0% found this document useful (0 votes)
88 views22 pages

Jacobian Lineariza

Uploaded by

lahlouh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views22 pages

Jacobian Lineariza

Uploaded by

lahlouh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

ME 132, Spring 2005, UC Berkeley, A.

Packard 156

18 Jacobian Linearizations, equilibrium points

In modeling systems, we see that nearly all systems are nonlinear, in that the differential
equations governing the evolution of the system’s variables are nonlinear. However, most
of the theory we have developed has centered on linear systems. So, a question arises: “In
what limited sense can a nonlinear system be viewed as a linear system?” In this section
we develop what is called a “Jacobian linearization of a nonlinear system,” about a specific
operating point, called an equilibrium point.

18.1 Equilibrium Points

Consider a nonlinear differential equation


ẋ(t) = f (x(t), u(t)) (74)
where f is a function mapping Rn × Rm → Rn . A point x̄ ∈ Rn is called an equilibrium
point if there is a specific ū ∈ Rm (called the equilibrium input) such that
f (x̄, ū) = 0n

Suppose x̄ is an equilibrium point (with equilibrium input ū). Consider starting the system
(74) from initial condition x(t0 ) = x̄, and applying the input u(t) ≡ ū for all t ≥ t0 . The
resulting solution x(t) satisfies
x(t) = x̄
for all t ≥ t0 . That is why it is called an equilibrium point.

18.2 Deviation Variables

Suppose (x̄, ū) is an equilibrium point and input. We know that if we start the system at
x(t0 ) = x̄, and apply the constant input u(t) ≡ ū, then the state of the system will remain
fixed at x(t) = x̄ for all t. What happens if we start a little bit away from x̄, and we apply
a slightly different input from ū? Define deviation variables to measure the difference.
δx (t) := x(t) − x̄
δu (t) := u(t) − ū
In this way, we are simply relabling where we call 0. Now, the variables x(t) and u(t) are
related by the differential equation
ẋ(t) = f (x(t), u(t))
Substituting in, using the constant and deviation variables, we get
δ̇x (t) = f (x̄ + δx (t), ū + δu (t))
ME 132, Spring 2005, UC Berkeley, A. Packard 157

This is exact. Now however, let’s do a Taylor expansion of the right hand side, and neglect
all higher (higher than 1st) order terms
¯ ¯
∂f ¯¯ ∂f ¯¯
δ̇x (t) ≈ f (x̄, ū) + δx (t) + δu (t)
∂x ¯u=ū ∂u ¯u=ū
¯ ¯
x=x̄ x=x̄

But f (x̄, ū) = 0, leaving


¯ ¯
∂f ¯¯ ∂f ¯¯
δ̇x (t) ≈ δx (t) + δu (t)
∂x ¯u=ū ∂u ¯u=ū
¯ ¯
x=x̄ x=x̄

This differential equation approximately governs (we are neglecting 2nd order and higher
terms) the deviation variables δx (t) and δu (t), as long as they remain small. It is a linear,
time-invariant, differential equation, since the derivatives of δx are linear combinations of the
δx variables and the deviation inputs, δu . The matrices
¯ ¯
∂f ¯¯ ∂f ¯¯
A := ∈ Rn×n , B := ∈ Rn×m (75)
∂x ¯u=ū ∂u ¯u=ū
¯ ¯
x=x̄ x=x̄

are constant matrices. With the matrices A and B as defined in (75), the linear system

δ̇x (t) = Aδx (t) + Bδu (t)

is called the Jacobian Linearization of the original nonlinear system (74), about the
equilibrium point (x̄, ū). For “small” values of δx and δu , the linear equation approximately
governs the exact relationship between the deviation variables δu and δx .

For “small” δu (ie., while u(t) remains close to ū), and while δx remains “small” (ie., while
x(t) remains close to x̄), the variables δx and δu are related by the differential equation

δ̇x (t) = Aδx (t) + Bδu (t)

In some of the rigid body problems we considered earlier, we treated problems by making
a small-angle approximation, taking θ and its derivatives θ̇ and θ̈ very small, so that cer-
tain terms were ignored (θ̇2 , θ̈ sin θ) and other terms simplified (sin θ ≈ θ, cos θ ≈ 1). In
the context of this discussion, the linear models we obtained were, in fact, the Jacobian
linearizations around the equilibrium point θ = 0, θ̇ = 0.

If we design a controller that effectively controls the deviations δx , then we have designed a
controller that works well when the system is operating near the equilibrium point (x̄, ū).
We will cover this idea in greater detail later. This is a common, and somewhat effective
way to deal with nonlinear systems in a linear manner.
ME 132, Spring 2005, UC Berkeley, A. Packard 158

18.3 Tank Example

qH qC

? ?

6
T
h

?
?
Consider a mixing tank, with constant supply temperatures
TC and TH . Let the inputs be the two flow rates qC (t) and qH (t). The equations for the tank
are ³ q ´
ḣ(t) = A1T qC (t) + qH (t) − cD Ao 2gh(t)
1
ṪT (t) = h(t)A T
(qC (t) [TC − TT (t)] + qH (t) [TH − TT (t)])
Let the state vector x and input vector u be defined as
" # " #
h(t) qC (t)
x(t) := , u(t) :=
TT (t) qH (t)

