+ All Categories
Home > Documents > E209A: Analysis and Control of Nonlinear Systems Problem...

E209A: Analysis and Control of Nonlinear Systems Problem...

Date post: 09-Jun-2018
Category:
Upload: phamliem
View: 223 times
Download: 0 times
Share this document with a friend
18
E209A: Analysis and Control of Nonlinear Systems Problem Set 2 Solutions Gabe Hoffmann Stanford University Winter 2005 Problem 1: The method of isoclines. We consider the system ˙ x 1 = x 2 1 x 1 x 2 (1) ˙ x 2 = x 2 + x 2 1 (2) The equilibria are found by setting the state derivatives to zero. ˙ x 1 =0 x 2 1 x 1 x 2 =0 x 1 (x 1 x 2 )=0 (3) ˙ x 2 =0 x 2 + x 2 1 =0 x 2 = x 2 1 (4) Combining these results, we find that x 2 1 (1 x 1 ) 2 =0 x 1 = 0 or x 1 =1 (5) So, we have equilibria at (0,0) and (1,1) . Now, on the x 2 axis, x 1 = 0. So, on the x 2 axis, ˙ x 1 = x 2 1 x 1 x 2 = 0. Therefore, the x 2 axis is invariant. The slope dx 2 dx 1 is found as follows. dx 2 dx 1 = dx 2 dt dx 1 dt = x 2 + x 2 1 x 2 1 x 1 x 2 (6) So, dx 2 dx 1 →∞ when the denominator goes to zero while the numerator remains finite. Factoring the denominator, we see that it is (x 1 )(x 1 x 2 ). So, when x 1 = 0 or x 1 = x 2 , dx 2 dx 1 →∞. Now, to find the isoclines on which dx 2 dx 1 = c for finite c. For c = 0, from (6), we find that the isocline is x 2 + x 2 1 = 0. So, c = 0 on x 2 = x 2 1 (7) 1
Transcript

E209A: Analysis and Control of Nonlinear Systems

Problem Set 2 Solutions

Gabe Hoffmann

Stanford University

Winter 2005

Problem 1: The method of isoclines.

We consider the system

x1 = x21 − x1x2 (1)

x2 = −x2 + x21 (2)

The equilibria are found by setting the state derivatives to zero.

x1 = 0 ⇒ x21 − x1x2 = 0 ⇒ x1(x1 − x2) = 0 (3)

x2 = 0 ⇒ −x2 + x21 = 0 ⇒ x2 = x2

1 (4)

Combining these results, we find that

x21(1 − x1)

2 = 0 ⇒ x1 = 0 or x1 = 1 (5)

So, we have equilibria at (0,0) and (1,1) .

Now, on the x2 axis, x1 = 0. So, on the x2 axis, x1 = x21 − x1x2 = 0. Therefore, the x2 axis is

invariant.

The slope dx2

dx1is found as follows.

dx2

dx1=

(dx2

dt

)

(dx1

dt

) =−x2 + x2

1

x21 − x1x2

(6)

So, dx2

dx1→ ∞ when the denominator goes to zero while the numerator remains finite. Factoring the

denominator, we see that it is (x1)(x1 − x2). So, when x1 = 0 or x1 = x2,dx2

dx1→ ∞.

Now, to find the isoclines on which dx2

dx1= c for finite c.

For c = 0, from (6), we find that the isocline is −x2 + x21 = 0. So,

c = 0 on x2 = x21 (7)

1

For c = 0.5, from (6), we find that the isocline is−x2+x2

1

x2

1−x1x2

= 0.5. So,

c = 0.5 on x2 =x2

1

2 − x1(8)

For c = 1, from (6), we find that the isocline is −x2 + x21 = x2

1 − x1x2. So,

c = 1 on x2 = 0 and x1 = 1 (9)

For c = 2, from (6), we find that the isocline is −x2 + x21 = 2(x2

1 − x1x2). So,

c = 2 on x2 =x2

1

2x1 − 1(10)

The next part of the problem requires the curves to be sketched with the associated slopes on topof the isoclines. These drawings should be done by hand. The exact curves are plotted in Figure 1.

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 1: Isoclines for Problem 1

Finally, we need to conjecture the phase portrait from this information. The trajectories are foundby tracing curves through the slopes that we plotted on top of the isoclines. In order to establishthe direction of these trajectories, we need to look at the differential equations at some of theisoclines to determine the direction of the derivative field. This plot should be made by hand inyour solutions. It is plotted by computer in Figure 2

2

x1 ’ = x

12 − x

1 x

2x

2 ’ = − x

2 + x

12

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 2: Isoclines and phase portrait for Problem 1

