0% found this document useful (0 votes)
126 views

Nonlinear Control and Aerospace Applications 2x1

This document provides an introduction to a course on nonlinear control and aerospace applications. It outlines the course organization including lecture and lab schedules. It also lists relevant bibliography sources and provides an overview of course topics, which will cover nonlinear systems analysis and control design methods applied to aerospace systems like spacecraft and aircraft. Example dynamic systems like the pendulum and mass-spring-damper are presented to illustrate modeling and numerical integration concepts.

Uploaded by

ciccio77777
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Nonlinear Control and Aerospace Applications 2x1

This document provides an introduction to a course on nonlinear control and aerospace applications. It outlines the course organization including lecture and lab schedules. It also lists relevant bibliography sources and provides an overview of course topics, which will cover nonlinear systems analysis and control design methods applied to aerospace systems like spacecraft and aircraft. Example dynamic systems like the pendulum and mass-spring-damper are presented to illustrate modeling and numerical integration concepts.

Uploaded by

ciccio77777
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 333

Nonlinear control and aerospace applications

Introduction to the course

Carlo Novara

Politecnico di Torino
Tel. +39 011 0907019
Email: [email protected]

Course organization

Lectures:
◮ schedule:
⋆ lectures: Wednesday, 14:30-17:30
⋆ backup lectures: Monday, 8:30-11:30 (when needed)
◮ theory
◮ examples/exercises
◮ simulations.
Lab exercises:
◮ schedule: Thursday, 8:30-10 (not all weeks)
◮ exercises/problems/design
◮ use of Matlab/Simulink.
Bibliography

1 C. Novara, Nonlinear Control and Aerospace Applications: lecture notes.


Politecnico di Torino, 2017.
2 J-J. E. Slotine and W. Li, Applied Nonlinear Control, Prentice Hall, 1991.
3 H.K. Khalil, Nonlinear Systems, Prentice Hall, 2002.
4 S. Sastry, Nonlinear Systems: Analysis, Stability, and Control, Springer, 1999.
5 M. H. Kaplan, Modern Spacecraft Dynamics and Control, I. John Wiley and Sons,
1976.
6 B. Wie, Space Vehicle Dynamics and Control. Aiaa, 1998.
7 F. Markley and J. Crassidis, Fundamentals of Spacecraft Attitude Determination
and Control. Cambridge University Press, 2014.
8 M.J. Sidi, Spacecraft Dynamics and Control: A Practical Engineering Approach.
Cambridge University Press, 1997.
9 D. G. Hull, Fundamentals of Airplane Flight Mechanics, Springer, 2007.
10 A. Tewari, Atmospheric and Space Flight Dynamics: Modeling and Simulation
with Matlab and Simulink, Birkhauser, 2007.

Course introduction

Control is a multi-disciplinary area, involving theoretical, numerical


and hardware tools, finalized at modifying the behavior of real-world
systems.
Control is nowadays fundamental in most fields of science and
technology:
◮ aerospace, automotive, robotics and energy, biomedical, data analytics,
communications and networks.
Key observation: most real-world dynamic systems are nonlinear.
Course objectives:
◮ provide the basic methodologies for analyzing and controlling nonlinear
systems;
◮ show how these methodologies can be effectively applied to aerospace
systems.
Course overview

1 Nonlinear systems
1 Analysis: dynamic system properties; state equations; stability
concepts; Lyapunov stability.
2 Control design: linearization and gain scheduling; feedback
linearization; sliding mode control; nonlinear model predictive control;
extended Kalman filter.
2 Aerospace
1 General topics: coordinate reference systems; rotations and
translations; rigid body attitude kinematics and dynamics; orbital
dynamics.
2 Aerospace applications/case studies will be about spacecraft
orbit/trajectory control; spacecraft attitude control; aircraft flight
control.

Nonlinear Control and Aerospace Applications

Dynamic systems

Carlo Novara
Politecnico di Torino
Dynamic systems - General definition

A dynamic system can be (roughly) defined as a set of interacting


objects which evolve over time.

Examples:
– vehicles
– mechanical systems
– electrical circuits
– aircrafts
– spacecrafts, satellites
– stock market
– animal population
– atmosphere
– planet systems
– and so on...

Dynamic systems - A classic example: pendulum

• Variables:
– : angular position
– : angular velocity
– : applied torque.


• Parameters:
– : mass
– : length
– : gravity acceleration.
Dynamic systems - Variables and signals

• The time evolution of a dynamic system is described by quantities


called variables.

• The functions which represent the time evolution of the variables


are called signals.
– In other words, a signal is a function of time that represents the behavior of
the corresponding variable.

1
T(t)

-1
0 5 10 15 20 25 30 35 40
t

20
0
(t)

-20
0 5 10 15 20 25 30 35 40
t
1
(t)

-1
0 5 10 15 20 25 30 35 40
t

Dynamic systems - Fundamental Variables

system

• Fundamental variables:
– Input : variables which influence the time evolution of the system.
– Output : measured.

• Input types:
– Command inputs: their behavior can be chosen by the human user.
– Disturbances: their behavior is independent on the human user; they
cannot be chosen.
Dynamic systems - A classic example: pendulum

• Variables:
– : angular position
– : angular velocity
– : applied torque.


• Parameters:
– : mass
– : length
– : gravity acceleration.

• Input:
• Output: we can choose e.g. .

Dynamic systems - A classic example: pendulum

• According to the 2nd principle of dynamics (Newton’s law):

J(t )   K sin (t )  (t )  T (t )

where : moment of inertia


: elastic constant
: friction coefficient.

• The time evolution of the system is described by differential equations.


• The behavior of the system (more precisely, of its variables) can be
predicted by integration of the differential equations.
• Integration can be performed
– analytically (when possible) or
– numerically (always possible).
Dynamic systems - A classic example: pendulum

• Pendulum equation: J(t )   K sin (t )  (t )  T (t )

• Forward Euler discretization method:

                         
    
  2

where , = sampling period,

• Discretized pendulum equation:

+ +

where .

Dynamic systems - A classic example: pendulum

• Numerical integration by means of a Matlab script:

% Parameters
m=1; l=0.8;
J=m*l^2; K=9.81*m*l; beta=0.6;
tau=0.01;
a1=2-tau*beta/J; a2=-1+tau*beta/J; a3=-tau^2*K/J; b=tau^2/J;

% Initial conditions
theta=[pi/4;pi/4];

% Time evolution
for k=1:1998
T(k)=sin(0.01*k);
theta(k+2)=a1*theta(k+1)+a2*theta(k)+a3*sin(theta(k))+b*T(k);
end
Dynamic systems - A classic example: pendulum

K  1
• Pendulum equation: (t )   sin (t )  (t )  T (t )
J J J

• Numerical integration using Simulink:

 



Dynamic systems - A classic example: pendulum

Damped pendulum ( ), non-null initial conditions, free evolution ( ).

Non-damped pendulum ( ), non-null initial conditions, free evolution ( ).


Dynamic systems - A classic example: pendulum

Damped pendulum ( ), null initial conditions, impulse response.

Damped pendulum ( ), null initial conditions, step response.

Dynamic systems – Example: mass-spring-damper system

• Variables:
– : mass horizontal position
– : force applied to the mass.

• Parameters:
– : body mass 
– : friction coefficient
– : elastic constant.
Dynamic systems – Example: RLC oscillator in series

• Variables:
– : generator tension
– : capacitance tension
– : current in the circuit.
s

• Parameters:
– : resistance
– : inductance
– : capacitance. c

Dynamic systems – Example: RLC oscillator in parallel

• Variables:
– : generator current
– : capacitance tension
– : inductance current. R L C

s
• Parameters: c

– : resistance
– : inductance
– : capacitance.

1 dV (t )
iS (t )  iR (t )  iL (t )  iC (t )  VC (t )  iL (t )  C C
R dt
diL (t )
L  VC (t )
dt
Dynamic systems – Analogy between systems

• Mass-spring-damper system:

• RLC oscillator in series:

d 2i (t ) di (t ) 1 dV (t )
L 2
 R  i (t )  s
dt dt C dt

The two equations are Similar dynamic


formally similar behavior

Dynamic systems – Aerospace examples

Aircraft vertical and pitch dynamics

b(t) z(t)

Aircraft roll dynamics


Dynamic systems – Aerospace examples

Satellite attitude dynamics

MD
d
Earth

Fc

Dynamic systems – Automotive examples

Vehicle lateral dynamics


Engine control

Vehicle vertical dynamics


Vehicle longitudinal dynamics
Dynamic systems – Example: a chaotic system

Lorenz attractor
• Lorenz system. Simplified atmosphere
model:

x,y,z: atmospheric variables related to


pressure, temperature and air speed.

• Typical example of Chaotic system: - Low predictability


- High sensitivity to initial conditions
- Unstable solutions

Dynamic systems – Example: stock market


Dynamic systems - General considerations

• It is important to distinguish between


– physical system,
– model.

• A model can be defined as a mathematical description of the physical


system.
• Equivalently, it is a mathematical relation between the variables which
describe the physical system.

• A model can be used for - prediction


- simulation
- filtering
- decision
- control
- etc.

Dynamic systems - General considerations

• In most real-world applications, a model is an approximation of the


physical system.

• Two kinds of model uncertainty:


– parametric: due to approximate parameter values;
– dynamic: due e.g. to neglecting some term or using wrong
basis functions in the model equations.

• These uncertainty usually cannot be avoided, since the system to


model is seldom exactly known.

• Robust modeling and control techniques can be used to efficiently


deal with uncertainty.
Nonlinear Control and Aerospace Applications

State equations

State equations - General definition

• Any dynamic system with a finite dimension can be described by


a set of first order differential equations of the form

where
– : state
– : input
– : output
– : order of the system.

• Such a description is called state equation description or state space


description.
State equations – Classic example: pendulum

• Newton’s equation: J(t )  k sin  (t )  (t )  T (t )

The input is u(t )  T (t )  R . Suppose that y (t )   (t )  R. Choosing

 x (t )   (t )
x(t )   1       R 2
 x2 (t )  (t )

we have  x1 (t )  x2 (t )

 k  1 state
 x2 (t )   J sin x1 (t )  J x2 (t )  J u (t ) equations
y (t )  x1 (t )

 x2 
Note: f ( x, u; t )  f ( x, u )   k  1 , f : R3  R2
 sin( x1 )  x2  u 
 J J J 
h( x, u; t )  h( x1 )  x1 , h : R  R

State equations – Example: RLC oscillator in series

 di (t )
• Kirchhoff’s equations:  VS (t )  Ri (t )  L  VC (t )  0
 dt

 i (t )  C dVC (t )
 dt
The input is u(t )  VS (t )  R . Suppose that y (t )  i (t )  2VS (t )  R.
2

Choosing
 x (t )   i (t ) 
x(t )   1     R2
 x2 (t ) VC (t )

we have  R 1 1
 x1 (t )   x 1 (t )  x 2 (t )  u (t )
L L L
 state
 x (t )  1 x (t ) equations
 2 C
1

y (t )  x1 (t ) 2  2u (t )

Note: f : R 3  R 2 , h : R 2  R
State equations – Example: electric motor

• Motor equations: i(t)


ω(t)
 di R
fm(t)
 L dt   Ri  K e  V
V(t) E(t)

 J d     K i
 dt t L

The input is u V  R . Suppose that y  . Choosing


x   i 
x   1   
 x2   

we have  R Ke 1
x
 1   x1  x 2  u
L L L
 state
 x  K t x   x equations
 2 J 1 J 2
y  x2

State equations – Discussion

• The state of a system is a set of variables that represent the system at any
given time.

• If the state of a system is known at a given time, then any future value of any
system variable can be computed in function of this state and the input signal.

• The number of state variables used to represent a given system is called


the order of the system.

• The state is a set of internal variables: The state is usually not measured. The
measured variable (the output ) can be a non-invertible function of .
State equations – Discussion

• The first equation is dynamic:

x (t )  f x(t ), u (t ); t   x(t  dt )  x(t )  f x(t ), u (t ); t dt


- The state at time depends on the state and input at time .
- The relation between the involved variables is differential.

x2
x(t  dt ) integrating
from 0 to T

x(t ) f x(t ), u (t ); t dt x ( 0) x (T )

x1

• The second equation is static: it is a relation between


variables at the same time .

State equations – Vector fields


State equations – Classification: linear/nonlinear

• Nonlinear system:
x (t )  f x (t ), u (t ); t 
y (t )  hx(t ), u (t ); t 

• Linear system:
x (t )  A(t ) x(t )  B (t )u (t )
y (t )  C (t ) x(t )  D (t )u (t )

- The functions and are linear.

- are matrices of compatible dimensions, possibly


time-varying.

- If are constant in time, the system is linear time invariant (LTI).

State equations – Classification: time varying/time invariant

• Time varying system:

x (t )  f x(t ), u (t ); t 
y (t )  hx(t ), u (t ); t 

• Time invariant system:

x (t )  f x(t ), u (t )
y (t )  hx(t ), u (t )

The functions f and h do not explicitly depend on time.


State equations – Classification: forced/autonomous

• Forced system:

x (t )  f  x(t ), u (t ); t  x (t )  f  x(t ); t  x (t )  f  x(t ), u (t )


y(t )  h  x(t ), u (t ); t  y(t )  h  x(t ); t  y(t )  h  x(t ), u(t )

• Autonomous system:

x (t )  f  x(t )
y(t )  h  x(t )

State equations – Classification: continuous/discrete time

• Continuous time system:

x (t )  f x(t ), u (t ); t 
t  0,  
y (t )  hx(t ), u (t ); t 
differential equations

• Discrete time system:

x(t  1)  f x(t ), u (t ); t 
t  0,1,2,...
y (t )  hx(t ), u (t ); t 

finite difference equations


State equations – Classification: numbers of inputs and outputs

• State equations: x (t )  f x(t ), u (t ); t 


y (t )  hx(t ), u (t ); t 

where: u (t )  R nu : input
n
y (t )  R y : output

- Multi Input Multi Output (MIMO): nu>1, ny >1


- Single Input Single Output (SISO): nu =1, ny =1
- Multi Input Single Output (MISO): nu >1, ny =1
- Single Input Multi Output (SIMO): nu =1, ny >1

Nonlinear Control and Aerospace Applications

Stability concepts

Carlo Novara
Politecnico di Torino
Solution of a dynamic system - Definition

• Consider the system


with input signal u(t) and initial condition x(0).

Definition. The signal resulting from system integration is a function of


time x(t), t  0, called the solution of the system corresponding to the
input signal u(t) and the initial condition x(0).

20

10

0
1
x

-10

-20
0 5 10 15 20 25 30 35 40
time [s]

40

20

0
2
x

-20

-40
0 5 10 15 20 25 30 35 40
time [s]

Trajectory of a dynamic system - Definition

Definition. The set of points in the state space generated by the solution
is called the trajectory (or orbit) of the system corresponding to the input
signal u(t) and the initial condition x(0).

x2 trajectory

x ( 0) x(t )

x1
Solution (trajectory) of a dynamic system – Examples of pendulum solutions (trajectories)

Damped pendulum (β>0) Damped pendulum (β>0)


non-null initial conditions null initial conditions
free evolution (T(t)=0) impulse response

Non-damped pendulum (β=0) Damped pendulum (β>0)


non-null initial conditions null initial conditions
free evolution (T(t)=0) step response

Solution stability – Nominal and perturbed solutions

• Let x(t) be the solution of a system corresponding to given input


signal and initial condition x(0). x(t) is called the nominal solution.

• Let xp(t) be the solution of the same system corresponding to the


same input signal but to a different initial condition xp(0)  x(0).
xp(t) is called a perturbed solution.

x2

p x p (t )
x (0)
x ( 0) x(t )

x1
Solution stability – Definitions

Definition. The solution x(t) is (simply or marginally) stable if

  0,   0 :
x 0  x p 0    x  t   x p  t    , t  0

x2

x p (0)  
x(t )
x ( 0) x p (t )
 

x1

Solution stability – Definitions

Definition. The solution x(t) is asymptotically stable if it is stable and


.

x2

x p (0) 
x ( 0)
 x p (t )  x(t )
per
for t  
x1

Definition. The solution x(t) is exponentially stable if it is asymptotically


stable and the convergence is exponential.
Solution stability – Definitions

Definition. The solution x(t) is unstable if it is not stable.

x2

x p (0) 
x ( 0) x(t )
x p (t )  

x1

High sensitivity to initial conditions:


xp(0)  x(0), xp(0)  x(0)  xp(t) far away from x(t)

Solution stability – Examples of pendulum solutions (trajectories)

(Simply) stable solution Asymptotically stable solution


non-damped pendulum (β=0) damped pendulum (β>0)
free evolution (T(t)=0) forced evolution (T(t)=Asin(wt))

Unstable solution (chaotic pendulum)


damped pendulum (β>0)
forced evolution (T(t)=Acasin(wcat))
Equilibrium states of a dynamic system – Definition

• Consider a system x  f x, u 


• Let be a constant input.

Definition. is an equilibrium state (or equilibrium point) corresponding


to the constant input if it is solution of the set of algebraic equations
f x , u   0

Rationale:

Equilibrium states of a dynamic system – Example: pendulum equilibrium states

• State equations: x1  x2


k  1
x2   sin( x1 )  x2  u
J J J
y  x1
• Suppose that . The corresponding equilibrium points are
the solutions of the algebraic equations

x2  0
k 
 sin( x1 )  x2  0
J J

• These solutions are given by


 x2  0  x1  k , k  0,1,...
  
sin( x1 )  0  x2  0
Equilibrium state stability – Definition

Definition. The equilibrium state is (simply or marginally) stable if

  0,   0 :
x ( 0)  x    x(t )  x   , t  0

x2

x ( 0) 
x(t )

x1

Equilibrium state stability – Definition

Definition. The equilibrium state is asymptotically stable if it is stable


and .

x2

x ( 0) 

x1

Definition: The equilibrium state is exponentially stable if it is


asymptotically stable and the convergence is exponential.
Equilibrium state stability – Definitions

Definition. A domain (or basin) of attraction of an equilibrium point is any


set of points such that trajectories initiated at these points converge to the
equilibrium point.

Definition. The domain (or basin) of attraction of an equilibrium point is


the set of all points such that trajectories initiated at these points
converge to the equilibrium point.

Definition: If asymptotic (or exponential) stability holds for any initial


state, the equilibrium point is asymptotically (or exponentially) stable in
the large. It is also called globally asymptotically (or exponentially) stable.

Equilibrium state stability – Definition

Definition. The equilibrium state is unstable if it is not stable.

x(t )
x2

x ( 0) 

x1
Equilibrium states of a dynamic system – Example: pendulum equilibrium states

(Simply) stable equilibrium ( , )  (0,0) As. stable equilibrium ( , )  (0,0)
non-damped pendulum (β=0)
damped pendulum (β>0)
free evolution (T(t)=0)
free evolution (T(t)=0)

Unstable equilibrium ( , )  ( ,0)


damped pendulum (β>0)
free evolution (T(t)=0)

Stability of LTI systems – General considerations

• In the case of LTI system, stability does not depend on the particular
solution. Stability is not a property of a single solution but of the
system itself:
one solution is stable

all solutions are stable

the system is stabile

• For any constant input , the equilibrium states can be found by


solving (with respect to ) the system of algebraic linear equations

 det a unique equilibrium point;


 otherwise, infinite equilibrium points, forming a subplane (a
subspace when ).
Stability of LTI systems – Fundamental results

• Consider an LTI system

• Let 1,…, i be the eigenvalues of A and let k1,…,ki their (auxiliary


geometric) multiplicities.

Theorem. The LTI system is (internally)

(1) asymptotically (exponentially) stable iff (if and only if)

(2) (simply or marginally) stable iff

and for ;

(3) unstable iff

or with .

Finite-gain and BIBO stability

• In the case of nonlinear system, stability as introduced above is a


concept related to each single solution of the system.

• It is also of interest to analyze the general stability properties of a set


of solutions or all possible solutions of a system.
 In this case, stability is a concept related to the system and not
to a specific solution. Two other stability definitions:
 finite-gain stability
 BIBO (Bounded Input Bounded Output) stability.

• Consider a system with input and output :


Finite-gain stability – Definition

Definition. A dynamic system is finite-gain stable if,


for any initial condition , where is a bounded set,
for any input signal , where is a set of signals of interest,
finite constants and exist such that the output signal is bounded as

where is a signal norm.


Otherwise, the system is finite-gain unstable.

finite-gain stability with bias;


finite-gain stability without bias.

input to state stability.

BIBO stability – Definition

Definition. A dynamic system is BIBO stable if, for any bounded initial
condition and any
bounded input: ||u(t)|| < Mu < , t  0,
the resulting output is bounded: ||y(t)|| < My < , t  0.

Otherwise, the system is BIBO unstable.

My
Mu

u(t)  y(t)

-Mu -My
t t

• BIBO stability is equivalent to finite-gain stability with bias.


Finite-gain stability (with or without bias) implies BIBO stability.
Stability – Relations between internal and external stability for LTI systems

LTI systems: The following implications can be proven by means of


mode analysis.

Internal stability: BIBO stability:

asymptotic stability  BIBO stability

(marginal) stability
or
instability
 BIBO instability

The inverse implications do not hold.

Internal, finite-gain and external stability – Example: integrator

x (t )  u (t )
y (t )  x(t )

x(t ), u (t ), y (t )  R

The system is (simply) stable but not


asymptotically stable, not finite-gain
stable, not BIBO stable.
Nonlinear control and aerospace applications

Behavior of nonlinear systems

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II


1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II

Introduction

The behavior of nonlinear systems can be significantly different from


that of linear systems.

Phenomena typical of nonlinear systems, not occurring for linear


systems, are:
◮ multiple isolated equilibrium points
◮ limit cycles
◮ bifurcations
◮ finite escape time
◮ chaos
◮ other phenomena, such as subharmonics, jump resonance, ...

Here, we will discuss the following topics:


◮ phase plane portrait
◮ behavior of nonlinear systems (with a summary on the behavior of
linear systems).
1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II

Phase portrait
Introduction

Phase plane analysis is a graphical method suitable for studying


second-order systems.
◮ The generalization to higher-order systems is possible (Poincare maps)
but more complicated from a geometric/computation point of view.

Method:
◮ Plot the trajectory of the second-order system in a 2-dimensional plane,
representing the state space. This plane is called the phase plane (or,
sometimes, state plane).
◮ Plot different trajectories corresponding to different initial conditions.

The analysis regards the free evolution of systems, allowing us to


◮ understand the most intrinsic properties of the system behavior;
◮ make useful considerations on the forced solution of the system.
Phase portrait
Definition

Consider an autonomous system with state x = (x1 , x2 ) ∈ R2 :

ẋ = f (x) (1)

This equation can also be written as

ẋ1 = f1 (x1 , x2 )
ẋ2 = f2 (x1 , x2 ).

For any initial condition x(0) = x0 , integration of (1) generates a


trajectory in the phase plane.

Repeating the integration for different initial conditions, we obtain a


family of trajectories, whose plot constitutes the phase portrait.

Phase portrait
Example

Consider a mass-spring-damper system with m = 1, k = 1, β = 0,


F = 0. The dynamic equation of this system is

ẍ + x = 0.

The state variables are x1 = x and x2 = ẋ.

It can be easily verified that the solution is given by

x(t) = x0 cos t
ẋ(t) = −x0 sin t.

It follows that
x2 + ẋ2 = x20 .

This equation defines a circle in the phase plane, with radius x0 .


Phase portrait
Example

The trajectory of the system is described by the circle equation

x2 + ẋ2 = x20 .

Changing x0 , we generate a family of circles, giving the phase portrait.

Phase portrait
Vector fields

Consider the system ẋ = f (x), with x ∈ X ⊆ Rnx . The function f (·)


defines a vector field: to any point x ∈ X, the function assigns a
vector, given by f (x) ∈ Rnx , where
◮ f (x)/ kf (x)k: direction of motion
◮ kf (x)k: speed magnitude.

 
x2
f (x1 , x2 ) =
0.2(1 − x21 )x2 − x1
a vector field on a sphere
Phase portrait
Singular points

Consider the system ẋ = f (x), with x ∈ X ⊆ R2 . The slope of a


trajectory at a point x = (x1 , x2 ) is given by

dx2 f2 (x1 , x2 )
= .
dx1 f1 (x1 , x2 )

If f1 (x1 , x2 ) 6= 0 or f2 (x1 , x2 ) 6= 0, the slope is properly defined. This


implies that, at the point (x1 , x2 ), the trajectories do not intersect.

If f1 (x1 , x2 ) =f2 (x1 , x2 ) = 0, the slope is undetermined, implying


that several trajectories may intersect at (x1 , x2 ).

The equation f (x) = 0 defines the singular points of the phase plane.
◮ It follows that the singular points are the system equilibrium points (or
fixed points).

Phase portrait
Singular points

Singular points are very important to characterize the properties of a


dynamic system.
The figure shows the phase portrait of a system with two singular
points, one stable, the other unstable.
Phase portrait
First-order systems

The phase portrait can be drawn also for first-order systems.


Consider for example the system ẋ = −4x + x3 .
Three singular points: x = 0, 2, −2.
The point x = 0 is stable, the other two are unstable.
This systems has only one main trajectory.

Phase portrait
Methods for constructing the phase portrait

Analytical/geometric methods. These include the analytical method,


the method of isoclines, the delta method, Lienard’s method, and
Pell’s method.
◮ Most popular methods:
⋆ Analytical method: Based on the analytical solution of the differential
equation. Not applicable in many situations.
⋆ Method of isoclines: Based on geometric/graphical considerations.

Methods based on numerical simulation.


◮ These can be applied in any situation.
◮ They can be naturally generalized to systems with order >2.
◮ In this course, we use suitable Matlab functions.
Phase portrait
Example: a satellite control system

A satellite is a body in rotational motion, whose main input is the


torque u produced by a proper set of thrusters. Typically, u = U or
−U , being U a positive constant torque.
Letting θ be the satellite rotation angle, a simple mono-dimensional
model is
θ̈ = u.
Defining the state as x = (x1 , x2 ) = (θ, θ̇), the corresponding state
equations are
ẋ1 = x2
ẋ2 = u.

Phase portrait
Example: a satellite control system

The aim is to control system in order to maintain the satellite antenna


at a zero angle θ. To this aim, the following control law is used:

 −U x1 > 0
u(t) = 0 x1 = 0
U x1 < 0.

The state equations of the controlled system are

ẋ1 = x2

 −U x1 > 0
ẋ2 = 0 x1 = 0
U x1 < 0.

One equilibrium point: (x̄1 , x̄2 ) = (0, 0).


Phase portrait
Example: a satellite control system

The phase portrait shows that, starting from θ 6= 0, the satellite


oscillates in periodic motions ← marginal stability.
Convergence of the system to θ = 0 can be obtained by adding a rate
feedback.

Phase portrait
Example: the Van der Pol oscillator
The Van der Pol system is an oscillator with a nonlinear damper. The
state equations are the following:
ẋ1 = x2
ẋ2 = µ(1 − x21 )x2 − x1 .
One equilibrium point: (x̄1 , x̄2 ) = (0, 0) ← unstable. Note that the
trajectories are bounded.
Phase portrait
Example: the undamped pendulum

The state equations of the undamped pendulum are the following:

ẋ1 = x2
ẋ2 = − Jk sin x1 .

Infinite equilibrium points: (x̄1 , x̄2 ) = (kπ, 0), k = 0, 1, . . ., some


stable, others unstable.

Phase portrait
Example: the damped pendulum

The state equations of the damped pendulum are the following:

ẋ1 = x2
ẋ2 = − Jk sin x1 − Jβ x2 .

Infinite equilibrium points: (x̄1 , x̄2 ) = (kπ, 0), k = 0, 1, . . ., some


stable, others unstable.
1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II

Behavior of LTI systems

Studying the phase portrait of LTI (linear time invariant) systems is


important to
◮ have a geometric interpretation of their behavior;
◮ analyze the behavior of nonlinear systems, being these latter similar to
LTI systems in a neighborhood of each equilibrium point.
The state equation of an autonomous LTI system is

ẋ = Ax

where x ∈ R2 is the state and A ∈ R2×2 is a matrix dependent on the


system physical parameters.
Behavior of LTI systems

From LTI system theory, the solution is given by linear combinations of


