Proportional control alone limits the response we can achieve for the system. The closed loop root locus shows that the fastest settling time for the system, using only proportional control, is a 4 second. We can improve this response by adding a derivative control.
The root locus for the closed-loop system, when varying the proportional control, k, is shown below.
For small values of k the system has two real poles. One of those poles is between -1 and 0. This pole is the slower of the two and will dominate the response, so the response of the system with two real poles will always be slower than 4 seconds (Tsettling=-4/(real part of pole))
For large values of k the system has complex poles and the real part of the complex pole is always -1. Thus these poles all have a settling time of 4sec
Derivative control has the form
This can also be done using block diagrams and transfer functionswhere θ is the measured position, θd is the desired position and kp and kd are the feedback gains.
Now simplify the transfer function
The root locus is a plot of the roots of an equation as a single parameter is varied. In our case we have two parameters to vary, kp and kd. Our approach will be to hold kd constant and vary the kp. From that plot we pick a reasonable kp. Then hold kp constant and vary kd. You can work between these two root locus plots to find the desired value for both parameters. This is a trial an error process, but with time you will see patterns appear that make it fairly easy to hone in on kp and kd values that satisfy the design specifications.
The figure below shows the two root locus plots on one graph. Experiment with varying the parameters and notice how the root locus changes. The blue dot shows where the two graphs intersect corresponds to the roots of the closed-loop characteristic equation for the two selected values of kp and kd.
If you know the form of the characteristic equation for the closed-loop system, you can often solve directly for the k values. In our problem closed-loop characteristic equation is:
Compare this to the standard 2nd order form
Alternately if we know the desired close-loop pole locations we can solve for k directly. The key is that you must know the exact value for the pole locations and those must lie on the root locus. The desired pole locations from the root-locus graph are: s= -0.025±-0.025 i. Therefore the desired closed-loop equation must be
Use the following simulation to verify the solution. Select values for kp and kd, change the value for θdesired, and observe the system response. Pay attention to how much the system oscillates and how long it takes to settle. You should verify the system response by comparing what you observe to the close-loop poles for the system
In addition to tracking θdesired the system also rejects disturbances to the motor. Click and drag on the wheel. Note how the torque increases to resist the disturbance.
The final check in the design is to verify that the motor torque requirements don't exceed the physical limits of the system. This is the same check we perform on the proportional only controller. If this value of the torque exceeds the physical limits of the system you may need to reduce kp or kd.