Attitude Control System - Princeton University · 2/12/20 4 Spacecraft Attitude Disturbances...

31
2/12/20 1 Copyright 2016 by Robert Stengel. All rights reserved. For educational use only. http://www.princeton.edu/~stengel/MAE342.html Spacecraft Attitude Control Space System Design, MAE 342, Princeton University Robert Stengel More on Rotation Matrices Direction cosine matrix Quaternions Yo-yo De-Spin Continuously Variable Torque Controllers On/Off-Torque Controllers 1 1 Attitude Control System 2 Fortescue 2

Transcript of Attitude Control System - Princeton University · 2/12/20 4 Spacecraft Attitude Disturbances...

2/12/20

1

Copyright 2016 by Robert Stengel. All rights reserved. For educational use only.http://www.princeton.edu/~stengel/MAE342.html

Spacecraft Attitude ControlSpace System Design, MAE 342, Princeton University

Robert Stengel

• More on Rotation Matrices• Direction cosine matrix • Quaternions

• Yo-yo De-Spin• Continuously Variable Torque Controllers• On/Off-Torque Controllers

1

1

Attitude Control System

2Fortescue

2

2/12/20

2

3

UARS Attitude Control System

3

Spacecraft Attitude Control Inputs• On-Board Sensors

– Inertial Measurements• Accelerometers• Angle sensors• Angular-rate sensors

– Optical Sensors• Star sensors• Sun sensors• Horizon sensors

• Off-Board Observations– Ground-Based Tracking

• Radar• Navigation beacons (VOR/DME, LORAN, …)

– Spaced-Based Tracking• GPS, GLONASS, …

4

4

2/12/20

3

Potential Accuracies of External Attitude Measurements

Fortescue5

5

Spacecraft Attitude Control Outputs• Continuous Control Torques

– Control Moment/Reaction Wheel Gyros– Magnetic Torquers– Solar Panels

• Pulsed Control Torques– Reaction Control Thrusters (RCS)

• One-Shot Devices– RCS Spin-up– Yo-Yo De-Spin

6

6

2/12/20

4

Spacecraft Attitude Disturbances• External Torques

– Solar radiation pressure– Gravity gradient– Magnetic fields– Aerodynamics– Can be put to good use if related to

attitude control objectives• Vehicle-Based Torques

– Mass movement– Elasticity– Out-gassing

7

7

More on Rotation Matrices and Quaternions

8

8

2/12/20

5

§ Cosines of angles between each I axis and each B axis

§ Projections of vector components in one frame on the other

H IB =

cosδ11 cosδ21 cosδ31cosδ12 cosδ22 cosδ32cosδ13 cosδ23 cosδ33

⎢⎢⎢

⎥⎥⎥

9

Direction Cosine Matrix

rB = H IBrI

9

Angular orientation of one axis system, B, with respect to another, I

10

Euler’s Rotation Formula

rB = H IBrI

= aTrI( )a + rI − aTrI( )a⎡⎣ ⎤⎦cosφ + sinφ rI × a( )

= cosφ rI + 1− cosφ( ) aTrI( )a − sinφ a × rI( )

Vector transformation

a !a1a2a3

⎢⎢⎢

⎥⎥⎥

10

2/12/20

6

11

Euler’s Formula

rB = H IBrI = cosφ rI + 1− cosφ( ) aTrI( )a − sinφ a × rI( )

aTrI( )a = aaT( )rI

H IB = cosφ I3 + 1− cosφ( )aaT − sinφ !a

Identity

Rotation matrix

11

Quaternion Derived from Euler Rotation Angle and Orientation

q =

q1q2q3q4

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

!aφq4

⎣⎢⎢

⎦⎥⎥=

sin φ 2( )a1a2a3

⎜⎜⎜

⎟⎟⎟

cos φ 2( )

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

§ Not singular at θ = ±90°§ 4-parameter representation of 3 parameters;

hence, a constraint must be satisfied

12

qT q = q12 + q2

2 + q32 + q4

2

= sin2 φ 2( ) + cos2 φ 2( ) = 1

Quaternion vector4 parameters based on Euler’s formula

12

2/12/20

7

Rotation Matrix Expressed with Quaternion

13

H I

B = q42 − aφ

T aφ( )⎡⎣ ⎤⎦I3 + 2aφaφT − 2q4 !aφ

H IB =

q12 − q2

2 − q32 + q4

2 2 q1q2 + q3q4( ) 2 q1q3 − q2q4( )2 q1q2 − q3q4( ) −q1

2 + q22 − q3

2 + q42 2 q2q3 + q1q4( )

2 q1q3 + q2q4( ) 2 q2q3 − q1q4( ) −q12 − q2

2 + q32 + q4

2

⎢⎢⎢⎢

⎥⎥⎥⎥

From Euler’s formula

Rotation matrix from quaternion

13

Quaternion Expressed from Elements of Rotation Matrix

14

q4 =121+ h11 + h22 + h33

aφ =q1q2q3

⎢⎢⎢

⎥⎥⎥= 14q4

h23 − h32( )h31 − h13( )h12 − h21( )

⎢⎢⎢⎢

⎥⎥⎥⎥

Assuming that q4 ≠ 0

Pisacane, 2005

14

2/12/20

8

Successive Rotations Expressed by Products of Quaternions and

Rotation Matrices

15

qAB : Rotation from A to BqBC : Rotation from B to CqAC : Rotation from A to C

Rotation from Frame A to Frame C through Intermediate Frame B

HAC qA

C( ) = HBC qB

C( )HAB qA

B( )

qAC =

aφq4

⎣⎢⎢

⎦⎥⎥A

C

= qBCqA

B !q4( )B

C aφAB + q4( )A

B aφBC − "aφ( )B

CaφA

B

q4( )BC q4( )A

B − aφBC( )T aφAB

⎢⎢⎢

⎥⎥⎥

Quaternion Multiplication Rule

Matrix Multiplication Rule

15

Quaternion Vector Kinematics

16

ODE is linear in both q and ωB

!q = ddt

aφq4

⎣⎢⎢

⎦⎥⎥= 12

q4ω B − "ω Baφ−ω B

Taφ

⎢⎢

⎥⎥

!q1!q2!q3!q4

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

= 12

0 ω z −ω y ω x

−ω z 0 ω x ω y

ω y −ω x 0 ω z

−ω x −ω y −ω z 0

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥B

q1q2q3q4

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

Pisacane, 2005

16

2/12/20

9

Propagate Quaternion Vector

17

dq t( )dt

=

!q1 t( )!q2 t( )!q3 t( )!q4 t( )

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

= 12

0 ω z t( ) −ω y t( ) ω x t( )−ω z t( ) 0 ω x t( ) ω y t( )ω y t( ) −ω x t( ) 0 ω z t( )−ω x t( ) −ω y t( ) −ω z t( ) 0

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥B

q1 t( )q2 t( )q3 t( )q4 t( )

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

qint tk( ) = q tk−1( ) + dq τ( )dt

dτtk−1

tk

Digital integration to compute q(tk)

Normalize q(tk) to enforce constraint

q tk( ) = qint tk( ) qintT tk( )qint tk( )

17

Quaternion Interface with Euler Angles

18

• Quaternion and its kinematics unaffected by Euler angle convention• Definition of HIB makes the connection• Specify Euler angle convention (e.g., 1-2-3 or 3-1-3) ; for (1-2-3),

H IB =

h11 h12 h13h21 h22 h23h31 h32 h33

⎢⎢⎢

⎥⎥⎥I

B

=cosθ cosψ cosθ sinψ −sinθ

−cosφ sinψ + sinφ sinθ cosψ cosφ cosψ + sinφ sinθ sinψ sinφ cosθsinφ sinψ + cosφ sinθ cosψ −sinφ cosψ + cosφ sinθ sinψ cosφ cosθ

⎢⎢⎢

⎥⎥⎥

• Apply equations on earlier slide to find q(0)• Perform trigonometric inversions as indicated to generate

[Φ(tk), θ(tk),Ψ(tk)] from q(tk)

18

2/12/20

10

Yo-Yo De-Spin

19

19

Mars Odyssey Launch PhasesBooster Separation Stage 2 Separation Stage 2 Ignition

Heat Shield Separation

Stage 3 Spinup Yo-Yo De-Spin

20

20

2/12/20

11

Yo-Yo De-spin

• Satellite is initially spinning at ωz rad/s• Angular momentum and rotational energy of satellite

plus expendable masses are conserved• Masses are released, moment of inertia increases, and

angular velocity of satellite decreases• With proper cord length (independent of initial spin

rate), satellite is de-spun to zero angular velocity

Kaplan

21

21

Yo-Yo De-spin

ω final =ω initialcR2 − l2

cR2 + l2⎛⎝⎜

⎞⎠⎟= 0 if l = R c

R = spacecraft radiusl = tether length

c = mR2 + Izz

mR22

m = mass of 2 deployable objectsI zz = satellite moment of inertia

φ = angle between split hinge and tangent point

Angular momentum

Rotational energy

Simultaneous solution for final angular rate

hz = I zzω z +mR2 ω z +φ

2 ω z + !φ( )⎡⎣ ⎤⎦

T = 1

2I zzω z

2 + 12mR2 ω z

2 +φ 2 ω z + !φ( )2⎡⎣

⎤⎦

22

Spaceloft 7 Sounding Rocket De-Spinhttps://www.youtube.com/watch?v=5ZqbjQ9ASc8

22

2/12/20

12

Continuously Variable Torque Controllers

23

23

Overview of Control

24

Single- or multi-axis interpretation

24

2/12/20

13

Single-Axis “Classical” Control of Non-Spinning

Spacecraft

Pitching motion (about the y axis) is to be controlled

!p t( )!q t( )!r t( )

⎢⎢⎢⎢

⎥⎥⎥⎥

=

Mx t( ) / I xx

My t( ) / I yy

Mz t( ) / I zz

⎢⎢⎢⎢

⎥⎥⎥⎥

I zz − I yy( )q t( )r t( ) / I xx

I xx − I zz( ) p t( )r t( ) / I yy

I yy − I xx( ) p t( )q t( ) / I zz

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

!q t( ) = My t( ) / I yy• For motion about the y axis

only, this reduces to

!θ t( ) = q t( )• Pitch angle equation

25

25

Single-Axis Angular Rate Control of Non-Spinning Spacecraft

e(t) = qc(t)− q(t)u(t) = Ce(t)

Simplified Control Law (C = Control Gain)

• Small angle and angular rate perturbations• Linear actuator, e.g.,

– Momentum wheel• Linear measurement, e.g.,

– Angular rate gyro

26

26

2/12/20

14

Angular Rate Control

• Iyy: moment of inertia • q(t): angular rate• qc(t): desired angular rate• gA: actuator gain • gAu(t): control torque

q(t) = gA

I yy

u(t)0

t

∫ dt = CgAI yy

e(t)0

t

∫ dt = CgAI yy

qc − q(t)[ ]0

t

∫ dt

27

27

Step Response of Angular Rate Controller

q(t) = qc 1− e− CgA

Iyy

⎝⎜

⎠⎟ t⎡

⎢⎢

⎥⎥= qc 1− e

λt⎡⎣ ⎤⎦ = qc 1− e− t τ⎡

⎣⎢⎤⎦⎥

• where– λ = –CgA/Iyy = eigenvalue or

root of the system (rad/s)– τ = Iyy/CgA = time constant of

the response (s)

Step input :

qc(t) =0, t < 01, t ≥ 0

⎧⎨⎪

⎩⎪

28

28

2/12/20

15

Angle Control of the Spacecraft

e(t) = θc(t)−θ(t)u(t) = Ce(t)

Angle Control Law (C = Control Gain)

• Small angle and angular rate perturbations• Linear actuator, e.g.,

– Momentum wheel• Linear measurement, e.g.,

– Earth horizon sensor

29

29

Model of Dynamics and Angle Control

θ(t) = gA

I yy

u(t)0

t

∫ dt0

t

∫ dt = CgAI yy

e(t)0

t

∫ dt0

t

∫ dt = CgAI yy

θc −θ(t)[ ]0

t

∫ dt dt0

t

• 2nd-order ordinary differential equation

d 2θ(t)dt 2

= !!θ(t) = CgAI yy

θc −θ(t)[ ]

• Output angle, θ(t), as a function of time

30

30

2/12/20

16

Rewrite 2nd-Order Model as Two 1st-Order Equations

!θ(t) = q(t)

!q(t) = CgAI yy

θc −θ(t)[ ]

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥= 0 1

0 0⎡

⎣⎢

⎦⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0gA / I yy

⎣⎢⎢

⎦⎥⎥C θc(t)−θ(t)[ ]

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥=

0 1−CgA / I yy 0

⎣⎢⎢

⎦⎥⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0CgA / I yy

⎣⎢⎢

⎦⎥⎥θc

31

31

Simulation of Step Responsewith Angle Feedback

Objective is to control angle to 1 rad, but solution oscillates about the target

CgA/Iyy = 1, 0.5, and 0.25 32

32

2/12/20

17

What Went Wrong?• No damping!• Solution: Add rate feedback

Closed-loop dynamic equation

u(t) = c1 θc (t) −θ(t)[ ]− c2q(t)

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥=

0 1−c1gA / I yy −c2gA / I yy

⎣⎢⎢

⎦⎥⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0c1gA / I yy

⎣⎢⎢

⎦⎥⎥θc

• Control law with rate feedback

33

33

c1gA /Iyy = 1 c2gA /Iyy = 0, 1.414, 2.828

Step Response with Angle and Rate Feedback

34

34

2/12/20

18

2nd-Order Dynamics

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥=

0 1−c1gA / I yy −c2gA / I yy

⎣⎢⎢

⎦⎥⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0c1gA / I yy

⎣⎢⎢

⎦⎥⎥θc

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥=

0 1−ω n

2 −2ζω n

⎣⎢⎢

⎦⎥⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0ω n

2

⎣⎢⎢

⎦⎥⎥θc

Oscillation and damping are induced by linear feedback control

ω n = c1gA / I yy

ζ = c2gA / I yy( ) / 2ω n = c2 / 2 c1gAI yy

Natural frequency and damping ratio

35

35

Effect of Damping on Eigenvalues, Damping Ratio, and Natural Frequency

λ1, λ2 =0 + 1.0000i0 - 1.0000i

-0.7070 + 0.7072i-0.7070 - 0.7072i

-0.4143-2.4137

Eigenvalues

ζ = ωn = (rad/s) 0 1

0.707 1

Overdamped

Damping Ratio, Natural Frequency

c1gA /Iyy = 1 c2gA /Iyy = 0, 1.414, 2.828

36

36

2/12/20

19

Control System Design to Adjust Roots

Choose control gains to satisfy desirable eigenvalue range

37

37

Control System Design to Adjust Transient Response

Choose control gains to satisfy step response criteria

38

38

2/12/20

20

Control System Design to Adjust Frequency Response

Choose control gains to satisfy frequency response criteria

39

39

Laplace Transform of the State Vector

x(s) = Adj sI− F( )Δ(s)

Gu(s)

Δθ(s)Δq(s)

⎣⎢⎢

⎦⎥⎥=

c1gA I yy

sc1gA / I yy

⎣⎢⎢

⎦⎥⎥

Δ(s)Δu(s) =

c1gA I yy

sc1gA / I yy

⎣⎢⎢

⎦⎥⎥Δu(s)

s( )2 + c2gA I yy( ) s( ) + c1gA I yy

Applied to the closed-loop system

Neglecting the initial condition

40

40

2/12/20

21

Frequency Response of the System

Δθ( jω)Δu( jω)

= ωn2

jω( )2 + 2ζωn jω( ) + ωn2

Δq( jω)Δu( jω)

=jω( )ωn

2

jω( )2 + 2ζωn jω( ) + ωn2

Angle Frequency Response

Rate Frequency Response

•Bode plot– 20 log(Amplitude Ratio) [dB] vs. log ω– Phase angle (deg) vs. log ω

41

σ = jω

41

Proportional-Integral-Derivative (PID) Controller

PID Control Law (or compensator):

e(t) = θC (t)−θ(t)

u(t) = cI e(t)∫ dt + cPe(t)+ cDde(t)dt

42

42

2/12/20

22

Proportional-Integral-Derivative (PID) Controller

Control Law Transfer Function:

e(s) = θC (s)−θ(s)

Differentiator produces rate term for dampingIntegrator compensates for persistent (bias) disturbance

43

u(s) = cPe(s)+ cIe(s)s

+ cDse(s)

u(s)e(s)

= cI + cPs + cDs2

s

43

Proportional-Integral-Derivative (PID) Controller

Forward-Loop Angle Transfer Function:

θ(s)e(s)

= cI + cPs + cDs2

s⎡

⎣⎢

⎦⎥

gAI yys

