Lab Activity - Speed P and PI Control Loop Simulation
This is section 3.2 ("Speed P/PI control loop modelling") of the same handout as Lab Activity - DC Servomotor Simulink ModelingLaboratory activity to build a Simulink model of the laboratory DC servomotor that includes voltage saturation, DAC and encoder quantization, Coulomb friction and three alternative speed filters, with nominal parameters, step-by-step tasks S1 to S7 and a Matlab parameter script.Lab Activity - DC Servomotor Simulink Modeling →; it uses that model, the speed filters (33)-(35) defined there, and the feedback structure of The Feedback Control Scheme and RequirementsThe basic control scheme feeds the plant G(s) with the output of a controller C(s) acting on the tracking error e = r - y, giving the closed-loop transfer function W(s) = C(s)G(s) / (1 + C(s)G(s)); the requirement y close to r splits into steady-state conditions (small error for some references, disturbances, model uncertainty) and transient conditions on rise time, settling time and overshoot, which become a region of the complex plane where the poles of W(s) must lie.The Feedback Control Scheme and Requirements →.
Control loop
The controller input is the control error , where is the load-side speed measurement provided by the speed filter and the load-side speed reference. The controller output is the DAC input voltage . The controller is specified for an input in rad/s and an output in V; since the measurement and the reference are in rpm, a conversion gain rpm2rads from rpm to rad/s () is placed at the controller input.
Fig. 7a, the top model: a Repeating Sequence block wl_ref, a summing node producing e [rpm], the Speed controller (output u [V]), the DAC, the Voltage driver, the "DC motor + gearbox" (outputs thl [deg] and wl [rpm]), the Encoder, the gain pulse2deg, and the Speed filter whose output wl_meas closes the loop on the summing node.
wl_ref -->(+)-- e [rpm] -->[Speed controller]-- u [V] -->[DAC]-->[Voltage driver]-->[DC motor + gearbox]--> thl, wl
^- |
| v
wl_meas <--[Speed filter]<--thl_meas<--[pulse2deg]<--[Encoder]<-- thl [pulses]-----+Controller implementations (Fig. 7b and 7c):
- P controller:
rpm2radsgain,P gain, then a saturation block ("controller saturation") on . - PI controller: after
rpm2rads, two parallel branches (P gain;I gainfollowed by an Integrator1/s) are summed, followed by the controller saturation block.
Tasks
S8. Proportional controller.
S9. Test of the P loop. Use a square-wave speed reference with period s:
Compare the response with each of the three speed filters (33), (34), (35), with simulation parameters (final time s) as in S7 of Lab Activity - DC Servomotor Simulink ModelingLaboratory activity to build a Simulink model of the laboratory DC servomotor that includes voltage saturation, DAC and encoder quantization, Coulomb friction and three alternative speed filters, with nominal parameters, step-by-step tasks S1 to S7 and a Matlab parameter script.Lab Activity - DC Servomotor Simulink Modeling →. Typical results (Fig. 8): the measured speed stays below the reference (the error plot settles at a nonzero value, of the order of 50 rpm as read from the plot, in each half period), and the current and the input voltage have a ripple that is largest with the first-order filter. Verify that the control system cannot guarantee perfect steady-state tracking of the reference. Explain why, and how the steady-state tracking error is related to the controller gain.
The handout only poses these questions; the plant transfer function needed to answer them is in Modeling a DC ServomotorA permanent-magnet DC motor is modeled by an electrical equation with a back-EMF term and a mechanical equation with inertia and viscous friction, a gearbox just adds the load inertia and friction divided by N squared on the motor side, and for the laboratory servomotor (voltage driver plus gearmotor plus disc) this gives a transfer function from input voltage to load angle that reduces to a first-order lag times an integrator.Modeling a DC Servomotor →.
S10. PI controller. Replace (37) with a proportional-integral controller
Repeat the test of S9. Typical results (Fig. 9): the speed follows the reference with zero steady-state error (the error returns to zero, apart from noise, after each reversal), and the control voltage varies smoothly. Verify that the new system tracks the speed reference with zero steady-state tracking error and explain why. With the first-order filter (33) the error is noisy; with (34) and (35) it is much cleaner.
Versione ripasso
Loop. (rpm, converted with rpm2rads=2*pi/60), controller output in V to the DAC, plant: driver and gearmotor with Coulomb friction, measured speed from the encoder and a speed filter (33), (34) or (35).
S8-S9, P control. . Reference: square wave rpm, period s, simulate s with the settings of S7. Result: the speed does not reach the reference, a steady-state error remains, related to the gain; the ripple is largest with filter (33).
S10, PI control.
Result: zero steady-state tracking error thanks to the integral action; the noise on the error is still largest with the first-order filter.
Implementation: P branch plus I branch (Integrator) summed, then controller saturation block on .