1
³ √ ´
f1 (x, u) = AT
u1 + u 2 − cD Ao 2gx1
1
f2 (x, u) = x 1 AT
(u1 [TC − x2 ] + u2 [TH − x2 ])
Intuitively, any height h̄ > 0 and any tank temperature T̄T satisfying

TC ≤ T̄T ≤ TH

should be a possible equilibrium point (after specifying the correct values of the equilibrium
inputs). In fact, with h̄ and T̄T chosen, the equation f (x̄, ū) = 0 can be written as
" #" # " √ #
1 1 ū1 cD Ao 2gx̄1
=
TC − x̄2 TH − x̄2 ū2 0

The 2 × 2 matrix is invertible if and only if TC 6= TH . Hence, as long as TC 6= TH , there is a


unique equilibrium input for any choice of x̄. It is given by
" # " #" √ #
ū1 1 TH − x̄2 −1 cD Ao 2gx̄1
=
ū2 TH − TC x̄2 − TC 1 0

This is simply
√ √
cD Ao 2gx̄1 (TH − x̄2 ) cD Ao 2gx̄1 (x̄2 − TC )
ū1 = , ū2 =
TH − T C TH − T C
ME 132, Spring 2005, UC Berkeley, A. Packard 159

Since the ui represent flow rates into the tank, physical considerations restrict them to
be nonegative real numbers. This implies that x̄1 ≥ 0 and TC ≤ T̄T ≤ TH . Looking at the
differential equation for TT , we see that its rate of change is inversely related to h. Hence, the
differential equation model is valid while h(t) > 0, so we further restrict x̄ 1 > 0. Under those
restrictions, the state x̄ is indeed an equilibrium point, and there is a unique equilibrium
input given by the equations above.

Next we compute the necessary partial derivatives.


 
∂f1 ∂f1 − Agc D Ao
0
" #

∂x1 ∂x2 T 2gx1
=
∂f2 ∂f2
− u1 [TC −xx2 ]+u 2 [TH −x2 ] −(u1 +u2 )

∂x1 ∂x2 2A x 1 AT
T1

∂f1 ∂f1 1 1
" # " #
∂u1 ∂u2 AT AT
∂f2 ∂f2 = TC −x2 TH −x2
∂u1 ∂u2 x 1 AT x 1 AT

The linearization requires that the matrices of partial derivatives be evaluated at the equi-
librium points. Let’s pick some realistic numbers, and see how things vary with different
equilibrium points. Suppose that TC = 10◦ , TH = 90◦ , AT = 3m2 , Ao = 0.05m, cD = 0.7. Try
h̄ = 1m and h̄ = 3m, and for T̄T , try T̄T = 25◦ and T̄T = 75◦ . That gives 4 combinations.
Plugging into the formulae give the 4 cases
³ ´
1. h̄, T̄T = (1m, 25◦ ). The equilibrium inputs are
ū1 = q̄C = 0.126 , ū2 = q̄H = 0.029
The linearized matrices are
" # " #
−0.0258 0 0.333 0.333
A= , B=
0 −0.517 −5.00 21.67
³ ´
2. h̄, T̄T = (1m, 75◦ ). The equilibrium inputs are
ū1 = q̄C = 0.029 , ū2 = q̄H = 0.126
The linearized matrices are
" # " #
−0.0258 0 0.333 0.333
A= , B=
0 −0.0517 −21.67 5.00
³ ´
3. h̄, T̄T = (3m, 25◦ ). The equilibrium inputs are
ū1 = q̄C = 0.218 , ū2 = q̄H = 0.0503
The linearized matrices are
" # " #
−0.0149 0 0.333 0.333
A= , B=
0 −0.0298 −1.667 7.22
ME 132, Spring 2005, UC Berkeley, A. Packard 160

³ ´
4. h̄, T̄T = (3m, 75◦ ). The equilibrium inputs are

ū1 = q̄C = 0.0503 , ū2 = q̄H = 0.2181

The linearized matrices are


" # " #
−0.0149 0 0.333 0.333
A= , B=
0 −0.0298 −7.22 1.667

We can try a simple simulation, both in the exact nonlinear equation, and the linearization,
and compare answers.

We will simulate the system


ẋ(t) = f (x(t), u(t))
subject to the following conditions
" #
1.10
x(0) =
81.5