the natural modes:
ηi1 eλ1 t + ηi2 eλ2 t , λ1 =
(
6 λ2
xi (t) =
ηi1 eλ1 t + ηi2 t eλ1 t , λ1 = λ2

where λi are the eigenvalues of A, ηij depend on the initial conditions


and i = 1, 2.

We can distinguish the following cases:


1 λ1,2 real with the same sign
2 λ1,2 real with opposite signs
3 λ1,2 complex conjugate with non-zero real part
4 λ1,2 complex conjugate with zero real part.

Behavior of LTI systems


λ1,2 real with the same sign → node

λ1,2 < 0 ⇒ all modes converge λ1,2 > 0 ⇒ all modes diverge
⇒ the solutions converge ⇒ the solutions diverges

stable node unstable node


Behavior of LTI systems
λ1,2 real with opposite signs → saddle point

λ1 < 0 < λ2 or λ2 < 0 < λ1 ⇒ one mode converges, the other diverges
⇒ some solutions converge, others diverge

saddle point (hyperbolic point)

Behavior of LTI systems


λ1,2 complex conjugate with non-zero real part → focus

The solution can be written as


xi (t) = 2 |ri | eRe(λ1 )t cos(Im(λ1 )t + ∠ri )

Re(λ1 ) < 0 ⇒ the solutions converge Re(λ1 ) > 0 ⇒ the solutions diverge

stable focus unstable focus


Behavior of LTI systems
λ1,2 complex conjugate with zero real part → center

The solution can be written as


xi (t) = 2 |ri | cos(Im(λ1 )t + ∠ri )

⇒ the solution is the composition of harmonic signals


⇒ the solutions are ellipses

center

1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II


Behavior of nonlinear systems

The phase plane analysis of nonlinear systems is related to that of LTI


systems: the local behavior of a nonlinear system can be approximated
by the behavior of an LTI system.

Nonlinear systems can display much more complicated patterns in the


phase plane:
◮ multiple isolated equilibrium points
◮ limit cycles.

Not restricting the analysis only to the phase plane, phenomena


typical of nonlinear systems, not occurring for linear systems, are:
◮ bifurcations
◮ finite escape time
◮ chaos
◮ others: subharmonics, jump resonance, ...

Behavior of nonlinear systems


Multiple isolated equilibrium points

System with two singular points,


one stable, the other unstable.
Pendulum.
Behavior of nonlinear systems
Limit cycles

A limit cycle is an isolated closed curve. The motion on this curve is


periodic.
Example. Van der Pol oscillator.

- An unstable node at the origin


and a closed curve (limit cycle).
- Trajectories inside and outside
tend to this curve.
- A motion started on this curve
stays on it forever, circling
periodically around the origin.

Non-isolated closed curves (e.g., mass-spring-damper system,


undamped pendulum, satellite, LTI systems) are not limit cycles.

Behavior of nonlinear systems


Limit cycles

Three kinds of limit cycles:


1 Stable limit cycles: all trajectories in the vicinity of the limit cycle
converge to it ← attractor.
2 Unstable limit cycles: all trajectories in the vicinity of the limit cycle
diverge from it ← repellor.
3 Semi-stable limit cycles: some trajectories in the vicinity converge to it,
others diverge from it ← saddle.
Behavior of nonlinear systems
Limit cycles

Behavior of nonlinear systems


Tori

When nx ≥ 3, the system motion can occur on a torus (or a


topologically equivalent object).
◮ The torus is the generalization of the non-isolated cycle or the limit
cycle for nx ≥ 3.
◮ A torus in a 3D space is a 2-torus: it is characterized by 2 angles and 2
frequencies.
◮ A torus can be an attractor, repellor or saddle.
Behavior of nonlinear systems
Tori

In general, in a multi-dimensional space, a torus is characterized by


two or more frequencies.
◮ If the frequencies form rational fractions (the ratio between any two
frequencies is a rational number), the motion is periodic and the
trajectory is a closed curve.
◮ If at least two of these frequencies form an irrational fraction, the
motion is quasi-periodic and the trajectory covers densely the torus.
◮ Two trajectories on the torus that start close will remain close.

periodic motion quasi-periodic motion

Behavior of nonlinear systems


Bifurcations

Bifurcation is a phenomenon by which changes of the system parameters


lead to changes of the system properties (e.g., number of equilibria, stability
of each equilibrium).
Example. Undamped Duffing equation (mass-spring system with a nonlinear
spring): ẍ + αx + x3 = 0.
◮ α < 0 ⇒ 3 equilibrium points (2 stable, 1 unstable)
◮ α ≥ 0 ⇒ 1 equilibrium point (stable).

pitchfork bifurcation Hopf bifurcation


Behavior of nonlinear systems
Bifurcations

Example of Hopf bifurcation

Behavior of nonlinear systems


Finite escape time

Finite escape time is a phenomenon by which some state diverges in a


finite time.
Example. Consider the first order system ẋ = −x + x2 .

◮ Two equilibrium points: x̄1,2 = 0, 1.


◮ It can be verified that the solution is
x0 e−t
given by x(t) = 1−x0 (1−e−t ) .

◮ For x0 < 1, the solutions converge to 0.


◮ For x0 > 1 and for some t = tesc ,
x0 (1 − e−tesc ) = 1, implying that
limt→tesc x(t) = ∞.
1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II

Chaotic systems

For a stable LTI system, a small difference in initial conditions can


only cause a small difference in the system solution.
For a nonlinear system, the solution can be extremely sensitive to
initial conditions.
◮ A small difference in initial conditions can cause a large difference in
the system solution.
◮ The system output is unpredictable: even if an exact model is
available, the long-term system output cannot be predicted, due to
errors on the initial conditions and/or to numerical errors.
⇈ These are some of the main features o chaos.
Chaos is different from randomness:
◮ A random motion is characterized by random inputs/initial conditions.
◮ A chaotic motion can occur even if everything is deterministic (the
model, the inputs and the initial conditions) ← deterministic chaos.
Chaotic systems
The motion of nonlinear systems can also occur on geometrically
complex objects, called strange attractors ← fractal structure.
◮ These objects are characterized by unstable (but bounded) solutions.
⋆ for some phases of the evolution, the difference between two solutions
grows with an exponential law eλt ;
⋆ λ is the so-called Lyapunov exponent;
⋆ λ > 0 ⇒ the attractor is chaotic ← high sensitivity to initial conditions.
◮ Besides attractors, we can have strange repellors and saddles.

Chaotic systems
Bifurcations and chaos

For certain values of the parameters, there are many equilibria (stable and
unstable), many limit cycles/tori, very close to each other → chaos.
Chaotic systems

Chaos in classical “academic” Chaos in the real world:


- weather
examples:
- space systems
- Lorenz system
- meteorites
- Van der Pol oscillator
- population dynamics
- Chua circuit - chaos in the heart (arrhythmia)
- Duffing oscillator - chaos in the brain (epilepsy)
- Chaotic pendulum - epidemiology
- Rossler system - social Sciences
- Bruselator diffusion - economics
- many others ... - many others ...

Chaotic systems
Example: the Lorenz system
The Lorenz system is a simplified mathematical model for atmospheric
convection:
ẋ1 = σ(x2 − x1 )
ẋ2 = x1 (ρ − x3 ) − x2
ẋ3 = x1 x2 − βx3
where xi are variables related to atmospheric temperature, pressure
and velocity, and σ, ρ and β are parameters.

state space trajectory time series


Chaotic systems
Example: the Chua circuit

The Chua system is a simple circuit with a nonlinear resistor ρ(·):

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = γ1 (x1 − x2 ) + γ2 x3
ẋ3 = −βx2

where xi are variables related to electrical quantities, and α, β and γi


are parameters of standard electrical components.

Chaotic systems
Example: the logistic map
The logistic map is a simple discrete-time demographic model, defined
by the difference equation
x(k + 1) = rx(k)(1 − x(k))
where x ∈ [0, 1] represents the ratio of existing population to the
maximum possible population and r is a parameter.

bifurcation diagram time evolution (r = 4)


1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II

Fractals
The trajectories of a chaotic system have a fractal structure. Fractals
are “strange” geometric objects.
Dimensions of geometric objects:

geometric topological Hausdorff


object dimension dimension
point 0 0
cycle 1 1
torus ≥2 ≥2
fractal integer non-integer

Main features of fractals:


◮ self-similarity at different scales;
◮ detailed structure at arbitrarily small scales;
◮ irregularity locally and globally;
◮ simple and possibly recursive definitions.
Fractals
How Long Is the Coast of Britain?
◮ The answer is difficult because the coast has a fractal shape: we have
to measure the length around every boulder, every rock, every pebble,
and even every grain of sand. At a microscopic level, sand is a fractal.
◮ The coast has a non-integer Hausdorff dimension. In particular, the
Hausdorff dimension of the Britain coast is 1.25.
Correct answer: the length depends on the measurement unit
(coastline paradox). Estimates: 12 429 km (CIA World Factbook);
19 717 km (World Resources Institute).

unit = 200 km, length = 2400 km unit = 50 km, length = 3400 km

1 Introduction

2 Phase portrait

3 Behavior of LTI systems

4 Behavior of nonlinear systems I

5 Chaotic systems

6 Fractals

7 Behavior of nonlinear systems II


Behavior of nonlinear systems
Types of attractors

Four types of attractors:

These geometric objects can alternatively be repellors or saddles.

Behavior of nonlinear systems


Types of attractors

The four types of geometric objects described so far may exist


together in the state space of a nonlinear systems and can be
attractors, repellors or saddles.
Nonlinear Control and Aerospace Applications

Linearization

Carlo Novara
Politecnico di Torino

Linearization - Introduction

• Nonlinear systems are in general difficult to analyze or control.

• It is often of interest to linearize the nonlinear system around


 an equilibrium point,
 a trajectory.

• Linearization can be useful to


 analyze the system (e.g. stability analysis),
 control (e.g. stabilization around an equilibrium point or
gain scheduling).
Linearization - Preliminaries

• Consider a nonlinear system x (t )  f x(t ), u (t )


y (t )  hx(t ), u (t )
n n ny
where x(t )  R x , u (t )  R u , y (t )  R
ny
f : R nx  nu  R nx , h : R nx  nu  R

• Let be a constant input and be an equilibrium state


corresponding to .

• Define x(t )  x(t )  x


u (t )  u (t )  u
y (t )  y (t )  h( x , u )

Linearization - Preliminaries

• Consider the Taylor expansions of and around the point


truncated at the first order:

 f   f 
x (t )  f ( x , u )    x    u
 x  ( x ,u )  u  ( x ,u )
 f   f  x (t )  x (t )
x (t )     x   u  u 
x
  ( x ,u )   ( x ,u )  f (x, u )  0

 h   h 
y (t )  h( x , u )    x    u
 x  ( x ,u )  u  ( x ,u )
 h   h 
y (t )  y (t )  h( x , u )     x   u  u
 x  ( x ,u )   ( x ,u )
Linearization - Definition

x (t )  Ax(t )  Bu (t )


y (t )  Cx(t )  Du (t )

 f1 f1   f1 f1 


 x  
 1 xnx   u
 1 unu 
 f   f 
A        R nx  nx , B          R nx  nu
 x  ( x , u )    u  ( x , u )  
 f nx f nx   f nx f nx 
 x  
 1 xnx   u
 1 unu 
( x ,u ) ( x ,u )

 h1 h1   h1 h1 


     
 x1 xnx   u1 unu 
 h     h 
   
n y  nx n n
C      R , D   R y u
 x  ( x , u )    u  ( x , u )  
 hny hny   hn y hny 
     
 x1 xnx 
( x ,u )
 u1 unu 
( x ,u )

• The linearized system is an approximation of the nonlinear


system holding in a neighborhood of the point .

Linearization – Equilibrium point stability

• Linearization allows us to study the stability properties of an


equilibrium point of a nonlinear system.

• An equilibrium point is

- Asymptotically stable if the linearized system is asymptotically


stable.

- Unstable if the linearized system is exponentially unstable.

- No simple indications can be obtained in the intermediate


situations.
Linearization – Example: pendulum equilibrium states

• State equations: x1  x2


k  1
x2   sin( x1 )  x2  u
J J J
y  x1
• Suppose that . The corresponding equilibrium points are
the solutions of the algebraic equations

x2  0
k 
 sin( x1 )  x2  0
J J

• These solutions are given by


 x2  0  x1  k , k  0,1,...
  
sin( x1 )  0  x2  0

Linearization – Example: pendulum equilibrium states

• Matrices of the system linearized around ଵ ଶ :

 f1 f1 
 x  0 1   0 1 
x2 
A   k   k  
1

  cos( x1 )   
 f 2 f 2  
 x   J J  (0,0,0)  J J
 1 x2  (0,0,0)
 f1 
 u  0
B    1  , C  1 0 , D  0
 f 2   
J 
 u  (0,0,0)

>> k=1; beta=2; J=3;


>> A=[0 1;-k/J -beta/J]; the eq. point is
>> eig(A)
-0.33333 + 0.4714i asymptotically stable
-0.33333 - 0.4714i
Linearization – Example: pendulum equilibrium states

• Matrices of the system linearized around ଵ ଶ :

 f1 f1 
 x x2   0 1  0 1 
A 1   k    k 
 f 2 f 2  
 J cos( x )   
J  ( , 0, 0)  J
1
J
 x1 x2  ( ,0, 0)
 f1 
 u  0
B    1 , C  1 0, D  0
f 2  J 
 
 u  ( , 0,0 )

>> k=1; beta=2; J=3;


>> A=[0 1;k/J -beta/J]; the eq. point is
>> eig(A) unstable
0.33333
-1

Nonlinear control and aerospace applications

Lyapunov’s direct method

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Positive definite functions and Lyapunov functions

3 Equilibrium point stability

4 Advanced topics

1 Introduction

2 Positive definite functions and Lyapunov functions

3 Equilibrium point stability

4 Advanced topics
Introduction

Lyapunov developed two methods for studying stability of nonlinear


systems:
◮ Linearization method (LM). Conclusions are obtained about a nonlinear
system local stability around an equilibrium point from the stability
properties of its linear approximation.
⋆ This method represents the theoretical justification of using linear
control for nonlinear systems.
◮ Direct method (DM). Not restricted to local motion. It determines the
stability properties of a nonlinear system by constructing an
“energy-like” function and examining the function time variation.
⋆ The most used method for nonlinear system analysis and design.

Drawbacks of the LM (not of the DM):


◮ the LM only allows a local analysis;
◮ the LM does not give indications in the case of marginal stability of the
linearized system.

Introduction

Lyapunov’s direct method is based on the following physical


observation:
◮ if the total energy of a system is dissipated, then the system must
settle down to an equilibrium point.
Example. Consider a mass-spring-damper system with nonlinear
damper −bẋ |ẋ| and nonlinear spring −k0 x − k1 x3 , b, k1 , k2 > 0:

mẍ + bẋ |ẋ| + k0 x + k1 x3 = 0.

It is difficult to study the stability properties of this system:


◮ the solution of this nonlinear equation is unavailable;
◮ the linearization method cannot be used if the motion starts outside
the linear range.
These difficulties can be overcome considering the mechanical energy
of the system.
Introduction
The total mechanical energy V (x) of the system is the sum of its
kinetic and potential energy:
Z x
m 2 m k0 k1
k0 z + k1 z 3 dz = ẋ2 + x2 + x4 .

V (x) = ẋ +
2 0 2 2 4

It can be easily found that V̇ (x) = −b |ẋ|3 .


Observations:
◮ V (x) = 0 corresponds to the equilibrium point (x = 0, ẋ = 0);
◮ V (x) ≥ 0: the energy is non-negative;
◮ V̇ (x) ≤ 0: the energy is dissipated until ẋ = 0.
We can conclude that the system state moves closer to the equilibrium
point (x = 0, ẋ = 0).
The direct method is a generalization of the concepts in this example
to more complex systems.

1 Introduction

2 Positive definite functions and Lyapunov functions

3 Equilibrium point stability

4 Advanced topics
Positive definite functions
Definition
A function V : Rnx → R is locally positive definite if, for some ball
.
BR = {x : kxk ≤ R},

V (x) = 0, x = 0
V (x) > 0, x =
6 0, x ∈ BR .

If BR = Rnx , V is globally positive definite.

Positive definite functions

Omitting for simplicity “locally” or “globally” ...

Definition
A function V : Rnx → R is positive semi-definite if

V (x) = 0, x = 0
V (x) ≥ 0, x =
6 0, x ∈ BR .

Definition
A function V : Rnx → R is negative definite if −V is positive definite. A
function V : Rnx → R is negative semi-definite if −V is positive
semi-definite.
Lyapunov functions
Consider an autonomous system with state x ∈ Rnx :

ẋ = f (x). (1)

Without loss of generality, assume x̄ = 0 is an equilibrium point.


Note that this equation can describe a feedback system with constant
reference:
ẋ = g(x, u), u = u(x, r), r = r̄
.
ẋ = g(x, u) = g(x, u(x, r̄)) = f (x).
The time derivative of a function V : Rnx → R can be computed
using the chain rule:

dV (x) ∂V (x) ∂V (x)


V̇ (x) = = ẋ = f (x).
dt ∂x ∂x

V̇ is the derivative of V along the system trajectory. In particular,


V = 0 at an equilibrium point.

Lyapunov functions
Definition
A function V : Rnx → R is a Lyapunov function for the system (1) if, in
.
some ball BR = {x : kxk ≤ R},
(i) V is positive definite and has continuous partial derivatives;
(ii) V̇ is negative semi-definite.
1 Introduction

2 Positive definite functions and Lyapunov functions

3 Equilibrium point stability

4 Advanced topics

Equilibrium point stability

Theorem (local stability)


(i) If the system (1) admits a Lyapunov function V in some ball BR , then
the equilibrium x̄ = 0 is (marginally) stable;
(ii) if V̇ is negative definite in BR , then stability is asymptotic.

Theorem (global asymptotic stability)


If the system (1) admits a Lyapunov function V in Rnx and
- V̇ is negative definite in Rnx ,
- V (x) → ∞ as kxk → ∞,
then the equilibrium x̄ = 0 is globally asymptotically stable.

Remark. Global stability of a point implies that this point is the only
equilibrium of the system.
Equilibrium point stability
Example: local marginal stability

Consider the damped pendulum

θ̈ + θ̇ + sin θ = 0.

The state is x = (θ, θ̇) and x̄ = (0, 0) is an equilibrium.


The following function is locally positive definite (actually, it is the
total energy):
θ̇2
V (x) = 1 − cos θ + .
2
The time derivative is locally negative semi-definite:

V̇ (x) = θ̇ sin θ + θ̇ θ̈ = −θ̇2 .

It follows that x̄ is locally marginally stable. No indications are


obtained on asymptotic stability.

Equilibrium point stability


Example: local asymptotic stability

Consider the above damped pendulum.


The following function is locally positive definite (no physical
meaning).
θ̇2 (θ + θ̇)2
V (x) = 2(1 − cos θ) + + .
2 2
The time derivative is locally negative definite:

V̇ (x) = 2θ̇ sin θ + θ̇ θ̈ + (θ + θ̇)(θ̇ + θ̈) = . . . = −θ̇2 − θ sin θ.

It follows that x̄ is locally asymptotically stable.


General remark. Many Lyapunov functions may exist for the same
system. Specific choices of Lyapunov functions may yield more precise
results than others.
Equilibrium point stability
Example: local asymptotic stability

Damped pendulum: asymptotic stability is not global.

Equilibrium point stability


Example: global asymptotic stability

Consider the system

ẋ1 = x2 − x1 (x21 + x22 )


ẋ2 = −x1 − x2 (x21 + x22 ).

The following function is globally positive definite:

V (x) = x21 + x22

and V (x) → ∞ as kxk → ∞.


The time derivative is globally negative definite:

V̇ (x) = 2x1 ẋ1 + 2x2 ẋ2 = . . . = −2(x21 + x22 )2 .

It follows that x̄ is globally asymptotically stable.


1 Introduction

2 Positive definite functions and Lyapunov functions

3 Equilibrium point stability

4 Advanced topics

Invariant sets

Definition
A set G ⊆ Rnx is an invariant set for a dynamic system if every solution
which starts from G remains in G for all future times.

The concept of invariant set is a generalization of the concept of


equilibrium point. Examples:
◮ any equilibrium point;
◮ the domain of attraction of an equilibrium point;
◮ the whole state space;
◮ any trajectory;
◮ limit cycles and tori.
Theorems (local and global versions):
◮ Ensuring asymptotic stability of equilibria when V̇ is negative definite.
◮ Ensuring convergence to sets such as limit cycles and tori.
Stability concepts for non autonomous systems

The concepts of stability for non-autonomous systems are quite similar


to those of autonomous systems.

However, due to the dependence of non-autonomous system behavior


on initial time t0 , the definitions of these stability concepts include t0
explicitly.
The concept of uniformity with respect to t0 , is necessary to
characterize non-autonomous systems, whose general behavior does
not change significantly for different values of the initial time t0 :
◮ uniform stability, uniform asymptotic stability.

Stability conditions for non-autonomous systems are in general more


complicated and more restrictive.

Lyapunov function construction

The above theorems about stability of equilibria are not constructive:


they do not indicate how to find a Lyapunov function.
Most common approaches to find Lyapunov functions:
◮ Krasovskii’s method. Sufficient condition based on the Jacobian
matrix ∂f /∂x.
◮ Variable Gradient method. A certain form for the gradient of an
unknown Lyapunov function is assumed, and then the Lyapunov
function itself is computed by integrating the gradient.
◮ Physical insight approach. If physical properties can be exploited, a
powerful Lyapunov analysis may be possible for very complex systems.

All these approaches are not general. They allow us to find Lyapunov
functions only in particular cases.
Control design based on Lyapunov’s Direct Method

There are two main ways of using Lyapunov’s direct method for
control design:
1 The first one consists in hypothesizing one form of control law and
then finding a Lyapunov function to justify the choice.
2 The second one, conversely, requires hypothesizing a Lyapunov function
candidate and then finding a control law to make this candidate a real
Lyapunov function.
Both of them are based on trial and error procedures.
Systematic design procedures have been developed only for some
classes of nonlinear systems (sliding, adaptive, physically based
control).

Nonlinear control and aerospace applications

Introduction to control of nonlinear systems

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Control problems

3 Control design procedure

4 Methods of Nonlinear Control Design

1 Introduction

2 Control problems

3 Control design procedure

4 Methods of Nonlinear Control Design


Introduction
Objective of control: Given a physical system and the specifications
of its desired behavior, find a control law u imposing a desired
behavior to the controlled system (plant).

u
r C plant y

General control design problem: Find a system C (called the


= r for a set of reference signals of interest.
controller) such that y ∼
The command u is computed on the basis of some control law (or
control algorithm), defined in the controller C.

Introduction
Open-loop (feedforward) control structure:
d

r controller plant y

Closed-loop (feedback) control structure:


d

r controller plant y

Feedback control is in general more effective: it allows stabilization,


disturbance attenuation/cancelation, higher tracking precision.
Feedforward and feedback control can be used together, to enhance
the performance.
1 Introduction

2 Control problems

3 Control design procedure

4 Methods of Nonlinear Control Design

Control problems
Consider a nonlinear system described by

ẋ = f (x, u, t)
(1)
y = h(x)

Two main kinds of control design problems can be distinguished:


◮ Asymptotic stabilization (regulation): Given a nonlinear dynamic
system described by (1), find a control law u such that, starting from
anywhere in a region of interest,
⋆ the state x converges to 0 as t → ∞.
◮ Asymptotic tracking: Given a nonlinear dynamic system described by
(1) and a desired output trajectory r, find a control law u such that,
starting from any initial state in a region of interest,
⋆ the tracking error r(t) − y(t) converges to 0 as t → ∞,
⋆ the state x remains bounded for all t.

Clearly, regulation is a sub-case of tracking, obtained with r(t) = 0.


Control problems
General requirements

The following general requirements are important for a controlled


system:
◮ Stability must be guaranteed for the nominal model (the model used
for design), either in a local sense or in a global sense. The region of
stability and convergence are also of interest.
◮ Accuracy and speed of response may be desired for some "typical"
trajectories. In certain cases, the controller can guarantee tracking
accuracy independently of the desired trajectory.
◮ Robustness with respect to disturbances, measurement noise,
unmodeled dynamics, etc.

These qualities are often in conflict. Control design must account for
trade-offs, such as stability/robustness, stability/performance,
cost/performance, command activity/performance, etc.

1 Introduction

2 Control problems

3 Control design procedure

4 Methods of Nonlinear Control Design


Control design procedure

Given a physical system to be controlled, a standard design procedure


is the following:
1 specify the desired behavior, and select actuators and sensors;
2 model the physical plant by a set of differential equations;
3 design a control law for the system;
4 analyze and simulate the resulting control system;
5 implement the control system in hardware.

1 Introduction

2 Control problems

3 Control design procedure

4 Methods of Nonlinear Control Design


Methods of Nonlinear Control Design

Most common methods:


◮ Methods based on linearization - gain scheduling
◮ embedded model control
◮ feedback linearization
◮ model predictive control
◮ methods based on Lyapunov functions
◮ methods based on describing functions
◮ sliding mode control
◮ backstepping control
◮ adaptive control
◮ neuro-fuzzy control
◮ data-driven design
◮ etc.

Methods of Nonlinear Control Design

Methods based on linearization


◮ Local linear control
1 The system to control (plant) is linearized around a working point, to
obtain a local LTI model.
2 A linear feedback controller is designed, based on the LTI model.

◮ Gain scheduling
1 The plant is linearized around several working points, to obtain several
local LTI models.
2 A linear feedback controller is designed for each LTI model → set of
controllers.
3 Some interpolation function is designed to obtain a unique controller,
able to schedule the various controllers of the set.
Methods of Nonlinear Control Design

Embedded model control


◮ Nonlinearities, uncertainties and noises are treated as unknown
disturbances.
◮ An extended state observer is designed, able to estimate this unknown
disturbances.
◮ A control law is designed, composed of a linear state feedback and a
disturbance cancellation term.

Feedback linearization
◮ The nonlinear plant is transformed into a linear system by means of
some (nonlinear) transformation realized via feedback.
◮ Standard linear design techniques are used to complete the control
design.
◮ Linearization is exact (different from local linearization).

Methods of Nonlinear Control Design

Model predictive control


◮ At each time step, a prediction over a sufficiently long time horizon is
performed, using a model of the plant.
⋆ The prediction depends on the current state and the command input.
◮ The command input is chosen as the one yielding the “best” prediction
(that is, the prediction closest to the desired behavior).
⋆ This “optimal” choice is carried out by means of some on-line
optimization algorithm.

Sliding mode control


◮ A so-called sliding surface is defined. This surface is a subset of the
state space, on which the trajectory of the plant is desired to lie.
◮ A feedback law is designed to bring the plant trajectory towards the
sliding surface and, once there, to stay close to this surface.
Nonlinear control and aerospace applications

Gain scheduling

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Gain scheduling

3 Examples
Control of a tank reactor
Stabilization of the inverted pendulum

4 Discussion
1 Introduction

2 Gain scheduling

3 Examples
Control of a tank reactor
Stabilization of the inverted pendulum

4 Discussion

Introduction

Gain scheduling (GS) was originally introduced in flight control


systems. The goal was to control the motion of airplanes and missiles.

Approach:
◮ The plant is linearized around several operating points, to obtain
several local LTI models.
◮ A linear feedback controller is designed for each LTI model → set of
controllers.
◮ Interpolation functions are designed to obtain a unique controller, able
to schedule the various controllers of the set.
◮ The designed GS controller applied to the nonlinear plant is tested in
simulation.
Introduction

1 Introduction

2 Gain scheduling

3 Examples
Control of a tank reactor
Stabilization of the inverted pendulum

4 Discussion
Gain scheduling
Consider the system
ẋ = f (x, u, w)
(1)
y = h(x)
◮ f and h are differentiable functions on suitable domains Df , Dh ;
◮ x ∈ Rnx is the state, u ∈ Rnu is the command input and y ∈ Rny is
.
the output; for simplicity, n = nx ;
◮ w ∈ Dw ⊆ Rnw is a measured signal, called the scheduling variable:
⋆ an external variable or a function of x;
⋆ used to determine the operating points.
Choose a set of operating points for the scheduling variable:

{w̄1 , . . . , w̄N } ⊂ Dw ⊆ Rnw .

Assume that, for each w̄ ∈ Dw , a pair (x̄, ū) exists, such that (x̄, ū, w̄)
is an equilibrium point of (1). In particular,

f (x̄i , ūi , w̄i ) = 0, i = 1, . . . , N.

Gain scheduling
The nonlinear system (1) can be linearized around each operation
point (x̄i , ūi , w̄i ). Define the relative variables
. . . .
x̃i = x − x̄i , ũi = u − ūi , w̃i = w − w̄i , ỹi = y − h(x̄i ).

The state equations of the linearized systems are

x̃˙ i = A(w̄i )x̃i + B(w̄i )ũi + E(w̄i )w̃ie


(2)
ỹi = C(w̄i )x̃i

where i = 1, . . . N and
. .

∂f ∂f
A(w̄i ) = ∂x (x̄ ,ū ,w̄ ) , B(w̄i ) = ∂u (x̄ ,ū ,w̄ ) ,
i i i i i i
. .

∂f ∂h

E(w̄i ) = ∂we (x̄ ,ū ,w̄ ) , C(w̄i ) = ∂x (x̄i ,ūi ,w̄i ) .
i i i

Superscript “e”: external components of w.


Gain scheduling
For each LTI system (2), an LTI controller with a fixed structure can
be designed, using any desired technique (e.g., PID, eigenvalue
placement, LQR, H∞ , loop shaping,...).
The i-th controller is defined by the general control law

ũi = Ki (ẽi ) = Ki (e)


.
where ẽi = r̃i − ỹi = r − h(x̄i ) − y + h(x̄i ) = r − y = e is the tracking
error and r is a desired reference signal.
The controllers Ki are characterized by the same structure but
different values of their parameters:

Ki (e) ≡ K (pi ; e)

where pi ∈ Rnp is the vector of all controller parameters. Clearly, this


vector depends on the operating point w̄i .

Gain scheduling

A family of controllers is thus obtained:

{K (p1 ; e) , . . . , K (pN ; e)} .

Each controller K (pi ; e) is local, in the sense that it works correctly in


some neighborhood of the i-th operating point.
Gain scheduling
The global controller is defined by the control law

u = Iu (w) + K (Ip (w); e) (3)

where I∗ (w) are suitable interpolation functions, such that, for


i = 1, . . . , N ,
Ip (w̄i ) = pi
Iu (w̄i ) = ūi .
Simple lookup tables are often used as interpolation functions.
Theoretical results show that a global controller (3) works correctly on
the whole domain Df if
◮ the variations of w are sufficiently slower wrt the variations of x;
◮ the number of operation points is sufficiently large to give a reasonable
exploration of Df .
When N = 1, GS reduces to conventional local linear control.

Gain scheduling

The linear controllers can be designed using any technique (e.g., PID,
eigenvalue placement, LQR, H∞ , loop shaping,...).
An effective option is represented by PID’s: they have a simple
structure, with only 3 parameters. Letting s be the Laplace variable, a
PID controller is of the form
cI
K(s) = cP + + cD s.
s
The parameters are functions of the scheduling variable:

cP ≡ cP (w), cI ≡ cI (w), cD ≡ cD (w).

These functions are obtained by interpolation, as discussed above.


Effective interpolation functions are lookup tables, polynomials, etc.
Remark. The global controller is nonlinear.
1 Introduction

2 Gain scheduling

3 Examples
Control of a tank reactor
Stabilization of the inverted pendulum

4 Discussion

Example: control of a tank reactor


The plant considered is a tank reactor, working over a wide range of
operating points.
◮ A chemical specie X reacts to form a specie Y .
◮ The concentration of Y strongly depends on the reaction temperature.
◮ A cooling system is used to obtain the desired concentration [Y ] of Y .
The reactor we consider is a nonlinear systems with
◮ one input: u = coolant temperature,
◮ two states: x1 = [Y ], x2 = reaction temperature,
◮ one output: y = x1 = [Y ].
Example: control of a tank reactor
The goal is to control y = [Y ] to track desired constant values.
A single PID controller can effectively use the coolant temperature to
regulate the output concentration around a small operating range.
◮ Since the plant is strongly nonlinear, the control performance degrades
if the operating point changes significantly. The closed-loop system can
even become unstable.
A GS controller is designed, using the scheduling variable w = y = x1 .
The range of variation of y is [0, 10] ⇒ Dw = [0, 10]. The following
N = 8 operating points are chosen: {w̄1 , . . . , w̄8 } = {2, 3, . . . , 9}.
Using Matlab, for each w̄i :
◮ a pair (x̄i , ūi ) is found, such that f (x̄i , ūi , w̄i ) = 0,
◮ an LTI model is derived by linearization around (x̄i , ūi , w̄i ),
◮ a PID controller is designed, based on the linearized model.
A global controller is then obtained by interpolation of the 8
controllers, by means of lookup tables.

Example: control of a tank reactor


Example: stabilization of the inverted pendulum

The state equations of the damped pendulum are the following:

ẋ1 = x2
ẋ2 = − Jk sin x1 − Jβ x2 + J1 u

where the state is x = (x1 , x2 ). The following parameter values are


taken: J = 0.64 kg ∗ m2 , k = 7.848 m2 kg/s2 , β = 0.3 kg ∗ m2 /s.

The goal is to stabilize the pendulum around the unstable equilibrium


point (x̄, ū) = (π, 0, 0).
The following approach is adopted:
1 linearization of the pendulum equations around the equilibrium;
2 design of an LTI controller from the linearized equations.

This is a conventional local linear control approach, that is equivalent


to a GS approach with only one operating point.

Example: stabilization of the inverted pendulum

The A matrix of the linearized system is


   
0 1 0 1
A= = 981 5 .
k/J −β/J 80 − 64

This matrix is unstable.

A state feedback controller K is designed such that the matrix


A − BK is asymptotically stable (eigenvalue placement).

The following control law is applied to the pendulum:

u = ū − K(x − x̄)

where ū = 0, x̄ = (π, 0).


Example: stabilization of the inverted pendulum

1 Introduction

2 Gain scheduling

3 Examples
Control of a tank reactor
Stabilization of the inverted pendulum

4 Discussion
Discussion
Advantages and drawbacks of gain scheduling

Advantages:
◮ simple basic idea;
◮ suitable for both state and output feedback;
◮ effective in many practical applications.

Drawbacks:
◮ heuristic design;
◮ stability guarantees under slow variations of the scheduling variables;
◮ difficult or even not feasible design and implementation when the
number of scheduling variables/operating points is large.

Nonlinear control and aerospace applications

Feedback linearization

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion

1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion
Introduction

Feedback linearization is one of the most relevant methods for control


of nonlinear systems, and is characterized by strong theoretical
foundations.
Approach: transform a nonlinear system into a linear one, so that
linear control techniques can be applied.
◮ The transformation is made by means of state feedback.
In its simplest form, feedback linearization consists in canceling the
nonlinearities of a system, so that the closed-loop dynamics is in a
linear form.
Different from conventional linearization: feedback linearization is
achieved by exact state transformation, rather than by linear
approximation.
Applications: control of helicopters, high performance aircraft,
robotics, biomedical devices, etc.

Introduction
A simple example

Consider a fluid in a tank with level h. The control input is the flow u
into the tank.
The dynamics of the tank is described by the following equation:
d p
V (h) = u − a 2gh
dt
Rh
where V (h) = 0 A(z)dz is the fluid volume, A(z) is the cross section
of the tank and a is the cross section of the outlet pipe.
Introduction
A simple example

Since
h
d d d
Z
V (h) = V (h)ḣ = ḣ A(z)dz = ḣA(h)
dt dh dh 0
the tank equation becomes
p
ḣA(h) = u(t) − a 2gh.

The nonlinearities in this equation can be canceled by choosing the


following feedback law:
p
u = a 2gh + A(h)v

where v is a user-defined input. In this way, the nonlinear tank system


is transformed into a LTI system:

ḣ = v.

Introduction

In the above example, everything is simple:


◮ a single state,
◮ feedback law easy to find.

What happens in more complex situations?

We will answer this question for both the cases of state feedback and
output feedback:
◮ Input-state linearization. Linearization is performed via state feedback.
◮ Input-output linearization. Linearization is performed via output
feedback.

To this aim, we first need to introduce some basic notions on


differential geometry.
1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion

Differential geometry
Lie derivatives

Definition
A function f (x) is smooth if it has continuous partial derivatives of any
required order.

Definition
Let h : Rn → R be a smooth scalar function, and f : Rn → Rn be a
smooth vector field on Rn . The Lie derivative of h with respect to f is a
.
scalar function defined by Lf h = ∇h f ∈ R.

∂h ∂h
The gradient ∇h = ∂h∂x = [ ∂x1
· · · ∂x n
] is a row vector; f is a
column vector; Lf h = ∇h f is a scalar.

The Lie derivative Lf h is the derivative of h along the direction of the


vector f .
Differential geometry
Lie derivatives

Recursive computation:

L0f h = h
Lif h = Lf (Li−1 i−1
f h) = ∇(Lf h)f, i = 1, 2, . . .

For a single-output system ẋ = f (x, u), y = h(x),


we have that ẏ = ∇hẋ = Lf h, ÿ = ∇(Lf h)ẋ = L2f h.

Given two vector fields f and g, Lg Lf h = ∇(Lf h)g.

Given a (candidate) Lyapunov function V , V̇ = Lf V.

Differential geometry
Lie brackets

Definition
Let f and g be two vector fields on Rn . The Lie bracket of f and g is a
third vector field, defined by
.
[f, g] ≡ adf g = ∇g f − ∇f g = Lf g − Lg f ∈ Rn .

∇f = ∂f ∂f ∂f
∂x = [ ∂x1 · · · ∂xn ] is a square matrix; g is a column
vector; ∇f g is a column vector. The symbol ad means “adjoint”.

Recursive computation:

ad0f g = g
adif g = [f, adi−1
f g], i = 1, 2, . . .
Differential geometry
Lie brackets

Let V , W and X be vector fields on Rn and h a scalar function. The


Lie brackets satisfy the following properties:
◮ [V, V ] = 0.
◮ [V, W ] = 0, for any pair of constant vectors f and g.
◮ Antisymmetry (or skew-commutativity): [V, W ] = −[W, V ].
◮ Bilinearity: for any a, b ∈ R,

[aV + bW, X] = a[V, X] + b[W, X]


[X, aV + bW ] = a[X, V ] + b[X, W ].

◮ Jacobi identities:
[V, [W, X]] + [W, [X, V ]] + [X, [V, W ]] = 0
L[V,W ] X = LV LW X − LW LV X.

Differential geometry
Diffeomorphisms

Definition
A function φ : Rn → Rn , defined in a region Ω, is a diffeomorphism if it is
smooth, and its inverse φ−1 exists and is smooth.

If Ω = Rn , then φ is called a global diffeomorphism, otherwise it is


called a local diffeomorphism, and is defined only in a finite
neighborhood of a given point.
◮ Global diffeomorphisms are difficult to find.

Checking if a function is a local diffeomorphism is easy:

Lemma
Let φ be a smooth function defined in a region Ω ⊆ Rn . If the Jacobian
matrix ∇φ is non-singular at a point x ∈ Ω, then φ defines a local
diffeomorphism in a neighborhood of x.
Differential geometry
Involutive vector fields

Definition
A linearly independent set of vector fields {f1 , . . . , fm } is involutive in Ω if
there are scalar functions αijk : Ω ⊆ Rn → R such that
m
X
[fi , fj ](x) = αijk (x)fk (x), ∀i, j.
k=1

Involutivity means that the Lie bracket of any pair of functions from
the set {f1 , . . . , fm } can be expressed as a linear combination of
functions of this set.

Differential geometry
Involutive vector fields

From the definition, checking if a set of vector fields {f1 , . . . , fm } is


involutive corresponds to checking if

rank [f1 (x) · · · fm (x)] = rank [f1 (x) · · · fm (x) [fi , fj ](x)]

for all x ∈ Ω and all i, j.

Observations:
◮ a set of constant vector fields is always involutive, since the Lie bracket
of two constant vectors is 0.;
◮ a set composed of a single vector is involutive, since [f, f ] = 0.
1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion

Input-state linearization

Consider a single-input nonlinear system

ẋ = f (x) + g(x)u (1)

where x ∈ Rnx is the state, u ∈ R is the command input, and f and g


.
are smooth vector fields on Rnx . For simplicity, n = nx .

It is assumed that the state is measured. Otherwise, an observer has


to be employed.
A system in this form is said affine (or linear) in u. All what we will
study in the following holds also if, instead of u, we have an invertible
function of u.
◮ We will see that the assumption of system affine in u (or invertible wrt
u) is reasonable in several situations but may be too restrictive in other
situations.
Input-state linearization
Linearizability

Definition
A single-input nonlinear system of the form (1) is input-state linearizable if
there exists a region Ω ⊆ Rn , a diffeomorphism φ : Ω → Rn , and a
nonlinear feedback control law

u = α(x) + β(x) v

such that z = φ(x) and ż = Az + Bv, where A and B are in the


companion form
 
0 1 0 ··· 0
 
0
 ..   0
 0 0 1 . 0  
..
 
. .. . . . . ..  B = 
 
A=  .. .

. . . .  .
 


 0 0 ··· 0 1 
  0 
0 0 ··· 0 0 1

Input-state linearization
Linearizability

Definition
The controllability matrix is defined as
h i
n−1
Mc (x) = g, adf g, . . . , adf g .

Theorem
The nonlinear system (1) is input-state linearizable if and only if there
exists a region Ω such that the following conditions hold:
1. rankMc (x) = n, ∀x ∈ Ω;
2. the columns of Mc (x) are involutive in Ω.

The first is a controllability condition, analogous to the one for LTI


systems. The second one is a technical condition, trivially satisfied for
LTI systems.
Input-state linearization
Basic idea
Suppose that a function z1 (x) is found such that

Lg Lif z1 = 0, i = 0, . . . , n − 2. (2)

Define a new state as z(x) = (z1 , Lf z1 , . . . , Lfn−1 z1 ). Then:

ż1 = ∇z1 ẋ = ∇z1 (f (x) + g(x)u) = Lf z1 + Lg z1 u = Lf z1 = z2


ż2 = Lf z2 + Lg z2 u = L2f z1 + Lg Lf z2 u = L2f z1 = z3
..
.  
u can be
żn = Lf zn + Lg zn u = Lfn−1 z1 + Lg Lfn−1 z1 u = v. ←
chosen
The transformed states thus obey the following LTI differential equations in
companion form:
ż1 = z2
ż2 = z3
..
.
żn = v.

Input-state linearization
Procedure

1 Construct the vector fields g, adf g, . . . , adn−1


f g (columns of Mc ).
2 Check if the controllability and involutivity conditions are satisfied.
3 If both are satisfied, find the first state z1 solving the set of equations1

∇z1 adif g = 0, i = 0, . . . , n − 2
(3)
∇z1 adfn−1 g 6= 0.

Remark: Solving (3) (or (2)) can be difficult.


4 Compute the state transformation z(x) = (z1 , Lf z1 , . . . , Ln−1
f z1 ) and the
input transformation u = α(x) + β(x)v, with2

Lnf z1 1
α(x) = − , β(x) = .
Lg Ln−1
f z 1 Lg Ln−1
f z 1

1
It can be proven that involutivity ⇒ ((2) ⇔ (3)).
(3) are used instead of (2), since adif g have already been computed.
2
It can be proven that controllability ⇒ Lg Lfn−1 z1 6= 0.
Input-state linearization
Control scheme

plant: ẋ = f (x) + g(x)u


state transformation: z = φ(x)
input transformation: u = α(x) + β(x)v
linear controller: v = Kz + Kr r.

Input-state linearization
Example: control of a flexible-joint mechanism

Consider the flexible-joint mechanism shown in the figure, consisting


of a link driven by a motor through a torsional spring. The mechanism
equations are the following:

I q̈1 = −M gL sin q1 − k(q1 − q2 )


J q̈2 = k(q1 − q2 ) + u.

Since the nonlinearities appear in the first equation, while the control
input u enters in the second one, there is no obvious way of designing
a large range controller.
Input-state linearization
Example: control of a flexible-joint mechanism

Choosing the state vector x = (q1 , q̇1 , q2 , q̇2 ),

x2
   
0
 − M gL sin x1 − k (x1 − x3 )   0 
f (x) =  I I , g(x) = 
 0 .

 x4 
k 1
J (x1 − x3 ) J

The controllability matrix is given by


 k 
0 0 0 − IJ
 0 k
0 0 
Mc = [g, adf g, ad2f g, ad3f g] =  IJ  .
 0 − J1 0 k
J2

1
J 0 − Jk2 0

This matrix is full-rank. The vector fields {g, adf g, ad2f g, ad3f g} are
constant and thus involutive. ⇒ The system is input-state linearizable.

Input-state linearization
Example: control of a flexible-joint mechanism

The transformed state z1 is found solving the equations


∂z1 ∂z1 ∂z1 ∂z1
= 0, = 0, = 0, 6= 0.
∂x4 ∂x3 ∂x2 ∂x1
The simplest solution is z1 = x1 .

The other transformed states are obtained as follows:


z2 = Lf z1 = Lf x1 = ∇x1 f = x2
z3 = L2f z1 = Lf x2 = ∇x2 f = − MIgL sin x1 − kI (x1 − x3 )
 
3 M gL k
z4 = Lf z1 = Lf − I sin x1 − I (x1 − x3 )
 
M gL k k
=− I cos x1 + I x2 + I x4 .
Input-state linearization
Example: control of a flexible-joint mechanism

The input transformation is u = α(x) + β(x)v,


J
α(x) = kI(k + L M g cos x1 ) (k x1 − k x3 + L M g sin x1 )
+k (x1 − x3 ) + Jk L M g x22 sin x1


IJ
β(x) = k .

With these state and input transformations, we obtain an LTI system


in companion form.

We can now design very easily a linear controller, using a standard


eigenvalue placement technique

K = place(A, B, −(1 : 4));

where the pair (A, B) is in companion form.

Input-state linearization
Example: control of a flexible-joint mechanism
1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion

Input-output linearization

Consider the SISO nonlinear system

ẋ = f (x) + g(x)u
(4)
y = h(x)

where x ∈ Rnx is the state, u ∈ R is the command input, y ∈ R is the


output, and f , g and h are smooth functions on Rnx . For simplicity,
.
n = nx .

It is assumed that the state is measured. Otherwise, an observer has


to be employed.

A system in this form is said affine (or linear) in u.

Basic approach: differentiate the output y repeatedly, until the input


u appears, and then design u to cancel the nonlinearity.
Input-output linearization

Let Ωx ∈ Rn be a domain of interest. The first derivative of y is

ẏ = ∇h(x)ẋ = ∇h(x) (f (x) + g(x)u) = Lf h(x) + Lg h(x)u.

Suppose Lg h(x) 6= 0 at some point x = x̄ ∈ Ωx . By continuity,


Lg h(x) 6= 0 in some neighborhood Ω ∈ Rn of x̄. Then, in Ω, the
control law
1
u= (−Lf h(x) + v)
Lg h(x)
transforms the nonlinear system (4) into the linear system

ẏ = v.

If Lg h(x) = 0, ∀x ∈ Ωx , then we differentiate again, to obtain

ÿ = L2f h(x) + Lg Lf h(x)u.

Input-output linearization

If Lg Lf h(x) = 0, ∀x ∈ Ωx , then we differentiate again and again:

y (i) = Lif h(x) + Lg Li−1


f h(x)u

until, for some integer γ and for some x = x̄ ∈ Ωx ,

Lg Lγ−1
f h(x) 6= 0.

Then, in some neighborhood Ω ∈ Rn of x̄, the control law


1  
u= −Lγf h(x) +v
Lg Lγ−1
f h(x)

transforms the nonlinear system (4) into the linear system

y (γ) = v.
Input-output linearization

The corresponding state equation is

µ̇ = Aµ + Bv
y = µ1
 
0 1 0 ··· 0
 
0
 0 0 1 ... 0 0
   

..
 
. . .
 .. .. . . . . . . ..
 
A=  B= .

 
 . 

 0 0 ··· 0 1

  0 
0 0 ··· 0 0 1

The state vector


.
µ = (µ1 , . . . , µγ ) = (y, ẏ, . . . , y (γ−1) )

describes a part of the system dynamics, called the external dynamics.

Input-output linearization
Relative degree

Definition
The integer γ ≤ n is the relative degree of the system (4) in Ω.

It is a generalization of the concept of relative degree for LTI systems


(difference between denominator degree and numerator degree).

If γ = n, then input-output linearization corresponds to input-state


linearization.
Input-output linearization
Relative degree

It may happen that Lg Lfγ−1 h(x) is zero at x̄ but nonzero at some


points x arbitrarily close to x̄. In this case, the relative degree of the
system is undefined at x̄.
◮ Sometimes, a simple change of output will allow one to define an
equivalent but easily solvable control problem.
◮ In general, however, input-output linearization at a point cannot be
straightforwardly achieved when the relative degree is undefined.
◮ In the following, we will consider only systems having a well defined
relative degree in a region Ω.

Input-output linearization
Normal form

Thanks to the above subsequent differentiations, the system (4) can


be written in the so-called normal form:
 
µ2
.
 ..  a(µ, ψ) = Lγf h(x)
µ̇ = 
 . 
.
b(µ, ψ) = Lg Lfγ−1 h(x)

 µγ 
a(µ, ψ) + b(µ, ψ)u (5)

ψ̇ = w(µ, ψ)
y = µ1 .

The new state, called the normal state, is (µ, ψ), where
.
µ = (µ1 , . . . , µγ ) = (y, ẏ, . . . , y (γ−1) ) external dynamics
ψ ∈ Rn−γ . internal dynamics.
Input-output linearization
Normal form

The external state is given by


    
h(x)

µ1 y
 µ2   ẏ   Lf h(x) 
µ =  ..  =  .. = .. .
     
 .   .   . 
µγ y (γ−1) Lγ−1
f h(x)

Finding explicitly the internal state ψ may be difficult: in general,


PDE’s have to be solved to find a ψ independent on u.
◮ However, computing the internal dynamics does not necessarily require
to have normal form. Often, the internal dynamics can be found just
by means of algebraic manipulations.
◮ When possible, stability of the internal dynamics can be checked
theoretically (zero dynamics). Otherwise, it can be verified by means of
simulations.

Input-output linearization
Zero dynamics

The external dynamics can be “easily” controlled.

What about the internal dynamics? It can be either bounded or


unbounded.
To investigate this important problem, we introduce the concept of
zero-dynamics.
◮ The zero-dynamics is the dynamics of the system (4), corresponding to
a zero output y (and zero initial µ).
◮ The zero-dynamics is important since
⋆ it is a simplified version of the internal dynamics ⇒ simpler to study;
⋆ it gives general indications on stability of the internal dynamics.
Input-output linearization
Zero dynamics

Definition
The zero-dynamics of the system (4) in Ω is defined by

µ̇ = 0
(6)
ψ̇ = w(0, ψ)

with initial conditions µ(0) = 0 and ψ(0) = ψ0 .

Definition
The system (4) is locally asymptotically minimum phase at x̄ if ψ = 0 is a
locally asymptotically stable equilibrium point of (6).

The concept of exponentially minimum phase can be defined similarly.


It is a generalization of the concept of minimum phase for LTI systems
(no zeros with real part ≥ 0).

Input-output linearization
Regulation

Consider the system (4) and its normal form (5), with
a(µ, ψ) = Lγf h(x), b(µ, ψ) = Lg Lfγ−1 h(x).
Define the control law

  feedback
u= 1
−Lγf h(x) +v
Lg Lfγ−1 h(x) linearization
 (7)
linear
v = −Kµ
control

where K ∈ R1×γ is such that A − BK, with (A, B) in companion


form, is asymptotically stable.

Theorem
Assume that the system (4) has a locally asymptotically stable
zero-dynamics. Then, the closed-loop defined by (4) and (7) is locally
asymptotically stable.
Input-output linearization
Tracking

Consider the system (4) and its normal form (5), with
a(µ, ψ) = Lγf h(x), b(µ, ψ) = Lg Lfγ−1 h(x).

Suppose the system output y(t) is required to track a desired signal


r(t) (reference). Assume that r(t) is smooth and bounded.
.
Let µr = (r, ṙ, . . . , r(γ−1) ) and define the tracking error as
.
µ̃ = µr − µ.

The goal is to make this error “small” and, possibly, to force it to


converge to zero.

Input-output linearization
Tracking
Define the control law

  feedback
u= 1
−Lγf h(x) +v
Lg Lfγ−1 h(x) linearization
 (8)
linear
v = K µ̃ + r(γ)
control

where K ∈ R1×γ is such that A − BK, with (A, B) in companion


form, is asymptotically stable.

Theorem
Assume that the solution of the equation

ψ̇r = w(µr , ψr ), ψr (0) = 0

exists, is bounded, and is asymptotically stable. Then, µ̃(t) converges


exponentially to 0, as t → ∞.
Input-state linearization
Control scheme

plant: ẋ = f (x) + g(x)u


state transformation: µ = (h(x), Lf h(x), . . . , Lfγ−1 h(x))
feedback linearization: eq. (8)
linear controller: eq. (8)
.
reference generator: computes analytically µr = (r, ṙ, . . . , r(γ−1) ).

Input-state linearization
A general control scheme

plant: ẋ = f (x) + g(x)u


state transformation: µ = (h(x), Lf h(x), . . . , Lfγ−1 h(x))
feedback linearization: eq. (8)
linear controller: designed using any technique.
1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion

Case study: control of the Chua circuit


Variant 1: γ = 2

The Chua system is a circuit with a nonlinear resistor ρ(·), described


by the following equations:

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = x1 − x2 + x3 + u
ẋ3 = −βx2 − Rx3
y = x1 .

The first two derivatives of y are

ẏ = ẋ1 = α(x2 − x1 − ρ)
.
ÿ = α(ẋ2 − ẋ1 − ρ′ ẋ1 ) ← ρ′ = dρ/dx1
= α (x1 − x2 + x3 + u − (1 + ρ′ )ẋ1 )
= α (x1 − x2 + x3 + u − α(x2 − x1 − ρ)(1 + ρ′ ))

indicating a relative degree γ = 2.


Case study: control of the Chua circuit
Variant 1: γ = 2

.
Defining the external state µ = (µ1 , µ2 ) = (y, ẏ) and the control law
v
u = −x1 + x2 − x3 + α(x2 − x1 − ρ)(1 + ρ′ ) +
α
the external dynamics is transformed into an LTI system.
The internal dynamics can be found as follows:

µ1 = y = x1
µ2 = ẏ = ẋ1 = α(x2 − x1 − ρ(x1 )) = α(x2 − µ1 − ρ(µ1 ))

ẋ3 = −βx2 − Rx3 .


.
With ψ = x3 , this latter equation describes the internal dynamics,
which is glob. marg. stable for R = 0 or glob. as. stable for R > 0.

Case study: control of the Chua circuit


Variant 1: γ = 2

The following parameter values are assumed: R ∈ {0.1, 0}, α = 10.4,


β = 16.5. The following nonlinearity is considered:

ρ(x1 ) = −1.16x1 + 0.041x31 .

A controller is designed, according to (8), and applied to the Chua


circuit in the following closed-loop scheme.
Case study: control of the Chua circuit
Variant 1: γ = 2

Simulation results with R = 0.1:

constant reference sinusoidal reference

Case study: control of the Chua circuit


Variant 1: γ = 2

Simulation results with R = 0:

constant reference sinusoidal reference


Case study: control of the Chua circuit
Variant 2: γ = 1

Consider the same Chua system but with y = x2 .


The first derivative of y is ẏ = ẋ2 = x1 − x2 + x3 + u , indicating a
relative degree γ = 1.
.
Defining the external state µ = y and the control law

u = −x1 + x2 − x3 + v

the external dynamics is transformed into an LTI system.


.
With ψ = (ψ1 , ψ2 ) = (x1 , x3 ), the internal dynamics is

ẋ1 = α(µ − x1 − ρ(x1 ))


ẋ3 = −βµ − Rx3 .

With the above ρ(x1 ) and α, it is loc. marg. stable for R = 0 or loc.
as. stable for R > 0.

Case study: control of the Chua circuit


Variant 3: γ = 2

Consider the same Chua system but with y = x3 .

The first two derivatives of y are

ẏ = ẋ3 = −βx2 − Rx3

ÿ = −β ẋ2 − Rẋ3
= −β(x1 − x2 + x3 + u) + R(βx2 + Rx3 )
= −βx1 + β(1 + R)x2 + (R2 − β)x3 − βu

indicating a relative degree γ = 2.


Case study: control of the Chua circuit
Variant 3: γ = 2

.
Defining the external state µ = (µ1 , µ2 ) = (y, ẏ) and the control law
1 2 v
u = −x1 + (1 + R)x2 + (R − β)x3 −
β β

the external dynamics is transformed into an LTI system

With ψ = x1 , the internal dynamics is

ẋ1 = α(x2 − x1 − ρ(x1 )).

With the above ρ(x1 ) and α, it is loc. as. stable (for any R).

General remark. Different choices of y (and u) lead to different


levels of design complexity and different stability properties of the
internal dynamics.

Case study: control of the Chua circuit


Variant 4: γ = 3

A Chua circuit described by the following equations is considered:

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = x1 − x2 + x3
ẋ3 = −βx2 − Rx3 + u
y = x1 .

The first three derivatives of y are

ẏ = ẋ1 = α(x2 − x1 − ρ)
ÿ = α (x1 − x2 + x3 − α(x2 − x1 − ρ)(1 + ρ′ ))
y (3) = a(x) + αu.

indicating a relative degree γ = n = 3.


Case study: control of the Chua circuit
Variant 4: γ = 3

.
Defining the external state µ = (µ1 , µ2 , µ3 ) = (y, ẏ, ÿ) and the control
law
u = (−a(x) + v)/α
the external dynamics is transformed into an LTI system.

No internal dynamics.

In this variant, γ = n, and input-output linearization corresponds to


input-state linearization.

The external state is equivalent to the original full state and is


obtained from it through a nonlinear transformation.

Remark. Lg Lγ−1
f h(x) = α 6= 0, ∀x ⇒ the stability and tracking error
theorems hold globally.

Case study: control of the Chua circuit


Variant 4: γ = 3

The same parameter values and nonlinearity as above are assumed.

A controller is designed, according to (8), and applied to the Chua


circuit in the following closed-loop scheme.
Case study: control of the Chua circuit
Variant 4: γ = 3

Simulation results with R = 0:

constant reference sinusoidal reference

1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion
Control of non-minimum phase systems

The control laws presented above cannot be applied to non-minimum


phase nonlinear systems.
◮ The essential reason is that they cannot be inverted.
◮ This is a generalization of the fact that the inverse transfer function of
a non-minimum phase LTI system is unstable.

For such systems, we do not look for asymptotic zero errors but for
“small” tracking errors. Three approaches:
◮ If possible, choose another output, which yield a stable zero-dynamics
and such that accurate tracking of the new output implies accurate
tracking of the original output.
◮ Differentiate the output n times, neglecting the terms containing the
input in the intermediate steps.
◮ If possible, modify the plant to obtain a stable zero-dynamics.

Control of MIMO systems


Consider a MIMO nonlinear system of the following form:

ẋ = f (x) + g(x)u
(9)
y = h(x)

where x ∈ Rn is the state, u ∈ Rnu is the command input, y ∈ Rny is


the output, and f , g and h are smooth functions on Rnx .
Input-output linearization of MIMO systems can be done similarly to
the SISO case, by differentiating the outputs, until the inputs appear.
For each output yi , differentiation is performed until at least one input
appears. A region Ωi and a relative degree γi are defined and the
following equation can be written:

Lg Lfγ1 −1 h1 (x)
 (γ )
  
Lγf 1 h1 (x)
 
y1 1
 ..  
= .. .  .. 
 +B(x)u, B(x) =  .


 .  .  . 
(γny ) γn y γny −1
y ny Lf hny (x) Lg Lf hny (x)
Control of MIMO systems
.
Let Ω = ∩i Ωi and suppose that B(x) is invertible on Ω. Then, the
control law
v1 − Lγf1 h1 (x)
 
..
u = B(x)−1 
 
. 
γn
vny − Lf y hny (x)
yields ny equations of the simple form
(γi )
yi = vi .

Since the input vi only affects the output yi , this is called a


decoupling control law. B(x) is called the decoupling matrix.
If B(x) is not invertible, techniques based on new input or new output
choices can be used to obtain a new invertible B(x) matrix.
The P
system is said to have relative degree (γ1 , ...., γny ), and the scalar
γ = i γi is called the total relative degree.

1 Introduction

2 Differential geometry

3 Input-state linearization

4 Input-output linearization

5 Case study: control of the Chua circuit

6 Advanced topics

7 Discussion
Discussion
Comparison with conventional linearization

Most results in feedback linearization (FL) are local, in the sense that
they hold in “some region” of the state space Ω ∈ Rn .
However, there are relevant differences wrt conventional linearization
(CL, based on Taylor expansion):
◮ In FL, the linearization is exact on the whole region Ω. In CL, the
linearization is approximated.
◮ Also in cases where CL works, FL usually yields a better control
performance.

Global versions of the FL results are also available, requiring however


stronger assumptions (e.g., global assumptions on the zero-dynamics
and on the Lie derivatives).

Discussion
Advantages and drawbacks of feedback linearization

Advantages:
◮ strong theoretical foundations and results;
◮ deep system analysis: the problems related to an unstable
zero-dynamics hold for all approaches (linear and nonlinear).
◮ exact linearization;
◮ high control performance (if the model is accurate).

Drawbacks:
◮ assumption of model affine in u;
◮ results are in some sense local;
◮ problems in the case unstable zero-dynamics;
◮ input/state/output constraints not accounted for;
◮ trade-off performance-command activity difficult to manage;
◮ possible lack of robustness.
Nonlinear control and aerospace applications

Sliding mode control

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion
1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion

Introduction

Sliding mode control is a well-established method for control of


nonlinear systems, and is characterized by solid theoretical foundations.

One of the most interesting features of sliding mode control is the


robustness versus imprecise knowledge of the plant to control.
Approach:
◮ A so-called sliding surface is defined. This surface is a subset of the
state space, on which the trajectory of the plant is desired to lie.
◮ A feedback law is designed to bring the plant trajectory towards the
sliding surface and, once there, to stay close to this surface.

Applications: aerospace systems, automotive systems, robotics,


electric motors, power systems, etc.
Case study: control of the Chua circuit
Variant 1: γ = 2

The Chua system is a circuit with a nonlinear resistor ρ(·), described


by the following equations:

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = x1 − x2 + x3 + u
ẋ3 = −βx2 − Rx3
y = x1 .

This system has relative degree γ = 2 and, with R > 0, an as. st.
internal dynamics.
The following parameter values are assumed: R = 0.1, α = 10.4,
β = 16.5.

Case study: control of the Chua circuit


Variant 1: γ = 2

Two nonlinearities are shown in the figure:


◮ true nonlinearity: ρ(x1 ), a piece-wise linear function (non smooth);
◮ approximated nonlinearity: ρ̂(x1 ) = −1.16x1 + 0.041x31 , used for
control design.
Case study: control of the Chua circuit
Variant 1: γ = 2

A feedback linearization controller is designed using ρ̂(x1 ), and applied


to the Chua circuit in the following closed-loop scheme.

Case study: control of the Chua circuit


Variant 1: γ = 2

Simulation results:

constant reference sinusoidal reference


1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion

Sliding mode control

Consider the SISO nonlinear system

ẋ = f (x) + g(x)u
(1)
y = h(x)

where x ∈ Rn is the state, u ∈ R is the command input, y ∈ R is the


output, and f , g and h are smooth functions on Rnx .

It is assumed that the state is measured. Otherwise, an observer has


to be employed.
Sliding mode control design is based on two main steps:
1 definition of the so-called sliding surface;
2 design of a control law, bringing the state on this surface.
Sliding mode control
The normal form of system (1) is also considered:
 
µ2
.. . γ
  a(x) ≡ a(µ, ψ) = Lf h(x)
µ̇ = 
 . 
.
b(x) ≡ b(µ, ψ) = Lg Lγ−1

 µγ  f h(x)
a(x) + b(x)u (2)

ψ̇ = w(µ, ψ)
y = µ1 .

where γ is its relative degree. The new state is (µ, ψ), with
.
µ = (µ1 , . . . , µγ ) = (y, ẏ, . . . , y (γ−1) ) external dynamics
ψ ∈ Rn−γ . internal dynamics.

The internal dynamics is assumed locally asymptotically stable.

Sliding mode control


Suppose the system output y(t) is required to track a desired signal
r(t) (reference).
Define the following tracking error : ỹ = r − y.
The goal is to have this error “small” and, possibly, to make it
converge to zero.

Definition
The sliding surface is
.
S(t) = {x ∈ Rn : s(x, t) = 0}

where the function s : Rn+1 → R is


.
s(x, t) = ỹ (γ−1) + kγ ỹ (γ−2) + . . . + k2 ỹ

and ki ∈ R are chosen so that all the roots of the polynomial


P (λ) = λγ−1 + kγ λγ−2 + . . . + k2 have negative real part.
Sliding mode control

Property 1: If the trajectory is confined to the sliding surface, then


ỹ → 0 exponentially, according to the roots of P (λ).
This property can be proven applying the Laplace transform to the equation
s(x, t) = 0, which yield P (λ)Ỹ (λ) − P0 (λ) = 0, where P0 (λ) is a polynomial
accounting for the initial conditions and λ is the Laplace variable. Then,
Ỹ (λ) = P0 (λ)/P (λ). The statement follows performing the partial fraction
expansion and the inverse transform.

We look for a control law u, such that the sliding surface S is


◮ invariant: when the trajectory is on S, it remains on it:

x(τ ) ∈ S(τ ) ⇒ x(t) ∈ S(t) ∀t ≥ τ.

◮ attractive: when the trajectory is outside S, it is forced to move


towards it.

Sliding mode control

A control law u is designed, such that the sliding surface S is an


invariant set and attractive.

The system’s behavior on the surface is called sliding mode.


Sliding mode control

Suppose that, at a certain time τ , the trajectory is on the sliding


surface, i.e., that x(τ ) ∈ S. For this τ, we have s(x(τ ), τ ) = 0.
To guarantee that S is an invariant set, we require that ṡ = 0.
Recalling the the definition of s, the equation ṡ = 0 reads

ỹ (γ) + kγ ỹ (γ−1) + . . . + k2 ỹ˙ = 0


r(γ) − a(x) − b(x)u + kγ ỹ (γ−1) + . . . + k2 ỹ˙ = 0

where ỹ (γ) = r(γ) − y (γ) = r(γ) − a(x) − b(x)u.


Solving for u, we obtain the following control law:
1  (γ) (γ−1) ˙

us = r − a(x) + kγ ỹ + . . . + k2 ỹ .
b(x)

Property 2: With this law, S(t) is an invariant set.

Sliding mode control


Suppose that, at a certain time τ , the trajectory is not on S.
To make S attractive, a discontinuous term is added:
Let k1 > 0. The complete sliding mode control law is
1  (γ) (γ−1) ˙

u= r − a(x) + kγ ỹ + . . . + k2 ỹ +k1 sign(s(x, t)) .
b(x)

The motivation is the following:

ṡ(x, t) = r(γ) − a(x) − b(x)u + kγ ỹ (γ−1) + . . . + k2 ỹ˙


= −k1 sign(s(x, t)).

Property 3: s(x, t) ṡ(x, t) < 0, ∀x, t, which implies that S(t) is


attractive. In particular:
◮ s(x, τ ) > 0 ⇒ ṡ = −k1 , whose solution is s(t) = s(τ ) − k1 (t − τ ).
◮ s(x, τ ) < 0 ⇒ ṡ = k1 , whose solution is s(t) = s(τ ) + k1 (t − τ ).
◮ In both cases, s(t) → 0 in finite time ⇒ x(t) → S(t) in finite time.
Sliding mode control

The discontinuous term may cause a phenomenon called chattering


(high frequency oscillations around the sliding surface).

Sliding mode control


To avoid this problem, a sigmoid function can be used instead:
σ(η s) ≃ sign(s), where η is a design parameter determining the slope.

Typical choices:
ηs
σ(η s) = 1+|ηs|
σ(η s) = tanh(η s)
σ(η s) = sat(η s).

. ˙ . . . , ỹ (γ−1) ),
Writing the tracking error as µ̃ = (µ̃1 , . . . , µ̃γ ) = (ỹ, ỹ,
the sliding mode control law becomes
1  (γ) 
u= r − a(x) + kγ µ̃γ + . . . + k2 µ̃2 +k1 σ(η s) .
b(x)
Sliding mode control
Summary

The sliding surface and control law are


.
s(x, t) = ỹ (γ−1) + kγ ỹ (γ−2) + . . . + k2 ỹ
.
S(t) = {x ∈ Rn : s(x, t) = 0}
1
r(γ) − a(x) + kγ µ̃γ + . . . + k2 µ̃2 + k1 σ(ηs) .

u= b(x)

Results
S(t) is globally attractive: x(t) → S(t) in finite time.
S(t) is an invariant set: x(τ ) ∈ S(τ ) ⇒ x(t) ∈ S(t), ∀t ≥ τ .
On S(t) the tracking error converges to 0: ỹ(t) → 0 as t → ∞.
If the internal dynamics is glob. as. stable and the reference r is
bounded for all t, the state x is also bounded for all t.

Sliding mode control


Comparison with feedback linearization

The following general control law is common to both feedback


linearization and sliding mode control:
1   1  γ 
u= −Lγf h(x) +v = −Lf a(x) + v .
Lg Lfγ−1 h(x) b(x)

Feedback linearization:

v = r(γ) + kγ µ̃γ + . . . + k2 µ̃2 +k1 µ̃1 .

Sliding mode control:

v = r(γ) + kγ µ̃γ + . . . + k2 µ̃2 +k1 σ(η s).

They are the same, except the last term. In sliding mode control, the
term k1 σ(η s) increases the robustness of the controller.
Input-state linearization
Control scheme

plant: ẋ = f (x) + g(x)u


state transformation: µ = (h(x), Lf h(x), . . . , Lfγ−1 h(x))
 
1 γ
feedback linearization: u = b(x) −Lf a(x) + v
sliding mode controller: v = r(γ) + kγ µ̃γ + . . . + k2 µ̃2 + k1 σ(η s)
.
reference generator: computes analytically µr = (r, ṙ, . . . , r(γ−1) ).

1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion
Robustness properties
Suppose that the system to control is not exactly known. In normal
form, the system is described by

y (γ) = a(x) + ∆a(x) + b(x)u (3)

where x ∈ Rn is the state, u ∈ R is the command input, y ∈ R is the


output.
◮ a, b and h are known smooth functions on Rnx ;
◮ ∆a is an unknown smooth function on Rnx , representing the model
uncertainty. It is bounded as:
¯ ∀x ∈ Rn .
k∆a(x)k ≤ ∆,

The sliding surface and control law are the same:


.
s(x, t) = ỹ (γ−1) + kγ ỹ (γ−2) + . . . + k2 ỹ
.
S(t) = {x ∈ Rn : s(x, t) = 0}
1
r(γ) − a(x) + kγ µ̃γ + . . . + k2 µ̃2 + k1 σ(ηs) .

u= b(x)

Robustness properties

The time derivative of the sliding surface is the following:

ṡ(x, t) = r(γ) − a(x) − ∆a(x) − b(x)u + kγ ỹ (γ−1) + . . . + k2 ỹ˙


= −∆a(x) − k1 sign(s(x, t)).
¯ then s(x, t) ṡ(x, t) < 0, ∀x, t.
Property 4: If k1 > ∆,

Results
S(t) is globally attractive: x(t) moves close to S(t) in finite time.
If x(τ ) is close S(τ ), then x(t) remains close to S(t), ∀t ≥ τ .
Close to S(t) the tracking error is “small”.
If the internal dynamics is glob. as. stable and the reference r is
bounded for all t, the state x is also bounded for all t.
1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion

Case study: control of the Chua circuit


Variant 1: γ = 2

The Chua system is a circuit with a nonlinear resistor ρ(·), described


by the following equations:

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = x1 − x2 + x3 + u
ẋ3 = −βx2 − Rx3
y = x1 .

This system has relative degree γ = 2 and, with R > 0, an as. st.
internal dynamics.
The following parameter values are assumed: R = 0.1, α = 10.4,
β = 16.5.
The true nonlinearity ρ(x1 ) is a piece-wise linear function. The
nonlinearity used for control design is ρ̂(x1 ) = −1.16x1 + 0.041x31 .
Case study: control of the Chua circuit
Variant 1: γ = 2

A sliding mode controller is designed using ρ̂(x1 ), and applied to the


Chua circuit in the following closed-loop scheme.

Case study: control of the Chua circuit


Variant 1: γ = 2

Simulation results:

constant reference sinusoidal reference


1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion

MIMO sliding mode control

In the MIMO case, the system equations can be written as

Lg Lfγ1 −1 h1 (x)
 (γ )
   
Lγf 1 h1 (x)

y1 1
 ..  
= .. .  .. 
 + B(x)u, B(x) = 


 .  .  . 

(γn ) γ n γny −1
y ny y Lf y hny (x) Lg Lf hny (x)

where γi is the relative degree with respect to yi .

The definition of the sliding surface is the same as above, except that
s : Rn+1 → Rny and ki ∈ Rny ×ny .
Assuming invertibility of B(x), the sliding mode control law is
 
(γ)
u = B(x) −1
r − a(x) + kγ µ̃γ + . . . + k2 µ̃2 + k1 σ(η s) .
1 Introduction

2 Sliding mode control

3 Robustness properties

4 Case study: control of the Chua circuit

5 MIMO sliding mode control

6 Discussion

Discussion
Advantages and drawbacks of sliding mode control

Advantages:
◮ solid theoretical foundation and results;
◮ robustness to model uncertainty and disturbances;
◮ high control performance.

Drawbacks:
◮ assumption of model affine in u;
◮ problems in the case unstable zero-dynamics;
◮ input/state/output constraints not accounted for;
◮ trade-off performance-command activity difficult to manage;
◮ possible high frequency control action;
◮ in general, high command activity.
Nonlinear Control and Aerospace Applications

Math tools: norms

Carlo Novara
Politecnico di Torino

Norms – Basic definition

• Consider a linear vector space over .


A norm on is a function with the following properties:

For all and for all ,

(non-negativity)

(positive homogeneity)

(triangular inequality)

if and only if (separates point)


Norms – Vector norms

• Consider a vector .

norm (Euclidean norm) :

norm:

norm:
,…,

weighted norm: ,
is a diagonal matrix.

• These norms give rise to the , and vector Banach spaces.

Norms – Vector norms: example

• Consider the vector .

norm:

norm:

norm:
,…,
Norms – Vector norms in Matlab

• Consider the vector .

norm: norm(f)=norm(f,2)=3.7417

norm: norm(f,1)=6

norm: norm(f,inf)=3

Norms – Signal norms

• Consider a function (signal) , where .

norm:

norm:

norm:
∈ℝ

• These norms give rise to the , and functional Banach spaces.


Norms – Signal norms

• Consider a function (signal) , where .

norm:

norm:

norm:
∈ℝ

• These norms give rise to the , and functional Banach spaces.

Norms – Signal norms

• Very common are the and norms:

norm: energy of the signal

norm: amplitude of the signal


∈ℝ
Norms – Signal norms: examples

• Consider the function

1.5 1.5

1 1

f(t)2
f(t)

0.5 0.5

0 0

-0.5 -0.5
0 2 4 6 8 10 0 2 4 6 8 10

t t

 2
2
f 2
  f (t ) dt   dt  2
2
 area of the red region  energy of f
0 0

f 
 max f (t )  max f (t )  1  largest value of f (t )  amplitude of f
tR  t[0,2]

Norms – Signal norms: examples

• Consider the function

1.5 1.5

1 1
f(t)2
f(t)

0.5 0.5

0 0

-0.5 -0.5
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

t t

  
2  1  1
f  f (t ) dt   e dt    e6t  
2 6 t

 6 0 6
2
0 0

f 
 max f (t )  max e3t  1
tR  tR 
Norms – Signal norms: examples

• Consider the function

1.5
1
1

f(t)2
f(t)

0 0.5

0
-1
-0.5
0 2 4 6 8 10 0 2 4 6 8 10

t t

 
2
f 2
  f (t ) dt   sin(t ) 2 dt    unbounded  2 norm
2

0 0

f 
 max f (t )  max sin(t )  1  bounded   norm
tR  tR 

Norms – Signal norms: examples

• Consider the function

7
x 10
10000 10
f(t)2
f(t)

5000 5

0 0
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1

t t

 
2
f 2
  f (t ) dt    (t )dt  1  bounded  2 norm
2

0 0

f 
 max f (t )  max  (t )    unbounded   norm
tR  tR 
Norms – Signal norms in Matlab

• Consider the function

dt=0.0001;
t=0:dt:10;
f=exp(-3*t)’;

norm(f)*sqrt(dt) % L2 norm

norm(f,1)*dt % L1 norm

norm(f,inf) % Linf norm

For vector-valued functions, norm computation can be slightly


more complicated.

Norms – Signal weighted norms

• Consider a function (signal) , where .

weighted norm: ,

dt=0.0001;
t=0:dt:10;
f=exp(-3*t)’;

sqrt(sum(f’*Q*f)*dt) % L2 weighted norm


Nonlinear control and aerospace applications

Math tools: optimization

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Basic notions

3 Minimization
1 Introduction

2 Basic notions

3 Minimization

Introduction
What is optimization?
◮ practical point of view: finding the best solution to a problem;
◮ mathematically: finding the minimum (or maximum) of a function.
Optimization is an extremely important discipline in most fields:
◮ physics and engineering;
◮ economy, finance and management;
◮ logistic and transportation;
◮ energy and environment;
◮ medicine and biology;
◮ ordinary life;
◮ etc ...
Control design can be seen as an optimization problem: we have to
design the controller in order to
◮ minimize the tracking error;
◮ minimize the effects of disturbances.
Optimization is fundamental in model predictive control.
1 Introduction

2 Basic notions

3 Minimization

Basic notions
Univariate function f : R → R; unique minimum.

×10 4
3
f (x)

-1

f (x∗ )
function
-2 global minimum
local maximum
local minimum
-3
-40 -30 -20 -10 0 10 20

x∗ x

x∗ = arg minf (x) = −30


x∈R

f (x∗ ) = minf (x) = −1.3 × 104


x∈R

x is said the decision variable.


Basic notions
Univariate function f : R → R; several minima.

2500

f (x)
function
global minimum
2000
global minimum

1500

1000

500

0
-20 -15 -10 -5 0 5 10
x∗1 x∗2 x

{x∗1 , x∗2 } = arg minf (x) = {−12, 4.5}


x∈R

f (x∗1 ) = f (x∗2 ) = minf (x) = 0


x∈R

Basic notions
Univariate function f : R → R; infinite number of minima.

×10 8
2
f (x)

function
1.8
global minima
1.6

1.4

1.2

0.8

0.6

0.4

0.2

0
-20 -15 -10 -5 0 5 10 15

X = arg minf (x) = {x : |x| ≤ 4} ⊂ R


x∈R

f (x) = minf (x) = 0, ∀x ∈ X


x∈R
Basic notions
Univariate function f : R → R; constrained optimization.

3.5

f (x)
3
function
global constrained minimum
2.5

1.5

0.5

-0.5

-1

-1.5

-2
-40 -30 -20 -10 0 10 20
x∗ x

x∗ = arg min f (x) = 3


−2≤x≤15

f (x∗ ) = min f (x) = −0.008


−2≤x≤15

Basic notions
Univariate function f : R → R; constrained optimization.

3.5
f (x)

3
function
global constrained minimum
2.5

1.5

0.5

-0.5

-1

-1.5

-2
-40 -30 -20 -10 0 10 20
x∗ x

x∗ = arg min f (x) = −20


−20≤x≤15

f (x∗ ) = min f (x) = −0.73


−20≤x≤15
Basic notions
Univariate function f : R → R; constrained optimization.

3.5

f (x)
3
function
global constrained minimum
2.5

1.5

0.5

-0.5

-1

-1.5

-2
-40 -30 -20 -10 0 10 20
x∗ x

x∗ = arg min f (x) = −20


−20≤x≤15

Alternative notation:
x∗ = arg min f (x) = −20
subject to: − 20 ≤ x ≤ 15

Basic notions
Multivariate function f : Rn → R; constrained optimization.

3
f (x1 , x2 )

-1

-2

20

-20

10 20
-40 -10 0
x2 -40 -30 -20

x1
n o

X = x = [x1, x2 ] : −45 ≤ x1 , x2 ≤ 20 ⊂ R2
x∗ = arg minf (x) =?
x∈X
f (x∗ ) = minf (x) =?
x∈X
Basic notions
Multivariate function f : Rn → R; constrained optimization.

20 4

10 3

0
2

-10
x2
1

-20
0

-30

-1

-40

-2
-40 -30 -20 -10 0 10 20

x1
n o

X = x = [x1, x2 ] : −45 ≤ x1 , x2 ≤ 20 ⊂ R2
 
−30
x∗ = arg minf (x) =
x∈X −30
f (x∗ ) = minf (x) = −2
x∈X

Basic notions
Feasibility

An optimization problem is feasible if there exists at least one solution


satisfying all constraints. Otherwise, it is unfeasible.

Example of feasible problem:

x∗ = arg min f (x)


subject to : − 20 ≤ x ≤ 15.

Example of unfeasible problem:

x∗ = arg min f (x)


subject to :
−20 ≤ x ≤ 15
20 ≤ x ≤ 25.

The feasible set is empty.


1 Introduction

2 Basic notions

3 Minimization

Minimization
A simple univariate example

Consider the function


x4 5 x3
f (x) = − − 17 x2 + 80 x.
4 3
To find its extrema, we compute the derivative:
df (x)
dx = x3 − 5 x2 − 34 x + 80
= (x − 2) (x + 5) (x − 8) .

The extrema of f are thus located at Xe = {−5, 2, 8}, and

f (−5) = −460, f (2) = 83, f (3) = −277.

It follows that
x∗ = arg minf (x) = −5
x∈R
f (x∗ ) = minf (x) = −460.
x∈R
Minimization

In the above example, we were able to compute analytically the


function minimum.
In many situations, it is not possible to find an analytical solution:
◮ it could not be possible to find the zeros of the derivatives;
◮ a large number of variables could be involved.
In these situations, a numerical solution can be found, by means of
some algorithm:
◮ typically, an initial point xo is chosen;
◮ other points are sequentially visited, based on the function gradient;
◮ the algorithm stops when a minimum is detected.

Problem: in general, numerical algorithms can only find local minima


(which depend on the starting point).

Minimization
A simple bivariate example

20 4 20 4

10 3 10 3

x+
o
0
x 0
2 2

-10 -10
xo
x2

x2

1 1

-20 -20
0 0

-30 -30

-1
x∗ -1

-40 -40

-2 -2
-40 -30 -20 -10 0 10 20 -40 -30 -20 -10 0 10 20

x1 x1

↑ ↑
local minimum found global minimum found
Minimization
Important is the class of convex functions:
◮ for these functions every local minimum is a global minimum;
◮ numerical algorithms can find a global minimum.

Definition: A function is convex if its level curves define convex sets. 2


20 4 100 9

80 8
10 3
60
7

0 40
2 6

20

-10 5
x2

x2
1 0

4
-20
-20
0
3
-40

-30
-60 2
-1

-80 1
-40

-2 -100
-40 -30 -20 -10 0 10 20 -100 -80 -60 -40 -20 0 20 40 60 80 100

x1 x1

↑ ↑
non-convex function convex function

Nonlinear control and aerospace applications

Nonlinear model predictive control

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion

1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion
Introduction

Nonlinear model predictive control (NMPC) is one of the most general


and flexible approaches to control nonlinear systems.

NMPC allows to deal with input/state/output constraints and to


manage systematically the trade-off performance/command activity.
Approach: At each time step:
◮ A prediction over a chosen time horizon is performed, using a model of
the plant.
◮ The command input is chosen as the one yielding the “best” prediction
(i.e., the prediction closest to the desired behavior) by means of some
on-line optimization algorithm.

Applications: automotive systems, aerospace systems, chemical


processes, robotics, biomedical devices, etc.

1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion
Nonlinear model predictive control

Consider the MIMO nonlinear system

ẋ = f (x, u) (1)

where x ∈ Rn is the state, u ∈ Rnu is the command input and the


output is y = x.

It is assumed that the state is measured. Otherwise, an observer has


to be employed, or a model in input-output form.

Suppose that the state is measured in real-time, with a sampling time


Ts . The measurements are

x(tk ), tk = Ts k, k = 0, 1, . . .

NMPC is based on two key operations: prediction and optimization.

Nonlinear model predictive control

A prediction of the state over an interval [t, t + Tp ] is obtained by


integration of (1) (or a model if (1) is not exactly known).
◮ Tp ≥ Ts is called the prediction horizon.

At a time τ ∈ [t, t + Tp ], the predicted state is a function of the


“initial” state x(t) and the input signal:

x̂ (τ ) ≡ x̂ (τ, x(t), u(t : τ ))

where u(t : τ ) denotes the input signal in the interval [t, τ ].

Typically, the input signal is assumed constant after a certain time Tc ,


called the control horizon:

u(τ ) = u(t + Tc ), τ ∈ [t + Tc , t + Tp ].

where 0 ≤ Ts ≤ Tc ≤ Tp .
Nonlinear model predictive control
In this prediction, u is an open-loop input, in the sense that it is a
generic input, which does not depend on x.

Nonlinear model predictive control


At each time t = tk , we look for an input signal u∗ (t : τ ), such that
the predicted state
x̂ (τ, x(t), u∗ (t : τ ))
has the “desired behavior” for τ ∈ [t, t + Tp ].
The concept of “desired behavior” is formalized by defining the
objective function
Z t+Tp
.
h i
2 2 2
J (u(t : t + Tp )) = kx̃p (τ )kQ + ku(τ )kR dτ + kx̃p (t + Tp )kP
t
.
where x̃p (τ ) = r(τ ) − x̂(τ ) is the predicted tracking error, r(τ ) is a
reference to track, and k·kX are weighted vector norms and their
integrals are (square) signal norms.

The input signal u∗ (t : t + Tp ) is chosen as one minimizing the


objective function J (u(t : t + Tp )).
Nonlinear model predictive control
The objective function is
Z t+Tp
.
h i
2 2 2
J (u(t : t + Tp )) = kx̃p (τ )kQ + ku(τ )kR dτ + kx̃p (t + Tp )kP .
t

The main goal of NMPC is to minimize, at each time tk , the tracking


error over a finite time interval.
The term kx̃(t + Tp )k2P gives further importance to the “final”
tracking error.
The term ku(τ )k2R allows us to menage the trade-off between
performance and command activity.
The weighted norm of a vector x ∈ Rn is defined according to
n
. T
kxk2Q
X
= x Qx = qi x2i
i=1

where Q = diag(q1 , . . . , qn ) ∈ Rn×n .

Nonlinear model predictive control


The objective function is
Z t+Tp
.
h i
2 2 2
J (u(t : t + Tp )) = kx̃p (τ )kQ + ku(τ )kR dτ + kx̃p (t + Tp )kP .
t
.
The tracking error x̃p (τ ) = r(τ ) − x̂(τ ) depends on x̂(τ ), which is
obtained by integration of (1) (or a model).
Minimization of J (u(t : t + Tp )) is thus subject to the constraint that
x̂(τ ) satisfies (1) (or a similar model equation):

x̂ : x̂˙ = f (x̂, u), x̂(t) = x(t).

Other constraints may be present


◮ on the predicted state: x̂(τ ) ∈ Xc , ∀τ ∈ [t, t + Tp ]
⋆ a classical example is represented by obstacles;
◮ on the input: u(τ ) ∈ Uc , ∀τ ∈ [t, t + Tc ]
⋆ a classical example is represented by input saturation.
1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion

NMPC mathematical formulation


General optimization problem

At each time t = tk , the following optimization problem is solved:

u∗ (t : t + Tp ) = arg minJ (u(t : t + Tp ))


u(·)

subject to:
˙ ) = f (x̂(τ ), u(τ )) ,
x̂(τ x̂(t) = x(t)
(2)
x̂(τ ) ∈ Xc , ∀τ ∈ [t, t + Tp ]
u(τ ) ∈ Uc , ∀τ ∈ [t, t + Tc ]
u(τ ) = u(t + Tc ), ∀τ ∈ [t + Tc , t + Tp ]

where 0 ≤ Ts ≤ Tc ≤ Tp . Ts is the sampling time, Tc is the control


horizon and Tp is the prediction horizon.
NMPC mathematical formulation

The optimization problem (2)


◮ is in general non-convex;
◮ must be solved on-line, at each time tk .
An efficient numerical algorithm is needed for its solution.

The objective function J (u(·)) is a function of the signal u(·). Since a


signal is a function of time, J(·) is a function of a function. Such a
mathematical object is called a functional.

The input signal u(t : t + Tp ) can be seen as a vector with an infinite


number of elements.
◮ Hence, optimization involves an infinite number of decision variables.
◮ To overcome this problem, the input signal can be parametrized.

NMPC mathematical formulation


Input parametrization:
m
X
u(τ ) = ci φi (τ ), c i ∈ Rn u
i=1

where φi are basis functions. Typical choices:



1, τ ∈ [t + (i − 1)Ts , t + iTs )
◮ Rectangular functions: φi (τ ) =
0, otherwise.
With rectangular functions, u(τ ) is piece-wise constant.
◮ Polynomial functions: φi (τ ) = (τ − t)i−1 .

A simple but often effective parametrization is obtained with


rectangular functions and Tc = Ts , which corresponds to a polynomial
parameterization with m = 1 and Tc = Tp . In both cases,

u(τ ) = c1 = const, ∀τ ∈ [t, t + Tp ].


NMPC mathematical formulation
Optimization problem with parametrized input

The input signal is represented by a vector with finite-dimension:

c = (c1 , . . . , cm ) ∈ Rnu ×m .
At each time t = tk , the following optimization problem is solved:

c∗ = arg min J (c)


c∈Rnu ×m
subject to:
˙ ) = f (x̂(τ ), u(τ )) ,
x̂(τ x̂(t) = x(t) (3)
x̂(τ ) ∈ Xc , ∀τ ∈ [t, t + Tp ]
u(τ ) ∈ Uc , ∀τ ∈ [t, t + Tc ]
u(τ ) = u(t + Tc ),
∀τ ∈ [t + Tc , t + Tp ].
The optimal input is given by u∗ (τ ) = m
P ∗
i=1 ci φ(τ ).

NMPC mathematical formulation


Receding horizon strategy

Suppose that, at a time tk , the optimal input signal u∗ (t : t + Tp ) has


been computed solving the above optimization problem.
◮ u∗ (t : t + Tp ) is an open-loop input: it depends on x(t) but not on
x(τ ), τ > t.
◮ u∗ (t : t + Tp ), if applied for the entire time interval [t, t + Tp ], do not
perform a feedback action, and thus it cannot increase the precision,
and reduce errors and disturbance effects.

The NMPC feedback control algorithm is obtained by means of a


so-called receding horizon strategy:
1a. At time t = tk , compute u∗ (t : t + Tp ) via optimization.
1b. Apply only the first input value: u(τ ) = u∗ (t = tk ) and keep it
constant for ∀τ ∈ [tk , tk+1 ].
2. Repeat steps 1a-1b for t = tk+1 , tk+2 , . . .
1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion

NMPC algorithm

1 At each time t = tk , solve the optimization problem

c∗ = arg min J (c)


c∈Rnu ×m

subject to:
˙ ) = f (x̂(τ ), u(τ )) ,
x̂(τ x̂(t) = x(t)
x̂(τ ) ∈ Xc , ∀τ ∈ [t, t + Tp ]
u(τ ) ∈ Uc , ∀τ ∈ [t, t + Tc ]
u(τ ) = u(t + Tc ), ∀τ ∈ [t + Tc , t + Tp ].

Pm
◮ Optimal open-loop input: u∗ (τ ) = ∗
i=1 ci φ(τ ).
◮ Closed-loop control law: u(τ ) = u∗ (tk ), ∀τ ∈ [tk , tk+1 ].

2 Repeat step 1 for t = tk+1 , tk+2 , . . .


NMPC algorithm
Control scheme

plant: ẋ = f (x, u)
nmpc law: algorithm shown in the previous slide.
◮ The NMPC algorithm contains a model of the plant, that is used for
prediction.
◮ The model is of the form ẋ = fˆ(x, u). In the nominal case, fˆ = f .
◮ It is important to not confuse the prediction model with the plant.

NMPC design
Parameters choice

Ts : In many situations, the sampling time is given and cannot be


chosen. If it can be chosen, a trial and error procedure in simulation
can be adopted, considering that Ts should be
◮ sufficiently small to deal with the plant dynamics (Nyquist-Shannon
sampling Theorem);
◮ not too small, to avoid numerical problems and slow computation.

Tp , Tc can be chosen through a trial and error procedure in simulation.


If a polynomial parametrization is used, it is convenient to set
Tc = Tp . Otherwise, Tc = Ts . Observations:
◮ a “large” Tp increases the closed-loop stability properties;
◮ a too large Tp may reduce the tracking accuracy.

m: Usually, a low number of parameters is enough to obtain a


satisfactory control performance.
◮ Choosing m ∈ {1, 2} works in many situations.
NMPC design
Weight matrices choice

Initial choice: Q, R and P diagonal with



1 in the presence of requirements on xi
◮ Qii =
0 otherwise

1 in the presence of requirements on xi
◮ Pii =
0 otherwise

1 in the presence of requirements on ui
◮ Rii =
0 otherwise.

Trial and error (in simulation): Change the values of Qii , Rii and
Pii , until the requirements are satisfied.

increasing decreasing the reducing the converging


⇒ ⇒
Qii , Pii energy of xi time and oscillations
increasing decreasing the reducing the command effort
⇒ ⇒
Rii energy of ui and “fuel consumption”

1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion
NMPC properties
Stability

To enforce closed-loop stability, the following terminal region


constraint can be added to the optimization problem:

x̂(t + Tp ) ∈ Ω

where Ω ⊂ Rn is a bounded, closed and connected set. Under a


number of reasonable technical conditions, the following result holds.

Theorem
Consider a constant r̄ ∈ Ω such that f (r̄, ū) = 0 for some ū. Assume that a
function u(x) exists such that u(r̄) = ū, u(x) ∈ Uc ∀x ∈ Ω and
2 2 2
∇x kr̄ − xkP f (x, u(x)) + kr̄ − xkQ + kūkR ≤ 0, ∀x ∈ Ω.

Then, for any 0 < Ts < Tp , r̄ is an asymptotically stable equilibrium of the


closed-loop system. A domain of attraction of r is the set Xs of states for which
the optimization problem admits a feasible solution.

NMPC properties
Robustness

In real-world applications, the exact plant model is seldom known.


This means that an approximated model fˆ(x, u) is used for control
design, instead of the “true” model f (x, u).

Thanks to the receding horizon strategy, standard NMPC is in general


characterized by good robustness properties.

Assuming that f − fˆ is bounded in some norm, several robust

versions of NMPC have also been proposed:


◮ min-max NMPC
◮ H∞ NMPC
◮ parametrized controller NMPC.
The first two techniques may be too conservative.
All the three typically require a high computational effort and thus
cannot be applied to problems where a small Ts is required.
1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion

Case study: control of the Chua circuit


Variant 1

The Chua system is a circuit with a nonlinear resistor ρ(·), described


by the following equations:

ẋ1 = α(x2 − x1 − ρ(x1 ))


ẋ2 = x1 − x2 + x3 + u
ẋ3 = −βx2 − Rx3
y = x1 .

This system has relative degree γ = 2 and, with R > 0, an as. st.
internal dynamics.

The following parameter values are assumed: R ∈ {0.1, 0}, α = 10.4,


β = 16.5.
Case study: control of the Chua circuit
Variant 1a

Plant: R = {0.1, 0}, ρ(x1 ) = −1.16x1 + 0.041x31 .


NMPC design:
◮ nonlinearity used for design: ρ̂(x1 ) = ρ(x1 );
◮ Ts = 0.01 s, Tp = Tc = 0.2 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices:
Q = diag(10, 0, 0), R = diag(0, 0, 0), P = diag(0, 0, 0);
◮ constraints: Xc = Rn , Uc = R (no constraints).

Case study: control of the Chua circuit


Variant 1a

Closed-loop performance with R = 0.1

constant reference sinusoidal reference


Case study: control of the Chua circuit
Variant 1a

Closed-loop performance with R = 0

constant reference sinusoidal reference

Case study: control of the Chua circuit


Variant 1b

Plant: R = 0, ρ(x1 ) = −1.16x1 + 0.041x31 .


NMPC design:
◮ nonlinearity used for design: ρ̂(x1 ) = ρ(x1 );
◮ Ts = 0.01 s, Tp = Tc = 0.2 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices:
Q = diag(10, 0, 0.1), R = diag(0, 0, 0), P = diag(0, 0, 0);
◮ constraints: Xc = Rn , Uc = R (no constraints).
Case study: control of the Chua circuit
Variant 1b

Closed-loop performance with R = 0

constant reference sinusoidal reference

Case study: control of the Chua circuit


Variant 1c

Plant: R = 0.1, ρ(x1 ) =piece-wise linear function.


NMPC design:
◮ nonlinearity used for design: ρ̂(x1 ) = −1.16x1 + 0.041x31 6= ρ(x1 );
◮ Ts = 0.01 s, Tp = Tc = 0.1 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices:
Q = diag(10, 0, 0), R = diag(0, 0, 0), P = diag(0, 0, 0);
◮ constraints: Xc = Rn , Uc = R (no constraints).
Case study: control of the Chua circuit
Variant 1c

Closed-loop performance

constant reference sinusoidal reference

1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion
Example: space rendezvous
A space rendezvous is an orbital maneuver in which two spacecrafts
(one is often a space station) approach to a very close distance.
Suppose that a space station is traveling on some circular orbit and a
spacecraft has to move a point located near a specific side of the
station, to allow a subsequent docking maneuver.
◮ State constraints must be imposed to avoid collisions.
◮ Input constraints are present, due to thruster saturation.

rendezvous docking

Example: space rendezvous

The dynamics of a spacecraft in a neighborhood of the space station is


described by the Hill-Clohessy-Wiltshire equations:

ẍ1 = 3ω 2 x1 + 2ω ẋ2 + u1
ẍ2 = −2ω ẋ1 + u2
ẍ3 = −ω 2 x3 + u3

where xi are the spacecraft coordinates relative to the station,


ω = 0.0011 rad/s, and
◮ state: x = (x1 , x2 , x3 , ẋ1 , ẋ2 , ẋ3 ),
◮ input: u = (u1 , u2 , u3 ).
These equations are LTI but the control problem is nonlinear due to
the presence of nonlinear constraints.
They are unstable, due to a double null eigenvalue.
Example: space rendezvous

NMPC design:
◮ Ts = 3 s, Tp = Tc = 70 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 105 I, P = I;
◮ constraints:
safety sphere around
⋆ Xc = {x : k(x1 , x2 , x3 )k > 50} ←
the space station;
⋆ Uc = {u : kuk∞ ≤ 1} ← thruster saturation.
◮ reference: r = (400, 0, 0, 0, 0, 0) ← docking starting point.

All quantities are expressed in SI units.

Example: space rendezvous

trajectories starting from example of example of


random initial conditions constrained trajectory position signals
1 Introduction

2 Nonlinear model predictive control

3 Mathematical formulation

4 NMPC algorithm and design

5 NMPC properties

6 Case study: control of the Chua circuit

7 Example: space rendezvous

8 Discussion

Discussion
Advantages and drawbacks of NMPC

Advantages:
◮ general and flexible;
◮ constraints and input saturation accounted for;
◮ efficient management of the performance/input activity trade-off;
◮ optimal trajectories (over a finite time interval).

Drawbacks:
◮ problems in the case unstable zero-dynamics;
◮ possible local minima in the optimization problem;
◮ high on-line computational cost.
Nonlinear control and aerospace applications

Introduction to aerospace control systems

Carlo Novara

Politecnico di Torino
Tel. +39 011 5647019
Email: [email protected]

Outline

1 Introduction

2 Overview
Introduction
The fields in which satellites are used are numerous:
◮ telecommunications
◮ scientific research
◮ meteorology
◮ environment monitoring
◮ etc.
Satellite weight: from several kilos to tens of tons.
Satellite life:
◮ reaching transfer orbit
◮ reaching mission orbit
◮ checking of instrumentation
◮ mission.

Introduction
Orbits:
◮ low Earth orbit (180 to 2 000 km above the Earth surface)
◮ mid Earth orbit (2 000 to 35 000 km)
◮ high Earth orbit (≥ 35 000 km).
Introduction

Geostationary orbit: the satellite travels on the orbit with a speed


equal to the Earth rotation speed.
The satellite is always above the same Earth zone.
Equilibrium equation: mω 2 R = G MRm
2

◮ ω = 7.29×10−5 rad/s = Earth rotational speed


◮ G = 6.67408 × 10−11 m3 kg−1 s−2 = gravitational constant
◮ M = 5.972×1024 kg = Earth mass
◮ m = satellite mass
◮ R = Earth-satellite distance.
Letting r = 6 378×103 m be the Earth radius, it follows that the
distance of a geostationary satellite from the Earth surface is
r
3 GM
Rg = R − r = − r = 35 786 km.
ω2

Introduction

Examples of medium-sized satellites are US Intelsat V


(communication) and European Sentinel I (environment monitoring).

US Intelsat V European Sentinel I


Introduction

Examples of medium-sized satellites are US Intelsat V and European


Sentinel I.
◮ Structural features:
⋆ central body with cubelike structure, ∼ 1.5 × 1.5 × 2 m3
⋆ solar arrays, ∼ 1 × 7 m2
⋆ antenna directed toward the earth
⋆ thrusters and attitude sensors located on the body and the solar panels
⋆ total mass ∼ 6 000 kg.
◮ Attitude and orbit control system hardware:
⋆ thrust system
⋆ 2 momentum wheels
⋆ 2 infrared horizon sensors
⋆ 4 fine sun sensors
⋆ 12 coarse sun sensors
⋆ 2 three-axis coarse rate gyros
⋆ 2 three axis integrating gyros.

Overview

Topics are organized in two main parts:


1 Attitude dynamics and control:
⋆ rotations, attitude kinematics and dynamics
⋆ attitude control.
2 Orbital dynamics and control:
⋆ orbital dynamics
⋆ orbit/trajectory control.
Nonlinear control and aerospace applications

Rotations

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation
1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation

Introduction

Controlling the orientation (or attitude) of a spacecraft (or aircraft)


is fundamental.
◮ Spacecrafts and space stations orbiting around a planet, or during
interplanetary navigation,
⋆ must capture the solar energy through panels,
⋆ need a communication link between on-board antennas and Earth
stations/receivers or relay satellites.
◮ Scientific satellites and space vehicles carry payloads to be pointed
toward either celestial objects or Earth targets (e.g., the Hubble).
Depending on the mission objectives, the orientation must be known
and controlled with respect to
◮ the Earth (Earth pointing satellites) or
◮ a celestial frame (inertial pointing satellites).
Introduction

A spacecraft can be described as a rigid body, which moves with


respect to some inertial frame.
The body movement is given by a combination of a translation and a
rotation.
The objective here is to build the mathematical tools for properly
describing the rotational motion of a rigid body.
◮ This is fundamental to obtain the equations of motion of a spacecraft,
which in turn are fundamental for spacecraft attitude control.
Four rotation representations will be considered:
1 Direction cosine matrices;
2 Euler angles;
3 Angle-axis;
4 Quaternions (Euler parameters).

1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation
Reference frames
Definition
An orthogonal frame of reference R = {O, i, j, k} (or Cartesian coordinate
system) is formed by an origin O and a set of three unitary vectors {i, j, k}
with origin in O, that are mutually orthogonal.

Reference frames

Three kinds of RFs (reference frames) are commonly used in aerospace


applications:
1 Body frames:
⋆ Origin and axes are defined by points of a rigid body, either a
spacecraft or a planet.
⋆ Typically, the body Center of Mass (CoM) is taken as the origin.
2 Trajectory frames:
⋆ A trajectory is the path of CoM of a body through the space (typically,
an orbit).
⋆ The body CoM is taken as the origin.
⋆ The axes are aligned with three instantaneous directions of the
trajectory.
3 Celestial frames:
⋆ Origin and axes are defined by points and directions in the solar system
or in the universe.
Reference frames
Vector representations

Consider a reference frame F={O, i, j, k}.

A vector r ∈ R3 can be written as a linear combination of the unit


vectors of F as

r = xi + yj + zk ← physical vector

where x, y, z are the coordinates.

The vector can also be represented as


 
x
r =  y  ← column vector.
x

Reference frames
Vector representations

r = ~v = xi + yj + zk ← physical vector

 
x
r =  y  ← column vector.
x

The physical vector is an “abstract” object. We can think about it as a


vector defined in an “absolute” reference frame.

The column vector is the representation of the physical vector in a


given RF ⇒ the column vector depends on the RF.

The physical vector is often denoted with ~v . For simplicity, we use the
same symbol r for both the physical and the column vector.
Reference frames
Vector representations: example
Consider two RFs:
◮ F1={O, I, J, K}, with axes X, Y, Z.
◮ F2={O, i, j, k}, with axes x, y, z.
The physical vector
r = −0.45I + 0.04J + 0.19K = −0.4i − 0.24j + 0.16k
has two different representations (column vectors):
[−0.45 0.04 0.19]T and [−0.4 − 0.24 0.16]T .

1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation
Direction cosine matrices

Consider two RFs:


◮ F1={O1 , I, J, K}, with axes X, Y, Z.
◮ F2={O2 , i, j, k}, with axes x, y, z.

Direction cosine matrices


Consider a particle with position R = Ro + r

R = XI + Y J + ZK position of the particle in F1


Ro = Xo I + Yo J + Z o K position of the origin of F2
r = xi + yj + zk position of the particle in F2.
Direction cosine matrices

The components of R can be expressed in terms of x, y and z by


taking the scalar products of R with I, J and K:

X = R · I = (Ro + r) · I = Xo + xI · i + yI · j + zI · k
Y = R · J = (Ro + r) · J = Yo + xJ · i + yJ · j + zJ · k
Z = R · K = (Ro + r) · K = Zo + xK · i + yK · j + zK · k.

In matrix form:
     
X − Xo x I·i I·j I·k
. 
 Y − Yo  = T  y  , T = J · i J · j J · k .
Z − Zo z K·i K·j K·k

The dot products I · i, I · j, ..., are the 9 direction cosines representing


the orientation of each axis of one frame wrt each axis of the other.
T is the direction cosine matrix (DCM).

Direction cosine matrices

The DCM can be expressed as


   
I·i I·j I·k T11 T12 T13
. 
T= J·i J · j J · k  =  T21 T22 T23  = [Tij ] .
K·i K·j K·k T31 T32 T33

Since translations and rotations can be treated independently, in the


following we assume
Ro = 0.
Then,    
X x
 Y  = T y .
Z z
This shows that T is a transformation, giving the coordinates in F1
from the coordinates in F2.
Direction cosine matrices

In two dimensions (e.g., with z = Z = 0) the direction cosines are

I · i = cos θ = J · j
I · j = cos( π2 + θ) = − sin θ = −J · i

where θ is the rotation angle.

It follows that
    
X cos θ − sin θ x
= .
Y sin θ cos θ y

Direction cosine matrices


Example: 2D coordinate transformation

Suppose that F2 is rotated wrt F1 of an angle θ = 0.15 π rad.


Consider a particle with position in F2 given by
 
0.5
r = 0.5 i + 0.3 j = .
0.3
Direction cosine matrices
Example: 2D coordinate transformation

The particle position in F1 is obtained through the following


transformation:
    
X cos θ − sin θ 0.5
R= = Tr =
 Y  sin θ  cos
θ 0.3

0.891 −0.454 0.5 0.3093
= =
0.454 0.891 0.3 0.4943

Direction cosine matrices


Example: 2D vector rotation
Another interpretation of the rotation matrix is the following:
Consider a vector r in a reference frame with axes x, y:
 
0.5
r = 0.5 i + 0.3 j = .
0.3
Applying the rotation matrix, we obtain a vector R rotated of an
angle θ in the same reference frame:
    
cos θ − sin θ 0.5 0.3093
r′ = Tr = = .
sin θ cos θ 0.3 0.4943
Direction cosine matrices
Example: 2D rotation of a square
A square can be represented by the following matrix:
 
1 −1 −1 1 the columns
S= ←
1 1 −1 −1 are the verices.
Applying the rotation matrix with θ = π/6 rad:
 
′ 0.366 −1.366 −0.366 1.366 rotated
S = TS = ←
1.366 0.366 −1.366 −0.366 square.

Direction cosine matrices


Discussion

A DCM/rotation matrix T has 2 interpretations:


1 Transformation of coordinates F2 → F1.
2 Rotation of vectors in a given fixed frame.
In the case of vectors that are frame axes, F1 → F2.

Both interpretations are important.

Any time that an DCM is used, it is necessary to specify which


interpretation is being used.
1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation

Euler angles
In three dimensions, we define the elementary rotation matrices:
 
1 0 0
.  rotation about X (or x)
T1 (φ) = 0 cφ −sφ 
through an angle φ.
0 sφ cφ
 
cθ 0 sθ
. rotation about Y (or y)
T2 (θ) =  0 1 0 
through an angle θ
−sθ 0 cθ
 
cψ −sψ 0
. rotation about Z (or z)
T3 (ψ) =  sψ cψ 0 
through an angle ψ
0 0 1

Any rotation can be expressed as a product of T1 , T2 and T3 .


ψ, θ and φ are called the Euler angles.
Euler angles
Example: 3D elementary rotation of a vector

Consider the vector r = 0i + 2j + 4k.


The matrix T3 (π/3) rotates any vector about the z axis of an angle
π/3 rad = 60o .
The rotated vector is r′ = T3 (π/3)r = −1.73i + 1j + 4k.

Euler angles
Example: 3D elementary rotation of an hyper-rectangle

An hyper-rectangle can be represented by a matrix whose columns are


the vertices (blue).
Applying T3 (π/3) to this matrix, we obtain an hyper-rectangle
rotated about the z axis of an angle π/3 rad = 60o (red).
Euler angles

There exist 12 possible combinations of the 3 elementary rotations


(with non-sequentially repeated numbers), which can be grouped as
follows:
◮ 6 Tait–Bryan rotations:
⋆ 123 → T1 (φ)T2 (θ)T3 (ψ);
⋆ 321 → T3 (ψ)T2 (θ)T1 (φ);
⋆ ...
◮ 6 proper Euler rotations:
⋆ 313 → T3 (φ)T1 (θ)T3 (ψ);
⋆ 323 → T3 (ψ)T2 (θ)T3 (φ);
⋆ ...

Commonly used: Tait–Bryan 123 and 321; proper Euler 313.

Euler angles

Tait–Bryan 123:    
X x
 Y  = T123  y 
Z z
.
where T123 (φ, θ, ψ) = T1 (φ)T2 (θ)T3 (ψ) is the rotation matrix (or
attitude matrix) given by
 
cθ cψ −cθ sψ sθ
T123 =  cφ sψ + sφ sθ cψ cφ cψ − sφ sθ sψ −sφ cθ  .
sφ sψ − cφ sθ cψ sφ cψ + cφ sθ sψ cφ cθ
Euler angles

Tait–Bryan 321:    
X x
 Y  = T321  y 
Z z
.
where T321 (ψ, θ, φ) = T3 (ψ)T2 (θ)T1 (φ) is the rotation matrix
 
cθ cψ −cφ sψ + sφ sθ cψ sφ sψ + cφ sθ cψ
T321 =  cθ sψ cφ cψ + sφ sθ sψ −sφ cψ + cφ sθ sψ  .
−sθ sφ cθ cφ cθ

Euler angles

Proper Euler 313:    


X x
 Y  = T313  y 
Z z
.
where T313 (φ, θ, ψ) = T3 (φ)T1 (θ)T3 (ψ) is the rotation matrix
 
cφ cψ − sφ cθ sψ −cφ sψ − sφ cθ cψ sφ sθ
T313 =  sφ cψ + cφ cθ sψ −sφ sψ + cφ cθ cψ −cφ sθ  .
sθ sψ sθ cψ cθ
Euler angles
Example: 3D generic rotation of an hyper-rectangle

An hyper-rectangle can be represented by a matrix whose columns are


the vertices (blue).
Applying T1 (π/4)T2 (π/3)T3 (π/3) to this matrix, we obtain the
rotated hyper-rectangle shown in the figure (red).

Euler angles
Extrinsic and intrinsic rotations

Consider two RFs with axes X, Y, Z (fixed) and x, y, z (rotating).


◮ Extrinsic rotations: about the axes of the fixed frame.
◮ Intrinsic rotations: about the axes of the rotating frame.

Conversion: an extrinsic rotation is equivalent to an intrinsic rotation


by the same angles but with inverted order of the elementary
rotations, and vice versa.
The matrix T123 = T1 (φ)T2 (θ)T3 (ψ) corresponds to
extrinsic rotation: intrinsic rotation:
1) a rotation by ψ about Z; 1) a rotation by φ about x;
2) a rotation by θ about Y ; 2) a rotation by θ about y ′ ;
3) a rotation by φ about X. 3) a rotation by ψ about z ′′ .

