br3ttb / Arduino-PID-AutoTune-Library

416 stars 225 forks source link

Simulated input equation - Where does it come from? #17

Closed edgsc closed 5 years ago

edgsc commented 6 years ago

Hello, from where does the simulated input equation comes from?

input = (kpmodel / taup) (theta[0]-outputStart) + input(1-1/taup) + ((float)random(-10,10))/100;

What kind of dynamics? How was it linearized?

Thanks!!!

br3ttb commented 6 years ago

By "linearized" I assume you mean "discretized," as the model is already linear.

The model is a standard first order with dead time: taupdydt+y=kpmodeloutput(t-theta)

To discretize, replace dydt with (y- lasty)/deltaT and use algebra to simplify. For the code I assumed deltaT was constant and equal to 1

On Fri, Nov 10, 2017, 1:28 PM edgsc notifications@github.com wrote:

Hello, from where does the simulated input equation comes from?

input = (kpmodel / taup) (theta[0]-outputStart) + input(1-1/taup) + ((float)random(-10,10))/100;

What kind of dynamics? How was it linearized?

Thanks!!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/br3ttb/Arduino-PID-AutoTune-Library/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWL8odJV08vIM6JPx6s3DkBxA5B-iVuks5s1JXlgaJpZM4QZ8Em .