lecture 26. control of the diver
DESCRIPTION
Lecture 26. Control of the Diver. In order for a diver to do what he or she does the diver applies effective torques at the joints. We want to find a recipe for doing this that will cause the simulated diver to execute the diver. This is a control problem. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/1.jpg)
1
Lecture 26. Control of the Diver
In order for a diver to do what he or she doesthe diver applies effective torques at the joints
We want to find a recipe for doing this that will cause the simulated diver to execute the diver
This is a control problem
![Page 2: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/2.jpg)
2
Tomorrow’s office hours will be
1:30 to 3:30
I have to leave at 3:30
![Page 3: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/3.jpg)
3
We have a special case of nonlinear control hereand I want to explore that, beginning with some discussion
and then some simpler models
![Page 4: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/4.jpg)
4
Suppose we want the solution of a second order system to follow some prescription
€
y t( ) → yd t( )
We can write the second order system
€
˙ ̇ y + 2ζλ ˙ y + λ2y = f t( )
The error
€
e = y t( ) − yd t( ) can be made to satisfy the homogeneous equation
€
˙ ̇ e + 2ζλ ˙ e + λ2e = 0
by the proper choice of f(t)
![Page 5: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/5.jpg)
5
€
f t( ) = ˙ ̇ y d + 2ζλ ˙ y d + λ2yd
choose
€
˙ ̇ y + 2ζλ ˙ y + λ2y = f t( )
then
€
˙ ̇ y + 2ζλ ˙ y + λ2y = ˙ ̇ y d + 2ζλ ˙ y d + λ2yd
is the desired error equation
€
˙ ̇ e + 2ζλ ˙ e + λ2e = 0
![Page 6: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/6.jpg)
6
This can be extended to a quasilinear system, which is what we typically have
€
˙ ̇ y = g ˙ y , y, t( ) + f t( )
€
f t( ) = ˙ ̇ y d + 2ζλ ˙ y d + λ2yd − 2ζλ ˙ y − λ2y − g ˙ y , y,t( )
converts the nonlinear equation to the linear form that yields a decaying error
given
this choice for f(t)
This is called feedback linearization
![Page 7: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/7.jpg)
7
What are we doing here?
€
˙ ̇ y = ˙ ̇ y d + 2ζλ ˙ y d + λ2yd − 2ζλ ˙ y − λ2y
We are asking that
€
˙ ̇ y become
and we choose the forcing function to make this happen
This is cool, but it’s only 1D — what happens in a coupled system?
![Page 8: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/8.jpg)
8
For the class of problems we are considering, which includes divers and some robots,we can choose the generalized coordinates such that
each external force appears in only one reduced Hamilton equation
This is not necessary, but it cleans up the algebra and I’ll assume we’ve taken the trouble to do that, so my simplest coupled case is
€
a11˙ ̇ y 1 + a12˙ ̇ y 2 + g1 ˙ y 1, y1, ˙ y 2,y2,t( ) = f1 t( )a21˙ ̇ y 1 + a22˙ ̇ y 2 + g2 ˙ y 1,y1, ˙ y 2,y2,t( ) = f2 t( )
![Page 9: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/9.jpg)
9
€
˙ ̇ y 1 = ˙ ̇ y 1d + 2ζ 1λ1 ˙ y 1d + λ12y1d − 2ζ 1λ1 ˙ y 1 − λ1
2y1
€
˙ ̇ y 2 = ˙ ̇ y 2d + 2ζ 2λ 2 ˙ y 2d + λ 22 y2d − 2ζ 2λ 2 ˙ y 2 − λ 2
2 y2
substitute
into the system and solve for f1 and f2
When these are substituted back into the original equations we obtain
![Page 10: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/10.jpg)
10
€
a11 ˙ ̇ y 1 + 2ζ 1λ1 ˙ y + λ12y1 − ˙ ̇ y 1d − 2ζ 1λ1 ˙ y 1d − λ1
2y1d( )
+ a12 ˙ ̇ y 2 + 2ζ 2λ 2 ˙ y + λ 22 y − ˙ ̇ y 2d − 2ζ 2λ 2 ˙ y 2d − λ 2
2 y2d( ) = 0
€
a21 ˙ ̇ y 1 + 2ζ 1λ1 ˙ y + λ12y1 − ˙ ̇ y 1d − 2ζ 1λ1 ˙ y 1d − λ1
2y1d( )
+ a22 ˙ ̇ y 2 + 2ζ 2λ 2 ˙ y + λ 22 y − ˙ ̇ y 2d − 2ζ 2λ 2 ˙ y 2d − λ 2
2 y2d( ) = 0
and if the system is not singular
€
a11a22 − a12a21 ≠ 0( )
then the identical parenthetical equations must equal zero: the errors vanish asymptotically
![Page 11: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/11.jpg)
11
This looks like magic, but it isn’t
To make this work we have a necessary condition: as many forces as controlled variables
There’re more, but I can’t give them all to you.
It works for sufficiently simple systems with only revolute joints —divers and many robots (not the Stanford arm)
I’d like to look at the inverted double pendulum from this perspective before moving on to more complicated systems
![Page 12: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/12.jpg)
12
Planar inverted double pendulum: base fixed to the ground
parameters:l1, l2m1, m2
I treat them as slendermembers
![Page 13: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/13.jpg)
13
€
q =ψ1
ψ 2 −ψ1
⎧ ⎨ ⎩
⎫ ⎬ ⎭
We know how the double pendulum goes
Six holonomic constraints to restrict it to the x = 0 plane
Four connectivity constraints relating CMs to the ground
Apply all ten constraints and define a two dimensional q
![Page 14: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/14.jpg)
14
We can form a Lagrangian
![Page 15: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/15.jpg)
15
There are no additional constraints, so we can let qdot equal u
We can find p
and then the pieces of Hamilton’s equations
![Page 16: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/16.jpg)
16
![Page 17: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/17.jpg)
17
We have four differential equations and seven algebraic equations
(We can actually look at these in the Mathematica notebook)
The next issue is designing the control
€
u = ˙ q =˙ ψ 1
˙ ψ 2 − ˙ ψ 1
⎧ ⎨ ⎩
⎫ ⎬ ⎭⇒ ˙ u = ˙ ̇ q =
˙ ̇ ψ 1˙ ̇ ψ 2 − ˙ ̇ ψ 1
⎧ ⎨ ⎩
⎫ ⎬ ⎭
€
˙ ̇ ψ 1, ˙ ̇ ψ 2so by assigning we assign
€
˙ u 1, ˙ u 2
![Page 18: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/18.jpg)
18
We can look at various desired angles, both steady and time-dependent
Here’s the algorithm for vertical stabilization
![Page 19: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/19.jpg)
19
and the result
![Page 20: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/20.jpg)
20
Here we ask both links to follow sinusoidal paths out of phase
![Page 21: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/21.jpg)
21
and here’s the result of that
![Page 22: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/22.jpg)
22
Here are the torques required to perform the tracking shown on the previous slide
![Page 23: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/23.jpg)
23
How about a simple diving problem — a three link diver?
![Page 24: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/24.jpg)
24
Three links —> 18 variables
Confine to the x constant plane —> nine variables
Four connectivity constraints —> five variables
Number the links from the bottom to the topand select the middle link as the reference link
![Page 25: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/25.jpg)
25
There are two torques — one at each joint — as shown in the sketchand we want to choose our variables accordingly
€
q =
y2
z2
ψ 2
ψ1 −ψ 2
ψ 3 −ψ 2
⎧
⎨
⎪ ⎪ ⎪
⎩
⎪ ⎪ ⎪
⎫
⎬
⎪ ⎪ ⎪
⎭
⎪ ⎪ ⎪
![Page 26: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/26.jpg)
26
We get the Lagrangian as usual
![Page 27: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/27.jpg)
27
This is a fancy torque, suitable for 3D
but of course only two of the components actually do anything
The important thing is that the choice of q has isolated the two torques
![Page 28: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/28.jpg)
28
Note that we have written this in terms of the desired qs, not the yi
The next slide shows the development of the Zs and their gradients
![Page 29: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/29.jpg)
29
![Page 30: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/30.jpg)
30
We need the symbolic versions to build the equations we intend to integrate
![Page 31: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/31.jpg)
31
![Page 32: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/32.jpg)
32
The two internal angles start at zero, go to a maximum of 2π/3, and back to zeroin the time interval tf
Midway through the ends of the two outboard links should touch
We can do this integration and see what the results are
We can start by looking at the closest approach, when the two links are to touch
![Page 33: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/33.jpg)
33
![Page 34: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/34.jpg)
34
![Page 35: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/35.jpg)
35
![Page 36: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/36.jpg)
36
![Page 37: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/37.jpg)
37
![Page 38: Lecture 26. Control of the Diver](https://reader033.vdocuments.mx/reader033/viewer/2022051421/5681672c550346895ddbcee4/html5/thumbnails/38.jpg)
38
It is now probably worth looking at the Mathematica notebooks