An extrinsic rotation is denoted with Z − Y − X, an intrinsic rotation


with x − y ′ − z ′′ , where y ′ and z ′′ are the rotated axes.
1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation

Rotation matrices
Properties

T⋄ are linear transformations (⋄ stands for any combination of 1, 2


and 3 with non-sequentially repeated numbers).

T⋄ are orthogonal matrices, that is, square matrices with real entries
whose columns are orthonormal vectors.

Main property:
T
T−1
⋄ = T⋄ , TT⋄ T⋄ = T⋄ TT⋄ = I.

Orthogonal transformations preserve


◮ the lengths of vectors;
◮ the angles between vectors.
Rotation matrices
Properties

Orthogonal matrices have all the eigenvalues (either complex or real)


with absolute value equal to 1. 3D rotation matrices have one
eigenvalue equal to 1.

Orthogonal matrices have the determinant equal to 1 or −1. Rotation


matrices have the determinant equal to 1.

For null angles, T⋄ become identity matrices.


◮ It follows for example that T123 = T3 (ψ) for θ = φ = 0.

The matrix product is non-commutative ⇒ the rotation composition


depends on the order.

T⋄ has 9 elements (3 × 3 matrix), which depend on 3 angles only;


◮ the minimum number of parameters required to describe a rotation is 3.