3

Problem 2: The pumping heart.

The Van der Pol oscillator equations are

x = v − µ(x3/3 − x) (11)

v = −x (12)

where x is the muscle fiber length, v is the stimulous, and µ > 0 is a parameter.

The equilibria are found by setting the state derivatives to zero.

x = 0 ⇒ v − µ(x3/3 − x) = 0 (13)

v = 0 ⇒ −x = 0 (14)

Combining these two equations, we see that the only equilibrium is at (0,0) . Next, we need to

find the stability of this equilibrium. To do so, we linearize about it.

Df =

[

−µ(x2 − 1) 1−1 0

]∣∣∣∣∣(0,0)

=

[

µ 1−1 0

]

(15)

Next, we determine the eigenvalues of the Jacobian.

det (Df − λI) = det

[

µ − λ 1−1 −λ

]

= λ2 − µλ + 1 = 0 (16)

Thus, the eigenvalues are at

λ =µ ±

µ2 − 4

2(17)

So, when µ > 2 , there are two positive real eigenvalues, and the equilibrium is an unstable node .

When µ = 2 , there are two identical eigenvalues greater than zero, so the equilibrium is an

improper unstable node .

When 0 < µ < 2 , there are two complex eigenvalues with positive real parts, so the equilibrium is

an unstable focus .

See the figures at the end of this problem for plots at small and large µ.

Finally, we need to show that in the transition from long fibers to short fibers, the contractionhappens slowly at first, but that at a high enough stimulus the fibers contract suddenly to pushthe blood all throughout the body.

We cannot directly read from the phase portrait how sudden the contraction is, because it’s the plotof v versus x, not x versus time. Although you can see some time information from the vector fieldplot of f(x1, x2) which we typically plot along with the phase portrait in pplane, we are supposdto show that the contraction happens slowly at first, and then suddenly at a high stimulus.

From the phase plot, we can find out how v and x change - the system exhibits a limit cycle. Let’slook at

x = v − µ(x3/3 − x) (18)

4

In the upper right corner of the limit cycle, at the point where x = 0, v = µ(x3/3 − x), so themuscle fiber length is constant. The extension is positive, so the equation v = −x says that v willcontinue decreasing.

As v decreases, x will transition to a slightly negative value. Thus, with x decreasing slightly, theequation µ(x3/3 − x) decreases as well. This decrease balances out the decrease in v, moderatingthe change in x, until the cubic equation reaches a local minimum, found by

d

dx

(

x3/3 − x)

= 0 (19)

⇒ x2 = 1 ⇒ x = ±1 (20)

The positive solution corresponds to the minimum. So when x = 1 is reached, the cubic equationturns around, and x begins to decrease very increasingly rapidly. It is no longer dependent on themagnitude of v increasing. Thus, the fiber contracts increasingly rapidly until the maximum of thecubic equation is reached, and the rate decreases again, and eventually goes to zero. We begin thesame process all over again, symmetric about the origin.

x ’ = v − mu (x3/3 − x)v ’ = − x

mu = 1

−4 −3 −2 −1 0 1 2 3 4

−4

−3

−2

−1

0

1

2

3

4

x

v

Figure 3: Phase portrait with µ = 1. This is an unstable focus.

5

x ’ = v − mu (x3/3 − x)v ’ = − x

mu = 2

−4 −3 −2 −1 0 1 2 3 4

−4

−3

−2

−1

0

1

2

3

4

x

v

Figure 4: Phase portrait with µ = 2. This is an improper unstable node.

x ’ = v − mu (x3/3 − x)v ’ = − x

mu = 4

−4 −3 −2 −1 0 1 2 3 4

−4

−3

−2

−1

0

1

2

3

4

x

v

Figure 5: Phase portrait with µ = 4. This is an unstable node.

6

Problem 3: Modification of Duffing’s equation.

The modified Duffing equation is

x1 = x2 (21)

x2 = x1 − x31 − δx2 + x2

1x2 (22)

First, we find its equilibria.

x1 = 0 = x2 (23)

⇒ x2 = 0 = x1(1 − x21) (24)

So, we have equilibria at (0, 0) , (1, 0) , and (−1, 0) . Next, we linearize about the equilibria.

Df =

[

0 11 − 3x2

1 + 2x1x2 x21 − δ

]∣∣∣∣∣xe

(25)

Around (0,0),

Df =

[

0 11 −δ

]

(26)

So the characteristic equation is

det

[

−λ 11 −δ − λ

]

= λ2 + δλ − 1 = 0 (27)

Therefore, the eigenvalues at (0,0) are λ = −δ±√

