QNET Experiment #01: DC Motor Speed Control DC Motor Control

QNET Experiment #01: DC Motor Speed Control DC Motor Control
Quanser NI-ELVIS Trainer (QNET) Series:
QNET Experiment #01:
DC Motor Speed Control
DC Motor Control Trainer (DCMCT)
Student Manual
DCMCT Speed Control Laboratory 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 Assignment............................................................................................................2
4.1. Exercise: Open-loop Modeling...................................................................................3
5. In-Lab Session.....................................................................................................................5
5.1. System Hardware Configuration..................................................................................5
5.2. Experimental Procedure...............................................................................................5
Revision: 01 Š Page: i
DCMCT Speed Control Laboratory Manual
1. Laboratory Objectives
The objective of this experiment is to design a closed-loop control system that regulates the
speed 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 proportionalintegral, or PI, 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. DCMCT Plant Presentation
3.1. Component Nomenclature
As a quick nomenclature, Table 1, below, provides a list of the principal elements
composing the DC Motor Control Trainer (DCMCT) system. Every element is located and
identified, through a unique identification (ID) number, on the DCMCT plant represented in
Figure 1.
ID #
Description
Description
ID #
1
DC Motor
3
DC Motor Case
2
Motor Encoder
4
Disc Load
Table 1 DCMCT Component Nomenclature
Revision: 01 Š Page: 1
DCMCT Speed Control Laboratory Manual
Figure 1 DCMCT Components
3.2. DCMCT Plant Description
The DCMCT system consists of a DC motor equipped with a servo motor driving a disc
load. The motor input is a voltage with a range of ±24V. The motor has an encoder that
measures its position, a digital tachometer that measures its speed, and a current sensor to
measure the actual current being fed into the motor.
It is assumed that the QNET system is properly configured as dictated in Reference [1].
4. Pre-Lab Assignment
This section must be read, understood, and performed before you go to the laboratory
session.
The purpose of the experiment is to introduce concepts of control by investigating the
characteristics and behaviour of a DC servo motor. As a result, it is important to become
familiarized with the physical characteristics of the motor.
The DC motor has both electrical and mechanical properties. For the various parameters
defined in Table 2, the electrical equations describing the open-loop response of the DC
motor are
Revision: 01 Š Page: 2
DCMCT Speed Control Laboratory Manual
V m ( t ) − R m I ( t ) − E emf ( t ) = 0
[1]
Eemf( t ) = Km ωm( t )
[2]
m
and
.
The mechanical equations describing the torque of the motor are
d
Tm( t ) = Jeq ⎛⎜⎜ ωm( t ) ⎞⎟⎟
⎝ dt
⎠
and
Tm( t ) = Kt I ( t )
m
,
where Tm, Jeq, ωm, Kt, Km, and Im are described in Table 2.
Symbol
[3]
[4]
Description
Unit
V
Vm
Motor terminal voltage
Rm
Motor terminal resistance
Ω
Im
Motor armature current
A
Kt
Motor torque constant
N.m/A
Km
Motor back-electromotive force constant.
ωm
Motor shaft angular velocity
rad/s
Tm
Torque produced by the motor
N.m
Jeq
Motor armature moment of inertia and load moment of
inertia
kg.m2
V/(rad/s)
Table 2 DC Motor Model Parameters
4.1. Exercise: Open-loop Modeling
Derive the open-loop transfer function, ωm(s)/Vm(s), representing the DC motor speed using
equations [1], [2], [3], and [4].
Revision: 01 Š Page: 3
DCMCT Speed Control Laboratory Manual
Solution:
Combine the mechanical equations by substituting the Laplace transform of equation [4]
into the Laplace of [3] and solve for current Im(s)
.
Substituting the above equation and the Laplace of [2] into the Laplace transform of [1]
gives
.
The open-loop transfer function of the DC motor is found by solving for ωm(s)/Vm(s):
.
Revision: 01 Š Page: 4
DCMCT Speed Control Laboratory Manual
5. In-Lab Session
5.1. System Hardware Configuration
This in-lab session is performed using the NI-ELVIS system equipped with a QNETDCMCT board and the Quanser Virtual Instrument (VI) controller file
QNET_DCMCT_Lab_01_Speed_Control.vi. Please refer to Reference [2] for the setup and
wiring information required to carry out the present control laboratory. Reference [2] also
provides the specifications and a description of the main components composing your
system.
Before beginning the lab session, ensure the system is configured as follows:
 QNET DC Motor Control Trainer module is connected to the ELVIS.
 ELVIS Communication Switch is set to BYPASS.
 DC power supply is connected to the QNET DC Motor Control Trainer module.
 The 4 LEDs +B, +15V, -15V, +5V on the QNET module should be ON.