Rotation matrices
Singularities

Consider for example the Tait–Bryan 123 rotation with θ = π2 :


 
0 0 1
φ, π2 , ψ =  cφ sψ + cψ sφ cφ cψ − sψ sφ 0 

T123
sφ sψ − cψ cφ cφ sψ + cψ sφ 0
 
0 0 1
=  sin (φ + ψ) cos (φ + ψ) 0  .
− cos (φ + ψ) sin (φ + ψ) 0

Only the sum of φ and ψ can be determined from the DCM.


◮ One angle is undermined.

This phenomenon is known as the gimbal lock, and corresponds to a


loss of a degree of freedom.
Rotation matrices
Singularities

Three-gimbal system:
used on boats and
inertial platforms.

Rotation matrices
Singularities

Critical situations:
◮ Tait–Bryan rotations: cos θ = 0;
◮ proper Euler rotations: sin θ = 0.

In these situations, a degeneracy at the poles occurs:


◮ it is not possible to determine φ and ψ from the DCM;
◮ only the sum or the difference of φ and ψ can be determined.

The singularity corresponds to a loss of a degree of freedom.


We will see that
◮ singularities appear in the kinematic equations;
◮ gimbal lock can be overcome using non-minimal representations.
1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation

Euler’s rotation theorem


Theorem
Any movement of a rigid body where one point is fixed is equivalent to a
rotation about an axis passing through the fixed point. The axis of rotation
is the eigenvector e1 (eigenaxis) corresponding to the eigenvalue 1 of the
rotation matrix.
Proof. From linear algebra, a rotation matrix T has one eigenvalue equal to 1.
The corresponding eigenvector e1 is unchanged by the rotation:

