|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: PID Loops
So you could make an arm hold a certain position without a mechanical lock? I've been wondering how to get an arm to drive and hold a position in the vertical without it falling down and without using the window motors. is that what a PID loop does?
|
|
#2
|
||||
|
||||
|
Re: PID Loops
Quote:
|
|
#3
|
||||
|
||||
|
Re: PID Loops
If we have approx 30-35 ft.lbs. of torque from the weight of the arm, fp would defiantly move it with ease, but it won't stay in a position. What would be needed with a PID to make it work?
|
|
#4
|
||||
|
||||
|
Re: PID Loops
read this starting at page 23
http://www.cs.cmu.edu/afs/cs/academi...y_friction.pdf Basically, PID is a function that takes an input a target (set point) you want to achieve and your current error to this target and outputs the motor speed to get there. P refers to a term that is proportional to the error. It is used to achieve the desired rise time to get to the set point. However having a high P will cause the system to oscillate around the set point. D refers to a term that is proportional to he derivative of the error. It is used to dampen the system to reduced the oscillations. If you overly dampen the system, you may rob it of the power it needs to actually reach the set point. This is called steady state error. I refers to a term that is proportional to the integral of the error. It is used to address steady state error. Basically, as long as error persists, the system will try harder and harder to reduce the error. This may become dangerous because of wind up. E.g. say that you disable power to a motor for a moment. The I term will cause the speed output to rise as the error is not going away (the motor is disabled). When the motor is finally re enabled, it will go flying. Sometimes you can get away with just using P especially if there is a lot of friction in the system which would make it hard to shoot past the set point. Hope that helps. |
|
#5
|
||||
|
||||
|
Re: PID Loops
Quote:
|
|
#6
|
||||
|
||||
|
Re: PID Loops
I still don't understand to much about the details on how to find the derivative of the error (or the integral). I understand that the derivative of an equation is e.g.: instantaneous velocity, for instance F(x)' 4x^4 = 16x^3 (not pretending anything however I don't know the in depths of the derivatives all i know from second hand learning is the power rule). However my knowledge on integrals is null. How do you find the integral and derivative?
|
|
#7
|
||||
|
||||
|
Re: PID Loops
Quote:
All you need supply are: the setpoint (the target value), See attached screenshot of LabVIEW's PID Last edited by Ether : 13-03-2011 at 14:06. |
|
#8
|
||||
|
||||
|
Re: PID Loops
Computing the derivative is easy as it is just change over time. Computing the integral is a bit more involved. You can use Fourth order Runge-Kutta to estimate the integral
http://mathworld.wolfram.com/Runge-KuttaMethod.html http://doswa.com/blog/2009/01/02/fou...l-integration/ If you are using a PID function of some library, you probably don't need to worry about computing derivatives and integrals and will probably just need to pass it the desired set point and the current location/sensor reading (like in Labview) |
|
#9
|
||||
|
||||
|
Re: PID Loops
Quote:
"Euler's Method is the most common integration method for control systems . Control methods such as PID do not need exact integration to work well. This is because the purpose of the integral is usually to force the average error to zero to ensure that the controlled signal matches the command signal over long periods of time. Only rarely is there a need to control the integral of a signal. In those cases you may need a more accurate integration method." Control System Design Guide Second Edition George Ellis Page 82 |
|
#10
|
|||
|
|||
|
Re: PID Loops
I'm not a mathematician, but couldn't
Quote:
|
|
#11
|
||||
|
||||
|
Re: PID Loops
Quote:
If you are trying to move your car at 50 mph and currently, the error from this target is +10 mph, does it make sense to push the pedal down at 10 mph? A correlation does not mean an equivalent 1 to 1 relation. Another example is if you are trying to drive your robot 5 feet forward and the current error is 4 inches. Does it make sense to tell the motors to drive at 4 inches? Built into the k value is unit conversion among other things. Last edited by Chris27 : 13-03-2011 at 15:48. |
|
#12
|
||||
|
||||
|
Re: PID Loops
Quote:
On the other hand, suppose you are trying to control motor speed. You want to go 2000 rpm and you are presently going 1900 rpm. So the error is 100 rpm. Would it make sense to give the motor a voltage command which is roughly equal to 100 rpm? |
|
#13
|
||||
|
||||
|
Re: PID Loops
Quote:
|
|
#14
|
||||
|
||||
|
Re: PID Loops
We are currently running two denso window motors in tandem to power the joint with a surgical tubing counter balance. I'm just curious because when we ram the fp, it was WAY too fast and couldn't hold the weight in one position, but I've seen teams do it with much success.
|
|
#15
|
||||
|
||||
|
Re: PID Loops
when you "ran the fp" how did you run it? i.e. what total gear ratio did you use?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|