ECSE 4962 Control Systems Design More on Control...

Post on 04-Nov-2020

1 views 0 download

Transcript of ECSE 4962 Control Systems Design More on Control...

ECSE 4962 Control Systems Design

Instructor: Professor John T. Wen

TA: Ben Potsaid

http://www.cat.rpi.edu/~wen/ECSE4962S04/

More on Control Design

Progress Report

• Postponed until March 24.

• Keep CII 2037 clean (throw away all trash!). Let me know if you notice any unbecoming behavior.

Progress Report

• Must contain your control specification and justification

• Time domain: rise time, settling time, steady state error, tracking error

• Frequency domain: bandwidth (based on desired trajectory and disturbance rejection), robustness

• Must contain analytical model, model based control design, and spec verification at least in simulation.

Progress Report

• Must contain some experimental results (e.g., friction ID, initial control results – based on your model.)

• Must compare progress against schedule.

• As a good example, check out Group 6’s reports and presentations on last year’s web page.

Final Report

• Final report must contain discussion of societal impact (e.g., similar products/prototypes/ideas, intellectual property, manufacturing issues, safety, economics, privacy, …)

Today

• Velocity estimation • A bit more on ID• Compensation for nonlinearity (feedback

linearization)• Trajectory tracking• Nonlinear pan-tilt model

• Friction ID: give a large pulse initially to break stiction.

t

V(t)

Addition Considerations

• Velocity Estimation– washout filter– finite difference + low pass filter– Kalman predictor (state observer based on

assumed plant )

+

