0% found this document useful (0 votes)
74 views12 pages

DC Motor Control Lab: PI & PD Design

lectures
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views12 pages

DC Motor Control Lab: PI & PD Design

lectures
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ECE 416 Laboratory

Experiment # 1 – DC Motor I

1 Preliminaries
1.1 Laboratory Objectives
1. Identify the parameters of a DC motor.

2. Design a PI controller to regulate the speed of the motor. The controller parameters are
chosen by (a) online tuning; (b) calculation from the specifications.

3. Design a PD controller to regulate the position of the motor. The controller parameters
are chosen by (a) online tuning; (b) calculation from the specifications.

1.2 Hardware Components


• General purpose PC

• NI-E series data acquisition card

• NI ELVIS benchtop workstation

• Quanser QNET-010 DC Motor Control Trainer (DCMCT)

1.3 Software Components


• LabView 8.6 with the Control Design Toolkit and Simulation Module

• ECE416 Labview8.6 \ QNET init elvis [Link]

• ECE416 Labview8.6 \ DC Motor Controller \ 03-QNET DCMCT [Link]

• ECE416Labview8.6 \ DC Motor Controller \ 04-QNET DCMCT Speed [Link]

• ECE416Labview8.6 \ DC Motor Controller \ 06-QNET DCMCT Position [Link]

2 Background
The DC motor has both electrical and mechanical properties. The relevant parameters are
shown in Table 1. Neglecting the armature inductance, the mathematical model for the electrical
properties is given by
Vm (t) − Rm Im (t) − Eemf (t) = 0 (1)
where
Eemf (t) = kb ωm (t) = k ωm (t) (2)

1
Table 1: DC Motor parameters
Symbol Description Unit
Vm Armature voltage V
Rm Armature resistance Ω
Im Armature current A
Eemf Back-electromotive-force(EMF) V
kb Back EMF Constant V s/rad
k Torque constant (k = kb ) N m/A
ωm Shaft angular speed rad/s
Tm Torque Produced by the motor N m
J Equivalent moment of inertia of the motor shaft and load kg m2

Neglecting mechanical friction, the mechanical equation describing the torque of the motor is
dωm
J = Tm (t) = kIm (t) (3)
dt
The transfer function from the terminal voltage V to the shaft angular speed ωm is given by
K 1 Rm J
Gω,V (s) = ; where K = and τ = 2 (4)
τs + 1 k k
The transfer function can be identified by measuring Rm and k and calculating J.
The equivalent moment of inertia J is the sum of the moment of inertia of the shaft Jsh and the
moment of the inertia of the disk, given by 12 M r2 , where M is the mass of the disc and r is its
radius. For the DCMCT, Jsh = 9.46 × 10−6 kg m2 , M = 0.033 kg, and r = 0.0242 m. Hence,
J = 1.93 × 10−5 kg m2 .
The resistance Rm is measured by applying a constant voltage Vm while holding the shaft
stationary (by hand) and measuring the current Im , referred to in this case as the stall current
Istall . From Equation (1), the resistance Rm is given by Rm = Vm /Istall .
The torque constant k is measured by applying a constant voltage Vm and measuring the steady-
state speed ωss of the shaft. From Equation (4)

Vm
ωss = (5)
k
Hence k = Vm /ωss .
When the speed of the motor is regulated using a PI controller, the closed-loop system is
represented by the block diagram of Figure 1 and the closed-loop transfer function is given by

K(kp s + ki )
Gω,r (s) = (6)
τ s2 + (Kkp + 1)s + Kki

For a desired closed-loop characteristic polynomial of the form

s2 + 2ζω0 s + ω02 , with ζ < 1

2
r +  Vm ωm
ki K
- - kp + - -
 s τ s+1
6

Figure 1: Speed regulation of DC motor using PI controller


r +  Vm θm
- kp ki K
- + s
+ kd s -
s(τ s+1)
-

6

Figure 2: Position regulation of DC motor using PID controller

kp and ki are chosen as


2ζω0 τ − 1 ω02 τ
kp = , ki = (7)
K K
provided 2ζω0 τ > 1.
When the position of the motor is regulated using a PID controller, the closed-loop system is
represented by the block diagram of Figure 2 and the closed-loop transfer function is given by
K(kd s2 + kp s + ki )
Gθ,r = (8)
τ s3 + (Kkd + 1)s2 + Kkp s + Kki
For a desired closed-loop characteristic polynomial of the form

