Line: 1 to 1 | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Lab 4 | ||||||||||||||||||||||||
> > | Lab 4: PID Control and Virtual Wall | ||||||||||||||||||||||||
In this lab, we describe how a PID controller is tuned. We describe the effects of each individual terms in the PID controller (i.e. Proportional, Integral and Derivative terms). We describe an implementation of a virtual wall as a one sided spring. We also describe effects of changing sampling rates and introducing delays in the control loop. | |||||||||||||||||||||||||
Line: 8 to 8 | |||||||||||||||||||||||||
Proportional Controller | |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | ![]() ![]() | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | ![]() ![]() ![]() | ||||||||||||||||||||||||
See video here: http://www.youtube.com/watch?v=2-08aaWPc2M&feature=youtu.be![]() PD Controller | |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | PID Controller | ||||||||||||||||||||||||
> > | Fig 3. Low Derivative Gain Constant | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | Implementation of Virtual Wall | ||||||||||||||||||||||||
> > | Now, we introduce a small derivative gain constant Kd = 0.03. This derivative gain stabilizes the controller by damping the oscillation be decaying the amplitude of consecutive overshoot and undershoot. For small perturbances, this small gain is sufficient to stabilize the system.
![]() ![]() ![]() | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | Other ParametersIn the following images, the two extreme positions of the rotatory shaft are shown. Correspondingly, we can observe the displacement of the linear shaft to be around 10mm. | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | ![]() ![]() | ||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||
< < | See Video here: http://www.youtube.com/watch?v=1uL_xB_lVZE&index=5&list=PLFNjF5XN33kHVeIN8pdtEKfSgrSi6UhiO![]() | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | |||||||||||||||||||||||||
> > | PI ControllerIntegral gain is applied to the sum of error accumulated to over time. This gain is applied to systems that cannot reach its steady state value. In our example described above, the system was able to reach the steady state because it was strong enough to produce a momentum to bring the system to its new target state and damp enough to avoid oscillation. If the system was underactuated with low proportional gain we observed a steady state error as in Fig 1. In Fig 7, we increase the Kp term [Note: the figure shows the final value of Kp and Kd but we are describing how the graph evolves] to observe an oscillation that damps but still produces a steady state error. Now we add an integral gain Ki= 0.1. When we perturbe the system for sometime to let the error to accumulate on the integrator, it damps to slowly, ends with a steady state error. Now, the integral gain slowly corrects the position to final steady state. What if we increase the Ki gain to bring steady state faster. NO!!!. Because the integral gain is applied to cumulative error its value can easily reach the limiting value of the datatype being used to store the error. The effect of the integral term could easily make the system unstable. In this example, we introduce a sustained perturbance on an increased integral gain system with Ki=0.53, we observe the system go unstable. This instability can be attributed to slow reacting nature of the integrator gain and integrator winding up to datatype limitations.![]() PID Controller and other parametersNow that we have observed the effects of proportional, integral and derivative gains of a system. Lets use all these parameters in our system. BAD IDEA!!! First, need to understand our system and if we need a PID controller or not. Currently, we are running our PID controller every milliseconds. Our system is able to tuned well in Fig 6 using a PD controller. We can say that, our system can be fairly stabilized using a linear controller like a PID with not integral gain. But, if our system was not linear, would a PID control be able to control the sytem? We observed our system going a little bouncy when we decreased the sampling rate to 100ms (i.e. PID controller runs ten times every second) of the PID control loop. When the sampling rate is decreased, the system has more time to respond and the controller has more time to observe the effects of its actions. This can make the system slow and also very sensitive to gains because all the observations are longer time leading to larger values of errors. With a Kp gain = 0.4 and a sampling time Ts = 100ms, we see in Fig 5. the system fails to keep track of its action and senses.![]() Implementation of Virtual WallWe implement virtual wall as controller that operates on one side of the target position. We assume that the wall boundary is at position x = 0 and there is free space at x < 0. First we test our system using a single P controller. The proportional controller behaved like a spring as shown in Fig 9 and video![]() ![]() ![]() ![]() | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < | -- BikramAdhikari - 21 Jan 2014 | ||||||||||||||||||||||||
> > | Fig 10. Stiffer Virtual Wall system video![]() | ||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > | ReflectionsIn this lab, we learnt about the effects of different gain terms in PID. I learnt that, each of these gain terms have different effects and we should understand if our system needs any or all of the gain terms in a PID control equation. My experimentation with PID control suggests that, we should keep the system overactuated to be able to have a robust control. Our Twiddler when not boosted by additional power supply could not produce enough torque to hold a loaded twiddler (it failed when my hand was on the twiddler). So, our system must have enough power to be able to move under loaded condition. Sampling as fast as possible is equally important as sampling at consistent time. Simulating a virtual wall was a good exercise of tuning a PID Controller. | ||||||||||||||||||||||||
-- BikramAdhikari - 14 Mar 2014 | |||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Lab 4In this lab, we describe how a PID controller is tuned. We describe the effects of each individual terms in the PID controller (i.e. Proportional, Integral and Derivative terms). | ||||||||
Changed: | ||||||||
< < | We also describe effects of other related parameters in the PID control algorithm such as
design 3 puppets that can actuate at 1mm, 10mm and 100mm. Given below is a description to each individual action puppets
Click here![]() | |||||||
> > | We describe an implementation of a virtual wall as a one sided spring. We also describe effects of changing sampling rates and introducing delays in the control loop. | |||||||
Changed: | ||||||||
< < | 1mm Poker PuppetThis actuator is based on eccentric cam mechanism. There is a lever attached to the top of the cam shaft. This lever can only move in a distance ranging between minimum and maximum radius of the cam shaft. I have designed the difference to be approximately 1mm. This lever has a pen connected to it which bores on to the base plate. | |||||||
> > | Proportional Controller | |||||||
![]() ![]() ![]() | ||||||||
Deleted: | ||||||||
< < | Action
When the cam shaft rotates, the lever oscilates within 1mm distance. This oscillation is transferred as linear motion on to the pen. This pen only pops out (or pokes out) of the base plate when the cam shaft is at its minimum diameter position. These two extreme cam shaft positions are shown in the images below.
![]() ![]() | |||||||
See video here: http://www.youtube.com/watch?v=2-08aaWPc2M&feature=youtu.be![]() | ||||||||
Changed: | ||||||||
< < | 10mm Pen PuppetThis design transfer small circular motion to linear action. The total displacement is about 10mm. The rotatory shaft can rotate on one direction until the string is completely unwounded from the shaft. In the other direction, it can rotate only up to the position where the linear shaft's string lock is on its top. The rotatory shaft uses friction based locking mechanism to lock the linear shaft at a particular position. This design is inspired from traditional Nepalese instrument called "Sarangi". | |||||||
> > | PD Controller | |||||||
Changed: | ||||||||
< < | ![]() ![]() ![]() ![]() | |||||||
> > | PID Controller | |||||||
Changed: | ||||||||
< < | Action | |||||||
> > | Implementation of Virtual Wall | |||||||
Added: | ||||||||
> > | Other Parameters | |||||||
In the following images, the two extreme positions of the rotatory shaft are shown. Correspondingly, we can observe the displacement of the linear shaft to be around 10mm.
![]() | ||||||||
Line: 42 to 29 | ||||||||
See Video here: http://www.youtube.com/watch?v=1uL_xB_lVZE&index=5&list=PLFNjF5XN33kHVeIN8pdtEKfSgrSi6UhiO![]() | ||||||||
Deleted: | ||||||||
< < | 100mm Arch PuppetThis arch puppet transfer circular motion of small radius to an arch motion of larger radius. The small rotating link was designed to half approximately half the radius of large rotating link. The connecting link between the two rotating links is arbitrarily chosen. In this design, the spacing between to rotating links on the base was varied to achieve approximately 100mm arch motion.![]() ![]() ![]() ![]() ![]() | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Lab 4In this lab, we describe how a PID controller is tuned. We describe the effects of each individual terms in the PID controller (i.e. Proportional, Integral and Derivative terms). We also describe effects of other related parameters in the PID control algorithm such as design 3 puppets that can actuate at 1mm, 10mm and 100mm. Given below is a description to each individual action puppets Click here![]() 1mm Poker PuppetThis actuator is based on eccentric cam mechanism. There is a lever attached to the top of the cam shaft. This lever can only move in a distance ranging between minimum and maximum radius of the cam shaft. I have designed the difference to be approximately 1mm. This lever has a pen connected to it which bores on to the base plate.![]() ![]() ![]() ![]() ![]() ![]() 10mm Pen PuppetThis design transfer small circular motion to linear action. The total displacement is about 10mm. The rotatory shaft can rotate on one direction until the string is completely unwounded from the shaft. In the other direction, it can rotate only up to the position where the linear shaft's string lock is on its top. The rotatory shaft uses friction based locking mechanism to lock the linear shaft at a particular position. This design is inspired from traditional Nepalese instrument called "Sarangi".![]() ![]() ![]() ![]() ![]() ![]() ![]() 100mm Arch PuppetThis arch puppet transfer circular motion of small radius to an arch motion of larger radius. The small rotating link was designed to half approximately half the radius of large rotating link. The connecting link between the two rotating links is arbitrarily chosen. In this design, the spacing between to rotating links on the base was varied to achieve approximately 100mm arch motion.![]() ![]() ![]() ![]() ![]() |