ECSE 307: Linear Systems and Control Lab 5: Speed Control of Qnet DC Motor

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (4 votes)

1 Objectives
In this lab, we will design a controller for angular speed. We will use the identified transfer function
of the Qnet DC Motor in lab-03 to design a controller that matches some desired perfermances. We
will then use Matlab to drive the Qnet DC Motor and evaulate the designed controller.
2 The Open-loop System
2.1 Ressource files
Similary to previous labs, we provide a Matlab class which interfaces with the Qnet DC Motor.
1. Log in to myCourses and select the content folder Labs.
2. Download lab_05_matlab.zip.
3. Unzip the content in your Matlab workspace.
4. Open Matlab and navigate to the path where you have Lab_05_SpeedControl.m.
5. Run Lab_05_SpeedControl.m. You shouldn’t have any errors, you will have warnings that you can
ignore.
2.2 Qnet DC Motor model
The general form of the transfer function between the rotor angular speed Ω and the input voltage V
of a DC Motor (Figure 1) can be written as
H(s) = Ω(s)
V(s) =
Kt
(Js + b)(Ls + R) + KtKe

+ v(t)
R
i
L

+ e(t)
+

T, ω
Figure 1 A schematic diagram of a DC motor
We have seen in lab-03 that the Qnet DC Motor transfer function can be approximated to a first
order transfer function with DC gain G and time constant τ.
Ω(s)
V(s) =
G
τs + 1
ECSE 307: Linear Systems and Control
Fall 2017
Instructor: Aditya Mahajan
TA: Mohammad Afshari and Anas El Fathi
Page 2 of 4 November 6, 2017
where G = Kt
bR + KtKe
and τ =
JR
bR + KtKe
. The values of the G and τ might change from Qnet DC
Motor to another, however, we will use the following values for the controller design.
gain = 28.5; % DC gain
tau = 0.16; % Time constant
In open-loop form, we can represent the block diagram of this system as follow (Figure 2)
V(s) G
τs + 1 Ω(s)
Figure 2 Block diagram of the open-loop system.
We can simulate the open-loop system in Matlab by using lsim. For instance, in order to simulate
the response to a defined voltage signal one can do:
dt = 0.01; % Sampling time
T = 10; % Duration of simulation
time = 0:dt:T; % Define time vector
% Generate a voltage input signal
% equals 0 from [0 sec, 1 sec],
% equals 2 from [1 sec, 9 sec],
% equals 0 from [9 sec, 10 sec]
uSim = 0*(time<1) + 2*(time>=1 & time<T-1) + 0*(time>=T-1);
H = tf(gain, [tau 1]); % Define the transfer function.
ySim = lsim(H, uSim, time); % Simulate the transfer function H.
2.3 Question 1
We want to drive the Qnet DC Motor in the following square wave form Figure 3.
5 10 15 20 25
25
75
Time
Angular speed
Ω
Figure 3 Square wave with frequency 0.1 Hz.
ECSE 307: Linear Systems and Control
Fall 2017
Instructor: Aditya Mahajan
TA: Mohammad Afshari and Anas El Fathi
Page 3 of 4 November 6, 2017
1. In Matlab generate and plot a signal that mimics the shape of the square wave presented in
Figure 3.
2. What is the value of the voltage V that you should input to the Qnet DC Motor to get a steadystate angular speed of Ω = 25 ? Ω = 75 ?
3. Using these volage values, generate a square wave input signal that will make the Qnet DC Motor
follow the square wave form in Figure 3. Simulate and plot the response of the transfer function
H(s) to this signal.
4. Drive the Qnet DC Motor with this square wave input signal. Superpose both the test results and
the simulation results.
5. Discuss with your TA the following: Does the proposed model H(s) satisfactory describes the Qnet
DC Motor ? Do we achieve satisfactory resluts with open-loop ? What if the frequency of the
square wave was 5 times bigger ? (Include the discussion in the report).
3 Profile Tracking
3.1 Specifications
The objective of this section is to design a controller K(s) that enable us to to track the square wave
in Figure 4 with the following specifications:
• Steady-state error less than 5%.
• 5%-Settling time of 0.25 s.
• Overshoot less than 10%.
1 2 3 4 5
25
75
Time
Angular speed
Ω
Figure 4 Square wave with frequency 0.5 Hz.
The controller K(s) forms a unity feedback with the Qnet DC Motor , Figure 5 shows the block
diagram of the closed-loop system.
ECSE 307: Linear Systems and Control
Fall 2017
Instructor: Aditya Mahajan
TA: Mohammad Afshari and Anas El Fathi
Page 4 of 4 November 6, 2017
Ωref(s) ∑ K(s) G
τs + 1 Ω(s) + V(s)

Figure 5 Block diagram of the closed-loop system.
3.2 Question 2: P-controller
First let’s design a P-controller, i.e K(s) = kP.
1. In Matlab generate and plot a signal that mimics the shape of the square wave presented in
Figure 4.
2. Write the closed-loop transfer function between the input Ωref and the output Ω.
3. Design a controller K(s) = kP that meets the specifications. Notice that for a first order system,
the 5%-settling time (the time taken to get to 95% of the steady-state value and not oscillate after
this time) is around 3 times the time constant.
4. In Matlab simulate the system transfer function and plot both the output angular speed Ω and
the voltage V.
5. Drive the Qnet DC Motor in closed-loop with the P-controller that you have designed. Plot your
results superposed with your previously simulated results. Did your controller work as expected ?
6. The Qnet DC Motor have a voltage saturation of ±5 V, by looking at the plot of the simulated
voltage command, when does the voltage hits those saturations? Use the transfer function between
the input Ωref(s) and command voltage V(s) to give an upper-bound value of kP that keeps the
voltage between ±5 V.
7. Use the maximum value of kP to drive the Qnet DC Motor . Plot your results superposed to
simulated results.
8. What are the performance of this controller (Steady-state error, 5%-Settling time, Overshoot). How
does these perfermances compare to the desired specifications.
4 Assignement
In a report format, answer the laboratory questions. The report should contain:
• An introduction and a conclusion, outlining the purpose of the laboratory and what you have
learned.
• Explanation of the steps to answer the laboratory questions.
• All figures should have a legend and a caption.
• Include your code in the report appendix.
The assignment is due 7 days after your lab.