Te1 = e1 .

This means that e1 has the same components in the original and rotated
reference frames. The claim follows. 2
From this theorem, it follows that any rotation can be described by 2
quantities, involving 4 variables:
- a rotation angle (1 variable)
← angle-axis representation.
- a rotation axis (3 variables)
Euler’s rotation theorem
Example

Consider the rotation matrix


 √ √ √ 
2
π π π  √4 √
− 42
√ √ 2
3

, , = 3 2 3 2 3 1
T123 − .
 
6 3 4 8√ 8
√ √4
− 82 5 2
8 4
3

The eigenvalues are {0.0464 + 0.9989i, 0.0464 − 0.9989i, 1}. The


corresponding eigenvectors are
 
−0.25 + 0.53 i −0.25 − 0.53 i 0.57
 0.60 0.60 0.52  .
−0.27 − 0.47 i −0.27 + 0.47 i 0.64

The last column u = [0.57 0.52 0.64]T is a vector representing the


axis of rotation (eigenaxis).

Euler’s rotation theorem


Example

The result of T123 π6 , π3 , π4 applied to a cube is shown in the figure.




The axis of rotation is u = [0.57 0.52 0.64]T .


Euler parameters

Based on the Euler’s theorem, the following 4 variables (called the


Euler parameters) can be used to describe a rotation of an angle β
about an axis defined by a unit vector u = u1 i + u2 j + u3 k:
.
q0 = cos β2
.
q1 = u1 sin β2
.
q2 = u2 sin β2
.
q3 = u3 sin β2 .

Note that only 3 of these 4 parameters are independent:


v
u 3
uX
t qi2 = 1.
i=0

1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation
Quaternions
The Euler parameters form a quaternion.
Quaternions are mathematical objects introduced by the Irish
mathematician Hamilton that are
◮ a generalization of complex numbers to a 3D-space;
◮ efficient rotation operators.
Advantages wrt Euler angles/rotation matrices:
◮ more efficient from a computational point of view;
◮ less sensitive to rounding errors;
◮ gimbal lock avoided.

Definition
Quaternions are elements of a 4D linear space with basis {1, i, j, k}, where
the basis vectors satisfy the following multiplication rules:

i2 = j2 = k2 = i ⊗ j ⊗ k = −1
i ⊗ j = −j ⊗ i = k
j ⊗ k = −k ⊗ j = i
k ⊗ i = −i ⊗ k = j.

Quaternions
The following notations are equivalent to indicate a quaternion q:

q = q0 + q1 i + q2 j + q3 k
= q0 + q

= cos β2 + u sin β2
β
= eu 2
 
β β β β
= cos 2 , u1 sin 2 , u2 sin 2 , u3 sin 2
= (q0 , q1 , q2 , q3 )
cos β2
   
q0
= (q0 , q) = =
q u sin β2
◮ q0 is the real part,
◮ q is the imaginary (or vector) part.
◮ A quaternion with null real part is said pure.
Quaternions
Algebra

There exists the null element, that is O = (0, 0).


The complex conjugate of a quaternion q = q0 + q is

. β β β
q∗ = q0 − q = (q0 , −q) = cos − u sin = e−u 2 .
2 2
The norm of a quaternion is
v
u 3
p uX
|q| = kqk = kqk2 = |q∗ | = q · q∗ = t qi2 .
i=0

The reciprocal of a quaternion q is

q−1 = q∗ / |q|
q−1 = q∗ for a unit quaternion.

Quaternions
Algebra

Sum: q + p = q0 + p0 + q + p.
Dot product: q · p = 3i=0 qi pi .
P

Quaternion product (Hamilton product):

q ⊗ p = (q0 + q) ⊗ (p0 + p) = . . .
= (q0 p0 − q · p) + (q0 p + p0 q + q × p)
P3
q·p= i=1 qi pi dot product
 
q 2 p 3 − q 3 p2
q × p =  q 3 p 1 − q 1 p3  cross product.
q 1 p 2 − q 2 p1
.
◮ The identity element is I = (1, 0): q ⊗ I = q, I ⊗ q = q.
◮ The quaternion product is associative, non-commutative.
◮ The cross product is non-associative, anti-commutative.
Quaternions
Algebra

The cross product can also be written as


    
0 −q3 q2 p1 0 −q3 q2
.
q × p =  q3 0 −q1   p2  , q× =  q3 0 −q1  .
−q2 q1 0 p3 −q2 q1 0

The quaternion product can also be computed as

q ⊗ p = (q0 p0 − q · p) + (q0 p + p0 q + q × p)

−qT
  
q0 p0
=
q q0 I + q× p

−pT
  
p0 q0
= .
p p0 I − p× q

Quaternions
Rotations

A 3D vector r = (x, y, z) can be seen as a quaternion with null real


part: rq = (0, r) = (0, x, y, z).
Consider a rotation of r about an axis u = (u1 , u2 , u3 ) (ui =
coordinates in F2) of an angle β:

r′ = T(β, u)r.
 
β β β β
Let q = cos 2 , u1 sin 2 , u2 sin 2 , u3 sin 2 be the unit quaternion
corresponding to this rotation.

Theorem
The rotated vector r′ can be computed as follows:

(0, r′ ) = q ⊗ rq ⊗ q∗ .
Quaternions
Rotations

Rotation composition: Given a rotation composition

T =T1 T2 . . . Tn ,

the quaternion corresponding to the rotation T is

q = q 1 ⊗ q 2 ⊗ · · · ⊗ qn

where qi is the quaternion corresponding to the rotation Ti .

Inverse rotation: Given a rotation defined by a unit quaternion q, the


inverse rotation is defined by the quaternion

q−1 = q∗ .

Quaternions
Rotations

Elementary rotations:
 
φ φ
T1 (φ) ↔ q1 (φ) = cos 2 , sin 2 , 0, 0

↔ q2 (θ) = cos 2θ , 0, sin 2θ , 0



T2 (θ)
 
ψ ψ
T3 (ψ) ↔ q3 (ψ) = cos 2 , 0, 0, sin 2 .

These are called the elementary quaternions.


Quaternions
Example: 3D elementary rotation of a vector
Consider the vector r = 0i + 2j + 4k.
The quaternion q3 (π/3) rotates any vector about the z axis of an
angle π/3 rad = 60o .
The rotated vector is computed as (0, r′ ) = q3 ⊗ (0, r) ⊗ q∗3 , giving
r′ = −1.73i + 1j + 4k.

Same result as that obtained with


the rotation matrix T3 (π/3).

Quaternions
Example: 3D generic rotation of an hyper-rectangle

An hyper-rectangle can be represented by a matrix whose columns are


the vertices (blue).
Applying q1 (π/4) ⊗ q2 (π/3) ⊗ q3 (π/3) to each column of this matrix,
we obtain the rotated hyper-rectangle shown in the figure (red).

Same result as that obtained


with the rotation matrix
T1 (π/4)T2 (π/3)T3 (π/3).
1 Introduction

2 Reference frames

3 Direction cosine matrices

4 Euler angles

5 Rotation matrices

6 Euler’s rotation theorem

7 Quaternions

8 Changes of representation

Changes of representation

Four different rotation representations have been introduced:


1 Direction cosine matrix (DCM)
 
T11 T12 T13
T = [Tij ] = T21
 T22 T23  .
T31 T32 T33

2 Euler angles (φ, θ, ψ):


⋆ Tayt-Brian angles 321;
⋆ proper Euler angles 313.
3 Angle-axis (β, u).
4 Quaternions (Euler parameters) q = (q0 , q).

In the following, we will see how to change representation.


Changes of representation
DCM ↔ Euler angles

Euler angles → DCM: trivial.

DCM → Tayt-Brian angles 321 (− π2 ≤ θ ≤ π2 ):

φ = atan2 (T32 , T33 )


θ = atan2 (−T31 , sφ T32 + cφ T33 )
ψ = atan2 (−cφ T12 + sφ T13 , cφ T22 − sφ T23 ) .

DCM → Proper Euler angles 313 (θ 6= 0):

φ = atan2 (T13 , −T23 )


θ = atan2 (sφ T13 − cφ T23 , T33 )
ψ = atan2 (−cφ T12 − sφ T22 , cφ T11 + sφ T21 ) .

atan2(x, y) = four quadrant inverse tangent of y/x.

Changes of representation
Note

Function atan2(x, y):

In Matlab, atan2(0, 0) = 0.
Changes of representation
DCM↔ angle-axis

Angle-axis → DCM:
 
u21 (1 − cβ) + cβ u1 u2 (1 − cβ) − u3 sβ u1 u3 (1 − cβ) + u2 sβ
T =  u1 u2 (1 − cβ) + u3 sβ u22 (1 − cβ) + cβ u2 u3 (1 − cβ) − u1 sβ  .
u1 u3 (1 − cβ) − u2 sβ u2 u3 (1 − cβ) + u1 sβ u23 (1 − cβ) + cβ

DCM → angle-axis (sβ 6= 0):


T11 +T22 +T33 −1

β = arccos 2
 
T32 − T23
1  T13 − T31  .
u= 2sβ
T21 − T12

Changes of representation
DCM↔ quaternions

Quaternions → DCM:
 
q02 + q12 − q22 − q32 2(q1 q2 − q0 q3 ) 2(q1 q3 + q0 q2 )
T =  2(q1 q2 + q0 q3 ) q0 − q12 + q22 − q32
2
2(q2 q3 − q0 q1 )  .
2(q1 q3 − q0 q2 ) 2(q2 q3 + q0 q1 ) q02 − q12 − q22 + q32

DCM → quaternions (q0 > 0):



q0 = 12 T11 + T22 + T33 + 1
 
T32 − T23
1  T13 − T31  .
q= 4q0
T21 − T12

No singularities occur: q can always be computed from T (gimbal


lock avoided).
Changes of representation

Quaternions ↔ Euler angles

Euler angles → quaternions: elementary quaternions.