and (
0.022 for 0 ≤ t ≤ 25
u1 (t) =
0.043 for 25 < t ≤ 100
(
0.14 for 0 ≤ t ≤ 60
u2 (t) =
0.105 for 60 < t ≤ 100

This is close to equilibrium condition #2. So, in the linearization, we will use linearization
#2, and the following conditions
" # " #
1 0.10
δx (0) = x(0) − =
75 6.5

and (
−0.007 for 0 ≤ t ≤ 25
δu1 (t) := u1 (t) − ū1 =
0.014 for 25 < t ≤ 100
(
0.014 for 0 ≤ t ≤ 60
δu2 (t) := u2 (t) − ū2 =
−0.021 for 60 < t ≤ 100

To compare the simulations, we must first plot x(t) from the nonlinear simulation. This
is the “true” answer. For the linearization, we know that δx approximately governs the
deviations from x̄. Hence, for that simulation we should plot x̄ + δx (t). These are shown
below for both h and TT .
ME 132, Spring 2005, UC Berkeley, A. Packard 161

Water Height: Actual (solid) and Linearization (dashed)


1.3

1.25

1.2
Meters

1.15

1.1

1.05

1
0 10 20 30 40 50 60 70 80 90 100

Water Temp: Actual (solid) and Linearization (dashed)


82

80

78

76
Degrees

74

72

70

68

66
0 10 20 30 40 50 60 70 80 90 100
Time

18.4 Linearizing about general solution

In section 18.2, we discussed the linear differential equation which governs small deviations
away from an equilibrium point. This resulted in a linear, time-invariant differential equation.

Often times, more complicated situations arise. Consider the task of controlling a rocket
trajectory from Earth to the moon. By writing out the equations of motion, from Physics,
we obtain state equations of the form
ẋ(t) = f (x(t), u(t), d(t), t) (76)
where u is the control input (thrusts), d are external disturbances.
ME 132, Spring 2005, UC Berkeley, A. Packard 162

Through much computer simulation, a preplanned input schedule is developed, which, under
ideal circumstances (ie., d(t) ≡ 0), would get the rocket from Earth to the moon. Denote
this preplanned input by ū(t), and the ideal disturbance by d(t) ¯ (which we assume is 0).
This results in an ideal trajectory x̄(t), which solves the differential equation,

¯ t
³ ´
x̄˙ (t) = f x̄(t), ū(t), d(t),

Now, small nonzero disturbances are expected, which lead to small deviations in x, which
must be corrected by small variations in the pre-planned input u. Hence, engineers need to
have a model for how a slightly different input ū(t) + δu (t) and slightly different disturbance
¯ + δd (t) will cause a different trajectory. Write x(t) in terms of a deviation from x̄(t),
d(t)
defining δx (t) := x(t) − x̄(t), giving

x(t) = x̄(t) + δx (t)

Now x, u and d must satisfy the differential equation, which gives

ẋ(t) = f (x(t), u(t), d(t), t)


¯ + δd (t), t
³ ´
x̄˙ (t) + δ̇x (t) = f x̄(t) + δx (t), ū(t) + ¯δu (t), d(t) ¯ ¯
∂f ¯ ∂f ¯ ∂f ¯
≈ f (x̄(t), ū(t), 0, t) + ∂x x(t)=x̄(t) x
¯ δ (t) + ∂u x(t)=x̄(t) u
¯ δ (t) + ∂d x(t)=x̄(t) d
¯ δ (t)
u(t)=ū(t) u(t)=ū(t) u(t)=ū(t)
¯
d(t)=d(t) ¯
d(t)=d(t) ¯
d(t)=d(t)

But the functions x̄ and ū satisfy the governing differential equation, so x̄˙ (t) = f (x̄(t), ū(t), 0, t),
leaving the (approximate) governing equation for δx
¯ ¯ ¯
∂f ¯¯ ∂f ¯¯ ∂f ¯¯
δ̇x (t) = ¯x(t)=x̄(t) δx (t) + ¯x(t)=x̄(t) δu (t) + ¯x(t)=x̄(t) δd (t)
∂x ¯u(t)=ū(t) ∂u ¯u(t)=ū(t) ∂d ¯u(t)=ū(t)
¯
d(t)=d(t) ¯
d(t)=d(t) ¯
d(t)=d(t)

Define time-varying matrices A, B1 and B2 by


¯ ¯ ¯
∂f ¯¯ ∂f ¯¯ ∂f ¯¯
A(t) := ¯x(t)=x̄(t) B1 (t) := ¯x(t)=x̄(t) B2 (t) := ¯x(t)=x̄(t)
∂x ¯u(t)=ū(t) ∂u ¯u(t)=ū(t) ∂d ¯u(t)=ū(t)
¯
d(t)=d(t) ¯
d(t)=d(t) ¯
d(t)=d(t)

The deviation variables are approximately governed by


" #
h i δu (t)
δ̇x (t) = A(t)δx (t) + B1 (t)δu (t) + B2 (t)δd (t) = A(t)δx (t) + B1 (t) B2 (t)
δd (t)

This is called the linearization of system (76) about the trajectory x̄, ū, d¯ . This type of
³ ´

linearization is a generalization of linearizations about equilibrium points. Linearizing about


an equilibrium point yields a LTI system, while linearizing about a trajectory yields an LTV
system.

In general, these types of calculations are carried out numerically,


ME 132, Spring 2005, UC Berkeley, A. Packard 163

¯
• simulink to get solution x̄(t) given particular inputs ū(t) and d(t)
∂f
• Numerical evaluation of ∂x
, etc, evaluated at the solution points

• Storing the time-varying matrices A(t), B1 (t), B2 (t) for later use

In a simple case it is possible to analytically determine the time-varying matrices.


ME 132, Spring 2005, UC Berkeley, A. Packard 164

18.5 Problems
1. The temperature in a particular 3-dimensional solid is a function of position, and is
known to be
T (x, y, z) = 42 + (x − 2)2 + 3 (y − 4)2 − 5 (z − 6)2 + 2yz
(a) Find the first order approximation (linearization) of the temperature near the
location (4, 6, 0). Use δx , δy and δz as your deviation variables.
(b) What is the maximum error between the actual temperature and the first order
approximation formula for |δx | ≤ 0.3, |δy | ≤ 0.2, |δz | ≤ 0.1. You may use Matlab
to solve this numerically, or analytically if you wish. If you do it analytically,
remember how to do it. First, compute the error at the 8 corners of the“cube.”
Then, using calculus, look along all 8 edges, and find critical points (where the
single partial derivative vanishes). Then, look on all 6 faces to find critical points
(where both partial derivative vanish). Finally, look inthe cube for critical points
(where all 3 partial derivatives vanish). The maximum (and minimum) must be
at one of these numerous points.
(c) More generally, suppose that x̄ ∈ R, ȳ ∈ R, z̄ ∈ R. Find the first order approxi-
mation of the temperature near the location (x̄, ȳ, z̄).
2. The pitching-axis of a tail-fin controlled missile is governed by the nonlinear state
equations
α̇(t) = K1 M fn (α(t), M ) cos α(t) + q(t)
q̇(t) = K2 M 2 [fm (α(t), M ) + Eu(t)]
Here, the states are x1 := α, the angle-of-attack, and x2 := q, the angular velocity of
the pitching axis. The input variable, u, is the deflection of the fin which is mounted
at the tail of the missile. K1 , K2 , and E are physical constants, with E > 0. M is the
speed (Mach) of the missile, and fn and fm are known, differentiable functions (from
wind-tunnel data) of α and M . Assume that M is a constant, and M > 0.
(a) Show that for any specific value of ᾱ, with |ᾱ| < π2 , there is a pair (q̄, ū) such that
" #
ᾱ
, ū

is an equilibrium point of the system (this represents a turn at a constant rate).


Your answer should clearly show how q̄ and ū are functions of ᾱ, and will most
likely involve the functions fn and fm .
(b) Calculate the Jacobian Linearization of the missile system about the equilibrium
point. Your answer is fairly symbolic, and may depend on partial derivatives of the
functions fn and fm . Be sure to indicate where the various terms are evaluated.
3. (Taken from “Introduction to Dynamic Systems Analysis,” T.D. Burton, 1994) Let
f1 (x1 , x2 ) := x1 − x31 + x1 x2 , and f2 (x1 , x2 ) := −x2 + 1.5x1 x2 . Consider the 2-state
system ẋ(t) = f (x(t)).
ME 132, Spring 2005, UC Berkeley, A. Packard 165

(a) Note that there are no inputs. Find all equilibrium points of this system. Hint:
In this problem, there are 4 equilibrium points.
(b) Derive the Jacobian linearization which describes the solutions near each equilib-
rium point. You will have 4 different linearizations, each of the form

δ̇x (t) = Aδx (t)

with different A matrices dependent on which equilibrium point the linearization


has been computed.
(c) Using eigenvalues, determine the stability of each of 4 Jacobian linearizations.
Note: (for part 3e below) If the linearization is stable, it means that while the
deviation of x(t) from x̄ remains small, the variables x(t)− x̄ approximately evolve
by a linear differential equation whose homogenous solutions all decay to zero. So,
we would expect that initial conditions near the equilibium point would converge
to the equilibrium point. Conversely, if the linearization is unstable, it means
that while the deviation of x(t) from x̄ remains small, the variables x(t) − x̄
approximately evolve by a linear differential equation that has some homogenous
solutions which grow. So, we would expect that some initial conditions near the
equilibium point would initially diverge away from the equilibrium point.
(d) Using Simulink, simulate the system starting from 30 random initial conditions
satisfying −3 ≤ x1 (0) ≤ 3, and −3 ≤ x2 (0) ≤ 3. Plot the resulting solutions in
x2 versus x1 plane (each solution will be a curve - parametrized by time t). This
is called a phase plane graph. Make the axis limits −4 ≤ xi ≤ 4. On each curve,
hand-draw in arrow(s) indicating which direction is increasing time. Mark the 4
equilibrium points on your graph.
(e) Make note of the solution curves near the equilibrium points, and how the curves
relate to the stability computation in part 3c.

Hints: The simulation can be “built” using 2 integrators (from Continuous), a


Mux and Demux from Signal Routing, and a Matlab Fcn block from User-defined
Functions. This is shown below.
Since some initial conditions will lead to diverging solutions, it is best to stop the
simulation when either x1 (t) ≥ 10 (say) or x2 (t) ≥ 10. Use a Stop Simulation block
(from Sinks), with its input coming from the Relational Operator (from Math).
ME 132, Spring 2005, UC Berkeley, A. Packard 166

>= STOP
R+5
Relational Stop Simulation
Operator
Constant

x1data

1 To Workspace
s
Integrator

MATLAB Demux
Function
MATLAB Fcn

1
s
Integrator1
x2data

To Workspace1

>= STOP

Relational Stop Simulation1


R+5 Operator1

Constant1

4. A hoop (of radius R) is mounted vertically, and rotates at a constant angular velocity
Ω. A bead of mass m slides along the hoop, and θ is the angle that locates the bead
location. θ = 0 corresponds to the bead at the bottom of the hoop, while θ = π
corresponds to the top of the hoop.

The nonlinear, 2nd order equation (from Newton’s law) governing the bead’s motion
ME 132, Spring 2005, UC Berkeley, A. Packard 167

is
mRθ̈ + mg sin θ + αθ̇ − mΩ2 R sin θ cos θ = 0
All of the parameters m, R, g, α are positive.

(a) Let x1 (t) := θ(t) and x2 (t) := θ̇(t). Write the 2nd order nonlinear differential
equation in the state-space form

ẋ1 (t) = f1 (x1 (t), x2 (t))


ẋ2 (t) = f2 (x1 (t), x2 (t))

(b) Show that x̄1 = 0, x̄2 = 0 is an equilibrium point of the system.


(c) Find the linearized system
δ̇x (t) = Aδx (t)
which governs small deviations away from the equilibrium point (0, 0).
(d) Under what conditions (on m, R, Ω, g) is the linearized system stable?
(e) Show that x̄1 = π, x̄2 = 0 is an equilibrium point of the system.
(f) Find the linearized system δ̇x (t) = Aδx (t) which governs small deviations away
from the equilibrium point (π, 0).
(g) Under what conditions is the linearized system stable?
(h) It would seem that if the hoop is indeed rotating (with angular velocity Ω) then
there would other equilibrium point (with 0 < θ < π/2). Do such equilibrium
points exist in the system? Be very careful, and please explain your answer.
(i) Find the linearized system δ̇x (t) = Aδx (t) which governs small deviations away
from this equilibrium point.
(j) Under what conditions is the linearized system stable?
ME 132, Spring 2005, UC Berkeley, A. Packard 168

5. Car Engine Model (the reference for this problem is Cho and Hedrick, “Automotive
Powertrain Modelling for Control,” ASME Journal of Dynamic Systems, Measurement
and Control, vol. 111, No. 4, December 1989): In this problem we consider a 1-state
model for an automotive engine, with the transmission engaged in 4th gear. The engine
state is ma , the mass of air (in kilograms) in the intake manifold. The state of the
drivetrain is the angular velocity, ωe , of the engine. The input is the throttle angle, α,
(in radians). The equations for the engine is

ṁa (t) = c1 T (α(t)) − c2 ωe (t)ma (t)


Te = c3 ma (t)

where we treat ωe and α as inputs, and Te as an output. The drivetrain is modeled


1
ω̇e (t) = [Te (t) − Tf (t) − Td (t) − Tr (t)]
Je
The meanings of the terms are as follows:

• T (α) is a throttle flow characteristic depending on throttle angle,




 0.00032 for α < 0
T (α) =  1 − cos (1.14α − 0.0252) for 0 ≤ α ≤ 1.4

1 for α > 1.4

• Te is the torque from engine on driveshaft, c3 = 47500 Nm/kg.


• Tf is engine friction torque (Nm), Tf = 0.106ωe + 15.1
• Td is torque due to wind drag (Nm), Td = c4 ωe2 , with c4 = 0.0026 Nms2
• Tr is torque due to rolling resistance at wheels (Nm), Tr = 21.5.
• Je is the effective moment of inertia of the engine, transmission, wheels, car,
Je = 36.4kgm2
• c1 = 0.6kg/s, c2 = 0.095
• In 4th gear, the speed of car, v (m/s), is related to ωe as v = 0.129ωe .

(a) Combine these equations into state variable form.

ẋ(t) = f (x(t), u(t))


y(t) = h(x(t))

where x1 = ma , x2 = ωe , u = α and y = v.
(b) For the purpose of calculating the Jacobian linearization, explicitly write out the
function f (x, u) (without any t dependence). Note that f maps 3 real numbers
(x1 , x2 , u) into 2 real numbers. There is no explicit time dependence in this
particular f .
ME 132, Spring 2005, UC Berkeley, A. Packard 169

(c) Compute the equilibrium values of m̄a , ω̄e and ᾱ so that the car travels at a
constant speed of 22 m/s (let v̄ denote the equilibrium speed). Repeat calculation
for an equilibrium speed of v̄ = 32 m/s . Make sure your formula are clear enough
that you repeat this at any value of v̄.
(d) Consider deviations from these equilibrium values,

α(t) = ᾱ + δα (t)
ωe (t) = ω̄e + δωe (t)
ma (t) = m̄a + δma (t)
y(t) = ȳ + δy (t)

Find the (linear) differential equations that approximately govern these deviation
variables (Jacobian Linearzation discussed in class), in both the 22 m/s and 32
m/s cases.
(e) Using Simulink, starting from the initial condition ωe (0) = ω̄e , ma (0) = m̄a ,
apply a step input of
α(t) = ᾱ + β
for 6 values of β, β = ±0.01, ±0.04, ±0.1 and obtain the response for v and ma .
(f) Also using Simulink (you can use the State-Space block from Continuous),
compute the response of the Jacobian linearization starting from initial condition
δωe (0) = 0 and δma (0) = 0, with the input δα (t) = β for for 6 values of β, β =
±0.01, ±0.04, ±0.1. Add the responses δωe (t) and δma (t) to the equilibrium values
ω̄e , m̄a and plot these sums, which are approximations of the actual response.
Compare the linearized response with the actual response from part 5e Comment
on the difference between the results of the “true” nonlinear simulation and the
results from the linearized analysis. Note: do this for both the equilibrium points
– at 22 m/s and at 32 m/s .
(g) Using Simulink, again starting from the equilibrium point computed in
part 5c apply a sinusoidal throttle angle of

α(t) = ᾱ + β sin(0.5t)

for 3 values of β, β = 0.01, 0.04, 0.1 and obtain the response for v and ma . Do
an analogous simulation for the linearized system, and appropriately compare the
responses. Comment on the difference between the results of the “true” nonlinear
simulation and the results from the linearized analysis. Again, do this for both
cases.

6. In this problem, we will approximate the 2nd order linearization by a lower-order linear
system.

(a) At v̄ m/s, compute the equilibrium values, and write the linearized equation that
approximately governs the deviation variables. Eveything should be a function of
v̄.
ME 132, Spring 2005, UC Berkeley, A. Packard 170

(b) Write the transfer function (from δ u to δ y ) of the linearized car model at v̄ m/s
(c) Decompose this transfer function into the form
1 γ
G(s) =
(τ1 s + 1) (τ2 s + 1)

where τ1 < τ2 . Specifically, find the 2nd order polynomial (coefficients are func-
tions of the equilibrium velocity, v̄) whose roots are −1 τ1
and −1
τ2
. Also, find the
expression (in terms of v̄) for γ. Hence, G is the cascade of two first-order systems:
• A system with steady-state gain 1, and time constant τ1
• A system with steady-state gain γ, and time constant τ2
Since τ1 < τ2 , we will approximate G with
γ
Gapp (s) :=
τ2 s + 1
Note that G and Gapp depend on v̄.
(d) Plot γ, τ1 and τ2 as functions of v̄ for 22 ≤ v̄ ≤ 32.

7. In this problem, we will design a cruise-control system for the linearized model of the
car at arbitrary speed of v̄.

(a) Pick a value of v̄, say 26m/s. Design a PI controller, C for Gapp , which yields
closed-loop roots of the characteristic equation at ωn = 0.6, ξ = 1.1. Around
the equilibrium values, this controller will work well in generating the correct
deviation input δ u (t) in order to regulate the deviation in velocity, δ y , as shown
below
+ δ u (t)
δ r (t) - i - C - Gapp - δ y (t)
−6

Here, δr is interpreted as a desired velocity deviation away from the equilibrium


value of ȳ.
(b) Since δr is the desired velocity deviation away from the equilibrium value of ȳ, it
makes sense to interpret the actual velocity command r as r(t) = ȳ +δr (t). So, the
velocity command is “near” ȳ, but not necessarily equal to it. Therefore, we can
implement the control on the true nonlinear car/engine model, as shown below,
with the equilibrium value of the throttle input shown adding to δ u in order to
get the correct input u.
+
- i -
u
δ- u - Car/ - y (= ȳ + δy )
(ȳ + δr =) r C d
−6 6 Engine

ME 132, Spring 2005, UC Berkeley, A. Packard 171

We can generate the equilibrium input ᾱ simply by setting the initial value (ie.,
initial condition, as the cruise-control is activated) of the integrator to be equal
to KᾱI

- KP

+ ? Car/
r - i- - KI - iu - - y
R
−6 Engine

Starting from equilibrium initial conditions, in the car, and with the correct initial
value on the controller integrator, simulate the closed-loop system for the following
desired velocity input
r(t)
6
30
¡
¡ J
¡ J
28 ¡ J
¡ J
¡ J 50 60 65 -
10 20 40 J ¡ t
J ¡
24 J ¡

(c) Notice that the undershoot at t = 50 appears to be from integrator windup. Plot
z and α and verify that integrator windup has occurred.
(d) Implement an anti-windup scheme for the PI controller. The left end of the
deadzone should be 0, and the right end should be 1.4. Resimulate, and verify
that the antiwindup controller reduces the undershoot at t = 50.
(e) Using the antiwindup controller, do a family of simulations (say 50), randomly
varying the car/engine parameters (c1 , c2 , ...Je ,.. etc) by ±20%. Plot three vari-
ables: the velocity response, the control input α, and the controller integrator sig-
nal z. Note the robustness of the feedback system to variations in the car/engine
behavior. Also notice that the speed (v) is relatively insensitive to the parameter
variations, but that the actual control input α is quite dependent on the varia-
tions. This is the whole point of feedback control – make the regulated variable
insensitive to variations, through the use of feedback strategies which “automat-
ically” cause the control variable to accomodate these variations.

8. A common actuator in industrial and construction equipment is a hydraulic device,


called a hydraulic servo-valve. A diagram is below.
ME 132, Spring 2005, UC Berkeley, A. Packard 172

p0 pS p0

-h

q4 q1 q2 q3
KA ¢ A ¢̧
¢¢ A ¢®¢¢ AAUA ¢ AA
¢ ¢ A A
¢ ¢ A A
¢ ¢ A A
¢ ¢ A A
¢ ¢ A A
¢ ¢ -y A A
¢ ¢ A A
¢ ¢ A A

¾ Fe
p1 p2

Two resevoirs, one at high pressure, ps , called the supply, and one at low pressure, p0 ,
called the drain. The small piston can be moved relatively easily, its position h(t) is
considered an input. As is moves, its connects the supply/drain to opposite sides of
the power piston, which causes significant pressure differences across the power piston,
and causes it to move.

Constant Value
pS 1.4 × 107 N/m2
p0 1 × 105 N/m2
c1 0.02m
c0 4 × 10−7 m2
Ap 0.008m2
K 6.9 × 108 N/m2
ρ 800kg/m3
L 1m
cD 0.7
mp 2.5kg

The volume in each cylinder is simply

V1 (y) = Ap (L + y)
V2 (y) = Ap (L − y)
ME 132, Spring 2005, UC Berkeley, A. Packard 173

The mass flows are q


q1 (t) = cD A1 (h(t)) ρ (pS − p1 (t))
q
q2 (t) = cD A2 (h(t)) ρ (pS − p2 (t))
q
q3 (t) = cD A3 (h(t)) ρ (p2 (t) − p0 )
q
q4 (t) = cD A4 (h(t)) ρ (p1 (t) − p0 )

The valve areas are all given by the same underlying function A(h),
4.0 × 10−7 for h ≤ −0.0002
A(h) = 4.0 × 10−7 + 0.02(u + 0.0002) for −0.0002 < h < 0.005
1.044 × 10−4 for 0.005 < h
By symmetry, we have A1 (h) = A(−h);, A2 (h) = A(h);, A3 (h) = A(−h);, A4 (h) =
A(h). Mass continuity (with compressibility) gives
1
· ¸
q1 (t) − q4 (t) = ρ ṗ1 (t)V1 (y(t)) + Ap ẏ(t)
K
and
1
· ¸
q2 (t) − q3 (t) = ρ ṗ2 (t)V2 (y(t)) − Ap ẏ(t)
K
Finally, Newton’s law on the power piston gives
mp ÿ(t) = Ap (p1 (t) − p2 (t)) − Fe (t)

(a) Why can the small piston be moved easily?


(b) Define states x1 := p1 , x2 := p2 , x3 := y, x4 := ẏ. Define inputs u1 := h, u2 := Fe .
Define outputs y1 := y, y2 := ẏ, y3 := ÿ. Write state equations of the form
ẋ(t) = f (x(t), u(t))
y = g(x(t), u(t))
(c) Suppose that the power piston is attached to a mass M , which itself is also acted
on by an external force w. This imposes the condition that Fe (t) = M ÿ(t) + w(t),
where w is the external force acting on the mass. Substitute this in. The “inputs”
to your system will now be h and w. Although it’s bad notation, call this pair u,
with u1 = h, u2 = w. You will still have 4 state equations.
(d) Develop a Simulink model of the hydraulic servovalve, attached to a mass, M .
Have y and ẏ as outputs (used for feedback later), and h and w as inputs.
(e) Let ȳ be any number satisfying −L < ȳ < L. With the mass attached, compute
the equilibrium values p̄1 and p̄2 such that
p̄1
 
" #
 p̄2  0
x̄ :=  ,

ū :=
ȳ 0

 
0
is an equilibrium point. Hint: The value of M should not affect your answers for
p̄1 and p̄2
ME 132, Spring 2005, UC Berkeley, A. Packard 174

(f) Derive (by hand) the linearization of the system, at the equilibrium point. with
u and w as the inputs. The matrices will be parametrized by all of the area, fluid
parameters, as well as M and ȳ. Make y the output.
(g) Ignoring the disturbance force w, compute the transfer function of the linearized
model from h to y. Denote this by Gȳ,M (s), since it depends on ȳ and M . Let M
vary from 10kg to 10000kg, and let ȳ vary from −0.8 to 0.8. Plot the Bode plot
of the frequency-response function from h → y for at least 35 combinations of M
and ȳ, namely 7 log-spaced values of M and 5 lin-spaced values of ȳ. Place all on
one plot.
(h) There are several simulations here. Consider two different cases with M = 30kg
and separately M = 10000kg. Do short duration (Final Time is small, say 0.15)
response with step inputs with h := 0.0001, w = 0, and h := 0.0004, w = 0, and
h := 0.001, w = 0, and h := 0.004, w = 0, and h := 0.01, w = 0. The power
piston should accelerate to the left. Plot the power-piston y(t), normalized (ie.,
divided by) by the constant value of h. (You should have 10 plots on one sheet).
Note, had the system been linear, (which it is not), after normalizing by the size
of the step, the outputs would be identical, which they are not. Comment on
the differences as the the forcing function step size gets larger (more deviation
from equilibrium input of h = 0). Hints: Be careful with maximum step size (in
Parameters window), using small sizes (start with 0.0001) as well as the simulation
time. Make sure that y(t) does not exceed L. Note that a dominant aspect of the
behavior is that y is the integral (with a negative scaling factor) of h.
(i) On one figure, using many different values for M and ȳ, plot
¯ ¯
¯G
¯ ȳ,M (jω) − G0,10000 (jω) ¯
¯

G0,10000 (jω)
¯ ¯
¯ ¯

versus ω, for ω in the range 0.01 ≤ ω ≤ 1000. This is a plot of percentage-variation


of the linearized model away from the linearized model G0,10000 .
(j) On one figure, using many different values for M and ȳ, plot
¯ ¯
¯G
¯ ȳ,M (jω) − Gnom (jω) ¯
¯

Gnom (jω)
¯ ¯
¯ ¯

for ω in the range 0.01 ≤ ω ≤ 1000, using


−325
Gnom :=
s
This is a plot of percentage-variation from Gnom .
(k) Using Gnom , design a proportional controller
h(t) = KP [r(t) − y(t)]
so that the nominal closed-loop time constant is 0.25. On the same plot as in part
8j, plot the percentage variation margin. Do all of the variations lie underneath
the percentage variation margin curve?
ME 132, Spring 2005, UC Berkeley, A. Packard 175

(l) With the nominal closed-loop time constant set to 0.25, we know that Lnom has
magnitude less than 1 for frequencies beyond about 4 rad/sec. We can reduce the
gain of L even more beyond that without changing the dominant overall response
of the closed system, but we will improve the percentage variation margin. Keep-
ing KP fixed from before, insert a first-order filter in the controller, so that (in
transfer function form)
KP
H= [R − Y ]
τf s + 1
1
Try using τf = 10 0.25. Again on the same plot as in part 8j, plot the new
percentage variation margin. Has the margin improved?
(m) Using this controller, along with the true nonlinear model, simulate the closed-
loop system with 3 different reference signals, given by the (time/value) pairs
listed below. Do this for three different values for M , namely 30, 2000, and 10000
kg.
Time Case 1 Case 2 Case 3
0 0 0 0
1 0.05 0.25 0.75
3 0.05 0.25 0.75
5 -0.025 -0.125 -0.375
10 -0.025 -0.125 -0.375
12 0 0 0
14 0 0 0
Between points, the reference signal changes linearly, connecting the points with
straight lines. Plot the resulting trajectory y, along with r. Comment on the
performance of the closed-loop system.

9. In ??, we derived a complex model for a hydraulic servo-valve, taking compressibility of


the hydraulic fluid into account. In this problem, we derive a model for incompressible
fluid, which is much simpler, and gives us a good, simplified, “starting point” model
for the servovalve’s behavior. The picture is as before, but with ρ constant (though p 1
and p2 are still functions of time – otherwise the piston would not move...).

(a) Assume that the forces from the environment are such that we always have p0 <
p1 (t) < ps and p0 < p2 (t) < ps . Later, we will check what limits this imposes
on theq environment forces. Suppose that u > 0. Recallq that flow into side 1 is
ch(t) ρ (ps − p1 (t)), and flow out of side 2 is ch(t) ρ (p2 (t) − p0 ), where is c is
some constant reflecting the discharge coefficient, and the relationship between
orifice area and spool displacement (h). Show that it must be that
ps + p0 = p1 (t) + p2 (t)

(b) Let ∆(t) := p1 (t) − p2 (t). Show that


ps + p0 + ∆(t) ps + p0 − ∆(t)
p1 (t) = , p2 (t) =
2 2
ME 132, Spring 2005, UC Berkeley, A. Packard 176

(c) Assuming that the mass of the piston is very small, show that
Ap ∆(t) + FE (t) = 0

(d) Show that p0 < p1 (t) < ps for all t if and only if
|FE (t)| ≤ Ap (ps − p0 )
Show that this is also necessary and sufficient for p0 < p2 (t) < ps to hold for all t.
(e) Show that the velocity of the piston ẏ is given by
v " #
ps − p0 ∆(t)
u
u
ρAp ẏ(t) = ch(t) ρ
t −
2 2

(f) Manipulate this into the form


v " #
c p − p F (t)
u
u s 0 E
ẏ(t) = h(t)tρ + (77)
ρAp 2 2Ap

Hence, the position of the piston y(t) is simply the integral of a nonlinear function
of the two “inputs,” h and FE .
(g) Go through the appropriate steps for the case h < 0 to derive the relationship in
that case.
(h) Suppose ȳ and F̄ are constants. Show that the “triple” (ȳ, h̄ = 0, F̄ ) is an equi-
librium point of the system described in equation (77).
(i) What is the linear differential equation governing the behavior near the equilib-
rium point?

10. A satellite is in a planar orbit around the earth, with coordinates as shown below.

The equations of motion are


m [r̈(t) − r(t)ω(t)] = − r2K(t)
m [ω̇(t) + 2ṙ(t)ω(t)] = u(t)
ME 132, Spring 2005, UC Berkeley, A. Packard 177

where u is a force input provided by thrusters mounted in the tangential direction.


Define states as x1 := r, x2 := ṙ, x3 := ω.

(a) Define states for the system (with u as the input), and write down state equations.
(b) For a given value x̄3 = ω̄ > 0, determine values for x̄1 , x̄2 , and ū to give an
equilibrium point.
(c) What is the physical interpretation of this particular equilibrium point?
(d) Calculate the linearization about the equilibrium point.
(e) Is the linearized system stable?
(f) Propose, derive, and fully explain a feedback control system which stabilizes the
linearized system. Document all steps, and mention any sensors (measurements)
your control system will need to make.

You might also like