(s2 + 2ζω0 s + ω02 )(s + p0 ), with ζ < 1

kp , ki , and kd are chosen as

ω0 τ (ω0 + 2ζp0 ) ω02 p0 τ 2ζω0 τ + p0 τ − 1


kp = , ki = , kd = (9)
K K K
provided (2ζω0 + p0 )τ > 1.

3 Pre-Laboratory Assignments
1. Read the“Before You Start” from the Introduction Lab.

2. Derive the transfer function of Equation (4).

3. Derive the expression of Equation (5).

3
Figure 3: Modeling

4. Derive the transfer function of Equation (6).

5. Suppose kp and ki are chosen as in Equation (7) with ζ = 0.5. Predict the overshoot of
the step response when ζ = 0.5 and 2ζω0 τ >> 1 (Hint: Take into consideration the effect
of the zero of the transfer function).

6. Derive the transfer function of Equation (8).

7. Find the closed-loop transfer function of Figure 2 when a PD controller is used; that is,
when ki = 0. What is the steady-state error in this case? How would you choose kp and
kd for a desired closed-loop characteristic polynomial of the form

s2 + 2ζω0 s + ω02 , with ζ < 1

4 Laboratory Procedure
Turn on the ELVIS station and run the VI QNET init elvis [Link] continuously.

4.1 Modeling
Open the VI 03-QNET DCMCT [Link]; this opens the window shown in Figure 3. Run
the VI by clicking the white arrow icon located in the top left corner of the screen.

Measure the Armature Resistance

4
1. Enable the signal generator by clicking on the Start Generator button

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 0.00 V
Frequency = 0.40 Hz
Offset = 0.00 V
3. Select the Resistance tab and measure the bias current by clicking on the blue Insert
button. The data is automatically entered in the first row.

4. Apply -5V to the motor by changing the Offset to -5V. Once the motor starts spinning,
hold the wheel stationary by hand. While stationary click on Insert to record the measured
voltage and current in the second row of the table.

5. Repeat Step 4 for Offset voltages in the range between -5V to 5V and fill the table. Don’t
include small voltages, e.g., ±0.5 V, at which the motor does not spin.

6. Capture and save the screen

7. Disable the signal generator by clicking on the Stop Generator button (You may disable
and enable the signal generator in between steps as you change the offset voltage).

Measure the Torque Constant

1. Enable the signal generator by clicking on the Start Generator button

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 0.00 V
Frequency = 0.40 Hz
Offset = 0.00 V
3. Select the Back-EMF tab. Measure the bias current by clicking on the blue Insert button.
The data is enterred automatically in the first row.

4. Apply -5V to the motor by changing the Offset to -5 V. Once the motor starts spinning
click on Insert to record the measured voltage, current, and voltage in the second row of
the table.

5. Repeat Step 4 for Offset voltages in the range between -5V to 5V and fill the table. Don’t
include small voltages, e.g., ±0.5 V, at which the motor does not spin.

6. Capture and save the screen

7. Disable the signal generator by clicking on the Stop Generator button (You may disable
and enable the signal generator in between steps as you change the offset voltage).

5
Calculate the Voltage-to-Speed Transfer Function
1. Using the measured values of Rm and k, and the calculated value of J in the background
section, calculate the Voltage-to-Speed transfer function
2. Ensure the signal generator is enabled by clicking on the Start Generator button.
3. In Signal Generator set:
Signal Type = ’square wave’
Amplitude = 0.00 V
Frequency = 0.40 Hz
Offset = 0.00 V
4. Select the Transfer Function tab and click on the Calculate button to evaluate the transfer
function of the motor.
5. Examine the steady-state gain, K, and the time constant, tau, of the transfer function and
compare with your calculation in Step 1.
6. Capture and save the screen
7. Disable the signal generator by clicking on the Stop Generator button.
Show your work to the Lab Instructor before you move to the next step.

