Lecture 1 Non Linear Control
Lecture 1 Non Linear Control
The main aim of the course is, as its name suggests, to present some industrial applications of basic
analysis and design tools for nonlinear control.
For this aim, the course has two main parts:
Real-world examples,
Real-time experiments.
During the semester, some interesting examples such as anti-angiogenic tumor treatment, magnetic
levitation trains, bioreactors, robot manipulators, land vehicles, turbulent systems etc. will be covered.
Besides, six different controllers for a Permanent Magnet Direct Current (PMDC) motor will be designed
and implemented. Experimental results to be obtained will provide a concrete comparison facility for
real-time performances of various nonlinear control design techniques introduced in ECE 874, like
backstepping, nonlinear adaptive/robust control, feedback linearization, observer design and so on.
All course materials are available at www.duzce.edu.tr/ugurhasirci/ece893/ece893main.htm.
Ugur Hasirci
Background
Gebze Institute of Technology 11 PhD
Assistant Professor, Duzce University
Visiting Professor (postdoc), Clemson University
Research
Nonlinear control of
Electromechanical systems
Bioengineering systems
p
p p 1
q
q bq dp 2/3 q Guq
State: Roughly speaking, a state is one of the system variables needed to be regulated to
control the system. Then the state variables are a subset of all system variables that can
represent the system at any given time. Consider again the motor control system; since we
aim to control the motor speed, the motor speed will be one of the state variables, but not
the only one. One can drive the motor speed to a desired point (or trajectory) by regulating
the current flows in motor windings. Then the electrical current must be the other state
variable needed to control the system. At this point, an important question arises: How can
one determine the state variables for a given system? The minimum number of state
variables required to represent a given system is usually equal to the order of the system's
defining differential equation. Most of the electromechanical systems are second-order
system and thus usually have 2 state variables in their dynamical model, just like the
electrical motor example above.
Proper selection of the state variables mostly relies on engineering experience and intuition.
Linear Systems: A linear system is a system that satisfies homogeneity and additivity properties.
X1
system
Y1
aX1
Homogeneity
system
aY1
X2
system
Y2
X1 + X 2
system
Y1+Y2
Additivity
All systems available in nature are modeled by differential equations. After getting a
differential equation model, designer has two choices to convert this differential equation
model to a more tractable model for control design and stability analysis:
A : system matrix (n n)
B : input matrix ( n p)
u : input vector ( p 1)
y : output vector (q 1)
C: output matrix (q n)
D : feedforward matrix (q p)
z 2 z 0.1z u
By selecting the state variables as x1 z and x2 z , we can build the state-space model as
x1 z
x1 z
x2 z
x2 z
x1 x2
x2 2 x2 0.1x1 u
1 x1 0
x1 0
x 0.1 2 x 1 u
2
2
By selecting the output variable(s), the variable(s) to be controlled, the output equation can
be also formed in the same way. For example, if the output variable is , then the output
x1
equation will be in the form of
x1
y 1 0
x2
Since the entries of the matrices and vectors in the state-space model given above are
constants, i.e., not functions of time (t), this system is a Linear Time-Invariant (LTI) system.
Linear control is a mature subject with a variety of powerful methods. One can easily
determine the system stability by using A matrix, system controllability by using A and B
matrices, and system observability by using A and C matrices. There also exist many
methods to design the control input signal (u) for linear systems.
8
Nonlinear Systems: A system is nonlinear if there exists at least one nonlinear component in
the dynamical model associated to it. For example, following differential equation model and
state-space model are nonlinear, and thus the systems modeled by these equations are
nonlinear systems.
x 4 x 3x x 1 u
2
x1 x1 x22
x2 u
It is obvious that the state-space model given above can not be written as state-space form
for linear, that is
x Ax Bu
y Cx Du.
x f ( x) x g ( x)u ,
1
0
g ( x)
y h( x) x.
Again, this general form is for time-invariant (autonomous) nonlinear systems.
Some common nonlinear system behaviors causes that the set of analysis and design tools
developed for linear systems does not work for nonlinear systems. One of the most
characteristic example of these is chaotic behavior of nonlinear systems. In linear systems,
small changes in initial conditions do not considerably effect the time-variation of system
output. In nonlinear systems, on the other hand, the system output is extremely sensitive to
initial conditions. The essential feature of chaos is the unpredictability of the system output.
Consider a simple mechanical nonlinear system: x 0.1x x 5 6sin(t )
The following figure shows the time-variation of system output for two different initial
conditions: x(0) 2, x(0) 3 and x(0) 2.01, x(0) 3.01.
ECE 893 Chaotic Behavior
2.5
2
1.5
1
x(t)
0.5
0
-0.5
-1
-1.5
-2
-2.5
0
10
20
30
40
50
Time (sec)
60
70
80
90
100
10
In addition to chaos, there are also some characteristic properties of nonlinear systems
such as bifurcation, multiple equilibrium point, limit cycles etc. These features make the
tools for linear systems useless for nonlinear systems. For this reason, we need some
methods to analyze and design nonlinear control systems. The most powerful method is
Lyapunov Stability Analysis Method. Since the issues of design and analysis are
intertwined, this method also provides useful design tools.
Before moving the simulation of dynamical system, our final revisiting will be on the comparison
of open-loop and closed loop control systems.
Open-loop control:
Input designed to move the system to a desired state based on current conditions
and model of the system.
Example: Fill a water tank to a specified level based on flow-rate and time.
If some of the water evaporates during filling then the level will be wrong
If flow rate is not exactly as expected then the level will be wrong.
Inaccurate time will lead to the wrong level.
12
Closed-loop control:
Input changes as the error, difference between the desired output and the
measured output, changes.
Example fill a tank to a specified level based on measuring the tank level and
turning flow on or off to reach the desired level.
Anything that prevents the tank from being filled to the desired level will be
compensated.
Desired level =
Actual level
Desired +
level
Input
System
Feedback
Measurement
13
14
M ( q ) q H ( q, q ) q G ( q ) F ( q )
where
ml 2 q mgl sin(q )
where l is the length of the arm and g is the acceleration of gravity.
15
x1 x2
x2
sin( x1 ) 2
l
ml
Control objective is to drive the arm position to desired trajectory, qd. To observe the
performance of the controller to be designed, a tracking error signal can be defined as
e(t ) qd (t ) q (t ).
For this simulation example, let us design the control input signal as a simple PD controller:
(t ) K p e(t ) K d e(t )
Block diagram of the closed-loop control system with a unity feedback will be as follows.
qd (t )
+
-
e(t )
Kp
d
dt
+
+
(t )
q(t )
Kd
16
Now let us build the simulation model step by step, by using Simulink s-functions.
17
3. Experiments
We will design and implement 6 controllers for a PMDC motor with a nonlinear load. This
experiments will provide a comparison facility for performance of various controllers for a
nonlinear system, also an introduction to real-time control engineering via presenting some
basics of data acquisition and processing. Following figures show a photo taken from
experimental setup and the block diagram of the system. For feedback, we will use an
encoder mounted on the motor shaft by manufacturer. The next lecture will be completely
on the real-time issues including the use of the xPC Target and Q4 data acquisition system.
This lecture aims to introduce experimental setup and controllers to be designed and
implemented.
PMDC Motor
Linear
Amplifier
Target PC
with
xPC Target
Host PC
with
Simulink
Encoder
Data
Acquisition
Card
18
Jq Bq N sin(q ) KT I
LI RI KV q u
mechanical subsystem
electrical subsystem
J : motor inertia
q : motor position
B : viscous friction coeffient
N : load constant
KT : torque constant
KV : voltage constant
L : inductance of the motor windings
I : current flowing through motor windings
R : resistance of the motor windings
u : voltage applied to the motor windings.
19
Jq Bq N sin(q ) KT I
LI RI KV q u
mechanical subsystem
electrical subsystem
x1 q
x2 q
x3 I
we get the state-space representation as follows:
x1 x2
K
B
N
x2 x2 sin x1
x3
J
J
J
KV
R
1
x3 x3
x2 u
L
L
L
Control objective : Drive the angular position of the motor , x1 , to a desired trajectory, x1d ,
by using the control input signal, u, the voltage applied to the motor.
20
x1 x2
K
B
N
x2 sin x1 x3
J
J
J
K
R
1
x3 x3 V x2 u
L
L
L
x2