PID online simulator: Difference between revisions

From STorM32-BGC Wiki V1
Jump to navigation Jump to search
(Created page with "You can plan with the characteristics of an PID control loop yourself using this [http://www.rentanadviser.com/en/pid-fuzzy-logic/pid-fuzzy-logic.aspx online-simulator] here. ...")
 
No edit summary
Line 1: Line 1:
== Ideal PID values ==
You can plan with the characteristics of an PID control loop yourself using this [http://www.rentanadviser.com/en/pid-fuzzy-logic/pid-fuzzy-logic.aspx online-simulator] here.
You can plan with the characteristics of an PID control loop yourself using this [http://www.rentanadviser.com/en/pid-fuzzy-logic/pid-fuzzy-logic.aspx online-simulator] here.
First click on the "Plot Realtime" button and now you can play with the input value R(t) by moving the slider as if you would tell our gimbal to move to a new target position. In the diagram the red line shows your value R(t), the target value, and the blue line is the actual position. With the initial values for PID there is a short delay but the target value is reached quickly and without overshooting it. Nice.
First click on the "Plot Realtime" button and now you can play with the input value R(t) by moving the slider as if you would tell our gimbal to move to a new target position. In the diagram the red line shows your value R(t), the target value, and the blue line is the actual position. With the initial values for PID there is a short delay but the target value is reached quickly and without overshooting it. Nice.
Line 4: Line 7:
[[File:Pid-1-ideal.png]]
[[File:Pid-1-ideal.png]]


 
== D-parameter too high ==
Now increase D to 0.2, same behavior. When D=0.3 there are some oscillations in the diagram but the target value is reached after 5 seconds.
Now increase D to 0.2, same behavior. When D=0.3 there are some oscillations in the diagram but the target value is reached after 5 seconds.
Now increase D to 0.4. At first nothing does happen as there is no or almost no error. But even the slightest change kicks the logic into maximum oscillations that will never stop.  
Now increase D to 0.4. At first nothing does happen as there is no or almost no error. But even the slightest change kicks the logic into maximum oscillations that will never stop.  
Line 11: Line 14:
[[File:Pid-2-d-too-high.png]]
[[File:Pid-2-d-too-high.png]]


 
== P-parameter too high ==
Same behavior you will find when the P or I part gets too high. At P=1.2 I=0.5 and D=0.2 and changing the input value R(t) with the slider shows that the target value is reached quickly but with first oscillations already. Increasing P to 1.5 and it takes ages already until the target value is reached.  
Same behavior you will find when the P or I part gets too high. At P=1.2 I=0.5 and D=0.2 and changing the input value R(t) with the slider shows that the target value is reached quickly but with first oscillations already. Increasing P to 1.5 and it takes ages already until the target value is reached.  


[[File:Pid-3-p-too-high.png]]
[[File:Pid-3-p-too-high.png]]


== I-Parameter too high ==
And at I=15 (P=0.5; D=0.2) the target position is never reached again.  
And at I=15 (P=0.5; D=0.2) the target position is never reached again.  



Revision as of 14:54, 14 June 2014

Ideal PID values

You can plan with the characteristics of an PID control loop yourself using this online-simulator here. First click on the "Plot Realtime" button and now you can play with the input value R(t) by moving the slider as if you would tell our gimbal to move to a new target position. In the diagram the red line shows your value R(t), the target value, and the blue line is the actual position. With the initial values for PID there is a short delay but the target value is reached quickly and without overshooting it. Nice.

Pid-1-ideal.png

D-parameter too high

Now increase D to 0.2, same behavior. When D=0.3 there are some oscillations in the diagram but the target value is reached after 5 seconds. Now increase D to 0.4. At first nothing does happen as there is no or almost no error. But even the slightest change kicks the logic into maximum oscillations that will never stop. That is the reason why we need to tune the parameters not only from a static position, but also while oscillating already and in all the different location.

Pid-2-d-too-high.png

P-parameter too high

Same behavior you will find when the P or I part gets too high. At P=1.2 I=0.5 and D=0.2 and changing the input value R(t) with the slider shows that the target value is reached quickly but with first oscillations already. Increasing P to 1.5 and it takes ages already until the target value is reached.

Pid-3-p-too-high.png

I-Parameter too high

And at I=15 (P=0.5; D=0.2) the target position is never reached again.


The Starting Point

Set the [P], [I] and [D] value to zero. Without a P and I there will no position correction at all, the motor will just hold its current position.

Pid-4-I-too-high.png