Model Validation
1. Ensure the signal generator is enabled by clicking on the Start Generator button.
2. In Signal Generator set:
Signal Type = ’square wave’
Amplitude = 2.00 V
Frequency = 0.40 Hz
Offset = 3.00 V
3. The motor should start to spin. Copy the computed model parameters by clicking on the
Set Model button and click on Update Model to apply them to the simulation.
4. Compare the simulated response with the actual response. Adjust the Speed (rad/s) scope
scales to see both the actual and simulated speeds (Right click on the chart and choose
Auto Scale Y).
5. Adjust K in the Model Parameters section to improve the steady-state accuracy of the
model. If needed, adjust tau to to improve the transient response accuracy.
6. Capture and save the screen
7. Repeat steps 2 through 6 with the Signal Generator set as
Signal Type = ’square wave’
Amplitude = 4.00 V
Frequency = 0.40 Hz
Offset = 0.00 V

6
Figure 4: Speed Control

8. Disable the signal generator by clicking on the Stop Generator button.

Show your work to the Lab Instructor before you move to the next step.

Stop the VI by clicking on the EXIT button, then close the window.

4.2 Speed Control


Open the VI 04-QNET DCMCT Speed [Link]; this open the window shown in Figure 4.
Run the VI by clicking the white arrow icon located in the top left corner of the screen.

PI Control by Parameter Tuning

1. Activate the control by clicking on the Start Control button. While carrying out the steps
of the experiment, you may stop the control by clicking on the Stop Control button and
then start it again as needed. Make sure the control is activated before you start any of
following steps.

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 50.0 rad/s
Frequency = 0.40 Hz
Offset = 100.0 rad/s

7
3. In the Control Parameters section set:
kp = 0.0400 V.s/rad
ki = 0.400 V/rad
bsp = 1.00
aw = 1.00
4. Click on the Update Control button. Examine the behavior of the measured speed, shown
in red, with respect to the reference speed, shown in blue, in the Speed (rad/s) scope.
Capture and save the screen.

5. Increment and decrement kp by steps of 0.005 V.s/rad and click on Update Control after
each change. Capture and save the screen in a few cases that represent the trend of the
response change.

6. Set kp to 0 V.s/rad, ki to 0 V/rad and click on Update Control. The motor should stop
spinning.

7. Increment the integral gain, ki, by steps of 0.05 V/rad and click on Update Control after
each change. Vary the integral gain between 0.05 V/rad and 1.00 V/rad. Capture and
save the screen in a few cases that represent the trend of the response change.

8. Stop the control by clicking on the Stop Control button.

Show your work to the Lab Instructor before you move to the next step.

PI Control according to Specifications

1. Ensure the control is enabled by clicking on the Start Control button.

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 50.0 rad/s
Frequency = 0.40 Hz
Offset = 100.0 rad/s
3. In the Model Parameters section set:
K = K rad/(V.s)
tau = τ s
where K and τ are the model parameters found in the modeling section.

4. In the Design Specifications section set:


zeta = 0.60
w0 = 20.0 rad/s
5. Click on Update Design to calculate a desired kp, ki, and set-point weight bsp. Set
these desired gains to the Control Parameters gains by clicking on Set Desired. In this
experiment we will not adjust the set-point weight bsp. Always reset its value
to 1 after clicking on the Set Desired button. Implement this controller by clicking
on Update Control. Capture and save the screen.

8
Figure 5: Position Control

6. Change the parameter zeta in increments of 0.1 in the range 0.5 to 0.9. After each change,
click on the Update Design, Set Desired, and Update Control to implement the new
controller. Observe the effect on the response. Capture and save the screens for zeta =
0.5 and 0.9.

7. Set zeta = 0.7 and vary the parameter w0 between 15 and 30 rad/s. After each change, click
on the Update Design, Set Desired, and Update Control to implement the new controller.
Observe the effect on the response. Capture and save the screens for w0 = 15 and 30
rad/s.

8. Stop the control by clicking on the Stop Control button.


Show your work to the Lab Instructor before you move to the next step.

Stop the VI by clicking on the EXIT button, then close the window.

4.3 Position Control


Open the VI 06-QNET DCMCT Position [Link]; this open the window shown in Figure 5.
Run the VI by clicking the white arrow icon located in the top left corner of the screen.

PD Control by Parameter Tuning


1. Activate the control by clicking on the Start Control button. While carrying out the steps
of the experiment, you may stop the control by clicking on the Stop Control button and

