QNET DCMCT Laboratory - Student Manual
QNET DCMCT Laboratory - Student Manual
Student Manual
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic
or mechanical, including photocopying, recording, storing in an information retrieval system, or
translating, in whole or in part, without the prior written consent of Quanser Inc.
Table of Contents
1. INTRODUCTION..........................................................................................................................................1
2. PREREQUISITES.........................................................................................................................................1
4. IN-LAB EXPERIMENTS...............................................................................................................................9
4.1. Modeling...........................................................................................................................................9
4.1.1. Bumptest................................................................................................................................................9
4.1.2. Model Validation.................................................................................................................................11
4.1.3. Exercises..............................................................................................................................................13
5. REFERENCES...........................................................................................................................................37
1. Introduction
This manual contains experimental procedures and lab exercises for the QNET DC Motor Control
Trainer (DCMCT). The DCMCT is depicted in Figure 1 and the hardware of the device is explained in
Reference QNET User Manual.
The prerequisites to run the LabVIEW Virtual Instruments (VIs) for the DCMCT are listed in Section 2
and described in Section 3. The in-lab procedures are given in Section 4 and split into three sections:
modeling, speed control, and position control. In Section 4.1, the bumptest method is used to find the
model parameters of the DC motor. This model is compared with the measured response by running the
simulation and actual system in parallel. The model parameters are then tuned for a better fit. In Section
4.2, a PI compensator is used to control speed of the motor. This section includes exercises that
demonstrates the effect of proportional and integral control, designing PI gains to meet specifications,
set-point weight, and tracking a triangular wave. In Section 4.3, a PID compensator is used to control
the position of motor. The effects of using only a PD controller is investigated and a PD controller is
designed for certain time-domain requirements. How the system handles disturbances when using PD
and PID compensators is then investigated. The exercises are given within the lab procedures and
labeled “Exercise”. In that case, enter your answer in the exercises number in the corresponding
section.
2. Prerequisites
The following system is required to run the QNET DCMCT virtual instruments:
If these are not all installed then the VI will not be able to run! Please make sure all the software
and hardware components are installed. If an issue arises, then see the troubleshooting section in
Reference QNET User Manual.
3.1. Summary
Table 1 below lists and describes the DCMCT LabVIEW VIs supplied with the QNET CD.
VI Description
QNET_DCMCT_Modeling.vi Run DC motor in open-loop.
3.2. Description
3.2.1. Modeling
The DCMCT Modeling VI, shown in Figure 2 and Figure 3, runs the DC motor in open-loop and plots
the corresponding speed and input voltage responses. This VI can be used to take speed and voltage
measurements of the responses, as illustrated in Figure 3, and runs a simulation of the DC motor in
parallel. Table 2 lists and describes the main elements of the QNET-DCMCT Modeling virtual
instrument front panel. Every element is uniquely identified through an ID number and located in
Figure 2.
4. In-Lab Experiments
4.1. Modeling
4.1.1. Bumptest
1. Open the QNET_DCMCT_Modeling.vi.
2. Ensure the correct Device is chosen, as shown in Figure 6
3. Run the QNET_DCMCT_Modeling.vi. The DC motor should begin spinning and the scopes
on the VI should appear similarity as shown in Figure 7.
4. In the Signal Generator section set:
Amplitude = 2.0 V
Frequency = 0.40 Hz
Offset = 3.0 V
5. Once you have collected a step response, click on the Stop button to stop running the VI.
6. Exercise 1: Attach the responses in the Speed (rad/s) and Voltage (V) graphs. See the QNET
User Manual for information on how to export a chart or graph to the clipboard.
7. Select the Measurement Graphs tab to view the measured response, similarly as depicted in
Figure 8.
8. Exercise 2: Use the responses in the Speed (rad/s) and Voltage (V) graphs to compute the
steady-state gain of the DC motor. Make sure you fill out Table 5. See the Bumptest Method
section in the QNET Practical Control Guide for details on how to find the steady-state gain
from a step response. Finally, you can use the Graph Palette for zooming functions and the
Cursor Palette to measure data. See the LabVIEW help for more information on these tools.
9. Exercise 3: Based on the bumptest method, find the time constant. Make sure you complete
Table 6 and see the Bumptest Method section in the QNET Practical Control Guide for
information on how to find the time constant of the step response.
10. Enter the steady-state gain and time constant values found in this section in Table 7. These are
called the bumptest model parameters.
7. Exercise 5: Tune the steady-state gain, K, and time constant, tau, in the Model Parameters
section so the simulation matches the actual system better. Enter both the bumptest and tuned
model parameters in Table 7.
4.1.3. Exercises
Exercise 1: Bumptest Response
0 1 2
0 1 2
0 1 2
• Frequency = 0.40 Hz
• Offset = 100.0 rad/s
5. In the Control Parameters section, enter the SLD PI control gains found in Exercise 5 and
make sure bsp = 0.00.
6. Stop the VI when you collected two sample cycles by clicking on the Stop button.
7. Exercise 6: Capture the measured SLD speed response. Make sure you include both the Speed
(rad/s) and the control signal Voltage (V) scopes.
8. Exercise 7: Measure the peak time and percentage overshoot of the measured SLD response.
Are the specifications satisfied?
9. Exercise 8: What effect does increasing the specification zeta have on the measured speed
response? How about on the control gains? Use the damping ratio equation given in the Peak
Time and Overshoot section of the QNET Practical Control Guide for more help if needed.
10. Exercise 9: What effect does increasing the specification w0 have on the measured speed
response and the generated control gains? Use the natural frequency equation found in the
Peak Time and Overshoot section of the QNET Practical Control Guide for more help if
needed.
• bsp = 1.00
4. Exercise 11: Compare the measured speed and the reference speed. Explain why there is a
tracking error.
5. Increase ki to 0.1 V/rad and examine the response. Vary ki between 0.1 V/rad and 1.0 V/rad.
6. Exercise 12: What effect does increasing ki have on the tracking ability of the measured signal?
Explain using the observed behaviour in the scope.
7. Stop the VI by clicking on the Stop button
4.2.5. Exercises
Exercise 1: Describe the Speed Response
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
Percentage overshoot PO %
Proportional gain kp V.s/rad
Integral gain ki V/rad
Percentage overshoot PO %
Proportional gain kp V.s/rad
Integral gain ki V/rad
0 1 2
0 1 2
0 1 2
Optional: You can also design a VI that simulates the DC motor first-order model with a PD
control and have it calculate the peak time and overshoot.
2. Exercise 5: Calculate the proportional, kp, and derivative, kd, control gains according to the
model parameters found in Section 4.1.2 and the specifications above.
3. Run the QNET_DCMCT_Position_Control.vi. You should see the DC motor rotating back
and forth.
4. In the Signal Generator section set:
• Amplitude = 2.00 rad
• Frequency = 0.40 Hz
• Offset = 0.00 rad
5. In the Control Parameters section, set the PD gains found in Exercise 5.
6. Exercise 6: Capture the position response found in the Position (rad) scope and and control
signal used in the Voltage (V) scope.
7. Exercise 7: Measure the peak time and percentage overshoot of the measured position
response. Are the specifications satisfied? If they are not, then give one possible reason why
there would be discrepancy.
8. Exercise 8: What effect does changing the specification zeta have on the measured position
response and the generated control gains? See the Peak Time and Overshoot section of the
QNET Practical Control Guide for more help.
9. Exercise 9: What effect does changing the specification w0 have on the measured position
response and the generated control gains? See the Peak Time and Overshoot section of the
QNET Practical Control Guide for more help.
10. Stop the VI by clicking on the Stop button.
• Amplitude = 0 rad
• Frequency = 0.40 Hz
• Offset = 0 rad
7. In the Control Parameters section set:
• kp = 2.0 V/rad
• ki = 0.0 V/(rad.s)
• kd = 0.02 V.s/rad
8. Apply the disturbance by clicking on the Disturbance toggle switch situated below the Signal
Generator.
9. Exercise 14: Examine the effect of the disturbance on the measured position. Attach a
response of the motor position when the disturbance is applied, record the obtained steady-
state angle, and compare it to the value estimated in Exercise 13.
10. Turn OFF the Disturbance switch
11. In the Control Parameters section set:
• kp = 2.0 V/rad
• ki = 2.0 V/(rad.s)
• ki = 0.02 V.s/rad
12. Apply the disturbance by clicking on the Disturbance toggle switch.
13. Exercise 15: Examine the effect of the disturbance on the measured position. Explain the
difference of the disturbance response with the integral action added and compare to the result
you obtained in Exercise 13.
14. Stop the VI by clicking on the Stop button.
4.3.4. Exercises
Exercise 1: Pure Proportional Control
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
Percentage overshoot PO %
Proportional gain kp V.s/rad
Derivative gain kd V/rad
Table 12: Effect of increasing damping ratio specification in position control.
Percentage overshoot PO %
Proportional gain kp V.s/rad
Derivative gain kd V/rad
Table 13: Effect of increasing natural frequency specification in position control.
0 1 2
0 1 2
0 1 2
0 1 2
0 1 2
5. References
[1] QNET User Manual
[2] QNET Practical Control Guide