Jump to content

PI controller for NXT


xavier30

Recommended Posts

Hi, i just tried to make a small PI (soon to be PID) controller for integer numbers, since there are no floating point awailable in the NXT. As i understand from the documentation provided with the NXT toolkit, there is a built in PID controller in the output properties for the NXT? Have any of you tested out this controller in LabVIEW (fishing for examples here :P , since i often fint this more explaining than the documentation itself, and im a bit lazy)

This is my own version of the PI controller for INT32, but im wondering if i should rather use U8 or something similar?

This controller multiplies the proportional gain and the integration time by the factor "Scale" so that you keep some of the desmal points which you otherwise would get from floating points. Then it scales down the output and saturates it to the proper limits of the actuator, and also prevents "windup" from the integer of the error.

Can some of you please give me some feedback of these blocs, and help me figure out if i did some calculating errors converting from double to integer?

(Bu the way, the scale defines the value you have to multiply KP, Ti and h with, Kp is the gain (opposite to PB which is 1/KP), Ti is the integral time relative to the scale and h is the step "length")

Cheers^^

X

Link to comment
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.