Open vinbo opened 3 years ago
Thanks for your helpful insight! Could you point me to what exactly you found incorrect in the code?
Much more than one or two points. My advice is, before you write the code, do understand the algorithm first, which is the only way that you can tell each curve you generated is right or wrong, analyse it theoretically.
Dear Telsang, can you plz explain this part of your code setpoint = 3*ones(1,length(timevector)); G_inertialComp = tf(1,[1 1]); ref = lsim(G_inertialComp,setpoint,timevector)'; G_inertialComp_ddt = tf([1 0],[1 1]); dref = lsim(G_inertialComp_ddt,setpoint,timevector)';
i'm facing the deficulty in understanding the derivative. how you have computed the derivative of Tf (1/1+s) to (s/s+1).
Dear Telsang, From your code I see that you are far from being understanding the algorithm. Publishing such code just wastes others' time. I strongly recommend that you retreat the code.