δ2+42 , a saddle for any value of δ.

Around (1,0),

Df =

[

0 1−2 1 − δ

]

(28)

So the characteristic equation is

det

[

−λ 1−2 1 − δ − λ

]

= λ2 + (δ − 1)λ + 2 = 0 (29)

Therefore, the eigenvalues at (1,0) are λ =−(δ−1)±

√(δ−1)2−8

2 , which will have stability varying withδ. The result for (-1,0) is the same. The stability regions are

δ < 1 − 2√

2 ⇒ Unstable Node (30)

δ = 1 − 2√

2 ⇒ Unstable Improper Node (31)

1 − 2√

2 < δ < 1 ⇒ Unstable Focus (32)

δ = 1 ⇒ Center in linearized system (33)

1 < δ < 1 + 2√

2 ⇒ Stable Focus (34)

δ = 1 + 2√

2 ⇒ Stable Improper Node (35)

δ > 1 + 2√

2 ⇒ Stable Node (36)

7

Now, to apply Bendixson’s theorem, we evaluate the divergence of our vector field.

div(f) =∂f1

∂x1+

∂f2

∂x2= 0 + (−δ) + x2

1 = x21 − δ (37)

So, δ is never identically zero on any region in ℜ2 except on the lines where δ = x21. The line cannot

contain an orbit, the first condition to say that orbits are possible is not met. What about thesecond condition? From (37), we know that div(f) changes sign on the lines where δ = x2

1, exceptwhen δ = 0. Thus, by Bendixson’s theorem, orbits could exist that cross these lines where a signchange occurs. They could not occur in the region between the lines alone, our outside the linesalone.

To conjecture plausible phase portraits, we return to the eigenvalue expressions. In the regionsdefined by (30) and (31), the line x1 = ±

√δ doesn’t exist, so no closed orbits can exist. The phase

portrait can then be conjectured and sketched by hand in the neighborhood of the equilibriumpoints. It shouldn’t have any closed orbits. The actual phase portrait is shown in Figure 6.

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 1 − 2 sqrt(2)

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 6: Phase portrait for δ = 1−2√

2. By Bendixson’s theorem, there can’t be any closed orbits.