Quaternions → Euler angles: pass through the DCM.

Quaternions ↔ angle-axis

Angle-axis → quaternions: trivial.

Quaternion → angle-axis (β 6= 2kπ, k = 0, 1, . . .):

β = 2 arccos q0
ui = qi / sin β2 .

Changes of representation
Examples

Euler angles 313 → DCM. Consider the 313 Euler angles π8 , π4 , π3 .




The corresponding DCM is


 
π  π  π  0.227 −0.935 0.270
T = T3 T1 T3 =  0.757 −0.005 −0.653  .
8 4 3
0.612 0.353 0.707

Note that numerical approximations may be critical.

DCM → Euler angles 313. The 313 Euler angles are

φ = atan2 (T13 , −T23 ) = π8


θ = atan2 (sφ T13 − cφ T23 , T33 ) = π4
ψ = atan2 (−cφ T12 − sφ T22 , cφ T11 + sφ T21 ) = π3 .
Changes of representation
Examples

Euler angles → quaternions. Consider the 313 Euler angles π8 , π4 , π3 .




The corresponding elementary quaternions are


π
q3 ( π8 ) = cos 16 π

 = (0.981, 0, 0, 0.195)
, 0, 0, sin 16
π π π
q1 ( 4 ) = cos 8 , sin 8 , 0, 0 = (0.924, 0.383, 0, 0)
q3 ( π3 ) = cos π6 , 0, 0, sin π6 = (0.866, 0, 0, 0.5) .

The total rotation quaternion is


π π π 
q = q3 ⊗ q1 ⊗ q3 = 0.695, 0.362, −0.123, 0.609 .
8 4 3

Changes of representation
Examples

DCM→ quaternions. Consider the DCM


 
0.227 −0.935 0.270
T =  0.757 −0.005 −0.653  .
0.612 0.353 0.707

The corresponding quaternion is q = (q0 , q), where



q0 = 12 T11 + T22 + T33 + 1 = 0.695
   
T32 − T23 0.362
1  T13 − T31  =  −0.123  .
q= 4q0
T21 − T12 0.609
Changes of representation
Examples

Quaternions → DCM. Consider the quaternion



q= 0.695, 0.362, −0.123, 0.609 .

The corresponding DCM is


 
0.227 −0.935 0.270
T =  0.757 −0.005 −0.653  .
0.612 0.353 0.707

Quaternions → DCM → Euler angles. From the above DCM,

ψ = atan2 (T13 , −T23 ) = π8


θ = atan2 (sψ T13 − cψ T23 , T33 ) = π4
φ = atan2 (−cψ T12 − sψ T22 , cψ T11 + sψ T21 ) = π3 .

Nonlinear control and aerospace applications

Attitude kinematics

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion

1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion
Introduction

A spacecraft can be (approximately) described as a rigid body, which


moves with respect to some inertial frame.

The body movement is given by a combination of


◮ a translation of the body center of mass (CoM);
◮ a rotation of the body about an axis passing through the CoM.

The study of both the translational and rotational motion is of


paramount importance for spacecraft design and control.

The objective here is to derive the attitude kinematic equations for a


rigid body in rotational motion.
◮ These equations, together with the dynamic equations, are
fundamental for spacecraft attitude control.

Introduction

The dynamic and kinematic equations can be seen as the series


connection of two nonlinear systems:
◮ the dynamic equations define a system from M to ω;
◮ the kinematic equations define a system from ω to (φ, θ, ψ) or q.

Overall, it is a nonlinear system with:


◮ input M;
◮ output (φ, θ, ψ), DCM or q. ← output to control.
Introduction

Consider a rigid body rotating in an inertial reference frame.

Inertial frame (IF):


- moving with a constant
velocity;
- origin: somewhere;
- unit vectors: i1 , i2 , i3 ;
- axes: X, Y, Z.

Body frame (BF):


- moving with the body;
- origin: body CoM;
- unit vectors: b1 , b2 , b3 ;
- axes: x, y, z.

Let the body angular velocity be ω = ω1 b1 + ω2 b2 + ω3 b3 .

Introduction

The main representations of rotations we have studied are:


1 Direction cosine matrix (DCM).
2 Euler angles.
3 Quaternions.

In the following, after a brief note on how to compute the derivative of


a vector, we will derive the kinematic equations for these three cases.
1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion

Vector derivative

For any vector r = xb1 + yb2 + zb3 ,

ṙ = ẋb1 + ẏb2 + żb3 + xb˙1 + y b˙2 + z b˙3 = . . .


= [ṙ]B + ω × r
◮ ṙ is the derivative in the inertial frame,
.
◮ [ṙ]B = ẋb1 + ẏb2 + żb3 is the derivative in the body frame.
The proof can be found on any classical mechanics book.

We recall that
 
0 −ω3 ω2
. cross product
ω× =  ω3 0 −ω1  ←
matrix.
−ω2 ω1 0
1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion

Direction cosine matrix kinematics


The goal is to describe the time evolution of the DCM in function of
ω1 , ω 2 , ω 3 .

Let T be the rotation DCM. Then,


         
b1 i1 Ti1 i1 b1
 b2  = T  i2  =  Ti2  ,  i2  = TT  b2  .
b3 i3 Ti3 i3 b3

Computing the derivative,


   ˙     
b1 b1 b1 ω × b1
0 = ṪT  b2  + TT  b˙2  = ṪT  b2  + TT  ω × b2 
b3 ˙ b3 ω × b3
 b3  
b1 b1
T T
= Ṫ  b2  + T ω ×  b2  .
b3 b3
Direction cosine matrix kinematics

Thus, 
  b1
ṪT + TT ω×  b2  = 0.
b3

This holds for any [b1 b2 b3 ]T ; moreover, [b1 b2 b3 ]T 6= 0. Then,

ṪT + TT ω× = 0.

Taking the transpose and considering that (ω×)T = −ω×,

Ṫ = ω × T.

This is the DCM kinematic equation. Integrating it allows us to


compute the DCM from ω1 , ω2 , ω3 .

1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion
Euler angle kinematics

The goal is to describe the time evolution of the rotation Euler angles
in function of ω1 , ω2 , ω3 .

The overall rotation from IF to BF can be seen as a sequence of 3


intrinsic elementary rotations:
1 IF → F1;
2 F1 → F2;
3 F2 → BF.
where F1 and F2 are intermediate frames.

For example, for a Tait-Bryan 321 intrinsic rotation, the axes of F1 are
X ′ , Y ′ , Z, while the axes of F2 are X ′′ , Y ′ , Z ′ , with X ′′ = x.

Euler angle kinematics


Tait-Bryan 321

1 Rotation IF → F1:
◮ F1 is rotated wrt IF of an angle ψ about the Z axis.
◮ In IF, the angular velocity due to the ψ rotation is ω ψI = [0 0 ψ̇]T .

◮ Coordinate transformations:
⋆ T3 (ψ): F1 → IF,
⋆ T3 (ψ)T = T3 (−ψ): IF → F1.
◮ In F1, the angular velocity is ω ψ1 = T3 (−ψ) ω ψI = ω ψI .
Euler angle kinematics
Tait-Bryan 321

2 Rotation F1 → F2; angle θ about the Y ′ axis:

◮ In F1, the angular velocity due to the θ rotation is

ω θ1 = [0 θ̇ 0]T .

◮ In F2, the angular velocity due to the θ rotation is

ω θ2 = T2 (−θ) ω θ1 = ω θ1 .

◮ In F2, the angular velocity due to the ψ rotation is

ω ψ2 = T2 (−θ) ω ψ1 = T2 (−θ) ω ψI .

Euler angle kinematics


Tait-Bryan 321

3 Rotation F2 → BF; angle φ about the X ′′ axis:

◮ In F2, the angular velocity due to the φ rotation is

ω φ2 = [φ̇ 0 0]T .

◮ In BF, the angular velocity due to the φ rotation is

ω φB = T1 (−φ) ω φ2 = ω φ2 .

◮ In BF, the angular velocity due to the θ rotation is

ω θB = T1 (−φ) ω θ2 = T1 (−φ) ω θ1 .

◮ In BF, the angular velocity due to the ψ rotation is

ω ψB = T1 (−φ) ω ψ2 = T1 (−φ)T2 (−θ) ω ψI .


Euler angle kinematics
Tait-Bryan 321

In BF, the total angular velocity is

ω = ω φB + ω θB + ω ψB

= ω φ2 + T1 (−φ) ω θ1 + T1 (−φ)T2 (−θ) ω ψI


     
φ̇ 0 0
=  0  + T1 (−φ)  θ̇  + T1 (−φ)T2 (−θ)  0 
0 0 ψ̇
 
  φ̇
= I1 φ̇ + A2 θ̇ + B3 ψ̇ = I1 A2 B3  θ̇ 
ψ̇
◮ I1 is the first column of the identity matrix,
.
◮ A2 is the second column of A = T1 (−φ),
.
◮ B3 is the third column of B = T1 (−φ)T2 (−θ).

Euler angle kinematics


Tait-Bryan 321

For the Tait-Bryan 321 rotation with angles (ψ, θ, φ), simple
calculations yield
    
ω1 1 0 −sθ φ̇
 ω2  =  0 cφ sφ cθ   θ̇  .
ω3 0 −sφ cφ cθ ψ̇

Inverting the matrix, we obtain the kinematic equations


    
φ̇ cθ sφ sθ cφ sθ ω1
 θ̇  = 1  0 cφ cθ −sφ cθ   ω2  .

ψ̇ 0 sφ cφ ω3

This is the Tait-Bryan 321 kinematic equation. Integrating it allows us


to compute the Euler angles from ω1 , ω2 , ω3 .
A singularity occurs for cθ = 0 (gimbal lock).
Euler angle kinematics
Tait-Bryan 123

Similarly, for the Tait-Bryan 123 rotation with angles (φ, θ, ψ),
    
ω1 cθ cψ sψ 0 φ̇
 ω2  =  −cθ sψ cψ 0   θ̇ 
ω3 sθ 0 1 ψ̇
    
φ̇ cψ −sψ 0 ω1
 θ̇  = 1  cθ sψ cθ cψ 0   ω2  .

ψ̇ −sθ cψ sθ sψ cθ ω3

This latter is the Tait-Bryan 123 kinematic equation. Integrating it


allows us to compute the Euler angles from ω1 , ω2 , ω3 .

A singularity occurs for cθ = 0 (gimbal lock).

Euler angle kinematics


Proper Euler 313

Similarly, for the proper Euler 313 rotation with angles (φ, θ, ψ),
    
ω1 sθ sψ cψ 0 φ̇
 ω2  =  sθ cψ −sψ 0   θ̇ 
ω3 cθ 0 1 ψ̇
    
φ̇ sψ cψ 0 ω1
 θ̇  = 1  sθ cψ −sθ sψ 0   ω2  .

ψ̇ −cθ sψ −cθ cψ sθ ω3

This latter is the proper Euler 313 kinematic equation. Integrating it


allows us to compute the Euler angles from ω1 , ω2 , ω3 .

A singularity occurs for sθ = 0 (gimbal lock).


1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion

Quaternion kinematics

The goal is to describe the time evolution of the rotation quaternion q


in function of ω1 , ω2 , ω3 .

Note that both the quaternion and the angular speed change in time:

q ≡ q(t)
ω = (ω1 , ω2 , ω3 ) ≡ ω(t).

At time t + ∆t, we have the rotation q(t) at time t composed with the
rotation ∆q(t) occurred from time t to time t + ∆t.

The quaternion at time t + ∆t is thus given by

q(t + ∆t) = q(t) ⊗ ∆q(t).


Quaternion kinematics
The incremental quaternion ∆q(t) can be written as follows.
◮ Let ω = |ω| be the angular speed magnitude;
⋆ for a small ∆t, the rotation angle is ω∆t.
◮ Let u be the rotation axis, with |u| = 1;
⋆ it follows that ω = ωu.

Then, for small ∆t,


ω∆t
     
cos 1 1
∆q ∼= 2 ∼
= ω∆t = .
u sin ω∆t
2 u 2
ω∆t
2

The quaternion derivative is thus given by


q(t+∆t)−q(t) q⊗∆q−q
q̇ = lim∆t→0 ∆t = lim∆t→0 ∆t

q⊗(∆q−(1,0)) q⊗((1,ω∆t/2)−(1,0))
= lim∆t→0 ∆t = lim∆t→0 ∆t .

Quaternion kinematics
. Defining ω q = (0, ω),
 
Consider that 1, ω∆t
2 − (1, 0) = 0, ω∆t
2

q⊗(0, ω∆t
2 )
q̇ = lim∆t→0 ∆t = 21 q ⊗ (0, ω) ⇒ q̇ = 1
2 q ⊗ ωq .

Equivalent equations are the following:


1 1
q̇ = 2 Ωq q̇ = 2 Qω
   
0 −ω1 −ω2 −ω3 −q1 −q2 −q3
.  ω1 0 ω3 −ω2  .  q0 −q3 q2 
Ω= ω2 −ω3
, Q= .
0 ω1   q3 q0 −q1 
ω3 ω2 −ω1 0 −q2 q1 q0

These are the quaternion kinematic equations. Integrating them allows


us to compute q from ω1 , ω2 , ω3 .
No singularities occur.
1 Introduction

2 Vector derivative

3 Direction cosine matrix kinematics

4 Euler angle kinematics

5 Quaternion kinematics

6 Discussion

Discussion

We obtained the kinematics equations in the general form

ẋ = f (x, ω)

where x = T, x = (φ, θ, ψ) or x = q.

This is a state equation, with state x and input ω.

State equations allow us to predict the time evolution of a system:


◮ Given an initial state x(0) = x0 and an input ω(t), t ∈ [0, ∞), x(t)
can be computed for any future time t ∈ [0, ∞).
◮ This computation is done by integration:
⋆ analytical (possible only in very particular cases);
⋆ numerical (always possible).
Example
Consider the kinematic equation for the Tait-Bryan 321 rotation with
angles (ψ, θ, φ).
Suppose that:
◮ x(0) = (φ(0), θ(0), ψ(0)) = (0, 0, 0),
◮ ω(t) = (0.2 sin(t), 0.5 sin(2t), 0).
The corresponding time evolution, obtained by integration of the
kinematic equation is shown in the figure (magenta: cos(θ)).

Example

Consider the quaternion kinematic equation.


Suppose that:
◮ x(0) = q(0) = (0, 0, 0, 1),
◮ ω(t) = (0.2 sin(t), 0.5 sin(2t), 0).
The corresponding time evolution, obtained by integration of the
kinematic equation is shown in the figure.
Nonlinear control and aerospace applications

Attitude dynamics

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations
1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations

Introduction

Controlling the spacecraft orientation (or attitude) in a continuous


and autonomous manner is fundamental.
◮ Spacecrafts and space stations orbiting around a planet, or during
interplanetary navigation,
⋆ must capture the solar energy through panels,
⋆ need a communication link between on-board antennas and Earth
stations/receivers or relay satellites.
◮ Scientific satellites and space vehicles carry payloads to be pointed
toward either celestial objects or Earth targets (e.g., the Hubble).
The objective is to derive the attitude dynamic equations for a rigid
body in rotational motion.
◮ These equations, together with the kinematic equations, are
fundamental for spacecraft attitude control.
Introduction

The dynamic and kinematic equations can be seen as the series


connection of two nonlinear systems:
◮ the dynamic equations define a system from M to ω;
◮ the kinematic equations define a system from ω to (φ, θ, ψ) or q.

Overall, it is a nonlinear system with:


◮ input M;
◮ output (φ, θ, ψ), DCM or q. ← output to control.

Introduction

Consider a rigid body rotating in an inertial reference frame.

Inertial frame (IF):


- moving with a constant
velocity;
- origin: somewhere;
- unit vectors: i1 , i2 , i3 ;
- axes: X, Y, Z.

Body frame (BF):


- moving with the body;
- origin: body CoM;
- unit vectors: b1 , b2 , b3 ;
- axes: x, y, z.

Let the body angular velocity be ω = ω1 b1 + ω2 b2 + ω3 b3 .


1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations

Angular momentum

For a particle of the body with mass mi :

Ri = Ro + ri
Ṙi = Ṙo + [ṙi ]B + ω × ri

where

Ri = Xi1 + Y i2 + Zi3
R o = Xo i1 + Y o i2 + Z o i3

ri = xb1 + yb2 + zb3


[ṙi ]B = ẋb1 + ẏb2 + żb3
ω = ω1 b 1 + ω2 b 2 + ω3 b 3 .
Angular momentum

Angular momentum (moment of momentum) of the particle mi :


.
 
Hi = ri × mi Ṙi = ri × mi Ṙo + [ṙi ]B + ω × ri .

Being [ṙi ]B = 0 (rigid body),


 
Hi = ri × mi Ṙo + ω × ri

= −Ṙo × mi ri + ri × mi (ω × ri ) .

Angular momentum

The angular momentum of the entire body is


X X
H = − Ṙo × mi ri + ri × mi (ω × ri )
i i
X X
= −Ṙo × mi r i + ri × mi (ω × ri ) .
i i
P
By definition of CoM, i mi r i = 0. Hence,
P
H= i ri × (ω × ri ) mi
R
H= B r × (ω × r) dm for mi → 0, i → ∞.

This shows that the rotational motion is independent of the


translational motion.
1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations

Inertia matrix
Performing the products and using a matrix notation, from the above
expression we obtain
  
J11 J12 J13 ω1
H =  J21 J22 J23   ω2  = Jω
J31 J32 J33 ω3

J11 = RB y 2 + z 2  dm 
R 

J22 = RB x2 + z 2  dm moments of inertia


2
J33 = B x + y dm 2 

R 
J12 = J21 = − RB xy dm 
J13 = J31 = − RB xz dm products of inertia.
J23 = J32 = − B yz dm

J is the inertia matrix (or inertia tensor).


Principal axes of inertia
A body frame where the inertia matrix J is diagonal can always be
found by means of a rotation:

J = TT J′ T
 
J1 0 0
◮ J= 0 J2 0 : diagonal inertia matrix;
0 0 J3
 ′
◮ J′ = Jij : non-diagonal inertia matrix;
◮ T = [e1 e2 e3 ]
⋆ ei : eigenvectors of J′ ;
⋆ T is a rotation matrix, since J′ is real and symmetric.

With this transformation, J is a diagonal matrix with entries equal to


the eigenvalues of J′ .
◮ The eigenvalues of J′ are said the principal moments of inertia.
◮ The eigenvectors of J′ are said the principal axes of inertia.

Examples of principal moments/axes


1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations

Euler moment equations


Suppose that a moment M = M1 b1 + M2 b2 + M3 b3 is acting on the
body B. The II law of dynamics for rotating bodies is

Ḣ = M.
h i
Since Ḣ = Ḣ + ω × H, we obtain the Euler moment equation:
B
h i
Ḣ + ω × H = M.
B
h i
Considering that H = Jω and Ḣ = Jω̇, the Euler moment
B
equation can be written as

Jω̇ + ω × Jω = M.

This equation is nonlinear: in general, no analytical solution is


available.
Euler moment equations

The Euler moment equation

Jω̇ = M − ω × Jω.

can be implemented using the following block diagram:

Euler moment equations


Assuming a body frame in which J is diagonal and performing the
product, the Euler moment equation becomes

J1 ω̇1 + (J3 − J2 ) ω2 ω3 = M1
J2 ω̇2 + (J1 − J3 ) ω1 ω3 = M2
J3 ω̇3 + (J2 − J1 ) ω1 ω2 = M3 .

This can be written in matrix form as


      
ω̇1 0 σ1 ω3 0 ω1 M1 /J1
 ω̇2  =  σ2 ω3 0 0   ω2  +  M2 /J2 
ω̇3 σ3 ω2 0 0 ω3 M3 /J3

J2 − J3 J3 − J1 J1 − J2
σ1 = , σ2 = , σ3 = .
J1 J2 J3
These equations are nonlinear: in general, no analytical solution is
available.
1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations

Free motion for a symmetric body


Suppose that
◮ M = 0 (free motion = free response = homogeneous equation);
◮ J1 = J2 6= J3 (axisymmetry, with symmetry axis b3 ).

The Euler equations become

J1 ω̇1 + ω2 ω3 (J3 − J1 ) = 0
J1 ω̇2 + ω1 ω3 (J1 − J3 ) = 0
J3 ω̇3 = 0.

The third one implies ω3 = const.

It follows that:
1 The body rotates with constant velocity about the symmetry axis z.
2 The equations become linear, allowing a complete theoretical analysis
and the calculation of the analytical solution.
Free motion for a symmetric body

Defining λ = ω3 (J3 − J1 )/J1 , we obtain

ω̇1 + λω2 = 0 (1)


ω̇2 − λω1 = 0. (2)

Multiplying (1) by ω1 and (2) by ω2 , and adding the two equations,


we obtain
ω1 ω̇1 + ω2 ω̇2 = 0
ω1 dω1 + ω2 dω2 = 0
ω12 + ω22 = const.
p
Since ω3 = const, we have that |ω| = ω12 + ω22 + ω32 = const,
showing that the norm of the body angular velocity is constant1 .

1
Notation: |·| = k·k = k·k2 .

Free motion for a symmetric body

Differentiating (1) and using (2), we obtain

ω̈1 + λ2 ω1 = 0

that is the harmonic oscillator equation.

An harmonic oscillator is a marginally stable (or simply stable) system


(with two complex conjugate poles having null real part).

It follows that:
1 ω1 always remains bounded (without converging to the origin).
2 In particular, ω1 is an harmonic signal.

Analogous results hold for ω2 .


Free motion for a symmetric body

Applying the Laplace transform to the oscillator equation:

s2 Ω1 (s) − sω1 (0) − ω̇(0) + λ2 Ω1 (s) = 0

sω1 (0) ω̇1 (0)


Ω1 (s) = + .
s 2 + λ2 s 2 + λ2

Applying the inverse Laplace transform:

ω̇1 (0)
ω1 (t) = ω1 (0) cos(λt) + sin(λt).
λ

A similar result holds for ω2 (t):

ω̇1 (0)
ω2 (t) = ω1 (0) sin(λt) − cos(λt).
λ

Free motion for a symmetric body

Other properties:
◮ M =0 ⇒ H = const.
◮ It can be shown that
⋆ H, ω and b3 always lie on a plane;
⋆ the angle θh between b3 and H (nutation angle) is given by
p
J1 ω12 + ω22
tan θh = = const;
J3 ω 3
⋆ the angle γω between b3 and ω is given by
p
ω12 + ω22
tan γω = = const.
ω3

It follows that the path of ω creates two cones:


◮ body cone: fixed in BF;
◮ space cone: fixed in IF.
Free motion for a symmetric body

J 3 > J1 = J 2 J 3 < J1 = J 2

This spinning motion of ω about b3 is called nutation.


2π J1
It can be shown that the nutation period is T = ω3 |J1 −J3 | .

Free motion for a symmetric body


Example

A body with the following moments of inertia has been considered:


(J1 , J2 , J3 ) = (50, 50, 400) kg m2 .
The following initial conditions have been assumed:
ω(0) = (0.25, 0, 0.63) rad/s.

ω3 is constant;
ω1 and ω2 are harmonic signals;
trajectory of ω close to the z axis;
trajectory of (ω1 , ω2 ) = combination
of harmonic curves → ellipse;
ω draws the body cone.
Free motion for an asymmetric body

Suppose that
◮ M = 0 (free motion = free response = homogeneous equation);
◮ J1 6= J2 6= J3 6= J1 (asymmetry).

Suppose also that ω3 = ωo + ǫ , where


◮ ωo : constant angular speed;
◮ ǫ: perturbation.

For ǫ → 0, the moment equations become

J1 ω̇1 + (J3 − J2 )ω2 ωo = 0


J1 ω̇2 + (J1 − J3 )ω1 ωo = 0
J3 ǫ̇ + (J2 − J1 )ω1 ω2 = 0.

The first two equations are linear.

Free motion for an asymmetric body

Differentiating
r the first, using the second and defining
 
J3 J3
γ = ωo 1 − J1 1 − J2 , we obtain

ω̈1 + γ 2 ω1 = 0.

If γ is real (J3 > J1 , J2 or J3 < J1 , J2 ), we obtain again an harmonic


oscillator, implying (marginal) stability.

If γ is imaginary (J1 > J3 > J2 or J2 > J3 > J1 ), then we have a


positive real pole, implying instability.

It follows that:
1 The motion about the minor and major principal axis is stable.
2 The motion about the intermediate principal axis is unstable.
Free motion for an asymmetric body

In general, a trajectory of ω is a polhode.

The polhode curves can be represented on the Poinsot ellipsoid.

Free motion for an asymmetric body


Example

A body with the following moments of inertia has been considered:


(J1 , J2 , J3 ) = (500, 50, 200) kg m2 .
The following initial conditions have been assumed:
ω(0) = (0.25, 0, 0.63) rad/s.

ω diverges from the z axis;


trajectory of ω sometimes close to,
other times far from the z axis.
Free motion for an asymmetric body
Energy dissipation effects

The assumption of rigid body does not hold in a real-world system:


◮ structural deflection;
◮ liquid slosh due to accelerations about the CoM.

The assumption of semirigid body is intermediate (between rigid and


real body) and more realistic:
◮ no moving parts;
◮ the body dissipates energy.

With energy dissipation:


1 The motion about the major principal axis is asymptotically stable.
2 The motion about the minor and intermediate principal axis is unstable.

Free motion for an asymmetric body


Internal energy dissipation effects: an example

A body with the following moments of inertia has been considered:


(J1 , J2 , J3 ) = (400, 60, 50) kg m2 .
The following initial conditions have been assumed:
ω(0) = (0.25, 0, 0.63) rad/s.
Friction was included in the Euler equations.

ω diverges from the z axis;


it approaches the x axis (the
major axis, in this case).
Explorer 1 satellite (1958)

Set to spin about an axis parallel to its length.


However, this is the minor axis of the satellite.
Before it had orbited the Earth once, the angular momentum vector
had moved to the major axis.
It spent the rest of its mission wheeling though space.
Fortunately, its instruments and power supply were unaffected by the
orientation of the satellite and its mission was a success:
◮ discovery of the Van Allen radiation belts around the Earth.

1 Introduction

2 Angular momentum

3 Inertia matrix

4 Euler moment equations

5 Free rotational motion

6 Dynamic-kinematic equations
Dynamic-kinematic equations

The dynamic equations discussed so far describe the time evolution of


the angular speed vector ω.

However, a description of the body attitude in terms of angles (or


quaternions) is of interest for control purposes.
◮ The aim of control is to impose to the body desired values of the
orientation angles (or quaternions).

Such a description can be obtained putting together the dynamics


equations with the kinematic equations:
◮ the dynamic equations define a system from M to ω;
◮ the kinematic equations define a system from ω to the Euler angles or
the quaternions.

Dynamic-kinematic equations

The dynamic and kinematic equations can be seen as the series


connection of two nonlinear systems:
◮ the dynamic equations define a system from M to ω;
◮ the kinematic equations define a system from ω to (φ, θ, ψ) or q.

Overall, it is a nonlinear system with:


◮ input M;
◮ output (φ, θ, ψ), DCM or q. ← output to control.
Dynamic-kinematic equations
Tait-Bryan 321

State equations: ẋ = A (x) x + Bu

φ 0 0 0 1 sφ tθ cφ tθ
   

 θ 


 0 0 0 0 cφ −sφ 
 ψ   0 0 0 0 sφ/cθ cφ/cθ 
x= , A (x) =  

 ω1 


 0 0 0 0 σ1 ω3 0  
 ω2   0 0 0 σ2 ω3 0 0 
ω3 0 0 0 σ3 ω2 0 0

0 0 0
 
  0 0 0 
M1  
 0 0 0 
u = M2 , B = 
  .
 1/J1 0 0 
M3  
 0 1/J2 0 
0 0 1/J3

Dynamic-kinematic equations
Tait-Bryan 123

State equations: ẋ = A (x) x + Bu

φ 0 0 0 cψ/cθ −sψ/cθ 0
   

 θ 


 0 0 0 sψ cψ 0 

 ψ   0 0 0 −tθ cψ tθ sψ 1 
x= , A (x) =  

 ω1 


 0 0 0 0 σ1 ω3 0 

 ω2   0 0 0 σ2 ω 3 0 0 
ω3 0 0 0 σ3 ω 2 0 0

0 0 0
 
   0 0 0 
M1  
 0 0 0 
u =  M2  , B =  .
 1/J1 0 0 
M3  
 0 1/J2 0 
0 0 1/J3
Dynamic-kinematic equations
Proper Euler 313

State equations: ẋ = A (x) x + Bu

φ 0 0 0 sψ/sθ cψ/sθ 0
   

 θ 


 0 0 0 cψ −sψ 0 

 ψ   0 0 0 −ctθ sψ −ctθ cψ 1 
x= , A (x) =  

 ω1 


 0 0 0 0 σ1 ω3 0 

 ω2   0 0 0 σ2 ω3 0 0 
ω3 0 0 0 σ3 ω2 0 0

0 0 0
 
   0 0 0 
M1  
 0 0 0 
u = M2 , B = 
  .
 1/J1 0 0 
M3  
 0 1/J2 0 
0 0 1/J3

Dynamic-kinematic equations
Quaternions

State equations: ẋ = A (x) x + Bu

q0 0 0 0 0 −q1 −q2 −q3


   
 q1   0 0 0 0 q0 −q3 q2 
   
 q2   0 0 0 0 q3 q0 −q1 
   
x= q 3
 , A (x) = 1  0 0 0 0 −q2 q1 q0 
  2 
 ω1   0 0 0 0 0 2σ1 ω3 0 
   
 ω2   0 0 0 0 2σ2 ω3 0 0 
ω3 0 0 0 0 2σ3 ω2 0 0
0 0 0
 
 0 0 0 
   
M1  0 0 0 
 
u = M2 , B =  0
   0 0 .

M3  1/J1
 0 0 

 0 1/J2 0 
0 0 1/J3
Dynamic-kinematic equations
Example: free rotational motion of an hyper-rectangular body

Consider a body with the following features:


◮ shape: hyper-rectangle with dimensions 1 × 1.5 × 3 m3 ;
◮ mass: 1000 kg;
◮ inertia matrix: diag(937.5, 833.3, 270.8) kg m2 ;
◮ initial conditions: x(0) = (q(0), ω(0)), q(0) = (1, 0, 0, 0),
ω(0) = (1, 0.1, 0) rad/s.

Red: initial position. Blue: position after 11.72, 18.76, 30.48, 37.52 s.
The rotation is always about an axis close to the x axis.

Dynamic-kinematic equations
Example: free rotational motion of an hyper-rectangular body

Same body with


◮ initial conditions x(0) = (q(0), ω(0)), q(0) = (1, 0, 0, 0),
ω(0) = (0.1, 1, 0) rad/s.

Red: initial position. Blue: position after 11.72, 18.76, 30.48, 37.52 s.
After a certain time, the rotation axis tends to diverge from the y axis.
Dynamic-kinematic equations
Example: free rotational motion of an hyper-rectangular body

Same body with


◮ initial conditions x(0) = (q(0), ω(0)), q(0) = (1, 0, 0, 0),
ω(0) = (0, 0.1, 1) rad/s.

Red: initial position. Blue: position after 11.72, 18.76, 30.48, 37.52 s.
The rotation is always about an axis close to the z axis.

Dynamic-kinematic equations
Example: free rotational motion of an hyper-rectangular body

Same body with


◮ energy dissipation;
◮ initial conditions x(0) = (q(0), ω(0)), q(0) = (1, 0, 0, 0),
ω(0) = (0, 0.1, 1) rad/s.

Red: initial position. Blue: position after 11.72, 18.76, 30.48, 37.52 s.
After a certain time, the rotation axis get close to the x axis.
Nonlinear control and aerospace applications

Attitude control

Carlo Novara

Politecnico di Torino

Outline

1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control
1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Introduction

The Attitude Control System (ACS) is in charge of the following tasks:


1 vehicle orientation during the mission;
2 vehicle stabilization about a reference attitude in the presence of
perturbing torques (aerodynamic, gravity gradient, solar radiation and
wind, magnetic field).

The ACS includes


◮ sensors for attitude determination;
◮ actuators capable of exerting the necessary command torques;
◮ control algorithms.

Accurate orientation is fundamental for most spacecraft missions.


1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Sensors

Sensors must be capable of measuring in real-time the satellite


attitude, that is fundamental for control.

Two main types of sensors can be distinguished:


1 Absolute attitude sensors. They determine the attitude wrt the
direction between the spacecraft and celestial bodies like the Sun, the
Earth and the stars.
⋆ They require the observation of the celestial body in a field of view.
⋆ They include horizon sensors, orbital gyrocompasses, Sun sensors, Earth
sensors, star trackers, magnetometers.
2 Relative attitude sensors. They typically measure the angular rate and
obtain the attitude by integration.
⋆ They do not require any observation instrument but they cannot
directly measure the attitude and are thus subject to larger errors.
⋆ They are usually based on gyroscopes.
1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Actuators

Keeping a predefined attitude and angular momentum requires the


ACS to contrast the perturbation torques acting on the satellite.

Three main types of actuators are employed to this scope:


1 Actuators capable of delivering external torques.
⋆ They include thrusters, momentum/reaction wheels, control moment
gyros (CMGs).
2 Actuators using environmental forces.
⋆ They include gravity gradient, magnetic systems, aerodynamic systems,
solar sails.
3 Dampers. Typically used to reduce nutation effects and torque
disturbances. They also provide asymptotic stability properties.
Actuators

Actuators

The control laws that we will study can be actuated by means of


thrusters, control moment gyros, reaction wheels or combinations of
these actuators.

In the case of thrusters, a pulse-width pulse-frequency (PWPF)


modulation technique is commonly used.
◮ PWPF translates the continuous-time command to an on/off signal.
◮ The resulting signal is a sequence of square waves with given widths (in
time) and frequencies.
◮ Usually, the width is very short and the frequency is significantly faster
than the rigid body dynamics.
1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Control methods

The ACS objectives can be


1 vehicle attitude stabilization about a reference attitude;
2 reference tracking in attitude manoeuvres.

Attitude control can be


◮ passive,
◮ semi-active (semi-passive),
◮ active.

Complex manoeuvres can only be performed by means of active (or


semi-active) control systems.
Control methods

Passive control achieves attitude stabilization by exploiting the body


dynamic properties and/or the interactions with the surrounding
environment.
◮ Spinners:
⋆ Without power dissipation, the rotation about the minor and

major axes is stable.


⋆ With power dissipation, the rotation about the minor axis is

unstable.
◮ Environment perturbations (for instance the gravity gradient torques,
aerodynamic torques) can lead to stable attitude and rate equilibriums.
◮ In the case of large perturbations and/or perturbations with nonzero
mean, passive control needs the assistance of active control.

Control methods

Semi-active (semi-passive) control. Much more common than passive


control (this latter used in the early spacecraft missions).
◮ Reaction wheels, control moment gyroscope (CMG):
⋆ Based on conservation of angular momentum.
◮ Magnetic systems:
⋆ They create magnetic fields that interact with the Earth magnetic field,
producing useful torques.

Active control applies suitable and explicit torques to guide and keep
the attitude and angular rate close to suitable reference values.
◮ Typically based on thrusters.
◮ It can both stabilize and manoeuvre the spacecraft attitude.

This classification (passive, semi-active, active) is debatable. It is


difficult to individuate the separations between the three classes.
Control methods
Another possible classification is as follows.
Spin stabilization; made by setting the spacecraft spinning.
◮ The gyroscopic action of the rotating spacecraft mass is the stabilizing
mechanism.
◮ Propulsion system thrusters are fired only occasionally to make desired
changes in spin rate, or in the spin-stabilized attitude.

3-axis-stabilization; possible methods:


1 Small thrusters used to bring the spacecraft within a deadband of
allowed attitude error.
2 Electrically powered reaction wheels (or momentum wheels).
⋆ Mounted in three orthogonal axes.
⋆ They exchange angular momentum between spacecraft and wheels.
3 Control moment gyroscope (CMG): a spinning rotor and one or more
motorized gimbals that tilt the rotor’s angular momentum. Two CMGs
are need for 3-axis-stabilization.

Control methods

Reaction wheels and CMGs can be used in combination with thrusters


or magnetics (magnetic torquers) for momentum damping.
Control methods

In the following, we focus on active three-axis control.

1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control
Attitude control: a general setting
Consider a rigid body with inertia matrix J, subject to a rotational
motion. For this body, define (body frame coordinates):
◮ ω = (ω1 , ω2 , ω3 ): angular velocity;
◮ q = (q0 , q)= (q0 , q1 , q2 , q3 ): quaternion representing the attitude;
◮ x = (q, ω): state;
◮ u = (u1 , u2 , u3 ): external moment.

The state equations are given by the quaternion kinematic equations


and the Euler dynamic equations (inertial frame):
1
q̇ = 2 Ωq
ω̇ = J−1 (−ω × Jω + u)
 
0 −ω1 −ω2 −ω3  
0 −ω 3 ω 2
.  ω1 0 ω3 −ω2  . 
Ω= ω2 −ω3
 , ω× = ω3 0 −ω1  .
0 ω1 
−ω2 ω1 0
ω3 ω2 −ω1 0

Attitude control: a general setting

The general goal of control is to make the state vector (q, ω) track
some time-varying reference vector (qr , ω r ).
It is thus important to measure the distance between the reference and
the actual state. To this aim, we define:
◮ the angular speed tracking error
.
ω̃ = ω r − ω;

◮ the error quaternion


 
q̃0 .
q̃ ≡ = q−1 ⊗ qr .

Motivation: q̃ is the quaternion that, starting from q, gives qr (intrinsic


rotation): q ⊗ q̃ = qr .
Attitude control: a general setting
Technicalities

Consider the following relations:

q̇ = 21 q ⊗ ω q = −q · ω + q0 ω + q × ω
(q̇)−1 = −q · ω − q0 ω − q × ω
= − (−ω · (−q) + q0 ω + ω × (−q)) = − 21 ω q ⊗ q−1 .

d

Since quat. inversion is a linear operation, (q̇)−1 = dt q−1 = q̇−1 .
It follows that
1
q̇−1 = − ω q ⊗ q−1 .
2
The time derivative of q̃ is thus given by

q̃˙ = d −1
dt q ⊗ qr + q−1 ⊗ q̇r = − 21 ω q ⊗ q−1 ⊗ qr
+ 12 q−1 ⊗ qr ⊗ ω qr = − 21 ω q ⊗ q̃ + 21 q̃ ⊗ ω qr .

Attitude control: a general setting


Technicalities

The two terms of q̃˙ can be computed as


ωT ω T q̃
    
0 q̃0
− 12 ω q ⊗ q̃ = 1
=21
2 −ω −ω× q̃ −q̃0 ω + q̃ × ω
−ω Tr −ω Tr q̃
    
1 1 0 q̃0 1
2 q̃ ⊗ ω qr = =2 .
2 ωr −ω r × q̃ q̃0 ω r + q̃ × ω r

The derivative q̃˙ can thus be written as


" # " #
q̃˙0 1 q̃T (ω − ωr )
q̃˙ = = .
q̃˙ 2 q̃0 (ω r − ω) + q̃ × (ω r + ω)
1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Regulation
The goal of regulation is

q → qr = const and ω → 0
.
q̃ → I = (1, 0) and ω → 0.

A simple linear control law is the following:

u = kp q̃ − kd ω (R1)

where kp > 0 and kd > 0 are parameters to tune.

With this law, the state equations of the closed-loop system are
autonomous and can be written as

q̃˙ = − 21 ω q ⊗ q̃
ω̇ = J−1 (−ω × Jω + kp q̃ − kd ω) .
Regulation

This system has two equilibrium points: (q̃0 , q̃, ω) = (±1, 0, 0). Both
signs of q̃0 correspond to the same attitude.

Theorem
The equilibria (±1, 0, 0) of the closed-loop system are loc. asymptotically
stable. Moreover, for any initial condition (q̃0 (0), q̃(0), ω(0)),

lim (q̃0 (t), q̃(t), ω(t)) = (±1, 0, 0).


t→∞

The proof is based on the Lyapunov function


1 1 1
V = ω T Jω + kp q̃T q̃ + kp (1 ∓ q̃0 )2 .
4 2 2

Regulation
Other effective control laws are the following:

u = kp sign(q̃0 ) q̃ − kd ω (R2)
u = kp q̃ − kd (1 ± q̃T q̃) ω (R3)
u = kp sign(q̃0 ) q̃ − kd (1 ± q̃T q̃) ω. (R4)

where kp > 0 and kd > 0 are parameters to tune.


◮ (R2) is similar to (R1) but guarantees the shortest path to the final
orientation.
◮ (R3) and (R4) are nonlinear, allowing a better performance in terms of
response time a and command activity.
◮ (R4) is similar to (R3) but guarantees the shortest path.
The closed-loop equilibrium points using (R2), (R3) and (R4) are the
same as those using (R1).
Stability results similar to the one shown above hold also for these
modified laws.
Application: satellite attitude regulation
A satellite on an Earth orbit is considered, with inertia matrix
J = diag(10 000, 9 000, 12 000) kg m2 . The satellite attitude is relative
to a suitable orbital frame.

We neglect orbit non-inertial effects, gravity gradient moment, third


body gravity, atmosphere drag, solar radiation.
The following initial quaternion and angular velocity are assumed:
q(0) = (0.6853, 0.6953, 0.1531, 0.1531), ω(0) = (0.53, 0.53, 0.053) rad/s.

The control task is to bring the satellite attitude to the identity


quaternion.

The control laws (R1)-(R4) are applied to the satellite system to


accomplish this task.

A satisfactory regulation performance is obtained for each of these


control laws.

Application: satellite attitude regulation


1 Introduction

2 Sensors

3 Actuators

4 Control methods

5 Attitude control: a general setting

6 Regulation
Application: satellite attitude regulation

7 Tracking
Application: WMAP attitude control

Tracking

The goal of tracking is

q(t) → qr (t) and ω(t) → ω r (t)


.
q̃(t) → I = (1, 0) and ω̃(t) → 0.

The above regulation controllers may be used. However, for tracking


tasks, they typically show poor performance and robustness.

An effective method for nonlinear systems is represented by


sliding-mode control.
◮ This method may allow for high performance and robustness levels.

Sliding-mode control design develops in two main steps:


1. definition of a sliding surface;
2. design of a feedback law.
Tracking

The system to control is


1
q̇ = 2 Ωq
ω̇ = J−1 (−ω × Jω + u)
◮ y = q: output to control;
◮ γ = 2: relative degree;
◮ u ∈ R3 , y ∈ R3 : the system is MIMO.

The sliding surface function is defined as

s(q, ω, t) = ω̃ + k2 q̃.

On the sliding surface, the tracking error converges to 0.

Tracking

The derivative is

ṡ = ω̇ r − ω̇ + k2 q̃˙
k2
= ω̇ r + J−1 ω × Jω − J−1 u + 2 (q̃0 ω̃ + q̃ × (ω r + ω)) .

With ṡ = 0, the sliding surface is invariant. Imposing ṡ = 0 and


inverting wrt u the above expression,
 
k2
us = J ω̇ r + (q̃0 ω̃ + q̃ × (ω r + ω)) + ω × Jω. (T1)
2

A further term is added, to make the sliding surface attractive. The


complete control law is

u = us + k1 J tanh(η s).
Tracking
Another sliding mode control law, guaranteeing the shortest
reorientation, is the following:
s(q, ω) = ω̃ + k2 sign(q̃0 ) q̃
us = J ω̇ r + k22 (|q̃0 | ω̃ + sign(q̃0 ) q̃ × (ω r + ω)) + ω × Jω.

(T2)
u = us + k1 J tanh(η s).

To impose the desired closed-loop system behavior, a reference


generator has to be used → qr , ω r and ω̇ r must be consistent with
each other. An example is the following:

Application: WMAP attitude control

The WMAP mission was to create a full-sky map of the cosmic


micro-wave background and to measure its anisotropy with 0.3o
angular resolution.
◮ Useful for measuring the Hubble constant, estimating the age of the
universe, checking the existence of the dark matter.
The WMAP spacecraft is in an orbit about the Earth-Sun L2
Lagrange point (180 day period, 1.5e6 km far from the Earth).
The universe is scanned as the Earth revolves around the Sun.
To ensure the scan pattern, the spacecraft must spin about its z-axis
at 0.04859 rad/s, and this axis must spin about the Sun direction at
0.001745 rad/s.
A 22.5o ± 0.25o angle between the z-axis and the Sun direction must
be maintained for power stability and science quality.
Application: WMAP attitude control

Application: WMAP attitude control

The spacecraft attitude is represented by a 313 Euler rotation, relative


to a rotating Sun-referenced frame (SRF).

We neglect non-inertial effects of SRF rotation, gravity gradient


moment, third body gravity, solar radiation.

The reference angular velocities and angles in SRF are the following:

φ̇r = 0.001745 rad/s


θ̇r = 0 rad/s
ψ̇r = 0.04859 rad/s
θr = 22.5o = 0.3927 rad.

φr and ψr are obtained by integration of φ̇r and ψ̇r .


Application: WMAP attitude control
Reference generator:

The spacecraft inertia matrix is


 
399 −2.81 −1.31
J =  −2.81 377 2.54  kg m2 .
−1.31 2.54 377

The following initial quaternion and angular velocity are assumed:


q(0) = (0, 0, 1, 0), ω(0) = (0.1, −0.9, 0.12) rad/s.
The control task for the satellite is to track the reference signals.

Application: WMAP attitude control

A disturbance is added to the input. The controller is designed using


an approximate inertia matrix Ĵ 6= J, Ĵ ≃ J.
The control laws (T1)-(T2) are applied to the spacecraft system to
accomplish this task.
Application: WMAP attitude control

A satisfactory tracking performance


is obtained for each of the control
laws: steady-state tracking error θ̃ < 0.1o .

Nonlinear control and aerospace applications

Orbital dynamics

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations

1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations
Introduction

A spacecraft can be (approximately) described as a rigid body, which


moves with respect to some inertial frame.
The body movement is given by a combination of
◮ a translation of the body center of mass (CoM);
◮ a rotation of the body about an axis passing through the CoM.

The objective here is to study the orbital dynamics, i.e., the


translational motion of a mass in a gravitational field.
◮ This study is fundamental for spacecraft control.

Orbital dynamics is based on celestial mechanics:


◮ Kepler’s laws: empirical laws describing the motion of a body in
unperturbed planetary orbits;
◮ Newton’s laws: general physical laws that imply the Kepler laws.

Introduction

Kepler’s laws:
1 The orbit of a planet is an ellipse with the sun located at one focus.
2 The radius vector drawn from the sun to a planet sweeps out equal
areas in equal time intervals.
⋆ In other words, the areal velocity is constant.
3/2
3 Planetary periods of revolution are proportional to rm , where rm is
the mean distance from the sun.

The Kepler’s laws can be derived from the more general Newton’s laws
(3 laws of motion + 1 law of gravitation).
Introduction

Newton’s laws of motion:


1 A particle remains at rest or continues to move at a constant velocity,
unless acted upon by an external force.
2 The rate of chance of linear momentum mv of a particle is given by
d
(mv) = F
dt
where
m : particle mass
v : particle velocity
F : force acting on the particle.
3 For any force F12 exerted by a particle 1 on a particle 2, there exists a
force
F21 = −F12
exerted by particle 2 on particle 1.

Introduction

Newton’s law of gravitation:


Any two particles attract each other with a force
Gm1 m2 r
F=
r3
where
m1 , m2 : particle masses
r : vector of magnitude r = |r| connecting the two particles
G = 6.67 × 10−11 N m2 /kg2 : universal constant of gravitation.
Introduction
Notation

Scalars: a, b, A, B ∈ R.
Column vectors:  
r1
r = (r1 , . . . , rn ) = [r1 . . . rn ]T =  ...  ∈ Rn×1 .
 

rn
Row vectors: rT = [r1 . . . rn ] ∈ R1×n .
Matrices: M ∈ Rn×m .
Products: Pn
r · p = rT p = i=1 ri pi dot product
 
r 2 p 3 − r3 p 2
r × p =  r 3 p 1 − r1 p 3  cross product.
r 1 p 2 − r2 p 1
ℓ2 (Euclidean) norm:
√ √ pPn
|r| = krk = krk2 = r·r= rT r = 2
i=1 ri = r.

1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations
The two-body problem
General setting

Consider two point masses m0 and m1 (located at P0 and P1 ):


◮ r0 and r1 : positions of the masses in an inertial frame
◮ r = r1 − r0 : relative position of the masses
◮ v0 and v1 : velocities of the masses in an inertial frame
◮ F0 and F1 : external forces (non gravitational) acting on the masses.

The two-body problem


Inertial and relative motion equations

The Newton’s II law and gravity law yield the following equations:
Gm1 1
v̇0 = r + F0
r3 m0
Gm0 1
v̇1 = − 3 r+ F1
r m1
where r = r1 − r0 is the relative position, r = |r| and constant masses
have been assumed.

Consider the following transformation:

r = r1 − r0 (relative position)
v = v1 − v0 (relative velocity)
m0 m1
rc = m0 +m1 r0 + m0 +m1 r1 (CoM position)
m0 m1
vc = m0 +m1 v0 + m0 +m1 v1 (CoM velocity).
The two-body problem
Restricted two-body equation

From the above equations, we obtain


  
G (m0 + m1 ) 1 m1 relative
v̇ = − r+ F1 − F0 ←
r3 m1 m0 motion

m1 F1 + F0 CoM
v̇c = ←
m0 1 + m1 /m0 motion.

If m1 ≪ m0 , the relative motion equation is


r 1
v̇ + µ = F1 . (R2B)
r3 m1
where µ = Gm0 is the gravitational parameter. (R2B) is called the
restricted two-body equation.
The CoM motion equation is v̇c = 0, showing that the CoM can be
chosen as the origin of an inertial frame.

The two-body problem


1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations

Free motion of the restricted two-body problem

The free R2B equation is


r
v̇ + µ = 0. (FR2B)
r3
In the following, we will see that
◮ the total mechanical energy of the FR2B system is conserved;
◮ the angular momentum of the FR2B system is conserved;
◮ the free response of the FR2B equation occurs on a plane;

We will also derive a geometric description of the FR2B system


trajectories (orbits).
Free motion of the restricted two-body problem
Energy conservation

Take the dot product of equation (FR2B) with v:


µ 1 d µ d
v̇ · v + r3
r ·v = 2 dt (v · v) + 2r3 dt
(r · r)
 
d v2 µ d 2 d v2 µṙ d v2 µ
= dt 2 + 2r3 dt
r = dt 2 + r2
= dt 2 − r = 0.

This proves the principle of energy conservation:

Ė = 0, E = const
v2
◮ E= 2 − µr : total (mechanical) energy per unit mass
v2
2 : kinetic energy per unit mass

◮ − µ : potential energy per unit mass.


r

For a given (constant)


p total energy E, the corresponding orbital
velocity is v = 2µ/r + 2E.

Free motion of the restricted two-body problem


Angular momentum conservation and planar motion

Take the cross product of r with equation (FR2B):

µ d
r × v̇ + r × r = r × v̇ = v × v + r × v̇ = (r × v) = 0.
r3 dt
This proves the principle of angular momentum conservation:

ḣ = 0, h = const

◮ h = r × v: angular momentum per unit mass.

An important implication of h being constant is that r and v always


remain in the same plane, called the orbital plane.

Example: Earth-Sun orbital plane.


Free motion of the restricted two-body problem
Orbit equation

Take the cross product of equation (FR2B) with h:


 µ  d  µ 
v̇ + 3 r × h = v × h − r = 0.
r dt r
The proof of the first equality is the following:
d
dt (v × h) = v̇ × h + v × ḣ = v̇ × h + v × (v × v + r × v̇);
| {z }
=0
 1 1
 1 1

d
dt − r
r = r

2 r − r v = 2r 3
d 2
dt r r − r v = 2r 3
d
dt (r · r) r − 1r v
1 1
= r3
((r · v) r − (r · r) v) = r3
r × (r × v) (vector triple product).

The above equation shows that


µ
v×h− r = const = µe
r
where e is the eccentricity vector and e = |e| is the eccentricity.

Free motion of the restricted two-body problem


Orbit equation

Take the dot product of r with this equation:


µ
r · (v × h) − r · r = µr · e.
r
Scalar triple product: r · (v × h) = (r × v) · h.
Moreover, (r × v) · h = h · h = h2 . Thus,

h2 − µ r = µ r e cos θ

where θ (the angle between r and e) is called the true anomaly.


Expliciting wrt to r and defining p = h2 /µ (p is called the parameter
or semilatus rectum), we obtain the orbit equation:
p
r= . (ORE)
1 + e cos θ
1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations

Orbit geometry
Conic sections
The ORE
p
r=
1 + e cos θ
is the equation of a conic section, written in terms of the polar
coordinates r and θ: for θ ∈ [0, 2π], r describes a conic.
A conic section (or simply a conic) is a curve obtained as the
intersection of a cone with a plane.
Orbit geometry
Conic sections

The following conic sections exist:


- ellipse, 0 ≤ e < 1 (circle, e = 0)
- parabola, e = 1
- hyperbola, e > 1.

Properties:
◮ the origin is located at one focus
◮ θ is measured from the point on the conic nearest to the focus
◮ p determines the size
◮ e determines the shape.

Orbit geometry
Ellipse

An ellipse is the locus of points the sum of whose distances from two fixed
points (foci) is constant (and = 2a, with a = semi-major axis).

Apsides: extreme points of the orbit:


◮ the periapsis is the point corresponding to θ = 0; its distance from the
main focus is rp = p/(1 + e);
◮ the apoapsis is the point corresponding to θ = π; its distance from the
main focus is ra = p/(1 − e).
Orbit geometry
Ellipse

The periapsis and apoapsis are also said


◮ perihelion and aphelion for a body orbiting around the Sun;
◮ perigee and apogee for a body orbiting around the Earth.

Orbit geometry
Ellipse

Ellipse parameters:
◮ basic: eccentricity: e; semilatus rectum: p
◮ semi-major axis: a = p/(1 − e2 )

◮ semi-minor axis: b = a 1 − e2
◮ distance center-focus: c = ae.
Other relevant quantities:
◮ total energy: E = −µ/(2a) < 0
p
◮ velocity: v = 2µ/r − µ/a ← vis-viva equation.
Orbit geometry
Ellipse: parameters of the solar system planets

Orbit geometry
Ellipse: parameters of the Earth
Orbit geometry
Kepler’s laws

The first law is implied by the ORE, for 0 ≤ e < 1.


The orbit area swept by r as it moves through an angle ∆θ in a short
time interval ∆t is ∆A ∼
= 21 r (r ∆θ). The areal velocity is

∆A r (r ∆θ) r2 θ̇ h
Ȧ = lim = lim = = = const
∆t→0 ∆t ∆t→0 2∆t 2 2
which is the second law.
Let Ap be the total orbital area. Then, the period P of an elliptical
orbit is given by

2
√ s
Ap Ap 2πab 2πa 1 − e 2 a3
P = = = =p = 2π
Ap /P Ȧ h µa(1 − e2 ) µ

which is the third law.

Orbit geometry
Parabola

A parabola is the locus of points whose


distance from a fixed point (focus) is equal
to the distance from a fixed line (directrix).

For a parabolic orbit, e = 1, implying that


◮ ra → ∞, a → ∞
◮ the total energy is null: E → 0.

From the vis-viva equation, for any orbital


p position with radius r, we
obtain the corresponding velocity ve = 2µ/r;
◮ this is called the escape velocity, and allows leaving a closed orbit.
Orbit geometry
Hyperbola

An hyperbola is the locus of points the


difference of whose distances from two fixed
points (foci) is constant (and = −2a).

For a hyperbolic orbit, e > 1, implying that


2
◮ the total energy is positive: E = v∞ /2 > 0.
Asymptotic quantities (r → ∞):
◮ angle: θ∞ = arccos (−1/e)
p
◮ velocity: v∞ = µ/ |a|.
Hyperbolic passage: A body passing close to a moving planet is subject
to a velocity increase, without being captured by the planet gravity.
◮ Adopted first by the US probe Mariner 10 (1973) to fly-by Venus
(once) and Mercury (three times).

Orbit geometry
Orbit geometry
Discussion
Our study about orbits is based on the equation
r
v̇ + µ 3 = 0. (FR2B)
r
The position trajectory generated by (FR2B) is described by the
equation p
r= . (ORE)
1 + e cos θ
Integrating (FR2B) with z(0) = 0, ż(0) = 0, we obtain the position
r(t) = (x(t), y(t), z(t) = 0), where x(t) and y(t) satisfy (ORE), when
transformed as
p
r(t) = x2 (t) +py 2 (t),
cos θ(t) = x(t)/ x2 (t) + y 2 (t).
Inverse transformation:
x(t) = r cos θ(t)
y(t) = r sin θ(t)
z(t) = 0.

1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations
State equations

State: x = (r, v) = (x, y, x, ẋ, ẏ, ż) = (x1 , x2 , x3 , x4 , x5 , x6 ).

State equations:

ṙ = v
r
v̇ = −µ .
r3
Alternative:
    
ẋ1 0 0 0 1 0 0 x1
 ẋ2   0 0 0 0 1 0  x2 
    
 ẋ3   0 0 0 0 0 1  x3 
 =  .
 ẋ4

 
  − rµ3 0 0 0 0 0 
 x4 

 ẋ5   0 − rµ3 0 0 0 0  x5 
ẋ6 0 0 − rµ3 0 0 0 x6

State equations
Example: Earth orbit about the Sun

Parameters (values expressed in the International p System of Units):


µ = 133e20, a = 1.496e11, rp = 1.471e11, vp = µ(2/rp − 1/a).
Initial state: x0 = [rp ; 0; 0; 0; vp ; 0] (perihelion).
Simulation duration: P = 365 ∗ 24 ∗ 60 ∗ 60 s.
Numerical integration: [t, x] =ode23tb(@fF RT B , [0, P], x0 ).

Note that, from integration,


z(t) = 0, ż(t) = 0, ∀t.

This confirms that the orbit


occurs on a plane.
State equations
Example: Earth orbit about the Sun

Parameters p = (rp vp )2 /µ, e = 0.0167. ORE computation:

th = linspace(0, 2π, 1000)


r = p./(1 + e ∗ cos(th))
x = r. ∗ cos(th)
y = r. ∗ sin(th).

blue: orbit computed by


integration;

dashed green: orbit computed


with the ORE.

State equations
Example: escape velocity
Consider a spacecraft taking off from the surface of the Earth with the
escape velocity (take off angle 45o ).
Parameters (values expressed in the International System of Units):
µ = 0.4e15, ve = 11.2e3.
√ √
Initial state: x0 = [6e6; 0; 0; ve / 2; ve / 2; 0] (perigee).
Numerical integration: [t, x] =ode23tb(@fF RT B , [0, 43200], x0 ).

green: Earth surface;

blue: trajectory computed by


integration.
1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations

Reference frames
Several reference frames may be associated to an elliptic orbit:

◮ (non inertial) local vertical local horizontal frame (LVLH):

Rl = {P1 , l1 , l2 , l3 };

◮ (non inertial) local orbital frame (LORF)

Ro = {P1 , o1 , o2 , o3 };

◮ (inertial) geocentric perifocal (perigee) frame

Rp = {P0 , p1 , p2 , p3 }.

Another important frame, not associated with any orbit, is the


(inertial) geocentric equatorial (GE) frame

Rge = {P0 , Î, Ĵ, K̂}.


Reference frames
The LVLH frame: origin in P1 ; the following unit vectors:
◮ l3 (local vertical): defined along the direction P0 → P1 , on the orbit
plane;
◮ l1 (local horizontal): perpendicular to l3 , on the orbit plane, sign
concordant with the orbital velocity;
◮ l2 (orbit pole): perpendicular to the orbit plane.

Reference frames
The LORF frame: origin in P1 ; the following unit vectors:
◮ o1 : instantaneous normalized velocity, on the orbit plane, tangent to
the orbit;
◮ o2 = l2 (orbit pole): perpendicular to the orbit plane;
◮ o3 = o1 × o2 : on the orbit plane.
Reference frames

The perifocal frame (or perigee frame): origin in P0 ; the following


unit vectors:
◮ p1 : eccentricity unit vector passing through the periapsis, on the orbit
plane;
◮ p3 = o2 = l2 (orbit pole): perpendicular to the orbit plane;
◮ p2 = p3 × p1 : on the orbit plane.

Reference frames
GE frame:
◮ Î and Ĵ are on the equatorial plane;
◮ Î = Xǫ : vernal equinox: Earth-Sun direction, 1st day of spring;
◮ K̂: polar rotation axis;
◮ ĵ = K̂ × Î: on the equatorial plane.
◮ not rotating with the Earth;
◮ independent on the orbit.
1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations

Orbital elements

We focus on elliptic orbits around the Earth.


Two planes can be distinguished:
◮ the orbital plane
◮ the equatorial plane.
The intersection between these two
planes is called the lines of nodes.
The angle i between these two
planes is called the inclination.
Orbital elements

ascending node: intersection between


the orbit and the equatorial plane;

Ω: angle from Î to ascending node;

ω: angle from ascending node to


perigee;

ν = θ (true anomaly): angle from


perigee to spacecraft position.

Orbital elements
The 6 classical orbital elements are 5 independent constant quantities
(a, e, Ω, i, ω), which completely describe the orbit, and one quantity (ν),
which gives the spacecraft position on the orbit.

The true anomaly is usually denoted with ν or θ. The time of perigee passage tp is
sometimes used instead of the true anomaly.
Orbital elements
Example: a communication satellite orbit

Orbital elements
Position, velocity → orbital elements

Suppose the satellite position r and velocity v are known and


expressed in the GE frame.
From r and v, the following quantities can be computed:

h = r × v, e = µ1 v × h − rr , Î′ = K̂ × (h/h).

The 6 orbital elements can be obtained as follows:

a = h2 /(µ(1 − e2 )), e = |e| , cos i = K̂ · h/h,

cos ω = Î′ · e/e, cos Ω = Î · Î′ , cos θ = r · e/(re).

The eccentric anomaly E and the period can also be computed:


q q
E 1−e θ 3
tan 2 = 1+e tan 2 , P = 2π aµ .
Orbital elements
Orbital elements → position, velocity

Suppose the 6 orbital elements are known. The semilatus rectum and
the radial position can be computed as
p
p = a(1 − e2 ), r= 1+e cos θ .

The satellite position and velocity, expressed in the perifocal frame,


are given by
   p 
r cos θ p − µ/p sin θ
r =  r sin θ  , v =  µ/p(e + cos θ)  .
0 0

Transf. perifocal frame → GE frame: T313 (Ω, i, ω).


Transf. GE frame → perifocal frame: T313 (−ω, −i, −Ω).

Types of orbit
Classification I

Remark: any orbit plane passes through the Earth CoM.


Types of orbit
Classification II

For more details, see https://en.wikipedia.org/wiki/List_of_orbits.

1 Introduction

2 The two-body problem

3 Free motion of the restricted two-body problem

4 Orbit geometry

5 State equations

6 Reference frames

7 Orbital elements

8 Orbit perturbations
Orbit perturbations

Orbital dynamics is based on celestial mechanics:


◮ Kepler’s laws: empirical laws describing the motion of a body in
unperturbed planetary orbits;
◮ Newton’s laws: general physical laws that imply the Kepler laws.
We have studied non-perturbed orbit (Keplerian orbits).
Real orbits are subject to perturbations (non-Keplerian orbits):
◮ gravity potential harmonics perturbing the central force, due to an
irregular mass distribution of planets (e.g., Earth polar flattening);
◮ third-body forces like those due to the Sun or Moon gravity;
◮ aerodynamic forces due to the residual atmosphere and wind at
low-Earth orbits;
◮ solar/cosmic radiation;
◮ others, such as Earth radiation and tides, and spacecraft thermal
radiation.

Atmospheric drag

For low Earth orbits (LEO), drag is a significant disturbing force.

The drag force is given by


1
Fd = − ρ CD S |vrel | vrel
2

◮ ρ: local atmospheric density


◮ CD : drag coefficient
◮ S: spacecraft area projected along the direction of motion
◮ vrel : relative velocity of the spacecraft wrt the atmosphere. Assuming
a negligible atmospheric velocity, vrel ∼= v.
Atmospheric drag

A model for the atmospheric density is the following:


 
r − r0
ρ(r) = ρ0 exp −
H

◮ ρ0 , r0 : reference density and height


◮ H: scale height coefficient
◮ r: distance from the planet CoM.

Though simple, this model is fine for preliminary simulations. For


more accurate simulations, a more refined model may be needed.

Nonlinear control and aerospace applications

Orbital control

Carlo Novara

Politecnico di Torino
Outline

1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control

1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control
Introduction

Orbital maneuvering and control are clearly fundamental to make a


spacecraft complete its mission.

The objective is to develop control algorithms for the following orbital


maneuvers:
◮ Proper orbital maneuvers. The goal is to place a spacecraft in a
target orbit and to make it remain in this orbit:
⋆ launch
⋆ orbit keeping (station keeping)
⋆ orbit change (shape, plane, period, ...).
◮ Tracking/set-point maneuvers. The goal is to make a spacecraft
track a desired trajectory or to move it to a desired point:
⋆ rendezvous
⋆ docking
⋆ interplanetary flight
⋆ de-orbiting.

1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control
Orbital maneuvers

Launch
A payload (a satellite, a probe, a space station, ...) is usually launched
by means of a rocket, which can be single-stage or multistage. Large
propellant amounts are required.
The main launch phases are
1 vertical ascent
2 pitchover maneuver (or turnover maneuver)
3 gravity turn.

Orbit keeping (station keeping)


A number of forces act on a satellite to change its orbit over time:
asymmetries in the Earth’s gravitational field, gravitational pull of the
Sun and Moon, solar radiation pressure, and, for satellites in LEOs,
atmospheric drag.
A satellite must be properly controlled to maintain its prescribed orbit.

Orbital maneuvers
Orbit shape change
The shape of the orbit is changed, maintaining the orbital plane.
Typical is the Hohmann transfer, with two steps:
1 starting orbit → transfer orbit
2 transfer orbit → target orbit.

Orbit inclination change


Maneuvers that change the plane require changing the direction of the
velocity of the satellite.
Since the orbital velocity of a satellite is very large (roughly
3 ∼ 8 km/s for typical orbits), changing its direction by a significant
amount requires adding a large velocity component perpendicular to
the orbital velocity.
◮ Large amounts of propellant needed.
Orbital plane rotation at constant inclination
Rotating the orbital plane around, while keeping the inclination fixed
(change the right ascension of the ascending node Ω).
Orbital maneuvers

Orbital period change


The orbital period depends on the altitude and shape of the orbit.
Maneuvers to change the shape and altitude of the orbit can be used
to change the period.

Relative location change in the same orbit


Changing the speed does not work, since that changes the orbit.
The satellite must be placed temporarily into a higher or lower orbit to
change its period, and then moved back into the original orbit.
De-orbiting
Thrusters are used to accelerate out of orbit and back toward the
Earth.

Orbital maneuvers
Rendezvous
A vehicle is required to approach another vehicle (typically, a space
station).
The relative motion when the two vehicles are close can be described
by the linear Hill-Clohessy-Wiltshire equations.

Docking
Usually docking follows rendezvous. The goal is to bring a vehicle into
physical contact with another vehicle and create a link between them.

Interplanetary flight
Three phases:
1 Earth escape
2 heliocentric orbital transfer
3 planet encounter.
1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control

Orbital dynamics model


The following spacecraft simplified model can be used to simulate
various missions/maneuvers:

ṙ = v
1
v̇ = −µ rr3 + m (Fd + d + u)
(
0, u=0
ṁ = (1)
−u/ve , u 6= 0
Fd = − 21 ρ CD S v v, ρ = ρ0 exp − r−r

0
H
u = 0 if m ≤ mb
◮ variables: (r,v): spacecraft position and velocity, u: rocket thrust, Fd :
atmosphere drag, ρ: atmosphere density, d: other disturbances, m:
spacecraft mass (body + propellant);
◮ parameters: µ: gravitational parameter, CD : drag coefficient, H: scale
coefficient, S: spacecraft projected area, ρ0 and r0 : reference density and
height, ve : effective exhaust velocity, mb : body mass.
Orbital dynamics model
Orbital dynamics model:
ṙ = v
1
v̇ = −µ rr3 + m (Fd + d + u)
(
0, u=0
ṁ = (1)
−u/ve , u 6= 0
Fd = − 21 ρ CD S v v, ρ = ρ0 exp − r−r

0
H
u = 0 if m ≤ mb

◮ x = (r, v, m) ∈ R7 : state
◮ u ∈ R3 : command input
◮ Fd , d ∈ R3 : disturbances
◮ y: output to control, i.e.,
⋆ physical trajectory (tracking maneuvers)
⋆ constants of motion/orbital elements (proper orbital maneuvers).

Orbital dynamics model

The model (1) describes the main aspects of the spacecraft behavior
in all the phases although it makes several approximations:
◮ no solar radiation
◮ simple spacecraft geometry
◮ no thrust delta-pressure
◮ no gravity perturbations
◮ no lift force (launch)
◮ angle of attack = 0 (launch) ...

In the case of launch, the model refers to a single-stage vehicle. For


multi-stage vehicles, discontinuous decreases of m when a stage
separates should be included in the model.
Orbital dynamics model

To control such a system (model (1)), we will use nonlinear model


predictive control (NMPC).
NMPC is not a traditional method for aerospace applications but it
presents some advantages wrt traditional methods:
◮ general approach
◮ optimal trajectories (over a finite time horizon)
◮ orbit/trajectory design not needed
◮ efficient management of the trade-off performance/command activity
◮ systematic treatment of constraints.

First, we will discuss additional NMPC topics (general, not restricted


to aerospace applications). Then, we will focus on NMPC for orbital
control/maneuvering.

1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control
NMPC additional topics
NMPC with y 6= x

Consider the MIMO nonlinear system

ẋ = f (x, u)
(2)
y = h(x, u)

where x ∈ Rn is the state, u ∈ Rnu is the command input and


y ∈ Rny is the output of interest.
◮ x is used for feedback
◮ y is the output to control.

A prediction ŷ(τ ) of y(τ ), τ ∈ [t, t + Tp ] is obtained by integration of


(2) (or a model if (2) is not exactly known).

The predicted output is a function of the “initial” state x(t) and the
input signal:
ŷ (τ ) ≡ ŷ (τ, x(t), u(t : τ )) .

NMPC additional topics


NMPC with y 6= x

The objective function is defined as


Z t+Tp
.
h i
2 2 2
J (u(t : t + Tp )) = kỹp (τ )kQ + ku(τ )kR dτ + kỹp (t + Tp )kP
t
.
where ỹp (τ ) = yr (τ ) − ŷ(τ ) is the predicted tracking error and yr (τ )
is a reference to track.
The input signal u∗ (t : t + Tp ) is chosen as one minimizing the
objective function J (u(t : t + Tp )).
Constraints:
◮ x̂(τ ), ŷ(τ ) satisfy (2) (or a similar model equation)
◮ x̂(τ ) ∈ Xc : state constraints
◮ ŷ(τ ) ∈ Yc : output constraints
◮ û(τ ) ∈ Uc : input constraints.
NMPC additional topics
State/output constraints

To increase the numerical efficiency of an NMPC algorithm,


state/output constraints in the form of inequalities can be directly
included in the objective function.
Consider the constraint Fc (x̂) ≤ 0. This constraint can be directly
managed by defining the new objective function
.
Jc (u(t : t + Tp )) = J (u(t : t + Tp )) + λ max (0, Fc (x̂)) .

For a sufficiently large λ, the additional term creates a “wall” that


enforces constraint satisfaction:
Fc (x̂) ≤ 0 ⇔ λ max (0, Fc (x̂)) = 0
Fc (x̂) > 0 ⇔ λ max (0, Fc (x̂)) = λFc (x̂).

As previously discussed, it is convenient to parametrize u, so that


Jc (u(t : t + Tp )) ≡ Jc (c), where c is a parameter vector.

NMPC additional topics


NMPC algorithm

1 At each time t = tk , solve the optimization problem

c∗ = arg min Jc (c)


c∈Rnu ×m

subject to:
˙ ) = f (x̂(τ ), u(τ )) ,
x̂(τ x̂(t) = x(t)
u(τ ) ∈ Uc , ∀τ ∈ [t, t + Tc ]
u(τ ) = u(t + Tc ), ∀τ ∈ [t + Tc , t + Tp ].

Pm
◮ Optimal open-loop input: u∗ (τ ) = ∗
j=1 cj φ(τ ).
◮ Closed-loop control law: u(τ ) = u∗ (tk ), ∀τ ∈ [tk , tk+1 ].

2 Repeat step 1 for t = tk+1 , tk+2 , . . .


1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control

NMPC for orbital control

The key step is to properly define the output to control:


◮ physical trajectory (generic maneuvers)
◮ constants of motion/orbital elements (proper orbital maneuvers).

In the case of generic maneuvers, y = (r, v) ∈ R6 .

In the case of proper orbital maneuvers,

y = (a, e, ci) ∈ R5

where
h = r × v, e = µ1 v × h − rr ,
a = h2 /(µ(1 − e2 )), ci = cos i = K̂ · h/h.
The output is related to the orbital elements. Main advantage: it is
not required to specify a reference trajectory or an arrival point.
◮ An optimal trajectory is implicitly found by the NMPC algorithm.
NMPC for orbital control

The 6 classical orbital elements are 5 independent constant quantities


(a, e, Ω, i, ω), which completely describe the orbit, and one (θ = ν), which
gives the spacecraft position on the orbit.

NMPC for orbital control

inclination i: angle between the orbit


plane and the equatorial plane;

ascending node: intersection between


the orbit and the equatorial plane;

Ω: angle from Î to ascending node;

ω: angle from ascending node to


perigee;

ν = θ (true anomaly): angle from


perigee to spacecraft position.
1 Introduction

2 Orbital maneuvers

3 Orbital dynamics model

4 NMPC additional topics

5 NMPC for orbital control

6 Space applications
Spacecraft launch
Orbit shape change
Orbit inclination change
Orbit rotation
Set-point control

Space applications
Control scheme
spacecraft dynamics: model (1).
nmpc law: algorithm shown in the previous slide.
◮ The NMPC algorithm contains a model of the plant, that is used for
prediction. The prediction model can be different from (1).
◮ Measurement errors: w.
◮ State: x = (r, v, m).
◮ Output: y = (r, v) or y = (a, e, ci).
Space applications
Perturbations/disturbances/errors

Drag model:
Fd = − 12 ρ CD S v v
ρ = ρ0 exp − r−r 0

H

where CD = 1, S = 12 m2 , ρ0 = 1.22, kg/m3 , H = 8 km,


r0 = rE = 6371 km (mean Earth radius).

Other perturbations/disturbances/errors are simulated as random


signals with zero mean and std given as follows:
◮ other perturbations/disturbances: std(d(t)) = 0.01 kg · km/s2
◮ measurement errors w = (wr , wv , wm ):
⋆ position: std(wr (t)) = 10−3 km
⋆ velocity: std(wv (t)) = 10−4 km/s
⋆ mass: std(wm (t)) = 10−3 kg.

Spacecraft launch
A spacecraft (payload) has to be placed on a low Earth orbit (LEO).
Spacecraft:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 30000 kg;
◮ engine exhaust velocity is ve = 10 km/s;
◮ no input saturation.
Launch point on the Earth: r(0) = (rE , 0, 0), v(0) = (0, vE , 0), where
rE = 6371 km is the mean Earth radius and vE = 0.465 km/s is the
mean Earth rotation speed at the Equator.
◮ The point is on the Equator. Launch sites are often located close to
the Equator to exploit the Earth rotation speed to save fuel.
Target orbit:
◮ circular orbit: er = (0, 0, 0) (eccentricity vector);
◮ altitude: hr = 500 km, corresponding to a semi-major axis
ar = rE + hr = 6871 km, where rE = 6371 km is the mean Earth
radius;
◮ equatorial plane: cir = 1 (inclination).
Spacecraft launch

The typical launch phases are


1 vertical ascent
2 pitchover maneuver (or turnover maneuver)
3 gravity turn.

Multi-stage rockets are often used, usually composed of 4 stages.

Here, we adopt a NMPC strategy, able to find optimal launch


trajectories, without requiring the three launch phases.

For simplicity, a single-stage launch vehicle is considered. All


simulations will be similar for multi-stage rockets, except that the fuel
mass decrease is discontinuous when a stage separates.

Spacecraft launch

The spacecraft dynamics is described by (1).


The references is

yr = (ar , er , cir ) = (6871, 0, 0, 0, 1).

NMPC design:
◮ a simplified prediction model is used, not accounting for disturbances
and mass variation during the prediction interval;
◮ output: y = (r, e, ci); using r instead of a allows a faster convergence
to the target orbit;
◮ Ts = 10 s, Tp = Tc = 150 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 0.1 I, P = diag(10, 103 , 103 , 103 , 103 );
◮ tracking error tolerance: tol = (1, 0.01, 0.01, 0.01, 0.01);
◮ no state and input constraints.
Spacecraft launch
Simulation results (closed-loop)

Orbit shape change


The goal is to change the shape of a spacecraft orbit from circular to
ellipsoidal.
Spacecraft:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 10000 kg;
◮ engine exhaust velocity is ve = 4.4 km/s;
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3.

Initial orbit:
◮ semi-major axis: a0 = 6871 km;
◮ eccentricity vector: e0 = (0, 0, 0);
◮ inclination: ci0 = 1.

Target orbit:
◮ semi-major axis: ar = 8932 km;
◮ eccentricity vector: er = (0.25, 0, 0);
◮ inclination: cir = 1.
Orbit shape change
The spacecraft dynamics is described by (1).
The references is

yr = (ar , er , cir ) = (8932, 0.25, 0, 0, 1).

NMPC design:
◮ a simplified prediction model is used, not accounting for disturbances
and mass variation during the prediction interval;
◮ output: y = (a, e, ci); using r instead of a allows a faster convergence
to the target orbit;
◮ Ts = 10 s, Tp = Tc = 50 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 3 I, P = diag(1, 103 , 103 , 103 , 103 );
◮ tracking error tolerance: tol = (2, 0.01, 0.01, 0.01, 0.01);
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3;
◮ no state constraints.

Orbit shape change


Simulation results (closed-loop)

red: initial orbit


blue: intermediate maneuver
black: target orbit.
Orbit inclination change

The goal is to change the inclination of a spacecraft orbit.


Spacecraft:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 10000 kg;
◮ engine exhaust velocity is ve = 4.4 km/s;
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3.

Initial orbit:
◮ semi-major axis: a0 = 8.932 km;
◮ eccentricity vector: e0 ≃ (0.25, 0, 0);
◮ inclination: ci0 = 1.

Target orbit:
◮ semi-major axis: ar = 8932 km;
◮ eccentricity vector: er ≃ (0.25, 0, 0);
◮ inclination: cir = 0.9.

Orbit inclination change


The spacecraft dynamics is described by (1).
The references is

yr = (ar , er , cir ) = (8932, 0.25, 0, 0, 0.9).

NMPC design:
◮ a simplified prediction model is used, not accounting for disturbances
and mass variation during the prediction interval;
◮ output: y = (a, e, ci); using r instead of a allows a faster convergence
to the target orbit;
◮ Ts = 10 s, Tp = Tc = 50 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 3 I, P = diag(1, 103 , 103 , 103 , 104 );
◮ tracking error tolerance: tol = (3, 0.05, 0.05, 0.05, 0.01);
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3;
◮ no state constraints.
Orbit inclination change
Simulation results (closed-loop)

red: initial orbit


blue: intermediate maneuver
black: target orbit.

Orbit rotation
The goal is to rotate the orbital plane around, while keeping the
inclination fixed.
Spacecraft:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 12000 kg;
◮ engine exhaust velocity is ve = 4.4 km/s;
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3.

Initial orbit:
◮ semi-major axis: a0 = 8.932 km;
◮ eccentricity vector: e0 ≃ (0.25, 0, 0);
◮ inclination: ci0 = 1.

Target orbit:
◮ semi-major axis: ar = 8932 km;
◮ eccentricity vector: er ≃ (0, 0.25, 0);
◮ inclination: cir = 1.
Orbit rotation
The spacecraft dynamics is described by (1).
The references is

yr = (ar , er , cir ) = (8932, 0.25, 0, 0, 0.9).

NMPC design:
◮ a simplified prediction model is used, not accounting for disturbances
and mass variation during the prediction interval;
◮ output: y = (a, e, ci); using r instead of a allows a faster convergence
to the target orbit;
◮ Ts = 10 s, Tp = Tc = 50 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 0.5 I, P = diag(1, 103 , 103 , 103 , 102 );
◮ tracking error tolerance: tol = (5, 0.015, 0.015, 0.015, 0.015);
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3;
◮ no state constraints.

Orbit rotation
Simulation results (closed-loop)

red: initial orbit


blue: intermediate maneuver
black: target orbit.
Set-point control

The goal is to bring a spacecraft traveling on a LEO to a fixed


set-point, avoiding to crash on Earth (radius rE = 6371 km).
Spacecraft:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 20000 kg;
◮ engine exhaust velocity is ve = 100 km/s;
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , ∀i.

Initial orbit:
◮ initial position: r(0) = (6971, 0, 0) km;
◮ initial velocity: v(0) = (0, 8.4, 0) km/s.

Set-point (reference):

yr = (rr , vr ) = (−6971, 0, 2091, 0, 0, 0).

Set-point control

The spacecraft dynamics is described by (1).


NMPC design:
◮ a simplified prediction model is used, not accounting for disturbances
and mass variation during the prediction interval;
◮ output: y = (r, v);
◮ Ts = 50 s, Tp = Tc = 1500 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 10 I, P = diag(5, 5, 5, 2e3, 2e3, 2e3);
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , ∀i;
◮ state constraint (to avoid crash): 1.05 rE − r ≤ 0.
Set-point control
Simulation results (closed-loop)

With state constraint:

Set-point control
Simulation results (closed-loop)

Without state constraint:


Nonlinear control and aerospace applications

Exercises

Carlo Novara

Politecnico di Torino

Outline

1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control
1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control

Exercise 1 (rotations)

Consider the following transformation:


     
a1 b1 Tb1
 a2  = T  b2  =  Tb2 
a3 b3 Tb3

where {ai } and {bi } are bases of orthogonal unit vectors.

Exercise 1: Prove that T is an orthonormal matrix, i.e., that

TTT = TT T = I.
Exercise 1 (rotations)
Solution
First, note that
   
b1   b1 · b1 b1 · b2 b1 · b3
 b2  · b1 b2 b3 =  b1 · b2 b2 · b2 b2 · b3 
b3 b1 · b3 b2 · b3 b3 · b3
   
1 0 0 a1  
=  0 1 0  = I; similarly,  a2  · a1 a2 a3 = I.
0 0 1 a3

Then,
   
a1   b 1  
I =  a2  · a1 a2 a3 = T  b 2  · b 1 b2 b3 TT = TTT .
a3 b3

From this identity, TT TTT = TT ⇒ TT T TT = TT , which implies
that TT T = I.

Exercise 2 (rotations)

Exercise 2: Derive the analytical expression of the proper Euler rotation


matrix 212, with angles (φ, θ, ψ).

Solution
Using the Matlab Symbolic Toolbox:
Exercise 3 (rotations)

Two reference frames are given: F1={O, a1 , a2 , a3 }, F2={O, b1 , b2 , b3 }.


F1 is rotated wrt F2 according to
   
a1 b1
 a2  = T212 (φ, θ, ψ)  b2 
a3 b3

with (φ, θ, ψ) = (0.3π, −0.4π, 1.5π).


Consider the vector r = 3b1 + b2 + 2b3 .

Exercise 3: Compute the components of r in F1.

Exercise 3 (rotations)

Solution
The components of r in F1 can be obtained as follows:
   
2.0643 3
T
 −3.1173  = T212 (φ, θ, ψ)  1  .
−0.1453 2
Exercise 4 (rotations)

Two reference frames are given: F1={O, a1 , a2 , a3 }, F2={O, b1 , b2 , b3 }.


F1 is rotated wrt F2 according to
   
a1 b1
 a2  = T212 (φ, θ, ψ)  b2 
a3 b3

with (φ, θ, ψ) = (0.3π, −0.4π, 1.5π).


Consider the vector r = 3b1 + b2 + 2b3 .

Exercise 4: Compute the components of r in F1 using the elementary


quaternions.

Exercise 4 (rotations)

Solution
The required quaternion is q = q∗2 (ψ) ⊗ q∗1 (θ) ⊗ q∗2 (φ), where

q1 (α) = cos α2 , sin α2 , 0, 0 




q2 (β) = cos β2 , 0, sin β2 , 0 .

The components of r in F1 can be computed as follows:


   
0 0
 2.0643 
 = q ⊗  3  ⊗ q∗ .
 

 −3.1173   1 
−0.1453 2
1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control

Exercise 5 (attitude kinematics)

The quaternion kinematic equation can be written as


1
q̇ = 2 Ωq
 
0 −ω1 −ω2 −ω3
.  ω1 0 ω3 −ω2 
Ω= ω2 −ω3
.
0 ω1 
ω3 ω2 −ω1 0

Exercise 5: Study the stability of system defined by this equation, with


ω = (ω1 , ω2 , ω3 ) = (1.5, −0.3, 2.1), ∀t.
Exercise 5 (attitude kinematics)

Solution
A first important observation is that, when ω = const, the kinematic
equations define an LTI system.

Replacing in Ω the values ω = (1.5, −0.3, 2.1), we obtain a constant


matrix with pure complex eigenvalues (null real part) with auxiliary
geometric multiplicity 1.
◮ It follows that the LTI system is marginally stable.

The matrix Ω, due to its structure, has pure complex eigenvalues for
any constant ω.

1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control
Exercise 6 (attitude dynamics)

Consider a body in a reference frame with axes X, Y, Z. The body


inertia matrix in this frame is
 
1500 0 −1000
J′ =  0 2700 0 .
−1000 0 3000

Exercise 6: Find:
1 The principal moments of inertia of J′ .
2 The principal axes of inertia of J′ .
3 A reference frame in which J′ is diagonal.

Exercise 6 (attitude dynamics)


Solution
The answer to all the three questions can be obtained computing the
eigenvalues and eigenvectors of J′ .
Using the Matlab command eig, we obtain

eigenvalues : λ (J′ ) = (1000, 2700, 3500)


 √ √ 
2 5
5 0 − 55
eigenvectors : T = [e1 e2 e3 ] =  0 1 0 .
 
√ √ 
5
5 0 255

Answers:
1 The principal moments of inertia of J′ are (1500, 2700, 3000).
2 The principal axes of inertia of J′ are e1 , e2 , e3 .
3 A reference frame in which J′ is diagonal is defined by e1 , e2 , e3 .
Exercise 6 (attitude dynamics)
Solution

1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control
Exercise 7 (orbital dynamics)

Consider the free restricted two-body equation:


r
v̇ + µ = 0.
r3
Let r be expressed as follows:
 
r cos θ
r =  r sin θ 
0

where (r, θ) are the polar coordinates in the orbital plane.

Exercise 7: Derive the equations of motion in terms of (r, θ).

Exercise 7 (orbital dynamics)


Solution
The velocity and acceleration are given by
 
ṙ cos θ − r sin θ · θ̇
v =  ṙ sin θ + r cos θ · θ̇ 
0
r̈ cos θ − ṙ sin θ · θ̇ − ṙ sin θ · θ̇ − r cos θ · θ̇2 − r sin θ · θ̈
 

v̇ =  r̈ sin θ + ṙ cos θ · θ̇ + ṙ cos θ · θ̇ − r sin θ · θ̇2 + r cos θ · θ̈  .


0

Considering the first two components of the FR2B equation,


   
2
cos θ r̈ − rθ̇ − sin θ 2ṙθ̇ + rθ̈ + µ cos θ/r2 = 0
   
sin θ r̈ − rθ̇ + cos θ 2ṙθ̇ + rθ̈ + µ sin θ/r2 = 0.
2
Exercise 7 (orbital dynamics)
Solution
It follows that
   
cot θ r̈ − rθ̇ − 2ṙθ̇ + rθ̈ + µ cot θ/r2 = 0
2
   
tan θ r̈ − rθ̇ + 2ṙθ̇ + rθ̈ + µ tan θ/r2 = 0.
2

Observing that tan θ + cot θ = 1/(cos θ · sin θ), and summing the two
equations, we obtain the first equation of motion:

r̈ − rθ̇2 + µ/r2 = 0.
Similarly, subtracting the following two equations,
   
r̈ − rθ̇ − tan θ 2ṙθ̇ + rθ̈ + µ/r2 = 0
2
   
r̈ − rθ̇2 + cot θ 2ṙθ̇ + rθ̈ + µ/r2 = 0

we obtain the second equation of motion:

2ṙθ̇ + rθ̈ = 0.

Exercise 8 (orbital dynamics)

Consider a system with 2 big bodies (e.g., the Earth and the Moon),
with masses m0 and m2 , and a small body (e.g., a spacecraft), with
mass m1 .
Assume that:
◮ m1 ≪ m0 and m1 ≪ m2 ;
◮ the primary bodies 0 and 2 rotate about their composite CoM in
circular orbits; the CoM is denoted with Oc ;
p
the rotation angular speed is ωp = (µ0 + µ2 )/D3 , where D is the
distance between the two bodies.
Let Fc={Oc , i, j, k} be a reference frame fixed with m0 and m2 :
◮ i, j are on the orbit plane of the primary bodies; i is from m0 to m2 ;
◮ Fc rotates with an angular velocity ωp k.
The position of m1 is expressed as r1 = xi + yj + zk.
Exercise 8 (orbital dynamics)
Let Fc={Oc , i, j, k} be a reference frame fixed with m0 and m2 :
◮ Oc = composite CoM of m0 and m2 ;
◮ i, j are on the orbit plane of the primary bodies; i is from m0 to m2 ;
◮ Fc rotates with an angular velocity ωp k.
The position of m1 is expressed as r1 = xi + yj + zk.

Exercise 8 (orbital dynamics)


The motion pf m1 is described by the so-called free circular restricted
three-body equations:

ẍ − 2ωp ẏ − ωp2 x = −µ0 x+D


r3
0
− µ2 x−D
r3
2
10 12

ÿ + ωp2 y
2ωp ẋ − = −µ0 ry3 − µ2 ry3
10 12

z̈ = −µ0 r3 − µ2 rz3 .
z
10 12

The Earth-Moon parameters are assumed: µ0 = 0.3986 e15 m3 /s2 ,


µ2 = 4.9e12 m3 /s2 , D0 = 4 674 e3 m, D2 = 380 073 e3 m,
ωp = 2.662 · 10−6 rad/s.
Define the state as x = (x, y, z, ẋ, ẏ, ż).
Consider the initial state x(0) = (187699500, 336532000, 0, 30, 0, 0).
Note that the initial position is close to the L4 Lagrangian point.
Exercise 8: Perform a numerical simulation (time interval [0, 3e7] s), plot
the obtained trajectory and provide comments about local stability.
Exercise 8 (orbital dynamics)

Solution

1 Rotations

2 Attitude kinematics

3 Attitude dynamics

4 Orbital dynamics

5 Orbital control
Exercise 9 (orbital control)

A satellite is traveling on a circular equatorial Earth orbit (radius


rp = 6771 km) and has to be transferred to a geostationary equatorial
orbit (radius rg = 42164 km). The spacecraft data are the following:
◮ spacecraft mass: 4000 kg;
◮ total initial mass (body + fuel): 40000 kg;
◮ engine exhaust velocity is ve = 4.4 km/s;
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3.

Exercise 9: Design a NMPC controller to accomplish the orbit


transfer.

Exercise 9 (orbital control)


Solution
The references is
(
(28e3, 0, 0, 0, 1), t < 20e3 s,
yr = (ar , er , cir ) =
(rg , 0, 0, 0, 1), t ≥ 20e3 s.

A two-step maneuver is performed, since more efficient in terms of


convergence time and fuel consumption.
NMPC design:
◮ a simplified prediction model is used;
◮ Ts = 200 s, Tp = Tc = 2000 s;
◮ polynomial input parametrization, with m = 1;
◮ weight matrices: Q = 0, R = 120 I, P = diag(0.5, 103 , 103 , 103 , 103 );
◮ tracking error tolerance: tol = (10, 0.05, 0.05, 0.05, 0.05);
◮ input saturation: ui ∈ [−132, 132] kg · km/s2 , i = 1, 2, 3;
◮ no state constraints.
Exercise 9 (orbital control)
Solution
Simulation results (closed-loop)

You might also like