=1

)(

ps

ssG

uy =&&

• Sampling: 3 to 10 times faster than closed loop bandwidth

More on ID

sgn( )v cI B B KVθ θ θ+ + =&& & &• Friction ID: Bv /K , Bc /K• K=N Kt Ka

N = Nmotor Next.gear

Kt = motor constant N-m/A (from data sheet)Ka = 0.1 A/V (Ben Potsaid’s calibration)

• Double check: take off timing belt, friction should be close to the values in the motor data sheet

How to get the full model?

• For a constant voltage V, the response is a first order exponential with time constant Bv /I

sgn( )v cB B KV

I I Iθ θ θ+ + =&& & &

( )1

22 1

( ) 1

( )1

1ln

( )( ) 1

tss

v ss

ss

t e

tB

tI t t

σθ θ

θθσ

θθ

−= −

= = −− −

& &&&

&&

Average over different input voltages and time intervals (avoid noisy regions!)

How to get the full model? (Cont.)

• Once Bv /I is found, we can find K /I :

v

v

BKI

B IK

=

Now we have the full model for control design!

• Then Bc /I :c cB BK

K I I=

sgn( )v cB B KV

I I Iθ θ θ+ + =&& & &

Feedback Linearization

• Equation of motion:

• If we have a good model, we can just cancel all the nonlinear terms!

• Then we get

• If friction not very well known, we can just use

uθ =&&

1 2 3 4

4

sgn( ) sin

(For pan axis: 0)

a a a V a

a

θ θ θ θ+ + = +=

&& & &

( )( )1 2 43

1sgn( ) sinV u a a a

aθ θ θ= + + −& &

( )43

1sinV u a

aθ= − 1 2 sgn( )a a uθ θ θ+ + =&& & &

Feedback Linearization (Cont.)

• Pro: control design is much simpler – only need to deal with two decoupled double integrators.

• Con: Model may not be accurate, so we’ll need to identify them based on experimental data.

• Con: longer computation time (slower sampling rate)

• Con: usually larger torque requirement

Given ytarget , vmax , amax , find a smooth curve yd(t) such that for some T

yd(0)=0, yd(T)=ytarget

Given ytarget , vmax , amax , find a smooth curve yd(t) such that for some T

yd(0)=0, yd(T)=ytarget

Trajectory Generation

• So far, all the point-to-point motions are implemented as steps. For smoother motion (and lower torque requirement), trajectory generation is almost always used.

max max( ) , ( )y t v y t a≤ ≤& &&

Common Trajectory Generation Algorithms

0 0.2 0.4 0.6 0.8 1 1.2 1.40

0.5

1x

0 0.2 0.4 0.6 0.8 1 1.2 1.40

1

2v

0 0.2 0.4 0.6 0.8 1 1.2 1.4-5

0

5a

• spline, e.g.,used) be alsocan basis(other

33

2210 ttt)t( λλλλλ +++=

• trapezoid (bounded acceleration)

• s-curve (bounded jerk)

• others: sinusoid, sigmoid

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

1

2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-10

0

10

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1x

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

1

2v

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-5

0

5a

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.20

0.5

1x

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.20

5

10v

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2-200

0

200a

0 0.05 0.1 0.15 0.2 0.250

0.5

1x

0 0.05 0.1 0.15 0.2 0.250

5

10v

0 0.05 0.1 0.15 0.2 0.25-200

0

200a

MATLAB code for trapezoid and s-curve on-line (see trajgen.m), but you must convert them to Simulink if you’d like to use them

Full Nonlinear Model

The code to generate the general equation of motion is posted: pantilt.m, you just have to run it in MATLAB to obtain the expressions for M, C, G.

To use pantilt.m, first put the mechanism in the zero-configuration (all angles are zero). Choose a coordinate frame.Represent pi-1,i , pi , hi in this coordinate frame. Then run pantilt.m.

For simulation, you need to substitute in the parameters m1, m2, I1

c, I2c, p1, p2.

Pan-Tilt Platform

The pan-tilt platform is like a 2-link robot (O1 and O2 coincide).

With motors and gears attached

O2

O1

h1=[0,0,1]T

h2=[0,1,0]T

p12=[0,0,0]T

First Link (Pan)

p1=[ lca1, lca2, lca3-l1]T

Second Link (Tilt)

p2=[ lcb1, lcb2, lcb3]T

Skeletal Pan

p1=[ 0,0.0125m, -0.0981m, 0.0590m]T

Skeletal Tilt

p2=[ 0, 0.003m,0]T

0.003m

Choice of Motors / Gears

You will use the design resource page http://www.cat.rpi.edu/~potsaid/csd/Resources.html to find different choices of motors and gears. Manufacturers will provide the dimension and mass, but not the location of center of mass and inertia. Take a guess of where the center of mass is (e.g., roughly the geometric center), and approximate motors and gears as cylinders with uniform density. Then you have (a guess) of the CM location and inertia which you can use in your design iteration.

, cb bI m

Combining Two Bodies

, ca aI m

ap

bp

CM of combined bodies

cp

, cc cI m

( ) /c a b

c a a b b c

m m m

p m p m p m

= +

= +

( )( )

( ) ( )

2

2

( ),

( ),

Ta a a ac ac ac ac c ac

Tb b b bc bc bc bc c bc

c a bc c

I I m p I p p p p p

I I m p I p p p p p

I I I

= + − = −

= + − = −

= +

This is given in a MATLAB program compositebodies.m(which requires masscenter.m and parallelaxis.m)

Adding Motors / Gears to Skeleton

For your design, you need to

• obtain m from the manufacturer’s datasheet

• calculate Ic and location of CM based on some simplifying assumptions and the geometry of the part

• determine p based on where you will mount the part

An Example of Putting Things TogetherConsider the tilt axis with pulley, hub, and payload added.

Putting Things Together (Cont.)

32768 Kg/m (density of Aluminum)ρ =

0.0381m (diameter of hub)

0.0630m (diameter of pulley)

0.0095m (diameter of hole)

0.0095m (thickness of hub)

0.0095m (thickness of pulley)

0.0190m (thickness of hole)

hub

pulley

hole

hub

pulley

hole

d

d

d

t

t

t

d

==

==

=

=

1 2 3, , 0.0762m, 0.0381m, 0.0095m (dimension of payload)d d =

First gather part data:

Putting Things Together (Cont.)

Mass and inertia may then be found (hole has negative mass).2( / 2)m d tρπ=

22

2

22

3 0 012 2

0 02 2

0 0 312 2

c

m dt

m dI

m dt

+

= +

For a cylinder along the y axis

( )

( )

( )

2 22 3

2 21 3

2 21 2

0 012

0 012

0 012

c

md d

mI d d

md d

+ = + +

For a cube

Putting Things Together (Cont.)

Determine where you are going to put these components, thus pin down p for each part.

Repeatedly apply the composite body formula to find the overall m, Ic, p

The MATLAB code for the tilt axis example is on-line in bodyb.m, you need to modify it for the pan axis.

Once you obtain m, Ic, p for both pan and tilt axes, you can substitute the values into the equation of motion. Now you are ready to do simulation!

Overall Dimension

link with better pictures:http://www.cat.rpi.edu/~potsaid/csd/lect2_modeling/lecture2_modeling.html

Next Week

• Spring break! But get ready for your progress report presentation.

Tomorrow at 6pm in CII 2037

• Group 1: 6pm, Group 2: 6:15pm, Group 3: 6:30pm, Group 4: 6:45pm, Group 5: 7:00pm, Group 6:7:15pm, Group 7: 7:30pm.

• Prepare to discuss the progress of your project.

• Bring your lab notebook