Different descriptions of PID gains

3 years 2 weeks ago #29533168 by LROBBINS
The user's manual says:

Try initially to only use a small value of I and no P or D:
P = 0
I = 1
D = 0

My question is what I = 1 means when setting this in either the configuration profile or via a script. In the profile is this Integral Gain: 1.0 or Integral Gain: 0.1? In script syntax is this setconfig(_KI, cc, 10) or is it setconfig(_KI, cc, 1)?

Please Log in or Create an account to join the conversation.

3 years 2 weeks ago #29533169 by blake
Hi Lenny,

As you may already be aware, MicroBasic currently cannot store or manipulate decimal values. For this reason the script syntax uses gain X10 to be able to work around this issue. When setconfig(_kp, 1, 25) is used this is the equivalent of setting KP to 2.5 and this is how it would be displayed in the configuration tab.

When setting the gains directly from the configuration tab the x10 multiple does not apply. The decimal value you enter is the actual gain value, not gain x10. So in the configuration tab if you enter P = 1 it is 1.0 not .1

Please Log in or Create an account to join the conversation.

3 years 2 weeks ago #29533171 by LROBBINS
That's what I figured, just wanted to be sure since the text has unity gain as 1 rather than 1.0. In other words, the syntax difference between the profile and script is the same for PID gains as it is for accel and decel.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.153 seconds