Me2009 - Control System Technology Lab Assignment 4: Hochiminh City University of Technology Mechatronics Department
Me2009 - Control System Technology Lab Assignment 4: Hochiminh City University of Technology Mechatronics Department
Me2009 - Control System Technology Lab Assignment 4: Hochiminh City University of Technology Mechatronics Department
1. INTRODUCTION
You have learned how to code for implementing a microcontroller through the Arduino
IDE for previous lab experiment No.1. As well, you have already been able to control a DC
motor with a feedback controller. This lab experiment will guide you on how to obtain a
Proportional, Integral, Derivative (PID) controller for a given system. You should obtain a
system modeling for any given control system by using physical laws and measurements or
system identification methods. The system modeling enables the development of a model-
based controller for the given system that usually comes with the controller parameters. For
the design of a PID controller, the most important thing is to determine its well-known
controller gains called as K p , K i , K d . There are several approaches to obtain these controller
parameters, such as the trial-and-error method, Nicole Ziegler tunning, and the model-based
control design method.
2. LAB METHODOLOGY
2.1 Problem Statement
This lab gives an example of speed control for a DC brushed motor. Before designing the
PID controller, you should achieve a system modeling of the given DC motor. The system
modeling describes the dynamic behavior output of the physical structure of the DC motor
when it is applied an input voltage. For DC motors made from well-known manufacturers as
Maxon, the motor parameters are provided fully through a document for the manufacture. In
the case of using a DC motor without given parameters, you should identify the parameters
through experiment.
In this lab experiment, the parameters of a DC motor are given as follows:
Table 1 DC motor specification
The equivalent circuit of the motor consists of a voltage source, a resistor, an inductor,
and a Back EMF, as shown in Figure 1.
di ( t )
v ( t )=i (t ) R + L + K b ω(t ) (1)
dt
where v(t) is the supply voltage for the DC motor, i(t) is the armature current, and ω (t)
is the rotational velocity.
The rotor torque is proportional to the armature current and is expressed as follows:
T =K t i(t) (2)
where K t is the motor torque constant and can be ideally obtained as K t =K b (¿ K ).
By applying Newton-Euler for both the mechanical part and the mechanical part, the
dynamic equation of the DC motor can be obtained as:
dω ( t )
Ki ( t )=J + bω(t ) (3)
dt
Taking the Laplace transform of Eq. (1), (3), it yields:
(sJ +b)
V ( s )=( R+ sL ) Ω(s)+ K Ω( s) (5)
K
Eq. (5) can be rearranged to obtain the plant transfer function G p:
Ω( s) K
G p= = (6)
V ( s) J . L. s + ( J . R+ L. b ) . s+( R . b+ K 2 )
2
By substituting the given parameters shown in Table 1 into Eq. (6), you can achieve the
plant transfer function of the given DC motor that allows you to estimate the rotational
velocity when you apply a supply voltage to the DC motor.
2.2 PID controller design
To be able to achieve the steady-state error of zero for a step input, the PID controller is
required to control the DC motor where the integral component is utilized to eliminate the
steady-state error, whereas the proportional and derivative terms control the rise time and the
maximum overshoot, respectively. The transfer function of the PID controller is expressed as
follows
Ki
G C ( s )=K p + +s Kd (7)
s
where K p , K i , K p are the controller gains.
By using the transfer function of the PID controller for a closed loop of the given system
of Eq. (6), the overall transfer function G(s)is achieved as:
G p . Gc
G= (8)
1+G p .Gc
Substituting the parameters shown in Table 1 into Eq. (8), it yields
( K ¿¿ d s2 + K p s + K i)
G ( s )=17. ¿ (9)
0.45 s3 + ( 17. K d +10.15 ) . s2 + ( 17. K p +6.945 ) . s+ 17. K I
It can be seen that the transfer function of the system expressed in Eq. (9) is a third orders
system with two zeros. For the sake of simplification, this lab experiment offers the method
that first involves calculating estimates the controller gains by setting K i=0 , and then it can
be fine-tuned by the trial-and-error approach. If you set K i=0, the control system of Eq. (9)
reduces to a second orders system with a zero.
9.( K d . s+ K p )
0.45
G ( s )= (10)
(17. K d +10.15) (17. K p+ 6.945)
s 2+ s+
0.45 0.45
The standard form of the second-order system is given by:
ω2n
2 2 (11)
s + 2ζ d ωn s+ω n
If you ignore the effect of the zero of Eq. (9), the damping ratio ζ d of the characteristic
equation of the standard form second-order system required for a maximum overshoot of
MP=1 % is calculated by:
−ζ d . π
2
(12)
e √ 1−ζ =MP
d
ζ d=0.826 (13)
Referring to [1], for ζ d=0.826<1 , the natural frequency of the characteristic equation
that meet the required rise time t rof 0.1 second is calculated by:
1−0.4167 ζ d +2.917 ζ 2d
t r= (14)
ωn
Solving Eq. (13) for ω n, it gives as
ω n=26.464 (15)
Then the denominator of the standard form second-order system that meets the
requirement of the rise time and the maximum overshoot is achieved as follows:
K d =0.56 (18)
From Eq. (17), solving for K p, it can get
K p =18.13 (19)
These controller gains are the estimates that can be used as a starting point to obtain the
required controller gains using an iterative approach. The integral term eliminates the steady-
state error for a step input, and it's magnitude determines the settling time. Therefore the
value of the integral gain can be increased until the settling time specification is met, and then
the other gains can be adjusted to ensure that the remaining specifications are also met.
2.3 Simulation Setup
This lab experiment guides you on how to simulate the dynamic behavior of the DC
motor under the control of a traditional PID controller that was designed in the previous
section. This lab experiment uses MATLAB Simulink to implement the simulation. First, you
launch MATLAB software, then start a new blank model in the Simulink environment.
Press “Ctrl” + “.” and type “DC motor” in the context menu with the Blocks tab to pick
the Simscape model of DC brushed motor as shown in Figure 2.
You can connect a block of Scope to the “W” terminal of the motion sensor to monitor the
rotor speed of the DC motor. It is noted that you might be required to use a utility block
called PS-Simulink converter (see Figure 5).
To implement the PID controller, you can use a subsystem and modify it by double-
clicking it with the designed PID controller in the previous section (see Figure 8).
3. EXPERIMENTAL CONTENTS
(Student submits the following pages to the Instructor after the experiment class)
1. Describe the behavior of the output response when you increase the K i controller gain.
_________________________________________________________________________
_________________________________________________________________________
2. Describe the behavior of the output response when you decrease the K p controller gain.
_________________________________________________________________________
_________________________________________________________________________
3. What controller gain will you tune to reduce the rise time? (Multi-choice is required)
☐K p ☐K i ☐K d
☐Increase ☐Decrease
4. What controller gain will you tune to reduce the overshoot? (Multi-choice is required)
☐K p ☐K i ☐K d
☐Increase ☐Decrease
5. Describe the procedure tunning to achieve the steady-state error of zero and the required
maximum overshoot and maximum rise time.
_________________________________________________________________________
_________________________________________________________________________
6. What thing does the ideal rotational motion sensor block represent in practice?
_________________________________________________________________________
7. How do you measure the load current in practice?
_________________________________________________________________________
8. What thing does the controlled voltage source block represent in practice?
_________________________________________________________________________
9. What thing does the subsystem block represent in practice?
_________________________________________________________________________
10. List the best controller gains which you have tuned to obtain the requirement.
K p =¿ K i=¿ K d =¿ Rise time: Overshoot:
11. Assume that you have to control a DC motor given in the below picture with part number
618572. Find out and list the specification of the given motor necessary for the
development of the PID controller.
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
12. List the new controller gains which you have tuned to obtain the requirement with the
given motor.
K p =¿ K i=¿ K d =¿ Rise time: Overshoot:
13. How much is the maximum voltage supplied to the DC motor?
_________________________________________________________________________
14. How much does the maximum armature current cross to the DC motor?
_________________________________________________________________________
15. Do you think that these values of questions 13 & 14 are reality?
☐Yes ☐No Explain why:
_________________________________________________________________________
_________________________________________________________________________