DC Control Method
DC Control Method
DC Control Method
QNET Experiment #02: DC Motor Position Control DC Motor Control Trainer (DCMCT)
Student Manual
Table of Contents
1. Laboratory Objectives.........................................................................................................1 2. References...........................................................................................................................1 3. DCMCT Plant Presentation.................................................................................................1 3.1. Component Nomenclature...........................................................................................1 3.2. DCMCT Plant Description..........................................................................................2 4. Pre-Lab Assignments...........................................................................................................2 4.1. Pre-Lab Exercise #1: Open-loop Modeling.................................................................3 4.2. Pre-Lab Exercise #2: System Type..............................................................................4 4.3. Pre-Lab Exercise #3: Closed-loop Transfer Function.................................................7 4.4. Pre-Lab Exercise #4: Peak Time and Overshoot.........................................................8 5. In-Lab Session...................................................................................................................13 5.1. System Hardware Configuration................................................................................13 5.2. Experimental Procedure.............................................................................................13
Revision: 01
Page: i
1. Laboratory Objectives
The objective of this experiment is to design a closed-loop control system that regulates the position of the DC motor. The mathematical model of a DC motor is reviewed and its physical parameters are identified. Once the model is verified, it is used to design a proportional-integral-derivative, or PID, controller. Regarding the Gray Boxes: The gray boxes present in the instructor manual are not intended for the students as they provide solutions to the pre-lab assignments and contain typical experimental results from the laboratory procedure.
2. References
[1] NI-ELVIS User Manual [2] DCMCT User Manual [3] QNET Experiment #01: DC Motor Speed Control
Revision: 01
Page: 1
4. Pre-Lab Assignments
This section must be read, understood, and performed before you go to the laboratory session. There are three pre-lab assignments that need to be completed before the in-lab session. The first exercise is deriving the open-loop model of the DC motor position. In Pre-Lab Exercise 4.2, a simple feedback system is used to analyze some properties of the DC motor system. The closed-loop system using a given controller is to be derived in Pre-Lab Exercise 4.3 and its control gains are designed to meet certain specifications in the last assignment (i.e. Pre-Lab Exercise 4.4). Before beginning the exercises, the elecrical and mechanical equations describing a DC motor are summarized and the model paramater used are given. For the various parameters
Revision: 01
Page: 2
[2]
The mechanical equations describing the torque of the motor are d2 Tm( t ) = Jeq 2 m( t ) dt and
Tm( t ) = Kt I ( t )
m
[3]
[4] , where Tm, Jeq, m, Kt, Km, and Im are described in Table 2. This model does not take into account friction or damping. Symbol Vm Rm Im Kt Km m Tm Jeq Description Motor terminal voltage Motor terminal resistance Motor armature current Motor torque constant Motor back-electromotive force constant. Motor shaft angular velocity Torque produced by the motor Motor armature moment of inertia and load moment of inertia Unit V A N.m/A V/(rad/s) rad/s N.m kg.m2
Revision: 01
Page: 3
Solution: Combine the mechanical equations by substituting the Laplace transform of equation [4] into the Laplace of [3] and solving for current Im(s) [s1] . Substituting the above equation and the Laplace of [2] into the Laplace transform of [1] gives [s2] . The open-loop transfer function, denoted G(s), of the DC motor is found by solving for m(s)/Vm(s): . [s3]
Revision: 01
Page: 4
Revision: 01
Page: 5
Revision: 01
Page: 6
Find the closed-loop transfer function using G(s) found in Exercise 4.1 and the PV control law in [5]. Figure 4 may be used as a guide. HINT: Refrain from subsituting the open-loop transfer function G(s) until then final form of the closed-loop expression has been reached.
Revision: 01
Page: 7
[s14]
The closed-loop transfer function is finalized by inserting open-loop model [s3] into expression [s14], resulting in [s15] .
Symbol tp Mp ts ess
Unit
deg
As shown in Exercise 4.2, the steady-state error of the closed-loop system is already zero. Thus the fourth specification, at least theoretically, is already satisfied. The settling time will be adjusted in the laboratory session.
Revision: 01
Page: 8
The peak time and overshoot of the closed-loop response need to satisfy the specifcations given in Table 3. The closed-loop transfer function using the PV controller, attained in Exercise 4.3, is a 2nd order system of the form
H( s ) = n
2 2
s 2 + 2 n + n
[6]
where n is the natural frequency and is the damping ratio. The peak time and overshoot of H(s) is tp = [7] 1 2
n
and
Mp = e
1 2
[8] ,
where 0 <1. The PV control gains are now to be designed. First, the natural frequency and damping ratio must be expressed in terms of the control gains and the DC motor parameters. The minimum damping ratio and natural frequency needed to meet the time peak and overshoot specifications in Table 3 can be calculated using equations [7] and [8]. Finally given that the minimum damping ratio and natural frequency is known and by solving for the Kp and Kv gains in the n and expressions derived, the PV gains needed to attain this desired closed-loop response can be found. Find the natural frequency expression n(Kp) and the damping ratio equation (Kp,Kv) that results in the the closed-loop transfer function you found in Exercise 1.3 being equal to H(s) given in [6].
Revision: 01
Page: 9
Find the minimum damping ratio required to satisfy the overshoot requirement in Table 3 using expression [8]. Then using min and peak time expression [7], find the minimum natural frequency needed to satisfy the peak time specification given in Table 3. Express both in terms of the model parameters and evaluate them numerically using the DC motor model parameters in Table 4. Symbol Rm Kt Km Jeq Description Motor terminal resistance Motor torque constant Motor back-electromotive force constant Motor armature moment of inertia and load moment of inertia. Value 2.50 s 0.020 Nm/A 0.020 V/(rad/s) 2.00E-005 kgm2 Unit
Revision: 01
Page: 10
The damping ratio must be this or larger for the first peak to overshoot less than or equal to 5%. Using relationship [7], the time of the first peak of the response is less than tp when the the natural frequency n satisfies [s20] . The minimum natural frequency to achieve a peak time of tp=0.15 seconds is , using damping ratio [s19] and expression [s20]. [s21]
Find the control gains needed to meet the specifications using the expressions found in the first part of this exercise and using the minimum damping ratio and natural frequency calculated above. Express Kp and Kv in terms of the model parameters, n, and , and give the numerical result of the control gains.
Revision: 01
Page: 11
For a DC motor plant with the parameters in Table 4, the peak time and overshoot of the closed-loop response will meet the specifications in Table 3 given that the proportional gain and the velocity gain satisfy the [s23] and [s25], respectively.
Revision: 01
Page: 12
Revision: 01
Page: 13
Step 3. In the previous laboratory, Reference [3], the three DC motor parameters given below were identified for a particular DCMCT unit: (1) Motor Electrical Resistance (Rm) An electrical property of a motor. It describes the motor's response to a given voltage and determines the amount of current able to flow through the motor. (2) Motor Torque Constant (Kt) Describes the torque a motor generates and is directly proportional to the current going through the motor. Note that the electromotive force constant, Km, is equal to the motor torque constant Kt. (3) Moment of Inertia (Jeq) The moment of inertia of the disc load and the motor shaft. The three model parameters found in the last laboratory, Reference [3], may not represent the current DCMCT module being used accurately because a different QNET unit may be being used. For this reason, the model fitting procedure is redone to verify that the parameters in the transfer function developed in Exercise 4.1 represents the actual system. Step 4. Select the Model Fitting tab that loads the VI shown in Figure 6 and continue with the laboratory.
Revision: 01
Page: 14
Step 5. As depicted in Figure 6, the scope displays the simulation of the motor speed response, generated using the mathematical model developed in the last laboratory, and the actual motor speed response, measured using the tachometer sensor. The QNET motor is being driven by the signal generator. The Acquire Data button stops the VI and continues to the next step of the laboratory. Also in the top panel shown in Figure 6 is the simulation time readout, the sampling rate, and the RT LED that indicates if real-time is being held. Slow down the sampling rate if the RT LED is either RED or flickering between GREEN and RED. For the new sampling rate to take effect, stop this controller by clicking on the Acquire Data button and return to the Model Fitting tab to reload this sub-VI. Step 6. Enter the parameters Rm and Kt into the model variables that were derived in the DC motor speed control laboratory, Reference [3]. Select the Update Model button and notice that the simulation on the plot changes because it is simulating the system using the model with new parameters. Step 7. If there is a large discrepancy between the plots then a different QNETDCMCT module is being used than the system used to perform the parameter estimation in the previous speed control laboratory. Adjust the motor torque
Revision: 01
Page: 15
Unit
Step 9. The Controller Design tab should now be selected. As shown in Figure 7, the Motor Model block is the transfer function representing the open-loop system, the proportional and velocity compensators together compose the PV control system, as in Pre-Lab Exercise 4.3. By default, the reference input signal is a step of 90 degrees and the resulting closed-loop step response is shown in the top-right corner. The natural frequency and damping ratio are indicated above the plot. Further, the closed-loop poles are plotted on the s-plane in the middle graph of the VI and the locations of the poles are also given directly above the graph. Note that the locations of the poles is directly related to the damping ratio and natural frequency, which effects the resulting closed-loop response.
Revision: 01
Page: 16
Step 10. The two control knobs in Figure 7 change the proportional gain, Kp, and the velocity gain, Kv, of the controller. Vary the gains Kp and Kv as listed in Table 6 and record the Controller Performance changes.
Revision: 01
Page: 17
Step 11. Re-calculate the minimum control gains in Pre-Lab Exercise 4.4 needed to meet the specifications in Table 3 based on the model parameters of the current DCMCT module, recorded previously in Table 5. Record the PV control gains in Table 7. Control Gain Kp Kv Minimum Value to meet Specifications Unit
Table 7 Required PV control gains for current DCMCT unit to meet specifications
Step 12. Enter the minimum PV control gains calculated above in the Kp and Kv knobs in the Control Design VI shown in Figure 7. The resulting response should meet the specifications in Table 3 but some fine-tuning may be needed. The settling time was not accounted for in the design, thus the gains may have to fine-tuned to meet the settling time requirement. Once the controller gains yield a closedloop response that meets the required specifications, enter the Kp and Kv gains used in the last row of Table 6 along with the resulting response time-domain properties. Step 13. Select the Controller Implementation tab to load the VI shown in Figure 8. The controller designed is now to be implemented on the actual QNET DC motor system. The scope in Controller Implementation VI, as shown in Figure 8, plots the simulated motor position from the mathematical model using the parameters enterred and the actual closed-loop position of the motor measured by the encoder.
Revision: 01
Page: 18
Step 14. Ensure the proportional and velocity gains designed to meet the specifications , recorded in Table 7, are set in the CONTROLLER GAINS panel shown in Figure 8. The function generator in the DESIRED POSITION panel is used to generate the reference position. Set the commanded position signal to a square signal with an amplitude of 90 degrees at 0.1 Hertz. Implement the controller for the same system on which the model was obtained. This ensures the controller is not based on a model that may not represent your motor. Step 15. Record the resulting control performance properties of the actual measured motor position peak time, overshoot, settling time, and steady-state error in Table 8. If needed, use the zoom tools in the top-left corner of the scope to view a closeup of the plots.
Revision: 01
Page: 19
Unit
Step 16. Did the actual DC motor measurement meet all the specifications in Table 3? If not, give the specifications that were not met and provide an explanation why the PV control designed does not result in the desired properties when implemented on the actual system. Solution: The model and control system does not take into account any type of friction of damping. The steady-state error on the actual system may not be zero due to the Coulomb friction, or stiction, present in the actual system. Similarly, the overshoot on the actual system may be zero or less than the simulation because the model does not consider viscous damping. Energy is lost in the actual mechanical system through vibrations giving a response that is more dampened then the model would predict.
Step 17. Change the amplitude, frequency, and/or type of reference signal (sine, sawtooth, and square) and observe the behaviour of the responses. Step 18. Stop the controller implementation by clicking on the Acquire Data button and this will send you to the Mathematical Model tab. Shut off the PROTOTYPING POWER BOARD switch and the SYSTEM POWER switch at the back of the ELVIS unit. Unplug the module AC cord. Finally, end the laboratory session by selecting the Stop button on the VI.
Revision: 01
Page: 20