1/25 Problem Set 1 Solution

E209A: Analysis and Control of Nonlinear Systems
Problem Set 1 Solutions
Gabe Hoffmann
Stanford University
Winter 2005
Problem 1: Bowing of a violin string with different models of stiction.
From the equation of motion, ẍ =
is
1
M
(−kx − Fb (ẋ)). Let x1 = x and x2 = ẋ. Then the state model
f1 (x1 , x2 ) = ẋ1 = x2
1
f2 (x1 , x2 ) = ẋ2 = − M
(kx1 + Fb (x2 ))
(1)
First, we are to use the stiction characteristic model
Fb (x2 ) =
(
((x2 − b) − c)2 + d
if x2 > b
2
− ((x2 − b) + c) − d otherwise
(2)
The system is in equilibrium when the derivitive of the states, the left hand side of (1), is equal to
zero. This gives us the equations for the equilibrium points
−
x∗2 = 0
(3)
1
(kx∗1 + Fb (x∗2 )) = 0
M
(4)
Combining (3) and (4), and using the lower branch of the stiction curve, leads to
1
1
x∗1 = − Fb (0) =
(c − b)2 + d
k
k
(5)
So, there is one equilibrium point, at
(x, ẋ) =
1
k
(c − b)2 + d , 0
(6)
Now, plugging in the given constants to (6) gives us the equilibrium points
4
,0
3
b = 2.0, c = 2.0, d = 3.0 ⇒ (x, ẋ) = (1, 0)
b = 1.0, c = 2.0, d = 3.0 ⇒ (x, ẋ) =
b = 2.1, c = 2.0, d = 3.0 ⇒ (x, ẋ) = (1.00333, 0)
1
(7)
(8)
(9)
To determine the stability of the equilibrium points, linearize the state model about them. The
Jacobian is
# "
" ∂f
#
∂f1
1
0
1
∂x2
1
=
Df = ∂x
(10)
k
1 ∂Fb
∂f2
∂f2
−M
−M
∂x2
∂x
∂x
1
2
At all equilibrium points, x2 = 0, so at the equilibrium points,
∂Fb ∂x2 x∗ ,x∗
1
2
= −2(c − b). Note that we
only need to consider the derivative of Fb near the equilibrium point. Because the switching point
of that function is away from the equilibrium, the switch doesn’t affect derivative at the equilibrium
point. Substituting this result into (10) yields
Df (x∗1 , x∗2 )
=
"
0
k
−M
#
1
2
M (c
− b)
(11)
The eigenvalues are then given by
⇒ det
"
−λ
k
−M
⇒ λ2 −
det(A − λI) = 0
#!
= 0
2
k
(c − b)λ +
M
M
= 0
1
2
M (c
− b) − λ
Notice that we could just as well use det(λI − A), det(sI − A), etc., and we would arrive at the
same answer, because we equate the resulting determinant to zero, so sign does not matter. (In
fact, for even-dimension matrices, the determinant is the same) Both s and λ are common variables
used for eigenvalues.
Then, solving for the eigenvalues, we get
1
λ=
M
c−b±
q
c)2
(b −
− kM
(12)
Plugging in each value for b, we find the resulting stability of the system through the eigenvalues.
√
For b = 1, λ = 13 ± 2 3 2 j, indicating an unstable focus when b = 1, because the real part of
the eigenvalue is positive, and it has an imaginary part. The corresponding nonlinear system is
simulated using pplane in Figure 1.
For b = 2, λ = ±j, indicating a center when b = 2, because the eigenvalue is purely imaginary.
The corresponding nonlinear system is simulated using pplane in Figure 2.
For b = 2.1, λ = −0.0333 ± 0.999j, indicating a stable focus when b = 2.1, because the real part
of the eigenvalue is negative, and it has an imaginary part. The corresponding nonlinear system is
simulated using pplane in Figure 3.
Now, we need to use the linear stiction model given in Figure 2 of the problem set. In (5), rather
than using the quadratic sstiction model, Fb (0) can be found by looking it up on the linear stiction
model plot. The value at ẋ = 0 is -2. So, now, the equilibrium point is
(x, ẋ) =
2
2
k,0
(13)
x ’=x
1
2
x ’ = − 1/M (k x + (x >1) (((x − b) − c)2 + d) + (x <=1) ( − ((x − b) + c)2 − d))
2
1
2
2
2
M=3
2
k=3
c=2
b=1
d=3
2
1
x
2
0
−1
−2
−3
−4
−2
−1
0
1
x1
2
3
4
Figure 1: Phase portrait for quadratic stiction with b = 1, c = 2, d = 3.
x ’=x
1
2
x ’ = − 1/M (k x + (x >2) (((x − b) − c)2 + d) + (x <=2) ( − ((x − b) + c)2 − d))
2
1
2
2
2
M=3
2
k=3
c=2
b=2
d=3
4
3
2
x
2
1
0
−1
−2
−3
−4
−4
−3
−2
−1
0
x1
1
2
3
4
Figure 2: Phase portrait for quadratic stiction with b = 2, c = 2, d = 3.
3
x ’=x
1
2
x ’ = − 1/M (k x + (x >2.1) (((x − b) − c)2 + d) + (x <=2.1) ( − ((x − b) + c)2 − d))
2
1
2
2
2
M=3
2
k=3
c=2
b = 2.1
d=3
4
3
2
x
2
1
0
−1
−2
−3
−4
−4
−3
−2
−1
0
x1
1
2
3
4
Figure 3: Phase portrait for quadratic stiction with b = 2.1, c = 2, d = 3.
Then, to find the stability of the system with b = 1, M = 1, k = 1, and
the graph, the Jacobian is
Df =
"
0
k
−M
1
1 ∂Fb
−M
∂x2
#
=
"
0
1
−1 1
#
∂Fb ∂x2 x =0
2
= −1, as read off
(14)
The eigenvalues are computed from its characteristic equation
λ2 − λ + 1 = 0
(15)
√
Thus, the eigenvalues are found to be λ = 21 ± 23 , indicating an unstable focus . The corresponding
nonlinear system is simulated using pplane in Figure 4.
To explain what is happening in the plots, we look at the effect of varying the parameters. When
b = 1, b is less than c, so at ẋ = 0 in the quadratic stiction model, the slope of the stiction force is
negative. This effect acts as a negative damping force, that when combined with the spring force,
causes the equilibrium to be unstable. When the unstable oscillation reaches the switch in the
stiction function, though, the system falls into a limit cycle.
Physically, when the initial spring extension is zero, the belt and the mass stick to each other
and both move with the same velocity. Then, as the spring is stretched, it exerts an increasingly
negative force, and the mass begins to slip. The velocity of the block reduces and becomes negative
as it slips and the spring force draws it back. When the spring is near its unstretched position,
the spring force is weaker and the stiction force dominates, so that the belt “grabs” the mass once
more and the cycle is repeated.
4
x ’=x
M=1
1
2
x ’ = − 1/M (k x + (x >=3) (0.5 x − 0.5) + (x >1) (x <3) ( − x + 4) + (x > − 1) (x <=1) ( − x − 2) + (x <= − 1) (0.5 x k− =0.5))
1
2
1
2
2
2
2
2
2
2
2
2
2
2
1
x
2
0
−1
−2
−3
−4
−2
−1
0
1
x1
2
3
4
Figure 4: Phase portrait for piecewise linear stiction.
When b = 2, it is equal to c, so at ẋ = 0 in the quadratic stiction model, the slope of the stiction
force is zero. The symmetric nature of the stiction curve around ẋ = 0 leads to closed orbits about
the equilibrium.
When b = 2.1, the slope of the stiction force is slightly positive in the quadratic model. Thus, it
acts like a damping force, leading all trajectories to converge to the equilibrium.
In the linear stiction model, the slope of the stiction curve is negative at ẋ = 0, so the effect is
quite similar to the quadratic stiction model with b = 1.
5
Problem 2: Models for surge in jet engine compressors.
The equations of the system are
ẋ = B(C(x) − y)
1
ẏ =
(x − Fα−1 (y))
B
3
1
C(x) = −x3 + (b + a)x2 − 3abx +
2c + 3ab2 − b3 : compressor characteristic
2
2
x2
Fα (x) =
sign(x): throttle characteristic
α2
(16)
(17)
(18)
(19)
In the operating region, both the mass flow of air and plenum pressure rise are positive. Hence,
we can assume that x > 0 and y > 0 which gives sign(x) = 1 (note, if either x or y go negative,
bad things happen to the engine that may be out of the scope of this model). Thus, the throttle
characteristic becomes Fα (x) = x2 /α2 . The system is in equilibrium when
ẋ = B(C(x∗ ) − y ∗ )
= 0
= C(x∗ )
1 ∗
(x − Fα−1 (y ∗ ))
And ẏ =
B
= 0
⇒y
∗
⇒ x∗ = Fα−1 (y ∗ )
or y ∗ = Fα (x∗ )
So, the system is in equilibrium when C(x∗ ) = Fα (x∗ ) . Note that it is not realistic to compute x∗
and y ∗ explicitly, because that would require finding the symbolic root of a cubic equation, which
can be pages long. It is informative to look at the derivative of the compressor characteristic.
dC
= −3x2 + 3(b + a)x − 3ab
dx
d2 C
= −6x + 3(b + a)
dx2
We can assume, based on the problem statement, that a < b. So, if we evaluate the derivatives of
C(x) at the boundary of the region (a, b), we find that
dC d2 C =
0
and
= 3(b − a) > 0 ⇒ x = a is a local min of C(x)
dx x=a
dx2 x=a
d2 C dC =
0
and
= 3(a − b) < 0 ⇒ x = b is a local max of C(x)
dx x=b
dx2 x=b
Although that information is not required to solve the problem, it will prove helpful to understanding the solution. Now, denoting the equilibrium by x∗ and y ∗ , the system has the Jacobian around
the equilibrium of

Df = 
B
∂C ∂x x∗
1
B
− B1
−B
∂Fα−1 ∂y y ∗
6


=
B
∂C ∂x x∗
1
B
−
−B
1
B
∂Fα
∂x x∗
|


(20)
dFα−1
dy
Note that the last entry in the last matrix above is found by using the fact that
=
1
α
( dF
dx )
,
which can be proven by the chain rule.
√
Note that Fα−1 (y) = α y and y ∗ = Fα (x∗ ) = x∗2 /α2 . This gives
1 ∂Fα−1 α2
−
=−
B ∂y y∗
2Bx∗
(21)
Alternatively, we could have computed the derivative using
dFα−1 dy y∗
=
=
=
1
dFα dx x∗
1
1
2x∗
α2
α2
2x∗
Via either method, we arrive at the characteristic equation of the Jacobian
λ2 +
1
B
∂Fα
∂x x∗
|
−B
⇒ λ2 + 3B(x∗ − a)(x∗ − b) +
α2
2Bx∗
which gives the eigenvalues

α2
1
λ = − 3B(x∗ − a)(x∗ − b) +
2
2Bx∗
∂C ∂x x∗
!
λ+ 1−
∂C
∂x x∗
∂Fα
∂x x∗
|
|
=0
λ + 3B(x∗ − a)(x∗ − b) +
±
s
α2
2Bx∗
(22)
+1=0
α2
3B(x∗ − a)(x∗ − b) −
2Bx∗
2
(23)

− 4
(24)
Thus, the stability of the equilibria depends on the eigenvalues of the system given in terms of the
parameters a, b, α and B.
Case I: x∗ 6∈ (a, b)
If x∗ 6∈ (a, b), this implies that x∗ < a or x∗ > b. Therefore, we have
Also,
3B(x∗ − a)(x∗ − b) > 0
α2
⇒ 3B(x∗ − a)(x∗ − b) +
> 0: since x∗ , α, B > 0
2Bx∗
s
α2
3B(x − a)(x − b) +
2Bx∗
∗
∗
!
>
3B(x∗
−
a)(x∗
α2
− b) −
2Bx∗
2
−4
This last inequality is a consequence of the triangle inequality. Thus, equilibrium points in this
region are always stable, since the real part of the eigenvalues is always negative. The particular
type of stable equilibrium depends on the ∆, the discriminant (the radicand in the eigenvalue),
which depends on the values of x∗ , α and B.
α2
3B(x − a)(x − b) −
2Bx∗
∗
∗
!2
> 4 ⇒ ∆ > 0 ⇒ stable node
7
α2
3B(x∗ − a)(x∗ − b) −
2Bx∗
!2
= 4 ⇒ ∆ = 0 ⇒ improper stable node
α2
3B(x − a)(x − b) −
2Bx∗
!2
< 4 ⇒ ∆ < 0 ⇒ stable focus
∗
∗
Alternatively, we could look at (22), and see that the characteristic equation is simply a quadratic
polynomial. By Routh’s stability criteria, if and only if all of the coefficients of a quadratic characteristic equation are positive, then the system is stable. So, now we use the information
that a is a
<
0.
Because
min and b is a max in the cubic curve, and a < b. Thus, when x 6∈ (a, b), then ∂C
∂x ∗
x
2
α
α
x∗ > 0 always, we know that ∂F
∂x x∗ = 2x∗ > 0. Therefore, all of the coefficients are positive in
this range, so the system is stable in this range.
Case II: x ∈ (a, b)
First, in the boundary case,
x∗ = a or x∗ = b
In this case, ∂C
∂x x∗
(25)
= 0 as derived before, so all of the coefficients of (22) are positive, so the system
is stable .
Second, if
x∗ ∈ (a, b)
∂C ∂Fα and
<
∂x x∗
∂x x∗
v
u
1
u
and B < t ∂Fα ∂C
∂x ∗ ∂x ∗
x
x
then all coefficients of (22) are positive, so the system is stable .
However, if
x∗ ∈ (a, b)
∂C ∂Fα and
<
∂x x∗
∂x x∗
v
u
1
u
and B > t ∂Fα ∂C
∂x ∗ ∂x ∗
x
x
then the second coefficient of (22) becomes negative, so the system is unstable .
Finally, if the compressor characteristic is very steep, hence
∂C and
∂x x∗
x∗ ∈ (a, b)
∂Fα >
∂x x∗
8
then the equilibrium point would be a saddle , because the third coefficient of (22) would be
negative. It can only be negative when there is one positive root and one negative root.
There are MANY possible ways to show these stability regions, by evaluating the characteristic
equation or the eigenvalues. The method shown above is just one of the ways. Another way is as
follows.
If x ∈ (a, b), this implies that a < x < b. This means that 3B(x∗ − a)(x∗ − b) < 0, so
−3B |(x∗ − a)(x∗ − b)| < 0, for all x∗ in this interval. The stability of the equilibria depends
on the values of the parameters α and B. We can derive the following conditions on the parameters
s
iff
3B(x∗ − a)(x∗ − b) +
α2
2Bx∗
α2
3B |(x∗ − a)(x∗ − b)| +
2Bx∗
2
!2
− 4 > 3B(x∗ − a)(x∗ − b) +
!
iff
α2
2Bx∗
!2
> 0
iff α2 >
Also, we have 3B(x∗ − a)(x∗ − b) +
α2
− 3B |(x∗ − a)(x∗ − b)|
2Bx∗
−4 >
α2
iff 4
3B |(x∗ − a)(x∗ − b)| − 1
2Bx∗
α2
2Bx∗
2x∗
3 |(x∗ − a)(x∗ − b)|
> 0
α2
− 3B |(x∗ − a)(x∗ − b)| > 0
2Bx∗
iff B 2 <
α2
6x∗ |(x∗ − a)(x∗ − b)|
Hence, depending on α, B, and the discriminant ∆, we have the following types of equilibria
If α2
>
and ∆
>
2x∗
3 |(x∗ − a)(x∗ − b)|
0
⇒ saddle
2x∗
3 |(x∗ − a)(x∗ − b)|
and ∆ > 0
α2
and B 2 <
6x∗ |(x∗ − a)(x∗ − b)|
⇒ stable node
2x∗
If α2 <
3 |(x∗ − a)(x∗ − b)|
and ∆ > 0
α2
and B 2 >
6x∗ |(x∗ − a)(x∗ − b)|
⇒ unstable node
If α2
<
If ∆
>
0
and B 2
=
α2
6x∗ |(x∗ − a)(x∗ − b)|
9
If ∆
and B 2
If ∆
and B 2
If ∆
and B 2
⇒ saddle
<
0
α2
6x∗ |(x∗ − a)(x∗ − b)|
⇒ stable focus
<
<
0
α2
6x∗ |(x∗ − a)(x∗ − b)|
⇒ center
=
<
0
α2
6x∗ |(x∗ − a)(x∗ − b)|
⇒ unstable focus
>
At a low compressor speed, B = 0.1, we see a stable equilibrium which corresponds to the case of a
rotating stall. At B = 0.3, the equilibrium is unstable, but there exists a stable limit cycle around
the equilibrium. This is the case of compressor surge. For a large compressor speed, B = 1, there
is a stable limit cycle which follows the compressor characteristic, but with discontinuous jumps
between branches of the characteristic.
Bonus:
For a jet engine, the mass flow exiting the plenum is fixed for a given operating condition. The
throttle area is fixed so the exit flow is checked. Fα (x) represents the exit mass flow for a given
plenum condition. When the engine is operating in the lmit cycle where the compressor is driving
more mass into the system than is exiting, it causes the plenum pressure to rise. This is observed
as the trajectory “rides up” the right hand side of C(x). The back pressure keeps rising until it
reaches the flat spot on the curve where the compressor blades stall. The stalled blades are very
inefficient, so they cannot push as much mass into the system for a given back pressure. The mass
entering the system is now less than that exiting, so the plenum pressure must fall. The lowering
of the plenum pressure causes the compressor blades to become more efficient until they “un-stall”
and the cycle repeats.
This effect is captured in the equations for large B
ẋ
ẏ
B((C(x) − y)
1/B(x − Fα−1 (y))
⇒ O(B 2 )
=
So as B → ∞, ẋ/ẏ goes to ∞ like B 2 outside the region where y = C(x). This means that ẋ ≫ ẏ
so the discontinuity looks nearly horizontal. This is called a relaxation oscillation and the points
where the jumps occur are called turning points for the oscillation.
10
3
2
2
3
a=1
x ’ = B ( − x + 3/2 (b + a) x − 3 a b x + (2 c + 3 a b − b )/2 − y)
y ’ = 1/B (x − alpha sqrt(y))
b=3
alpha = 1
c=6
B = 0.1
10
9
8
7
y
6
5
4
3
2
1
0
0
0.5
1
1.5
2
x
2.5
3
3.5
4
Figure 5: Jet engine compressor phase portrait with B = 0.1.
3
2
2
3
a=1
x ’ = B ( − x + 3/2 (b + a) x − 3 a b x + (2 c + 3 a b − b )/2 − y)
y ’ = 1/B (x − alpha sqrt(y))
b=3
alpha = 1
c=6
B = 0.3
10
9
8
7
y
6
5
4
3
2
1
0
0
0.5
1
1.5
2
x
2.5
3
3.5
Figure 6: Jet engine compressor phase portrait with B = 0.3.
11
4
3
2
2
3
a=1
x ’ = B ( − x + 3/2 (b + a) x − 3 a b x + (2 c + 3 a b − b )/2 − y)
y ’ = 1/B (x − alpha sqrt(y))
b=3
alpha = 1
c=6
B = 1.0
10
9
8
7
y
6
5
4
3
2
1
0
0
0.5
1
1.5
2
x
2.5
3
3.5
Figure 7: Jet engine compressor phase portrait with B = 1.0.
12
4
Problem 3: Degenerate phase portraits.
(i) λ1 = 0, λ2 < 0
The system, after a similarity transformation, can be but into the Jordan form
"
ż1
ż2
#
=
"
0 0
0 λ2
#"
z1
z2
#
(26)
The corresponding equations of motion are
ż1 = 0
ż2 = λ2 z2
So, the trajectories are
z1 (t) = z1 (0)
z2 (t) = z2 (0)eλ2 t
Thus, the line defined by z2 = 0 is a stable equilibrium that is approached as t → ∞. The phase
portrait is plotted in Figure 8. Note that the similarity transform could map such a system onto
any orientation or skewing of coordinates in state space.
z1 ’ = 0
z2 ’ = − z2
2
1.5
1
z
2
0.5
0
−0.5
−1
−1.5
−2
−2
−1.5
−1
−0.5
0
z1
0.5
1
1.5
2
Figure 8: Phase portrait for λ1 = 0 and λ2 < 0.
(i) λ1 = 0, λ2 = 0
There are two subcases for this case. First, it is possible that A is the zero matrix. In this case, all
x ∈ ℜ2 are equilibrium points.
13
For the second case, we have the Jordan form
"
ż1
ż2
#
=
"
0 a
0 0
#"
z1
z2
#
(27)
Where a 6= 0. The corresponding equations of motion are
ż1 = az2
ż2 = 0
So, the trajectories are
z1 (t) = z1 (0) + az2 t
z2 (t) = z2 (0)
Again, the line defined by z2 = 0 is an equilibrium, although it is not asymptotically approached
in time. The phase portrait is plotted in Figure 9. Again, note that the similarity transform could
map such a system onto any orientation or skewing of coordinates in state space.
z1 ’ = z2
z2 ’ = 0
2
1.5
1
z
2
0.5
0
−0.5
−1
−1.5
−2
−2
−1.5
−1
−0.5
0
z1
0.5
1
Figure 9: Phase portrait for λ1 = 0 and λ2 = 0.
14
1.5
2
Problem 4: SR Latch..
The equations of motion are
ẋ1 = N OT (x2 ) − x1
ẋ2 = N OT (x1 ) − x2
To find the equilibrium points, set the above derivatives to zero to find that at equilibrium,
N OT (x2 ) = x1
(28)
N OT (x1 ) = x2
(29)
One way to use this to find the equilibrium points is to substitute one of the above equations into
the other. Note that there are many other great methods. This particular method leads to
x2 = N OT (N OT (x2 ))
(30)
By plotting the lines x2 = x2 and x2 = N OT (N OT (x2 )) on the same plot, it is clear that they
intersect at x2 =1, 3, and 5. Then using (28), we find the corresponding x1 value at equilibrium.
Thus, the equilibrium points are
(x1 , x2 ) = (5, 1), (3, 3), (1, 5)
(31)
To find the equilibrium types in order to plot the results, we linearize the system about the equilibria
and interpret the Jacobians.
#
"
∂f1
∂x1
∂f2
∂x1
Df =
∂f1
∂x2
∂f2
∂x2
(32)
The derivative of the N OT (x) function is either -2, if 2 < x < 4, or 0 otherwise (ignoring the
corner points). Evaluating the derivatives at the points corresponding to the equilibria yields the
following.
At (1, 5):
Df =
"
−1 0
0 −1
#
(33)
The eigenvalues of this matrix are λ = −1 with multiplicity 2, so (1, 5) is a stable focus.
At (3, 3):
Df =
"
−1 −2
−2 −1
#
(34)
The solution for (5, 1) is the same as the solution for (1, 5).
The eigenvalues of this matrix are λ1 = −3 and λ2 = 1, so (3, 3) is a saddle. The eigenvector
h
iT
corresponding to λ1 , the negative eigenvalue, is 1 1
, and the eigenvector corresponding to
h
iT
λ2 , the positive eigenvalue, is −1 1
. Therefore, trajectories approach the saddle from the
lower left and upper right, and depart from the saddle towards the upper left and lower right. Using
15
this information, we are able to sketch a plot by hand. For display purposes, it is plotted here by
pplane in Figure 10.
A method to improve the sketch would be to also plot the nullclines - the isoclines with slope of 0
and ∞. These are quick to find because they are the loci of solutions to (28) and (29).
x ’ = (x <=2) 5 + (x >2) (x <4) (9 − 2 x ) + (x >4) 1 − x
1
2
2
2
2
2
1
x ’ = (x <=2) 5 + (x >2) (x <4) (9 − 2 x ) + (x >4) 1 − x
2
1
1
1
1
1
2
7
6
5
x
2
4
3
2
1
0
0
1
2
3
4
x
5
1
Figure 10: Phase portrait for SR Latch.
16
6
7