5.2. Experimental Procedure
The sections below correspond to the tabs in the VI, shown in Figure 2. Please follow the
steps described below:
Step 1. Read through Section 5.1 and go through the setup guide in Reference [2]
Step 2. Run the VI controller QNET_DCMCT_Lab_01_Speed_Control.vi shown in
Figure 2. The speed control VI shown in Figure 2 is the top-level VI that will
guide you throughout the laboratory.
Revision: 01 Š Page: 5
DCMCT Speed Control Laboratory Manual
Figure 2 Overview of QNET-DCMCT Speed Control Laboratory VI
Step 3. As discovered in the pre-lab there are three characteristics that determine the
operation and behaviour of a DC servo motor:
(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.
These three open-loop model parameters will be identified.
Step 4. Select the Parameter Estimation tab that opens the sub-VI shown in Figure 3.
Revision: 01 Š Page: 6
DCMCT Speed Control Laboratory Manual
Figure 3 Parameter Estimation
Step 5. The current running through the motor armature, the speed of the motor shaft,
the motor terminal resistance, and the torque constant are measured using the
tachometer and the current sensor. They are displayed through the various
gauges shown in Figure 3. The input voltage of the motor, Vm, is controlled
using the knob in the top-center of the VI. The top-right panel contains an
Acquire Data button that stops the VI when pressed. Additionally, the panel
contains an Acquisition Time indicator that displays the running simulation time
of the VI, a control that can change the rate at which the analog controller are
sampled, and an LED that indicates whether the controller is maintaining realtime. Real-time is maintained when the VI does not loose any samples from the
sensors.
If the LED is red or flickers, it implies that there is insufficient
computational power for the VI to keep up with the sensors. In this case,
decrease the sampling rate and restart the VI by clicking on the Acquire Data
button to close the VI and selecting the Parameter Estimation tab to reload this
VI.
Step 6. Increment the voltage of the motor in steps of 1V starting at -5V to +5V. At
Revision: 01 Š Page: 7
DCMCT Speed Control Laboratory Manual
each step, measure the motor speed, motor current, and stall current. The stall
current is measured by holding the load such that the motor is no longer
spinning (i.e. stall the motor). Record your results in Table 3.
Motor Voltage (V)
Motor Speed
(rad/s)
Motor Current
(A)
Stall Current (A)
-5
-171
-0.189
-1.70
-4
-130
-0.180
-1.27
-3
-89
-0.172
-0.90
-2
-48
-0.169
-0.63
-1
-7
-0.180
-0.26
1
6
0.298
0.27
2
50
0.217
0.76
3
91
0.212
1.05
4
133
0.212
1.43
5
175
0.217
4.79
Table 3 Parameter Estimation Measurements
Step 7. Click on Acquire Data after all the measurements are taken to proceed with the
laboratory.
Step 8. These measurements are used to identify the physical parameters of your particular motor. Later, the mathematical model being developed is used to design
a controller. Ensure the same system used to develop the model is also used
when implementing the control system. As discussed earlier, there are three
model parameters to be identified – electrical resistance, motor torque constant,
and the equivalent moment of inertia.
Step 9. Recall that the The DC motor's electrical equations are
V m ( t ) − R m I ( t ) − E emf ( t ) = 0
[5]
m
and
Eemf( t ) = Km ωm( t )
.
As captured in equation [6], if the motor is not allowed to spin (i.e. motor
stalled) there is no back-emf voltage. Therefore if Eemf = 0V when I = Istall,
equation [5] becomes
[6]
Revision: 01 Š Page: 8
DCMCT Speed Control Laboratory Manual
Rm =
Vm( t )
I
stall
(t)
[7]
.
Step 10. The motor resistance can be estimated by copying your stall current
measurements from Table 3 into Table 5 and calculating Rm at each voltage step
using the expression in [7]. The estimate of the motor resistance can then be
found by taking the average over the ten measurements.
Motor Voltage (V)
Stall Current (A)
Estimated Resistance (Ω)
-5
-1.70
2.90
-4
-1.27
3.15
-3
-0.90
3.33
-2
-0.63
3.17
-1
-0.26
3.85
1
0.27
3.73
2
0.76
2.64
3
1.05
2.86
4
1.43
2.80
5
4.79
2.79
Average Electrical Resistance (Rm):
3.12
Table 4 Electrical Resistance Estimation
Step 11. The second model parameter to be found is the motor torque constant, denoted
by Kt. Given that in SI units Kt = Km, combining equations [5] and [6] and
solving for the torque constant gives
Vm( t ) − Rm I ( t )
m
Kt =
[8]
ω m( t )
.
The torque constant can be calculated at each voltage step using the motor
speed and the current recorded in Table 3, along with the estimated electrical
resistance in Table 4. The final estimate of the motor torque constant is found
Revision: 01 Š Page: 9
DCMCT Speed Control Laboratory Manual
by taking the average of the ten torque constants. Complete Table 5.
Motor Voltage
(V)
Motor Speed
(rad/s)
Motor Current (A)
Estimated Motor Torque
Constant
(N⋅m/A)
-5
-171
-0.189
0.0258
-4
-130
-0.180
0.0264
-3
-89
-0.172
0.0277
-2
-48
-0.169
0.0307
-1
-7
-0.180
0.0626
1
7
0.298
0.0100
2
50
0.217
0.0265
3
91
0.212
0.0257
4
133
0.212
0.0251
5
175
0.217
0.0247
Average Motor Torque Constant (Kt):
0.0285
Table 5 Motor Torque Constant Estimation
Step 12. The final parameter needed to be calculated is the moment of inertia. In the case
of the QNET module, there is a disc load fastened to the motor shaft. The
moment of inertia of a disc rotating about its center is
[9]
m r2
Jl =
2 .
The moment of inertia of the disc used in the QNET systems is 0.000015 kg
m2. The motor shaft also adds to the moment of inertia of the system and varies
with each QNET module. The total equivalent moment of inertia, Jeq, will be
found by fitting the model to the actual system later.
Step 13. Click on the Open-Loop Properties tab and the VI shown in Figure 4 should be
loaded.
Revision: 01 Š Page: 10
DCMCT Speed Control Laboratory Manual
Figure 4 Open-Loop System Properties
Step 14. Enter the estimated values of Rm, Kt, and Jeq. The response should change
accordingly.
Step 15. The motor's step response is the response of the motor speed when subject to a
1V unit step. The bode plot maps the motor speed response to a given input
frequency. Note that the magnitude is in dB and decreases at higher
frequencies. Take this opportunity to investigate the model of the system by
varying the three model parameters and how each effects the step response,
bode plot, and transfer function. For instance, observe how the peak time rises
and the settling time decreases when the motor inertia Jeq increases.
Step 16. After the open-loop properties have been investigated, make sure the
parameters are set back to those originally identified. Select the Model Fitting
tab that load the VI shown in Figure 5 and continue with the laboratory.
Revision: 01 Š Page: 11
DCMCT Speed Control Laboratory Manual
Figure 5 Model Fitting
Step 17. As depicted in Figure 5, the scope displays the simulation of the motor speed
response, generated using the mathematical model developed, and the actual
motor speed response, measured using the tachometer sensor. The QNET motor
is being driven by the signal generator.
Step 18. Enter the estimated parameters Rm and Kt are into the model variables. 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 19. Adjust the inertia parameter Jeq until the simulated response begins to match the
actual response. As mentioned earlier, the inertia of the disc load is known but
the inertia of the motor shaft is not.
Remember to click on the Update Model button after changing a model
parameter for the changes to take effect in the simulation.
Step 20. Additionally, the motor torque constant, Kt, and the motor resistance, Rm, can be
adjusted to fine-tune the model fitting. Once the simulation matches the actual
response well, record the final Jeq, Kt, and Rm used and click on the Acquire
Data button to proceed to the control design. Record these parameters for
use in the next session, DCMCT Laboratory #2 – Position Control.
Revision: 01 Š Page: 12
DCMCT Speed Control Laboratory Manual
Model Fitted Parameter
Rm
Kt
Jeq
Measured
Value
Unit
3.12 Ω
0.0295 N⋅m/A
1.93E-005 kg⋅m2
Table 6 Model Fitted Parameters
Step 21. The Controller Design tab should now be selected. As shown in Figure 6, the
Motor Model block is the transfer function representing the open-loop system
and the PI Controller block is the control system to be designed. Both blocks
are in a negative feedback loop, hence making this system a closed loop control
system. By default, the reference input signal is a step of a 100 deg/s. The
control system should output a voltage to the motor that ensures the actual
motor speed achieves the desired speed.
Figure 6 Controller Design
Step 22. The two control knobs in Figure 6 change the proportional gain, Kp, and the
integral gain, Ki, of the controller. Vary the gains Kp and Ki as listed in Table 7
and record the resulting step response changes and Controller Performance
changes.
Revision: 01 Š Page: 13
DCMCT Speed Control Laboratory Manual
Kp
(V/rad)
Ki
Rise
Max. Over- Setting Steady-State
(V/rad.s) Time (s) shoot (%) Time (s)
Error (%)
0.00
0.50
0.103
22.300
0.719
0.0
0.03
0.50
0.120
1.050
0.299
0.0
0.05
0.50
0.131
-0.008
0.384
0.0
0.08
0.50
0.135
-0.007
0.581
0.0
0.10
0.50
0.132
-0.006
0.683
0.0
0.05
0.00
0.001
-0.270
0.128
36.3
0.05
0.25
0.334
-0.011
0.990
0.0
0.05
0.50
0.131
-0.008
0.384
0.0
0.05
0.75
0.078
0.724
0.145
0.0
0.05
1.00
0.067
3.980
0.257
0.0
0.55
0.04
0.137
0.274
0.244
0.0
Table 7 Controller Performance
Step 23. In general, the type of specification and performance required by a control
system varies depending on the need of the overall system and the physical
limitations of the system. Find controller gains Kp and Ki that best meet the
following requirements for the DCMCT system:
(1) Maximum rise time of 0.15 s.
(2) Overshoot should be less than 5 %.
(3) Settling time less than 0.25 s.
(4) Steady-state error of 0 % (i.e. measured motor speed should
eventually reach the speed command).
Step 24. Once the controller gains yield a closed-loop response that meets the required
specifications, enter the Kp and Ki gains used in the last row of Table 7 along
with the resulting response time-domain properties.
Step 25. Select the Controller Implementation tab to load the VI shown in Figure 7. 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 7,
plots the simulated motor speed from the mathematical model developed and
the actual closed-loop speed of the motor measured by the tachometer.
Revision: 01 Š Page: 14
DCMCT Speed Control Laboratory Manual
Figure 7 PI Controller Implementation
Step 26. Ensure the proportional and integral gains designed to meet the specifications
are set in the Controller Gains panel shown in Figure 7. The function generator
in the Desired Speed panel is used to generate the reference speed. Set the
commanded speed signal to a square signal with an amplitude of 100 degrees
per second.
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 27. If the simulated or actual closed-loop response no longer meet the
requirements, tune the controller in the Controller Gains panel. Record the final
Kp and Ki used and the resulting control performance properties of the closedloop response – rise time, overshoot, settling time, and steady-state error in
Table 8.
Revision: 01 Š Page: 15
DCMCT Speed Control Laboratory Manual
Specification
Measured
Value
Unit
Kp
0.04 V/rad
Ki
0.65 V/(rad.s)
Rise time
0.12 s
Overshoot
Settling time
Steady-state error
0.0 %
0.24 s
0.0 deg/s
Table 8 Actual Closed-Loop Performance
Step 28. Change the amplitude, frequency, and/or type of reference signal (sine,
sawtooth, and square) and observe the behaviour of the responses.
Step 29. 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: 16
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising