Control of Nonlinear Dynamic Systems
Control of Nonlinear Dynamic Systems
Copyright 2010
All rights reserved.
2010
1 `Introduction
Key points
We consider systems that can be written in the following general form, where x is the
state of the system, u is the control input, w is a disturbance, and f is a nonlinear function.
We are considering dynamical systems that are modeled by a finite number of coupled,
first-order ordinary differential equations. The notation above is a vector notation, which
allows us to represent the system in a compact form.
2010
In many cases, the disturbance is not considered explicitly in the system analysis, that is,
we consider the system described by the equation
. In some cases we will
look at the properties of the system when f does not depend explicitly on u, that is,
. This is called the unforced response of the system. This does not
necessarily mean that the input to the system is zero. It could be that the input has been
specified as a function of time, u = u(t), or as a given feedback function of the state, u =
u(x), or both.
When f does not explicitly depend on t, that is, if
, the system is said to be
autonomous or time invariant. An autonomous system is invariant to shifts in the time
origin.
We call x the state variables of the system. The state variables represent the minimum
amount of information that needs to be retained at any time t in order to determine the
future behavior of a system. Although the number of state variables is unique (that is, it
has to be the minimum and necessary number of variables), for a given system, the
choice of state variables is not.
Linear Analysis of Physical Systems
The linear analysis approach starts with considering the general nonlinear form for a
dynamic system, and seeking to transform this system into a linear system for the
purposes of analysis and controller design. This transformation is called linearization
and is possible at a selected operating point of the system.
Equilibrium points are an important class of solutions of a differential equation. They
are defined as the points xe such that:
A good place to start the study of a nonlinear system is by finding its equilibrium points.
This in itself might be a formidable task. The system may have more than one
equilibrium point. Linearization is often performed about the equilibrium points of the
system. They allow one to characterize the behavior of the solutions in the neighborhood
of the equilibrium point.
If we write x, u and w as a constant term, followed by a perturbation, in the following
form:
2010
We then perform a multivariable Taylor series expansion about one of the equilibrium
points x0, u0, w0. Without loss of generality, assume the coordinates are transformed so
that x0 = 0. HOT designates Higher Order Terms.
We can set:
Now many powerful techniques exist for controller design, such as optimal linear state
space control design techniques, H control design techniques, etc This produces a
feedback law of the form:
This yields:
2010
2010
Figure 1.3. Smooth nonlinearity over a wide operating range. Which slope should be
pick for the linearization?
The nonlinear design framework is summarized below.
2010
General Properties of
Linear and Nonlinear
Systems
Key points
2010
much more difficult to solve. After decades of effort, it was eventually realized that the
three-body problem was essentially impossible to solve, in the sense of obtaining explicit
formulas for the motions of the three bodies. At this point, the situation seemed hopeless.
The breakthrough came with the work of Poincare in the late 1800s. He introduced a new
viewpoint that emphasized qualitative rather than quantitative questions. For example,
instead of asking for the exact positions of the planets at all times, he asked: Is the solar
system stable forever, or will some planets eventually fly off to infinity. Poincare
developed a powerful geometric approach to analyzing such questions. This approach has
flowered into the modern subject of dynamics, with applications reaching far beyond
celestial mechanics. Poincare was also the first person to glimpse the possibility of chaos,
in which a deterministic system exhibits aperiodic behavior that depends sensitively on
initial conditions, thereby rendering long term prediction impossible.
But chaos remained in the background for the first half of this century. Instead, dynamics
was largely concerned with nonlinear oscillators and their applications in physics and
engineering. Nonlinear oscillators played a vital role in the development of such
technologies as radio, radar, phase-locked loops, and lasers. On the theoretical side,
nonlinear oscillators also stimulated the invention of new mathematical techniques
pioneers in this area include van der Pol, Andropov, Littlewood, Cartwright, Levinson,
and Smale. Meanwhile, in a separate development, Poincares geometric methods were
being extended to yield a much deeper understanding of classical mecahsnics, thanks to
the work of Birkhoff and later Kolmogorov, Arnold, and Moser.
The invention of the high-speed computer in the 1950s was a watershed in the history of
dynamics. The computer allowed one to experiment with equations in a way that was
impossible before, and therefore to develop some intuition about nonlinear systems. Such
experiments led to Lorenzs discovery in 1963 of chaotic motion on a strange attractor.
He studied a simplified model of convection rolls in the atmosphere to gain insight into
the notorious unpredictability of the weather. Lorenz found that the solutions to his
equations never settled down to an equilibrium or periodic state instead, they continued
to oscillate in an irregular, aperiodic fashion. Moreover, if he started his simulations from
two slightly different initial conditions, the resulting behaviors would soon become
totally different. The implication was that the system was inherently unpredictable tiny
errors in measuring the current state of the atmosphere (or any other chaotic system)
would be amplified rapidly, eventually leading to embarrassing forecasts. But Lorenz
also showed that there was structure in the chaos when plotted in three dimensions, the
solutions to his equations fell onto a butterfly shaped set of points. He argued that this set
had to be an infinite complex of surfaces today, we would regard it as an example of
a fractal.
Lorenzs work had little impact until the 1970s, the boom years for chaos. Here are some
of the main developments of that glorious decade. In 1971 Ruelle and Takens proposed a
new theory for the onset of turbulence in fluids, based on abstract considerations about
strange attractors. A few years later, May found examples of chaos in iterated mappings
arising in population biology, and wrote an influential review article that stressed the
pedagogical importance of studying simple nonlinear systems, to counterbalance the
2010
often misleading linear intuition fostered by traditional education. Next came the most
surprising discovery of all, due to the physicist Feigenbaum. He discovered that there are
certain laws governing the transition from regular to chaotic behavior. Roughly speaking,
completely different systems can go chaotic in the same way. His work established a link
between chaos and phase transitions, and enticed a generation of physicists to the study
of dynamics. Finally, experimentalists such as Gollub, Libchaber, Swinney, Linsay,
Moon, and Westervelt tested the new ideas about chaos in experiments on fluids,
chemical reactions, electronic circuits, mechanical oscillators, and semiconductors.
Although chaos stole the spotlight, there were two other major developments in dynamics
in the 1970s. Mandelbrot codified and popularized fractals, produced magnificient
computer graphics of them, and showed how they could be applied to a variety of
subjects. And in the emerging area of mathematical biology, Winfree applied the methods
of dynamics to biological oscillations, especially circadian (roughly 24 hour) rhythms and
heart rhythms.
By the 1980s, many people were working on dynamics, with contributions too numerous
to list.
Lorenz attractor
Newton
Invention of calculus
Explanation of planetary motion
1700s
1800s
1890s
Poincare
1920-1950
1920-1960
Birkhoff
Complex behavior in Hamiltonian mechanics
Kolmogorov
Arnold
Moser
1963
Lorenz
1970s
May
Feigenbaum
1980s
Winfree
Mandelbrot
Fractals
Widespread interest in chaos, fractals, oscillators
and their applications.
2010
2010
The property of homogeneity states that for a given input, x, in the domain of the function
f, and for any real number k,
Any function that does not satisfy superposition and homogeneity is nonlinear. It is worth
noting that there is no unifying characteristic of nonlinear systems, except for not
satisfying the two above-mentioned properties.
10
2010
Dynamical Systems
There are two main types of dynamical systems: differential equations and iterated maps
(also known as difference equations). Differential equations describe the evolution of
systems in continuous time, whereas iterated maps arise in problem where time is
discrete. Differential equations are used much more widely in science and engineering,
and we shall therefore concentrate on them.
Confining our attention to differential equations, the main distinction is between ordinary
and partial differential equations. Our concern here is purely with temporal behavior, and
so we will deal with ordinary differential equations exclusively.
A Brief Reminder on Properties of Linear Time Invariant Systems
Linear Time Invariant (LTI) systems are commonly described by the equation:
In this equation, x is the vector of n state variables, u is the control input, and A is a
matrix of size (n-by-n), and B is a vector of appropriate dimensions. The equation
determines the dynamics of the response. It is sometimes called a state-space realization
of the system. We assume that the reader is familiar with basic concepts of system
analysis and controller design for LTI systems.
Equilibrium point
An important notion when considering system dynamics is that of equilibrium point.
Equilibrium points are considered for autonomous systems (no explicit control input).
Definition:
A point x0 in the state space is an equilibrium point of the autonomous system
when the state x reaches x0, it stays at x0 for all future time.
That is, for an LTI system, the equilibrium point is the solutions of the equation:
If A has rank n, then x0 = 0. Otherwise, the solution lies in the null space of A.
11
if
2010
Stability
A more formal statement would talk about the stability of the equilibrium point in the
sense of Lyapunov. There are many kinds of stability (for example, bounded input,
bounded output) and many kinds of tests.
Forced response
The analysis of forced response for linear systems is based on the principle of
superposition and the application of convolution.
The output sinusoids amplitude is different than that of the input and the signal also
exhibits a phase shift. The Bode plot is a graphical representation of these changes. For
LTIS, it is unique and single-valued.
12
2010
Example of a Bode plot. The horizontal axis is frequency, . The vertical axis of the top
plot represents the magnitude of |y/u| (in dB, that is, 20 log of), and the lower plot
represents the phase shift.
As another example, consider the Gaussian response of LTIS.
If the input into the system is a Gaussian, then the output is also a Gaussian. This is a
useful result.
Why are nonlinear problems so hard?
Why are nonlinear systems so much harder to analyze than linear ones? The essential
difference is that linear systems can be broken down into parts. Then each part can be
solved separately and finally recombined to get the answer. This idea allows fantastic
simplification of complex problems, and underlies such methods as normal modes,
Laplace transforms, superposition arguments, and Fourier analysis. In this sense, a linear
system is precisely equal to the sum of its parts.
But many things in nature dont act this way. Whenever parts of a system interfere, or
cooperate, or compete, there are nonlinear interactions going on. Most of everyday life is
nonlinear, and the principle of superposition fails spectacularly. If you listen to your two
favorite songs at the same time, you wont get double the pleasure! Within the realm of
physics, nonlinearity if vital to the operation of a laser, the formation of turbulence in a
fluid, and the superconductivity of Josephson junctions, for example.
13
2010
One has to solve n nonlinear algebraic equations in n unknowns. There might be between
0 and infinity solutions.
Example: Pendulum
L is the length of the pendulum, g is the acceleration of gravity, and is the angle of the
pendulum from the vertical.
The equivalent (nonlinear) system is:
x1 = x 2
k
g
x 2 = mL2 x 2 L sin x1
Nonlinearity makes the pendulum equation very difficult to solve analytically. The usual
way around this is to fudge, by invoking the small angle approximation for sin x x
the problem to a linear one, which can then be solved easily. But
for x<<1. This converts
by restricting the problem to small x, were throwing out some of the physics, like
motions where the pendulum whirls over the top. Is it really necessary to make such
drastic approximations?
14
2010
It turns out that the pendulum equation can be solved analytically, in terms of elliptic
functions. But there ought to be an easier way. After all, the motion of the pendulum is
simple: at low energy, it swings back and forth, and at high energy it whirls over the top.
There should be a way of extracting this motion from the system directly. This is the sort
of problem we will learn how to solve, using geometric methods.
Heres the rough idea. Suppose we happen to know a solution to the pendulum system,
for a particular initial condition. This solution would be a pair of functions x1(t) and x2(t)
representing the angular position and velocity of the pendulum. If we construct an
abstract space with coordinates (x1, x2), then the solution (x1(t), x2(t)) corresponds to a
point moving along a curve in this space.
This curve is called a trajectory, and the space is called the phase space of the system.
The phase space is completely filled with trajectories, since each point can serve as an
initial condition.
Our goal is to run this construction in reverse: given the system, we want to draw the
system trajectories, and thereby extract information about the solutions. In many cases,
geometric reasoning allows us to draw the trajectories without actually solving the
system!
If we plot the angular position against the angular speed for the pendulum, we obtain a
phase-plane plot.
15
2010
Stability
One must take special care to define what is meant by stability.
For nonlinear systems, stability is considered about an equilibrium point, in the
sense of Lyapunov or in an input-output sense.
Initial conditions can affect stability (this is different than for linear systems), and
so can external inputs.
Finally, it is possible to have limit cycles.
Example:
A limit cycle is a unique, self-excited oscillation. It is also a closed trajectory in the statespace.
16
2010
Note that in other application domains, for example in communications, a limit cycle
might be a desirable feature.
In summary, be on the lookout for this kind of behavior in nonlinear systems. Remember
that in nonlinear systems, stability, about an equilibrium point:
Is dependent on initial conditions
Local vs. global stability is important
Possibility of limit cycles
17
2010
Forced response
The principle of superposition does not hold in general. For example for initial conditions
x0, the system may be stable, but for initial conditions 2x0, the system could be unstable.
18
Classification of Nonlinearities
Single-valued, time invariant
Memory or hysteresis
Example:
19
2010
20
2010
2010
LINEAR SYSTEMS
NONLINEAR SYSTEMS
EQUILIBIUM POINTS
UNIQUE
MULTIPLE
f(xe)=0
n nonlinear equations in n unknowns
0 + solutions
ESCAPE TIME
x + as t +
STABILITY
Dependent on IC
A unique, self-excited
oscillation
A closed trajectory in the state
space
Independent of IC
FORCED RESPONSE
21
2010
One axis tells us the number of variables needed to characterize the state of the
system. Equivalently, this number is called the dimension of the phase space. The
other dimension tells us whether the system is linear or nonlinear.
Admittedly, some aspects of the picture are debatable. You may think that some
topics should be added, or place differently, or even that more axes are needed. The
point is to think about classifying systems on the basis of their dynamics.
There are some striking patterns in the above figure. All the simplest systems occur in
the upper left hand corner. These are the small linear systems that we learn about in
the first few years of college. Roughly speaking, these linear systems exhibit growth,
decay or equilibrium when n = 1, or oscillations when n = 2. For example, an RC
circuit has n = 1 and cannot oscillate, whereas an RLC circuit has n = 2 and can
oscillate.
The next most familiar part of the picture is the upper right hand corner. This is the
domain of classical applied mechanics and mathematical physics where the linear
partial differential equations live. Here we find Maxwells equations of electricity and
magnetism, the heat equation and so on. These partial differential equations involve
an infinite continuum of variables because each point in space contributes
additional degrees of freedom. Even though such systems are large, they are tractable,
thanks to such linear techniques as Fourier analysis and transform methods.
22
2010
In contrast, the lower half of the figure (the nonlinear half) is often ignored or
deferred to other courses. No more In this class, we will start at the lower left hand
corner and move to the right. As we increase the phase space dimension from n = 1 t
n = 3, we encounter new phenomena at every step, from fixed points and bifurcations
when n = 1 to nonlinear oscillations when n = 2 to chaos and fractals when n = 3. In
all cases, a geometric approach proves to be powerful and gives us most of the
information we want, even though we cant usually solve the equations in the
traditional sense of finding a formula for the answer.
Youll notice that the figure also contains a region forbiddingly marked The
frontier. Its like in those old maps of the world, where the mapmakers wrote Here
there be dragons on the unexplored parts of the globe. These topics are not
completely unexplored, but it is fair to say that they lie at the limits of current
understanding. These problems are very hard, because they are both large and
nonlinear. The resulting behavior is typically complicated in both space and time, as
in the motion of a turbulent fluid or the patterns of electrical activity in a fibrillating
heart. Towards the end of the course, time permitting, we will touch on some of these
problems.
23
2010
Phase-Plane Analysis
Key points
Phase plane analysis is a technique for the analysis of the qualitative behavior of secondorder systems. It provides physical insights.
Reference: Graham and McRuer, Analysis of Nonlinear Control Systems, Dover Press,
1971.
Consider the second-order system described by the following equations:
24
phase plane
2010
We look for equilibrium points of the system (also called singular points), i.e. points at
which:
Example:
Find the equilibrium point(s) of the system described by the following equation:
25
2010
Set
Then
a b
x = Ax with
c d
This is what makes linear systems so special. For the nonlinear equations of ultimate
interest to us, its usually impossible to find an analytic solution. We want to develop
methods to deduce the behaviour of ODEs without actually solving them.
A vector field that comes from the original differential equation determines the motion in
the phase plane. To find this vector field, we note that the state of the system is
characterized by its current position x and velocity v. If we know the values of both x and
v, then the equation above uniquely determines the future states of the system. We can
rewrite the ODE in terms of the state variables, as follows:
x = v
v =
k
x = 2 x
m
26
2010
This system assigns a vector ( x , v ) to each point (x,v) and therefore represents a vector
field on the phase plane.
For example, lets see what the vector field looks like when were on the x-axis. Then, v
= 0, so ( x , v ) = (0, 2 x) . The vectors point vertically downward for positive x and
vertically upward for negative x. As x gets larger in magnitude, the vectors get longer.
Similarly, on the v axis, the vector field is ( x , v ) = (v,0) , which points to the right when
v>0 and to the left when v<0.
The flow above swirls about the origin. The origin is special, like the eye of a hurricane.
A phase point placed there would remain motionless, because ( x , v ) = (0,0) when
(x,v) = (0,0) . The origin is a fixed point (or an equilibrium point). But a phase point
starting anywhere else would circulate around the origin and eventually return to its
starting point. Such trajectories form closed orbits. The figure below is called the phase
in the phase space.
portrait of the system. It shows the overall picture of trajectories
27
2010
What do fixed points and closed orbits have to do with the problem of a mass on a
spring? The answers are beautifully simple. The fixed point (x,v) = (0,0) corresponds to a
static equilibrium of the system: the mass is at rest at its equilibrium position and will
remain there forever, since the spring is relaxed. The closed orbits have a more
interesting interpretation: they correspond to periodic motion, that is, oscillations of the
mass. To see this, we can look at some points on aclosed orbit. When the displacement x
is most negative, the velocity v is zero. This corresponds to one extreme of the
oscillation, when the spring is most compressed. In the next instant, as the phase point
flows along the orbit, it is carried to points where x has increased and v is now positive;
the mass is being pushed back towards its equilibrium position. But by the time the mass
has reached x=0, it has a large positive velocity, and it overshoots x=0. The mass
eventually comes to rest at the other end of the swing, where x is most positive and v is
zero again. Then the mass gets pulled up and completes the cycle.
The shape of the closed orbits also has an interesting physical interpretation. The orbits
are actually ellipses given by the equation 2 x 2 + v 2 = C , where C is a positive constant.
One can show that this geometric result is equivalent to conservation of energy.
28
( a)( d) bc = 0
1,2 =
a+d
(a + d) 2 4(ad bc)
2
2
Stable node
Unstable node
Saddle point
Stable focus
Unstable focus
Center
29
2010
30
2010
2010
In Class Problem:
a 0
Graph the phase portraits for the linear system x = Ax where A =
0 1
x = ax
y = y
The equations are uncoupled. In this simple case, each equation may be solved
separately. The solution is:
x(t) = x 0e at
y(t) = y 0e t
The phase portraits for different values of a are shown below. In each case, y decays
exponentially. Name the different cases.
31
2010
There are four fixed points for this system: (0,0), (0,2), (3,0) and (1,1). To classify them,
we start by computing the Jacobian:
3 2x y
2x
A =
2 x 2y
y
(0,0): Then
3 0
A =
0 2
The eigenvalues are both positive at 3 and 2, so this is an unstable node. Trajectories
leave the origin parallel to the eigenvector for =2, that is, tangential to v = (0,1), which
at a node, the trajectories are tangential to the slow
spans the y-axis. (General rule
eigendirection, which is the eigendirection with the smallest ||.
32
2010
(0,2): Then
1 0
A =
2 2
The matrix has eigenvalues -1, -2. The point is a stable node. Trajectories approach along
the eigendirection associated with -1. You can check that this direction is spanned by (1,
2).
(3,0): Then
3 6
A =
0 1
The matrix has eigenvalues -1, -3. The point is a stable node. Trajectories approach along
the slow eigendirection. You can check that this direction is spanned by (3, -1).
(1,1): Then
1 2
A =
1 1
33
2010
The matrix has eigenvalues 1 2 . This is a saddle point. The phase portrait is as show
below:
Also, the x and y axes remain straight line trajectories, since x = 0 when x=0 and
similarly y = 0 when y=0.
We can assemble the entire phase portrait:
This phase portrait has an interesting biological interpretation. It shows that one species
generally drives the other to extinction. Trajectories starting below the stable manifold
34
2010
lead to the eventual extinction of the sheep, while those starting above lead to the
eventual extinction of the rabbits. This dichotomy occurs in other models of competition
and has led biologist to formulate the principle of competitive exclusion, which states that
two species competing for the same limited resource cannot typically co-exist.
35
2010
Write x as :
Then
Lyapunov proved that the eigenvalues of A indicate local stability of the nonlinear
system about the equilibrium point if:
a)
36
2010
Lets pick
It cold in space: the valves would freeze open. If and are small, there is not enough
torque to break the ice, so the valves get frozen open and all the gas escapes. One
solution is either relay control and / or bang-bang control. (These methods are inelegant).
Pick
, and
37
38
2010
In the thick black line interval, all trajectories point towards the switching line.
39
2010
Bad idea!
On the line,
. (a>0).
On average:
On the average, the trajectory goes to the origin.
where
40
2010
Case 1:
41
2010
When is
2010
iff
Example
Consider the system governed by the equation:
The goal of the controller is to guarantee the type of response shown below.
42
2010
The first term dictates that one always approaches zero. The second term is called the
switching term. The parameter is a tuning parameter that governs how fast one goes to
zero.
Once the trajectory crosses the s=0 line, the goals are met, and the system slides
along the line. Hence the name sliding mode control.
Does the switching surface s have to be a line?
No, but it keeps the problem analyzable.
Example of a nonlinear switching surface
43
2010
For a mechanical system, an analogy would be making a cart reach a given position at
zero velocity in minimal time.
The request for a minimal time solution suggests a bang-bang type of approach.
This can be obtained, for example, with the following expression for s:
44
2010
Logic is missing for the case when s is exactly equal to zero. In practice for a
continuous system such as that shown above this case is never reached.
Classical Phase-Plane Analysis Examples
Reference: GM Chapter 7
Example: Position control servo (rotational)
That yields:
45
2010
When
, we have
(another center).
From a controls perspective, dry friction results in an offset, that is, a loss of static
accuracy.
46
2010
To get the accuracy back, it is possible to introduce dither into the system. Dither is a
high-frequency, low-amplitude disturbance (an analogy would be tapping an offset scale
with ones finger to make it return to the correct value).
On average, the effect of dither pulls you in. Dither is a linearizing agent, that
transforms Coulomb friction into viscous friction.
Example: Servo with saturation
47
2010
The effects of saturation do not look destabilizing. However, saturation affects the
performance by slowing it down.
The effect of saturation is to slow down the system.
Note that we are assuming here that the system was stable to start with before we applied
saturation.
Problems appear if one is not operating in the linear region, which indicates that the gain
should be reduced in the saturated region.
If you increase the gain of a linear system oftentimes it eventually winds up unstable,
except if the root locus looks like:
Root locus for a conditionally stable system (for example an inverted pendulum).
So there are systems for which saturation will make you unstable.
48
2010
As t goes from 0 +, and given some initial conditions, the solution x(t) can be
represented geometrically as a curve (a trajectory) in the phase plane. The family of
phase-plane trajectories corresponding to all possible initial conditions is called the phase
portrait.
Main contributions:
Algebraic topology
Differential Equations
Theory of complex variables
Orbits and Gravitation
http://www-history.mcs.st-andrews.ac.uk/history/Mathematicians/Poincare.html
Poincar conjecture
In 1904 Poincar conjectured that any closed 3-dimensional manifold which is homotopy
equivalent to the 3-sphere must be the 3-sphere. Although higher-dimensional analogues
of this conjecture have been proved, the original conjecture remains open.
49
2010
At an equilibrium point, the value of the slope is indeterminate (0/0) singular point.
Set
Then
2
2
Possible cases
50
2010
STABLE NODE
UNSTABLE NODE
51
2010
UNSTABLE FOCUS
Which direction do circles and spirals spin, and what does this mean?
Let
and
With page of straightforward algebra, one can show that: (see homework 1 for details)
and
The r equation says that in a Jordan block, the diagonal element, , determines whether
the equilibrium is stable. Since r is always non-negative, greater than zero gives a
growing radius (unstable), while less than zero gives a shrinking radius. gives the rate
and direction of rotation, but has no effect on stability. For a given physical system,
simply re-assigning the states can get either positive or negative .
In summary:
52
Stability
x=xe+x
53
2010
2010
4 `Equilibrium Finding
Key points
We consider systems that can be written in the following general form, where x is the
state of the system, u is the control input, and f is a nonlinear function.
Let u = ue = constant.
At an equilibrium point,
54
2010
To obtain the equilibrium points, one has to solve n algebraic equations in n unknowns.
How can we find out if an equilibrium point is unique? See next section.
Global Implicit Function Theorem
Define
the Jacobian of f.
The solution xe of
There are many methods to find numerical solutions to this equation, including, but not
limited to:
- Random search methods
- Methods that require analytical gradients (best)
- Methods that compute numerical gradients (easiest)
Two popular ways of computing numerical gradients include:
- The method of Newton-Raphson
- The steepest descent method
Usually both methods are combined.
The method of Newton-Raphson
We want to find solutions to the equation
iteration and an error, ei, such that ei = f(xi).
55
2010
Expand
We have:
Then:
That is, we get an expression for the Newton-Raphson iteration:
Note: One needs to evaluate (OK) and invert (not so good) the Jacobian.
Note: Leads to good convergence properties close to xe but causes extreme starting
errors.
Steepest Descent Technique (Hill Climbing)
Define a scalar function of the error, then choose
scalar at each step.
Define:
56
2010
and
That is, the steepest descent iteration is given by:
57
2010
6 `Controllability and
Observability of
Nonlinear Systems
Key points
78
2010
Consider two vector fields f(x) and g(x) on n. Then the Lie bracket operation generates
a new vector field defined by:
The Lie bracket is [f,g] is commonly written adfg (where ad stands for adjoint).
Also, higher order Lie brackets can be defined recursively:
(ad 0f ,g) g
(ad1f ,g) [ f ,g]
k
k 1
(ad
f ,g) f ,(ad f ,g) for k=1,2,3,
C = [ B | AB | ... | A n 1B]
Local conditions (linear systems)
etc)
For linear systems, you get nothing new after the nth derivative because of the CayleyHamilton theorem.
Re-writing controllability conditions for linear systems using this notation:
,
m
i=1
79
2010
If we keep going:
m
x = A 3 x + A 2 Bi ui = A 3 x + ad 2f Bi ui
i=1
i=1
(n )
m
m
dn x
n
n 1
n
n 1
= n = A x + A Bi ui = A x + (1) ad nf 1Bi ui
dt
i=1
i=1
Nonlinear Systems
Assume we have an affine system:
The general case is much more involved and is given in Hermann and Krener.
If we dont have an affine system, we can sometimes ruse:
Let
80
2010
to be OK.
Theorem
The system defined by:
The gi terms are analogous to the B terms, the [gi,gj] terms are new from having a
nonlinear system, the [f,gi] terms correspond to the AB terms, etc
controllable.
Example: Kinematics of an Axle
81
2010
Basically, is the yaw angle of the vehicle, and x1 and x2 are the Cartesian locations of
the wheels. u1 is the velocity of the front wheels, in the direction that they are pointing,
and u2 is the steering velocity.
We define our state vector to be:
f(x) = 0,
and
Note:
If I linearize a nonlinear system about x0 and the linearization is controllable, then the
nonlinear system is accessible at x0 (not true the other way if the linearization is
uncontrollable the nonlinear system may still be locally accessible).
Back to the example:
where
82
2010
So
C has rank 3 everywhere, so the system is locally accessible everywhere, and f(x)=0 (free
dynamics system) so the system is controllable!
Example 2:
83
2010
So
Accessible everywhere except where x2=0
If we tried [f,[f,g]], would we pick up new directions? It turns out they will also be
dependent on x2, and the rank will drop at x2 = 0.
Example 3:
where
The system is of the form:
where
84
and
2010
We have:
If C has rank 4, then the system is locally accessible. Have fun
Observability for Nonlinear Systems
Intuition for observability:
From observing the sensor(s) for a finite period of time, can I find the state at previous
times?
Review of Linear Systems
where
where
and p<n
(linear system)
z(t), 0tT
Can I determine x0?
where M is pxn, eAT is nxn and x0 is nx1, so z(t) is px1
Using the Cayley-Hamilton theorem:
85
This does not carry over to nonlinear systems, so we take a local approach.
(n 1)
= MA n 1 x
Lie Derivatives:
The gradient of a smooth scalar function h(x) of the state x is denoted by:
h =
h
x
h
The gradient is represented by a row-vector of elements: (h) j =
.
x j
f =
f
x
f
It is represented by an nxn matrix of elements: (f ) ij = i
x j
Definition
n
2010
2010
Dimensions
f looks like:
h looks like:
Lfh is a scalar.
Conventions:
By definition,
We can also define higher-order Lie derivatives:
etc
One can easily see the relevance of Lie derivatives to dynamic systems by considering
the following single-output system:
x = f (x)
y = h(x)
Then
And
87
2010
Etc so
Mi is 1xn
L0 (h ) ... L0 (h ) M x
...
M p x
f
p
1
f 1
Define G = ...
...
... = ...
...
...
Ln 1 (h ) ... Ln 1 (h ) M A n 1 x ... M A n 1 x
f
1
f
p
1
p
Theorem:
Let G denote the set of all finite linear combinations of the Lie derivatives of h1,,hp
with respect to f for various values of u = constant. Let dG denote the set of all their
gradients. If we can find n linearly independent vectors within dG, then the system is
locally observable.
88
2010
Let:
Then
Example:
89
2010
The question we are trying to answer is: from observation, does z contain enough
information on x1 and x2?
Since x1 = z,
90
has
2010
system is controllable.
Observability
z=h(x)
Two states x0 and x1 are distinguishable if there exists an input function u* such that:
z(x0) z(x1)
The system is locally observable at x0 if there exists a neighbourhood of x0 such that
every x in that neighbourhood other than x0 is distinguishable from x0.
A test for local observability is that:
91
92
2010
LINEAR SYSTEMS
2010
NONLINEAR SYSTEMS
AFFINE SYSTEMS
CONTROLLABILITY
AND
ACCESSIBILITY
Intuition: the system is
controllable you can get
anywhere you want in a finite
amount of time.
CONTROLLABILITY
The system is controllable if:
C = [ B AB ... An-1B ]
has rank n, where n is the rank of
x.
ACCESSIBILITY
The system is locally accessible
about a point x0 if and only if
C = [ g1,...,gm, [gi, gj],...
[adgi k gj],..., [f,gi],..., [adfkgi],...]
has rank n where n is the rank of
x. C is the accessibility
distribution.
CONTROLLABILITY
93
OBSERVABILITY
AND DISTINGUISHABILITY
z=Mx
x has rank n
Intuition: the system is observable
z has rank p
from observing the sensor
p<n
measurements for a finite period
of time, I can obtain the state at
previous times.
OBSERVABILITY
The system is observable if:
2010
z=h(x)
DISTINGUISHABILITY
Two states x0 and x1 are
distinguishable if there exists an
input function u* such that:
z(x0) z(x1)
LOCAL OBSERVABILITY
94
2010
Remarks
In general the conditions for nonlinear systems are weaker than those for linear
systems. Properties for nonlinear systems tend to be local.
What to do for nonlinear controllability if the system is not in affine form?
Let
x
z = , v is my control the system is now affine in (z,v) and pick to be OK.
u
Dimensions
95
2010
f looks like:
h looks like:
Lfh is a scalar.
1 0 x1
For example, let f (x) =
0 2 x 2
96
Picture of h
97
2010
x 2
L f h =
x1
2010
x 2 1 0
x 2 0 2
So, the Lie derivative gives the rate of change in a scalar function h as one flows
along the vector field f.
f: n n
y
h: n
x = Ax
Imagine:
and we can only see y, a scalar, and we wish to find xn
y = Cx
98
2010
y = Cx
y = Cx = CAx
y(n-1) = CAn-1 x
and solve for x (n equations)
if [C CA ... CAn-1] has rank n, we have n independent equations in n
variables OK
Using the Lie derivative
f(x) = Ax, h(x) = Cx
and by convention,
[ f ,g] =
g
f
. f .g
x
x
Dimensions
f looks like:
99
2010
100
2010
8 `Feedback Linearization
Key points
Feedback linearization = ways of transforming original system models into
equivalent models of a simpler form.
Completely different from conventional (Jacobian) linearization, because
feedback linearization is achieved by exact state transformation and feedback,
rather than by linear approximations of the dynamics.
Input-Output, Input-State
Internal dynamics, zero dynamics, linearized zero dynamics
Jacobis identity, the theorem of Frobenius
MIMO feedback linearization is also possible.
151
2010
Feedback linearization is an approach to nonlinear control design that has attracted lots of
research in recent years. The central idea is to algebraically transform nonlinear systems
dynamics into (fully or partly) linear ones, so that linear control techniques can be
applied.
This differs entirely from conventional (Jacobian) linearization, because feedback
linearization is achieved by exact state transformation and feedback, rather than by linear
approximations of the dynamics.
The basic idea of simplifying the form of a system by choosing a different state
representation is not completely unfamiliar; rather it is similar to the choice of reference
frames or coordinate systems in mechanics.
Feedback linearization = ways of transforming original system models into
equivalent models of a simpler form.
Applications: helicopters, high-performance aircraft, industrial robots, biomedical
devices, vehicle control.
Warning: there are a number of shortcomings and limitations associated with the
feedback linearization approach. These problems are very much topics of current
research.
References: Sastry, Slotine and Li, Isidori, Nijmeijer and van der Schaft
Terminology
Feedback Linearization
A catch-all term which refers to control techniques where the input is used to linearize
all or part of the systems differential equations.
Input/Output Linearization
A control technique where the output y of the dynamic system is differentiated until the
physical input u appears in the rth derivative of y. Then u is chosen to yield a transfer
function from the synthetic input, v, to the output y which is:
152
2010
If r, the relative degree, is less than n, the order of the system, then there will be internal
dynamics. If r = n, then I/O and I/S linearizations are the same.
Input/State Linearization
A control technique where some new output ynew = hnew(x) is chosen so that with respect
to ynew, the relative degree of the system is n. Then the design procedure using this new
output ynew is the same as for I/O linearization.
SISO Systems
Consider a SISO nonlinear system:
y =
If
h
x = L1f h + Lg (h)u = L1f h if
x
Lg (h) = 0
doesnt appear,
then u does not affect the output! (Big difficulties ahead).
If
We end up with the following set of equalities:
153
, we keep going.
2010
with
with
with
The letter r designates the relative degree of y=h(x) iff:
That is, r is the smallest integer for which the coefficient of u is non-zero over the space
where we want to control the system.
Lets set:
Then
, where
We can now design a controller for this system, using any linear controller design
method. We have
. The controller that is implemented is obtained through:
154
2010
Here the first term in the expression is the standard feedback linearization term, and the
second term is tuned online for robustness.
Internal Dynamics
Assume r<n there are some internal dynamics
where
So we can write:
155
where
2010
and
We define:
where z is rx1 and is (n-r)x1. (
).
The normal forms theorem tells us that there exists an such that:
The equation represents internal dynamics; these are not observable because z does
not depend on at all internal, and hard to analyze!
We want to analyze the zero dynamics. The system is difficult to analyze. Oftentimes, to
make our lives easier, we analyze the so-called zero dynamics:
156
2010
We have:
The eigenvalues of the zero dynamics are the zeroes of H(s). Therefore if the zeroes of
H(s) are non-minimum phase (in the right-half plane) then the zero dynamics are
unstable.
o Procedure
a) Differentiate y until u appears in one of the equations for the derivatives of y
157
2010
o Example
Oral exam question
Follow steps:
a)
u appears r = 1
b) Choose u so that
In our case,
and
c) Choose a control law for the r-integrator system, for example proportional control
Goal: to send y to zero exponentially
since ydes = 0
158
2010
If x1 0 as desired, x2 is governed by
Unstable internal dynamics!
There are two possible approaches when faced with this problem:
159
2010
Question: does there exist a transformation (x) such that the transformed system is
linear?
Define the transformed states:
and
Question: does there exist an output y=z1(x) such that y has relative degree n?
with
160
2010
Let
Then:
z1 L0f (z1 )
1
z2 L f (z1 )
z
=
... ...
n 1
zn L f (z1 )
is there a test?
161
2010
Remember:
i1
L0f h = h , Lif h = L f (Li1
f h) = (L f h). f
ad 0f g = g . ad f g = [ f ,g] = g. f f .g , ad if g = [ f ,ad i1
f g]
For k = 0
(first order)
For k = 1
162
2010
for
for
The two conditions above are equivalent. Evaluating the second half:
163
(*)
2010
for
exists
b)
n 1
f
n 2
f
Definition of involutive:
i.e. when you take Lie brackets you dont generate new vectors.
Note: this is VERY hard to do.
Reference: George Myers at NASA Ames, in the context of helicopter control.
Example: (same as above)
Question: does there exist a scalar z1(x1,x2) such that the relative degree be 2?
2010
Note:
looks dangerous
(simplest)
Define
165
z1 z1d
Question: How to pick z1d?
We want:
for
166
2010
2010
Let rk, the relative degree, be defined as the relative degree of each output, i.e.
For some i,
Let J(x) be an mxm matrix such that:
167
Then we have:
where v is the synthetic input (v is mx1).
so
Problems:
Internal Dynamics
The linear subspace has dimension (or relative degree) for the whole system:
168
2010
2010
and
Internal dynamics
what is u?
design v, then solve for u using
The output is identically equal to zero if we set the control equal to zero (at all times).
Thus the zero dynamics are given by:
169
2010
Slotine and Li
Hauser, PhD Dissertation, UCB, 1989 from which this example is taken
Basically, is the yaw angle of the vehicle, and x1 and x2 are the Cartesian locations of
the wheels. u1 is the velocity of the front wheels, in the direction that they are pointing,
and u2 is the steering velocity.
We define our state vector to be:
x 2 = (sin )u1
= u2
and
170
2010
y1 cos 0 u1
=
y 2 sin 0 u2
cos 0
J(x) =
is clearly singular (has rank 1).
sin 0
Let
x1 = (cos )x 3
x 2 = (sin )x 3
x 3 = u1 = u3
= u2
where
Take
171
2010
and
we have a dynamic feedback controller (the controller has dynamics, not
just gains, in it).
172
2010
o In general terms
nth order
r = relative degree < n
a) Differentiate:
and
173
if r>1
and
=0 if r<2
where
b) Choose u in terms of v
Let
174
2010
175
2010
2010
We have an nth order system where y is the natural output, with relative degree r.
Previously, we skimmed over the state transformation interpretation of feedback
linearization.
Why do we transform the states?
The differential equations governing the new states have some convenient properties.
Example:
Consider a linear system
The points in 2-space are usually expressed in the natural basis:
So when we write x, we mean a point in 2-space that is gotten to from the origin by
doing:
176
2010
x = [ t1
0 1
t 2 ] x'
where t1 and t2 are the eigenvectors of A and x represents the coordinates in the new
basis x.
where is diagonal.
For I/O linearization, we do the same kind of thing:
We seek some nonlinear transformation so that the new state, x, is governed by
differential equations such that the first r-1 states are a string of integrators (derivatives of
each other), and the differential equation for the rth state has the form:
= nonlinear function(x) +u
and n-r internal dynamics states will be decoupled from u (this is a matter of
convenience).
177
2010
o T(x) is continuous
178
etc
2010
o T-1(x) is continuous
o Also
and
We are only concerned about the second term. To eliminate the dependence in u, we must
have:
179
2010
works also.
What about
? (NO violates one-to-one transformation part of the conditions
for a proper diffeomorphism).
180
2005
Key points
Historically:
- Other terms have been used, most predominantly Variable Structure Systems
(VSS)
- Began in the 1960s in the USSR (Fillipov, Utkin)
- Used in Japan in the 1970s for power systems
- Adopted in the US in the late 1970s and the 1980s, principally for robotics.
Brought over by Utkin, a professor at Ohio State.
161
2005
Attributes:
- Applicable to nonlinear dynamic systems
- Directly considers robustness issues as part of the design process.
Second-Order Example
Consider the system governed by the following equation:
If S=0, then the error goes to zero exponentially with a time constant 1/. This is
consistent with the controller goals. (also, if we can make S=0 in finite time t1, then we
can write out the equation for the error as a function of time:
)
Computing the first derivative of S:
162
2005
The u term appears in the equation for the first derivative of S. We say that S has
relative degree 1. (This will always be a desirable property for S).
We select u to cancel out some of the known terms:
The next thing to do is to select a Lyapunov function candidate. For example, we may
select
, which leads to
. That is, to make
negative definite, we
need to pick u so that
.
As before, let
Then:
163
2005
In general,
So,
This last equation is referred to as the sliding condition.
It indicates that S(t) will reach zero in a finite time
After t1, we enter the sliding mode, and the system chatters with zero amplitude and
infinite frequency on the average.
When in the sliding mode,
164
2005
Notes:
(a) We get perfect disturbance rejection and robustness to model error
(b) This is a Lyapunov-based controller design. Equilibrium point is guaranteed to be
stable.
Basic idea of sliding mode:
First-order systems are much easier to control than higher-order ones.
Goal is: y 0
For example this is applicable to velocity control via force.
Control law:
We can use any gain we please for k without instability.
Specifically, we can use,
, which looks like
close to x = 0.
165
In our case:
Note that at infinity gain (sgn(x) case), the closed loop system is stable.
Goal is: y 0
Control law: we must be more careful while choosing u:
For example, say we pick
166
2005
Goal is: y 0
Again, lets try
167
2005
2005
Goal is: y 0
Trivial: s = x and check the two above-mentioned conditions:
(i)
(ii)
Relative degree:
OK
Is s 0 a good thing? Yes!
Sliding mode control for the double integrator
Goal is: y 0
168
2005
So we use:
, with >0.
Choose:
The
term cancels out that term in the expression for
synthetic input.
, and v is similar to a
We are now faced once again with a familiar first-order control problem.
We let:
General trick: if the system is of order n, in general the sliding surface has degree n-1.
In our case,
169
2005
Goal is: y 0
Once again, we develop an expression for s using the two conditions mentioned above.
(i)
(ii)
s(x1,x2,x3)=0
We need to involve x1 and x2 or we wont go anywhere.
170
2005
Shorthand notation:
2
with n = 2.
In this expression, the CE(x) term cancels the x terms that represent system dynamics.
For example in our case, one can pick:
These results can also be obtained using Lyapunov functions and arguments:
171