9
then start it again as needed. Make sure the control is activated before you start any of
following steps.

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 2.0 rad
Frequency = 0.40 Hz
Offset = 0 rad
3. In the Control Parameters section set:
kp = 1.25 V/rad
kd = 0 V.s/rad
ki = 0 V/(rad.s)
bsp = 1.00
bsd = 0
4. Click on the Update Control button. Examine the behavior of the measured speed, shown
in red, with respect to the reference speed, shown in blue, in the Speed (rad/s) scope.
Capture and save the screen.

5. Increment the derivative gain, kd, by steps of 0.01 V.s/rad and click on Update Control
after each change. Vary the derivative gain between 0 and 0.07 V.s/rad. Capture and save
the screen in a few cases that represent the trend of the response change.

6. Stop the control by clicking on the Stop Control button.

Show your work to the Lab Instructor before you move to the next step.

PD Control According to Specifications

1. Ensure the control is enabled by clicking on the Start Control button.

2. In Signal Generator set:


Signal Type = ’square wave’
Amplitude = 2.0 rad
Frequency = 0.40 Hz
Offset = 0 rad
3. In the Model Parameters section set:
K = K rad/(V.s)
tau = τ s
where K and τ are the model parameters found in the modeling section.

4. In the Design Specifications section set:


zeta = 0.70
w0 = 35.0 rad/s
p0 = 0

10
5. Click on Update Design to calculate a desired kp and Kd. Set these desired gains to the
Control Parameters gains by clicking on Set Desired. Implement this controller by clicking
on Update Control.

6. Click on Update Specs in the Time-Domain Specifications section to generate a simulated


peak time, Tp, and percentage overshoot, PO. Capture and save the screen.

7. Change the parameter zeta in increments of 0.1 in the range 0.5 to 0.9. After each change,
click on the Update Design, Set Desired, Update Control, and Update Specs. Observe the
effect on the response. Capture and save the screens for zeta = 0.5 and 0.9.

8. Set zeta = 0.7 and vary the parameter w0 between 15 and 30 rad/s. After each change,
click on the Update Design, Set Desired, Update Control, and Update Specs. Observe the
effect on the response. Capture and save the screens for w0 = 15 and 30 rad/s.

9. Stop the control by clicking on the Stop Control button.

Show your work to the Lab Instructor.

Stop the VI by clicking on the EXIT button, then close the window.
Stop the VI QNET init elvis [Link] and close the window.
Turn off the ELVIS station.

4.4 Lab Report Requirements


The lab report should include the following items:

• Introduction, objectives, setup, and conclusions

• Pre-lab assignments

• Collected data and captured screens

• Any observations or comments you have (e.g., something didn’t work as expected or sug-
gestions for improving the lab procedure)

• Answers to the following questions

Modeling

(1) Examine the computed resistances in the table and the average resistance. Explain the
variations in the calculated values.

(2) Examine the computed back-EMF constant in the table and the average back-EMF con-
stant. Explain the variations in the calculated values.

PI Speed Control: Parameter Tuning

(3) Describe the change in the response when you change kp while ki is fixed. Use the transfer
function (6) and root locus analysis to explain your observations.

11
(4) Describe the change in the response when you change ki while kp is fixed. Use the transfer
function (6) and root locus analysis to explain your observation.

PI Speed Control According to Specifications

(5) For zeta 0.6 and w0 = 20, calculate kp and ki using the expressions of Equation (7).
Compare with the values given by the VI.

(6) What effect does changing zeta have on the measured speed response? How about on the
control gains?

(7) What effect does changing w0 have on the measured speed response and the generated
control gains?

(8) Compare the control design by tuning versus the control design according to specifications.

PD Position Control: Parameter Tuning

(9) Describe the change in the response when you change kd while kp is fixed. Use the closed-
loop transfer function and root locus analysis to explain your observations.

(10) Did you observer a steady-state error for certain values of kd? Explain why. How can you
reduce the error to zero?

PD Position Control According to Specifications

(11) Compare the simulated peak time, Tp, and percentage overshoot, PO, with the measured
response.

(12) Describe the change in the response and the control gains when you change zeta while
w0 is fixed. Use the closed-loop transfer function and root locus analysis to explain your
observations.

(13) Describe the change in the response and the control gains when you change w0 while zeta
is fixed. Use the closed-loop transfer function and root locus analysis to explain your
observations.

12

You might also like