Chapter 01 - Introduction
Chapter 01 - Introduction
Introduction
Chapter 1
Introduction
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 1/7
1. Introduction 1.1 System analysis and design
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 2/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Assume that you are given a robot car. You are asked to design an automatic
controller for driving the car at a constant speed regardless of the road condition.
How many steps do you think to solve this problem?
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 3/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 4/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 5/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 6/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 7/7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Inputs Outputs
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 8/7
1. Introduction 1.1 System analysis and design
Design procedure
Plant
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 9/7
1. Introduction 1.1 System analysis and design
Design procedure
Control without measurement
???
???
???
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 10 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control with measurements
Speed
sensor
???
???
???
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 11 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control with measurements
Speed
sensor
???
???
???
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 12 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
What you should do? How many steps? Which ones?
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 13 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 1
Step 1. ...
Step 2. ...
...
Step n. ...
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 14 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 2
Assume that you are a CEO of a new company. It is required that your company
must produce at least 1000 products each month.
What you should do before running the company if you know nothing about the
company in advance?
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 15 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 2
???
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 16 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 2
Board
supervisor
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 17 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Control problem 2
Step 1. ...
Step 2. ...
...
Step n. ...
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 18 / 7
1. Introduction 1.1 System analysis and design
Design procedure
General plant
Disturbances
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 19 / 7
1. Introduction 1.1 System analysis and design
Design procedure
General control system
Disturbances
Sensors Noises
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 20 / 7
1. Introduction 1.1 System analysis and design
Design procedure
General question
There are how many steps on the process of control system design?
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 21 / 7
1. Introduction 1.1 System analysis and design
Design procedure
1. Study the system plant to be controlled and obtain initial information about
the control objectives.
2. Model the system and simplify the model if necessary
3. Analyze the resulting model determine its properties
4. Decide which variables are to be controlled controlled outputs
5. Decide on the measurements and manipulated variables what sensors and ac-
tuators will be used and where will they be placed.
6. Select the control configuration.
7. Decide on the type of controller to be used.
8. Decide on performance specifications based on the overall control objectives.
9. Design a controller.
10. Analyze the resulting controlled system to see if the specifications are satisfied
and if they are not satisfied modify the specifications or the type of controller.
11. Simulate the resulting controlled system either on a computer or a pilot plant.
12. Repeat from step 1 if necessary.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 22 / 7
1. Introduction 1.1 System analysis and design
Design procedure
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 23 / 7
1. Introduction 1.2 Dynamic systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 24 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
Consider the ”natural” growth rate and the ”carrying capacity” of the environment.
Suppose that there are only 2 types of animals: the predator (foxes) and the prey
(rabbits). They form a simple food-chain where the predator species hunts the prey
species, while the prey grazes vegetation.
The growth rate of rabbits is positive for zero fox, but decreases with increasing of
foxes. Besides, the growth rate of foxes is negative for zero rabbit, but increases
with increasing of rabbits.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 25 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
Let y1 denote the number of rabbits (prey), let y2 denote the number of foxes
(predator). The population growth is described by
ẏ1 = α1 y1
ẏ2 = α2 y2
Here the growth rate α1 for rabbits is positive for y2 = 0, but decreases with
increasing y2 . The growth rate α2 for foxes is negative for y1 = 0, but increases
with increasing y1 .
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 26 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
Let
α1 = 1 − 0.01y2
α2 = −1 + 0.02y1
or
ẏ1 = y1 − 0.01y1 y2
ẏ2 = −y2 + 0.02y2 y1
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 27 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
t0 = 0;
tfinal = 15;
y0 = [20; 20];
[t,y] = ode23(@lotka,[t0 tfinal],y0);
figure(1)
plot(t,y)
title('Predator/Prey populations over time')
xlabel('Time')
ylabel('Population')
legend('Prey','Predators','Location','North')
grid on;
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 28 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
figure(2)
plot(y(:,1),y(:,2))
title('Phase plane Plot')
xlabel('Prey population')
ylabel('Predator population')
grid on;
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 29 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
Python codes
import numpy as np
import [Link] as plt
from [Link] import odeint, solve_ivp
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 30 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 31 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
# Population phase
[Link](sol.y[0],sol.y[1])
[Link]('Fox Population')
[Link]('Rabbit Population')
[Link]('Phase plane plot')
[Link]()
[Link]()
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 32 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
250
Population
200
150
100
50
0
0 5 10 15
Time
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 33 / 7
1. Introduction 1.2 Dynamic systems
Predator-prey models
300
Predator population
250
200
150
100
50
0
0 50 100 150 200
Prey population
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 34 / 7
1. Introduction 1.2 Dynamic systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 35 / 7
1. Introduction 1.2 Dynamic systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 36 / 7
1. Introduction 1.2 Dynamic systems
L Note
In the case of a linear, time-varying differential equation, the dependent variable
and its derivatives appear as linear combinations, but a coefficient or coefficients of
terms may involve the independent variable. For example:
d2 x
+ (1 − cos2t)x = 0
dt2
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 37 / 7
1. Introduction 1.2 Dynamic systems
d2 x dx
+ (x2 − 1) +x=0
dt2 2 dt
d x dx
+ + x + x3 = sinωt
dt2 dt
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 38 / 7
1. Introduction 1.2 Dynamic systems
Linear systems: For linear systems, the equations that constitute the model
are linear. The most important property of linear systems is that the principle
of superposition is applicable.
Nonlinear systems: For nonlinear systems, the equations that constitute the
model are nonlinear. The most important characteristic is that the principle of
superposition is not applicable. In general, procedures for finding the solutions
of problems involving such systems are extremely complicated.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 39 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 40 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Mathematical models
Any attempt to design a system must begin with a prediction of its performance
before the system itself can be designed in detail or actually built. Such prediction
is based on a mathematical description of the system’s dynamic characteristics.
This mathematical description is called a mathematical model. For many physical
systems, useful mathematical models are described in terms of differential equations.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 41 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 42 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Example 1.1
Consider the mechanical system shown below. The displacement y of the mass m is
measured from the equilibrium position, b is the damper constant and k the spring
constant. In this system, the external force F (t) is the input and y is the output.
Find mathematical model of the system.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 43 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Solution:
+ + + +
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 44 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Example 1.2
Let us consider the magnetic-ball suspension system
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 45 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 46 / 7
1. Introduction 1.3 Mathematical modeling of dynamical systems
Example 1.3
The electrical behavior of a separately excited DC machine can be expressed by the
following equation:
dia
va = ea + Ra ia + La
dt
where ea = Km Φn is the back-electromotive force (EMF), Φ is the machine excited
field flux, Te = Km Φia is the electrical torque, TL is the load torque, va is the
terminal voltage, Ra is the armature resistance, La is the armature inductance, ia
is the armature current, respectively.
The mechanical behavior of the separately excited DC machine is described by the
following equation:
dn 1
= (Te − TL )
dt 2πJ
where n is the rotor speed, J is the inertial torque of the machine, respectively.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 47 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 48 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
System analysis
Since any system is made up of components, analysis must start by developing a
mathematical model for each component and combining all the models in order
to build a model of the complete system. Once the latter model is obtained, the
analysis may be formulated in such a way that system parameters in the model are
varied to produce a number of solutions. One then compares these solutions and
interprets and applies the results to the basic task.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 49 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
System design
System design refers to the process of finding a system that accomplishes a given
task. In general, the design procedure is not straightforward and will require trial
and error.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 50 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
Synthesis
Synthesis is the use of an explicit procedure to find a system that will perform in a
specified way. Here the desired system characteristics are postulated at the outset,
and then various mathematical techniques are used to synthesize a system having
those characteristics. Generally, such a procedure is completely mathematical from
the start to the end of the design process.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 51 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
Implementation
Implementation can mean different things in different industries. In control engi-
neering, the word implementation usually refers to the action that one must follow
in order to make something actually happen such as installing new hardware, soft-
ware, or application.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 52 / 7
1. Introduction 1.4 Analysis and design of dynamical systems
Implementation
Implementation can mean different things in different industries. In control engi-
neering, the word implementation usually refers to the action that one must follow
in order to make something actually happen such as installing new hardware, soft-
ware, or application.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 53 / 7
1. Introduction 1.5 An example of system analysis and design
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 54 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Problem formulation
Design a proportional speed controller for a DC motor with angular angle θ, moment
of inertia J = 0.1(Kg/m2 ), friction coefficient B = 0.05, armature resistance
Ra = 1.32(Ω), armature inductance La = 0.15(H), torque coefficient Km = 0.1,
electromotive coefficient Ke = 0.1, electromotive force em = Ke dθdt (V ).
+
M
-
+ -
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 55 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 1. Study the system plant to be controlled and obtain initial information
about the control objectives.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 56 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 2. Model the system and simplify the model if necessary.
The torque equation (Chapter 2)
d2 θ(t) dθ(t)
J +B = Km ia (t)
dt2 dt
The voltage equation (Chapter 2)
dia (t)
vs (t) = Ra ia (t) + La + em (t)
dt
The motor transfer function is (Chapter 3, 4)
Ω(s) Km
Gm (s) = =
Vs (s) (La s + Ra )(Js + B) + Ke Km
where Ω(s) = sΘ(s), Θ(s) = L[θ(t)].
1
⇒ Gm (s) =
0.15s2 + 1.395s + 0.76
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 57 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 3. Analyze the resulting model determine its properties.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 58 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 4. Decide which variables are to be controlled outputs.
The controlled output is the motor angular speed (single output).
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 59 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 5. Decide on the measurements and manipulated variables what sen-
sors and actuators will be used and where will they be placed.
A velocity sensor should be used to measure the angular speed of the motor. It
should be installed on the shaft.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 60 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 6. Select the control configuration.
+
-
Controller DC motor
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 61 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 7. Decide on the type of controller to be used.
Test with Proportional controller (P).
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 62 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 8. Decide on performance specifications based on the overall control
objectives.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 63 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 9. Design a controller.
When the proportional controller Kp = 12.4 is applied to the closed-loop system
(Chapter 7).
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 64 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 10. Analyze the resulting controlled system to see if the specifications
are satisfied and if they are not satisfied modify the specifications or the
type of controller.
The steady-state error is (Chapter 7)
1 1
ess = b0
= 1 = 0.058
1 + Kp a0 1 + 12.4 0.76
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 65 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step response
1.2
0.8
Magnitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2
Times (s)
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 66 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Remark 1.1
The steady-state is not satisfied.
Less oscillations.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 67 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
When the proportional controller Kp = 200.0 is applied to the closed-loop system
the steady-state error is
1 1
ess = = 1 = 0.0038
1 + Kp ab00 1 + 200 0.76
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 68 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step response
2
1.5
Magnitude
0.5
0
0 0.5 1 1.5 2
Times (s)
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 69 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Remark 1.2
The steady-state is small.
More oscillations.
One can now test with another type of the controller.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 70 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Test with PID controller (Kp = 12.4, Ki = 25, Kd = 1.54) (Chapter 7).
Step response
1.2
1
Magnitude
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5
Times (s)
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 71 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Remark 1.3
The steady-state is zero.
No oscillation.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 72 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 11. Simulate the resulting controlled system either on a computer or
a pilot plant.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 73 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Matlab code:
J = 0.1;
B = 0.05;
Km = 0.1;
Ke = 0.1;
Ra = 1.32;
La = 0.15;
num = Km;
den = [(J*La) ((J*Ra)+(La*B)) ((B*Ra)+Km*Ke)];
Kp = 12.4;
Ki = 25;
Kd = 1.54;
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 74 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Code
numc = [Kd, Kp, Ki];
denc = [1 0];
numa = conv(num,numc);
dena = conv(den,denc);
[numac,denac] = cloop(numa,dena);
sysac = tf(numac,denac);
figure(1);
bode(sysac)
grid on
figure(2);
step(numac,denac)
grid on
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 75 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 12. Repeat from step 1 if necessary.
It is not necessary.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 76 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 13. Choose hardware and software and implement the controller.
You can choose them yourself.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 77 / 7
1. Introduction 1.5 An example of system analysis and design
DC motor control
Step 14. Test and validate the control system and tune the controller online
if necessary.
You can test it yourself.
Nguyen Tien Hung (TNUT) EEC010 - System analysis Academic year 2024-2025 78 / 7