|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: NI Labview PID Encoder Feedback
Quote:
As for your specific system issues, it just looks like the constants aren't tuned properly. Read a little bit about PID Theory (also: wikipedia) and take a look at some tips on designing a good controller (the rest of that page is helpful too). You may also want to start with the Ziegler-Nichols method for tuning (start with all zero, bring P up until it oscillates, add D to dampen and add I to correct for steady state error. Just another note - if I remember, the LabVIEW implementation of the algorithm doesn't use Kp, Ki, and Kd as straight constants. It actually uses time constants for I and D (so it has Kp, Ti, and Td). You can see details of the NI implementation here. You can verify this in the help popup (ctrl-H) for the VI. Plan your constants accordingly. Quote:
Also, what is that .02 constant doing? Is it wired to dt? You can delete that - the PID VI will calculate it for you if unwired. Last edited by plnyyanks : 25-01-2014 at 17:22. |
|
#2
|
||||
|
||||
|
Re: NI Labview PID Encoder Feedback
We weren't very sure on how the time constants worked, but we all knew how the traditional constants worked. I guess you could use the NI PID, but the traditional kP kI and KD constants were easier for us to work with. I really like the diagrams and explanations though, I think I'll break them out the next time I'm explaining PIDs to the team
![]() |
|
#3
|
|||||
|
|||||
|
Re: NI Labview PID Encoder Feedback
Quote:
Here's the overall function: ![]() The P component (Kc * error): ![]() I [(Kc / Ti)integral(e)]: ![]() D (Kc * Td * d(error)/dt ): ![]() So, if you take a simple version of the formula like below... ![]() Then: Kp = Kc Ki = Kc / Ti Kd = Kc * Td Make sense? Last edited by plnyyanks : 25-01-2014 at 22:51. |
|
#4
|
||||||
|
||||||
|
Re: NI Labview PID Encoder Feedback
Quote:
|
|
#5
|
|||
|
|||
|
Re: NI Labview PID Encoder Feedback
Thank you to the people who have posted, I will try your suggestions as soon as I can. However, it seems there is some disagreement, so I'll pose a more specific question. If am I to use a PID loop to control the angle of our shooting arm, should I get the rate output or the distance output from the encoder? As I understand it, the rate becomes 0 as soon as the motor stops moving, so I'm uncertain as to how I'd implement moving the arm to a specific angular position with it.
|
|
#6
|
||||||
|
||||||
|
Re: NI Labview PID Encoder Feedback
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|