2

⎣⎢

⎦⎥

44

44

2/12/20

23

Closed-Loop Spacecraft Control Transfer Function w/PID Control

Closed-Loop Angle Transfer Function:

θ(s)θc(s)

=

θ(s)e(s)

1+ θ(s)e(s)

=

cI + cPs + cDs2

I yys3 gA

⎣⎢

⎦⎥

1+ cI + cPs + cDs2

I yys3 gA

⎣⎢

⎦⎥

= cI + cPs + cDs2

cI + cPs + cDs2 + gA / I yys

3 45

45

Closed-Loop Frequency Response w/PID Control

Let s = jω. As ω -> 0

θ( jω)θc ( jω)

→ cIcI

=1 Steady-state output = desired steady-state input

θ(s)θc(s)

= cI + cPs + cDs2

cI + cPs + cDs2 + gA / I yys

3

As ω -> ∞

θ( jω )θc( jω )

→ −cDω2

− jI yyω3 gA =

cDjI yyω

gA = − jcDI yyω

gA

AR→ cDI yyω

gA; φ → −90 deg

High-frequency response “rolls off”

and lags input

46

46

2/12/20

24

State (“Phase”)-Plane Plots

Cross-plot of angle (or displacement) against rateTime not shown explicitly in phase-plane plot

47

47

Effect of Damping Ratio on State-Plane Plots

Damping ratio = 0.1 Damping ratio = 0.3 Damping ratio = –0.1(Unstable)

48

48

2/12/20

25

On/Off-Torque Controllers

49

49

Single-Axis State History with Constant Thrust

!θ(t)!q(t)

⎣⎢⎢

⎦⎥⎥= 0 1

0 0⎡

⎣⎢

⎦⎥

θ(t)q(t)

⎣⎢⎢

⎦⎥⎥+

0gA / I yy

⎣⎢⎢

⎦⎥⎥u(t)

What is the time evolution of the state while a thruster is on [u(t) = 1]?

q(t) = gA / I yy( )t + q(0)

θ(t) = gA / I yy( )t 2 / 2 + q(0)t +θ(0)Neglecting initial conditions, what does

the phase-plane plot look like?

What if the control torque can only be turned ON or OFF?

50

u t( ) =+1, 0, or −1

50

2/12/20

26

Constant-Thrust (Acceleration) Trajectories

For u = 1,Acceleration = gA/Iyy

Thrusting away from the origin Thrusting to the origin

With zero thrust, what does the phase-plane plot look like?

For u = –1,Acceleration = –gA/Iyy

51

51

Phase Plane Plot with Zero Thrust

52

How can you use this information to design an on-off control law?

52

2/12/20

27

Switching-Curve Control Law for On-Off Thrusters

• Origin (i.e., zero rate and attitude error) can be reached from any point in the state space

• Control logic:– Thrust in one

direction until switching curve is reached

– Then reverse thrust

– Switch thrust off when errors are zero

53

53

Switching-Curve Control with Coasting Zone

54

54

2/12/20

28

Apollo Lunar Module Control• 16 reaction control thrusters

– Control about 3 axes– Redundancy of thrusters

• LM Digital Autopilot

55

55

Apollo Lunar Module Phase-Plane Control Logic

• Coast zones conserve RCS propellant by limiting angular rate• With no coast zone, thrusters would chatter on and off at

origin, wasting propellant• State limit cycles about target attitude• Switching curve shapes modified to provide robustness

against modeling errors– RCS thrust level– Moment of inertia 56

56

2/12/20

29

Apollo Lunar Module Phase-Plane Control Law

Switching logic implemented in the Apollo Guidance & Control Computer

More efficient than a linear control law for on-off actuators

57

57

Typical Phase-Plane Trajectory

• With angle error, RCS turned on until reaching OFF switching curve

• Phase point drifts until reaching ON switching curve• RCS turned off when rate is 0-• Limit cycle maintained with minimum-impulse RCS firings

– Amplitude = ±1 deg (coarse), ±0.1 deg (fine)

58

58

2/12/20

30

Multi-Axis Spacecraft Control

59

Asymmetry Introduces Dynamic Coupling, Complicating Control

59

Next Time:Sensors and Actuators

60

60

2/12/20

31

Supplemental Material

61

61

62

GOES Attitude Control Sub-System

62