The region defined by (32) will be similar to the region defined by (30) and (31 when δ ≤ 0, exceptthe equilibria at (±1, 0) change from nodes to foci. When δ > 0, a the lines x1 = ±

√δ exist between

each equilibrium in region (32). Thus, orbits could exist crossing any combination of these lines,as long as they enclose an equilibrium point as well, and satisfy index theory. Again, sketches justneed to show guesses of where closed orbits could occur, and the behavior around the equilibrium.Figures 7, 8 and 9 show interesting actual phase portraits in this domain.

In the region defined by (33), the lines x1 = ±√

δ lie on the equilibria at (±1, 0). So, the pointscould be nonlinear centers. Again, a closed orbit could exist across the lines. Sketches need to

8

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 0.5

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 7: Phase portrait for δ = 0.5, with red lines indicating where the divergence changes sign.By Bendixson’s theorem, there can be closed orbits crossing the lines x1 = ±

√0.5. It turns out

that there aren’t in this case.

show guesses of what the phase portrait could be. It turns out that the equilibria at (±1, 0) arevery strange, and not exactly nonlinear centers, as shown in Figure 10.

In the regions defined by (34), (35), and (36), the lines x1 = ±√

δ no longer separate the equilibria.Again, a closed orbit could exist across the lines. Once again, sketches just need to show guessesof what the phase portrait could be. One example of a real phase portrait is given in Figure 11.

9

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 0.8

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 8: Phase portrait for δ = 0.8. By Bendixson’s theorem, there can be closed orbits crossingthe lines x1 = ±

√0.8. It turns out that there is one closed orbit encompassing all three equilibria.

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 0.9

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 9: Phase portrait for δ = 0.9. By Bendixson’s theorem, there can be closed orbits crossingthe lines x1 = ±

√0.9. Increasing δ by just 0.1, the system goes from having 1 orbit to having 3

orbits. Note that all orbits cross at least one of the sign change lines.

10

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 1

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 10: Phase portrait for δ = 1. By Bendixson’s theorem, there can be closed orbits crossingthe lines x1 = ±

√1. It turns out that there is one closed orbit again, encompassing all 3 equilibria.

x1 ’ = x

2

x2 ’ = x

1 − x

13 − delta x

2 + x

12 x

2

delta = 1.1

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x1

x 2

Figure 11: Phase portrait for δ = 1.1. By Bendixson’s theorem, there can be closed orbits crossingthe lines x1 = ±

√1.1. It turns out that there is a closed orbit, surrounding all 3 equilibria.

11

Problem 4: First integrals.

We consider the differential equationθ = 1 − 2 sin θ (38)

First, we put it in state model form with x1 = θ and x2 = θ. Then,

x1 = x2 (39)

x2 = 1 − 2 sin x1 (40)

The equilibrium points are then found by setting the derivatives to zero.

x1 = 0 = x2 ⇒ x2 = 0 (41)

x2 = 0 = 1 − 2 sin x1 ⇒ x1 = sinx1 =1

2⇒ x1 =

π

6+ 2πn,

6+ 2πn (42)

Thus, the equilibria are at (π6 + 2πn, 0) and (5π

6 + 2πn, 0) .

Next, we linearize the system.

Df =

[

0 1−2 cos x1 0

]

(43)

At (5π6 + 2πn, 0), the Jacobian is

Df =

[

0 1√3 0

]

(44)

So the eigenvalues are λ = ±31/4 , thus this point is a saddle .

At (π6 + 2πn, 0), the Jacobian is

Df =

[

0 1

−√

3 0

]

(45)

So the eigenvalues are λ = ±31/4j , thus this point is a center in the linearized system . Now weask if this is a nonlinear center. We use the first integral.

If we can find a scalar function V (x1, x2) has a time derivative of zero along the system trajectories,then that function is constant along the trajectories. Hence, its level curves would define thetrajectories. Let’s find such a scalar function for this system.

d

dtV (x1, x2) = 0

⇒ ∂V

∂x1

∂x1

∂t+

∂V

∂x2

∂x2

∂t= 0

⇒ ∂V

∂x1x1 +

∂V

∂x2x2 = 0

So, one solution is finding V such that

{∂V∂x1

= −x2∂V∂x2

= x1(46)

12

Then x1x2 − x2x1 = 0, and the function V would satisfy the differntial equation. As many inthe class correctly observed, this function V is called a Hamiltonian function. So, plugging in oursystem dynamics, we see that

{∂V∂x1

= 2 sin x1 − 1∂V∂x2

= x2(47)

Integrating the first equation,

V (x1, x2) =

2 sin x1 − 1dx1 (48)

= −2 cos x1 − x1 + g1(x2) (49)

Integrating the second equation,

V (x1, x2) =

x2dx2 (50)

=1

2x2

2 + g2(x1) (51)

Combining these results, we see that

V =1

2x2

2 − 2 cos x1 − x1 + C (52)

where C is a constant of integration. It can be anything without effecting our use of V , so let’s setit to zero.

Now, looking at the region around (π6 + 2πn, 0), define an arbitrary point very close to (π

6 , 0),(π

6 + ǫ1, ǫ2), where ǫ1, ǫ2 → 0. Set V (ǫ1, ǫ2) = c, where c is some arbitrary constant that thefunction V evaluates to at that point. Then,

V (ǫ1, ǫ2) = c (53)

⇒ 1

2ǫ22 − 2 cos (

π

6+ ǫ1) − (

π

6+ ǫ1) = c (54)

⇒ 1

2ǫ22 − 2

(

cosπ

6cos ǫ1 − sin

π

6sin ǫ1

)

− ǫ1 = c (55)

⇒ 1

2ǫ22 −

√3 cos ǫ1 + sin ǫ1 − ǫ1 = c (56)

⇒ 1

2ǫ22 −

√3

(

1 − 2 sin2 ǫ1

2

)

+ sin ǫ1 − ǫ1 = c (57)

Now, using the fact that ǫ1 → 0, we know that sin ǫ12 ≈ ǫ1

2 and sin ǫ1 ≈ ǫ1. So,

⇒ 1

2ǫ22 −

√3 + 2

√3

(ǫ1

2

)2

+ ǫ1 − ǫ1 = c (58)

⇒ 1

2ǫ22 +

√3

2ǫ21 = c (59)

(60)

Thus, as we approach the equilibria, the level curves of V are a family of ellipses, which form closedorbits around the equilibria. Thus, the equillibria do correspond to nonlinear centers.

At this point, the solution requires a hand drawn sketch of the phase portrait. The exact plot ofthe phase portrait is shown in Figure 12.

13

x1 ’ = x

2

x2 ’ = 1 − 2 sin(x

1)

−10 −5 0 5 10

−6

−4

−2

0

2

4

6

x1

x 2

Figure 12: Phase portrait for Problem 4.

14

Problem 5: Reaction-diffusion equations.

The governing equations are

x1 = 2(x2 − x1) + x1(1 − x21) (61)

x2 = −2(x2 − x1) + x2(1 − x22) (62)

First, we find the equilibria.

x1 = 0 = 2(x2 − x1) + x1 ∗ (1 − x21) (63)

x2 = 0 = −2(x2 − x1) + x2 ∗ (1 − x22) (64)

Subtracting (64) from (63), we obtain

4(x2 − x1) + (x1 − x2) + x32 − x3

1 = 0 (65)

⇒ (x2 − x1)(

3 + x21 + x1x2 + x2

2

)

︸ ︷︷ ︸

always positive

= 0 (66)

⇒ x1 = x2 (67)

Substituting this back into (63), we find that

x1(1 − x21) = 0 (68)

So, the equilibria are at (0, 0) , (1, 1) and (−1,−1) .

Now, to find the stability, we linearize the system. First, we find the Jacobian.

Df =

[

−1 − 3x21 2

2 −1 − 3x22

]

(69)

So, at (0,0),

Df =

[

−1 22 −1

]

(70)

The characteristic equation is given by

det(Df − λI) = det

[

−1 − λ 22 −1 − λ

]

= (λ + 1)2 − 4 = 0 (71)

So the eigenvalues are λ = −3, 1. Thus, this equilibrium is a saddle .

At (1,1) and (-1,-1),

Df =

[

−4 22 −4

]

(72)

The characteristic equation is given by

det(Df − λI) = det

[

−4 − λ 22 −4 − λ

]

= (λ + 4)2 − 4 = 0 (73)

15

So the eigenvalues are λ = −2,−6. Thus, these equilibria are stable nodes .

To find out about limit cycles, we use Bendixson’s theorem to see if any closed orbits exist.

div(f) =∂f1

∂x1+

∂f2

∂x2= −2 + 1 − 3x2

1 − 2 + 1 − 3x22 = −2 − 3(x2

1 + x22) < 0 (74)

So, because the divergence is always negative, it can never have a sign change, or be equivalentlyzero. Therefore, no closed orbits can exist in this system, so neither can a limit cycle.

16

Problem 6: Hamiltonian systems.

The equation of motion isx − x + x3 = 0 (75)

First, we put it in state model form with x1 = x and x2 = x. Then,

x1 = x2 (76)

x2 = x1 − x31 (77)

We linearize the system about (±1, 0).

Df =

[

0 11 − 3x2

1 0

]

=

[

0 1−2 0

]

(78)

So the eigenvalues are λ = ±√

2j , thus this point is a center in the linearized system, but byHartman-Grobman, we don’t know about the stability of the nonlinear system.

Next, we look at (18) in the problem statement to determine the Hamiltonian function.

x1 =∂H

∂x2= x2 ⇒ H =

1

2x2

2 + g1(x1) (79)

x2 = −∂H

∂x1= x1 − x3

1 ⇒ H =1

4x4

1 −1

2x2

1 + g2(x2) (80)

Combining these two equations, we find that

H =1

4x4

1 −1

2x2

1 +1

2x2

2 + C (81)

As in Problem 4, we can set C to zero, because we don’t care about the constant offset of H here.

Now, we need to determine what H is along the trajectories of the system.

H =∂H

∂x1

∂x1

∂t+

∂H

∂x2

∂x2

∂t=

∂H

∂x1

∂H

∂x2+

∂H

∂x2

(

−∂H

∂x1

)

= 0 (82)

Therefore, H is constant along a trajectory of the system. In other words, a contour of constantH corresponds to a trajectory on the phase portrait.

Now, looking at (±1, 0), let’s focus on (1,0). Because the system is symmetric about the origin,what we derive for (1,0) applies to (-1,0) as well.

Take a point (1 + ǫ1, ǫ2) which is very close to (1,0). That is, ǫ1 and ǫ2 are very small. EvaluatingH at that point, we find the function for a constant contour of H.

H =1

4(1 + ǫ1)

4 +1

2ǫ22 −

1

2(1 + ǫ1)

2 (83)

=1

4(1 + 4ǫ1 + 6ǫ2

1 + 4ǫ31 + ǫ4

1) −1

2(1 + 2ǫ1 + ǫ2

1) +1

2ǫ22 (84)

= ǫ21 + ǫ3

1 +1

4ǫ41 +

1

2ǫ22 −

1

4(85)

17

Getting rid of higher order terms, and setting H to a constant c, we obtain

H = ǫ21 +

1

2ǫ22 = c (86)

Which is the equation of an ellipse. Thus, as we approach the equilibrium point, the level curves ofH approach an ellipse centered on the equlibrium point. Therefore, there are closed orbits aroundthe equilibrium points (±1, 0).

18


Recommended