MAE 280 B - Linear Control Design
Mauricio de Oliveira

Hyperlink["http://fccr.ucsd.edu/~mauricio/courses/mae280b"]

Satelite Model

Nonlinear Model

Newton' s Law

Clear[R,U1,U2,F]
NewtonsLaw=m R''[t]-F[t]-U[t]

should be equal to zero, where F is the gravitational force:

gravityRule=F[t]->-k m/r[t]^2 R[t]/r[t]

with r[t] = |R[t]| and U[t] a control force.

In cylindrical coordinates :

Clear[er,eθ]
cylindricalRule={
er[t]->{Cos[θ[t]],Sin[θ[t]]},
eθ[t]->{-Sin[θ[t]],Cos[θ[t]]},
R[t]->r[t] er[t],
U[t]->u1[t]er[t]+u2[t]eθ[t]
}

Computing derivatives

cylindricalDerivativeRule={
D[er[t],t]->D[er[t]/.cylindricalRule,t],
D[er[t],{t,2}]->D[er[t]/.cylindricalRule,{t,2}],
D[eθ[t],t]->D[eθ[t]/.cylindricalRule,t],
D[eθ[t],{t,2}]->D[eθ[t]/.cylindricalRule,{t,2}],
D[R[t],t]->D[R[t]/.cylindricalRule,t],
D[R[t],{t,2}]->D[R[t]/.cylindricalRule,{t,2}]
}

rules=Join[cylindricalRule,cylindricalDerivativeRule];

Putting it all together we obtain

eqs=NewtonsLaw/.gravityRule//.rules

A rotation reveals the cylindrical coordinate equations :

T={{Cos[θ[t]],Sin[θ[t]]},{-Sin[θ[t]],Cos[θ[t]]}}

niceEqs=T.eqs//Simplify;
ColumnForm[niceEqs]

Equilibrium

For equilibrium we ask that the accelerations be zero:

Thread[niceEqs==0]/.{r''[t]->0,θ''[t]->0}

around u = 0 :

Thread[niceEqs==0]/.{r''[t]->0,θ''[t]->0}/.{u1[t]->0,u2[t]->0}

from which we select the second solution.

Thread[niceEqs==0]/.{r''[t]->0,θ''[t]->0}/.{u1[t]->0,u2[t]->0};
Solve[%,{r[t],θ[t],r'[t],θ'[t]}]
eqSol=%[[2]];

Note that :

DSolve[Equal@@@eqSol,{r[t],θ'[t]},t]

or by selecting θ[t] so that θ[0] == 0

equilibriumRule={r'[t]->0,r[t]->OverBar[r][t],θ'[t]->ω,θ[t]->ω t,u1[t]->0,u2[t]->0}

and for simplification we will define the rule :

omegaRule=k->(ω^2) (((OverBar[r][t]))^3)

Linearized Model

To obtain a linear model around the equilibrium we defined the state vector :

state={r[t],θ[t],r'[t],θ'[t]}
stateAtEquilibrium=Transpose[{state,state/.equilibriumRule}]

and the control vector :

control={u1[t],u2[t]}
controlAtEquilibrium=Transpose[{control,control/.equilibriumRule}]

After defining an output

output={r[t],r'[t],θ'[t]}

The linearized model can be obtained directly from the nonlinear equations :

linearizedSystem=StateSpaceModel[Thread[niceEqs==0],stateAtEquilibrium,controlAtEquilibrium,output,t]/.omegaRule

Controllability and Observability

Observability with both outputs

If we measure r[t] and θ’[t] we obtain the linearized system

linearizedSystem

for which the ObservabilityMatrix is

obsv=ObservabilityMatrix[linearizedSystem];
MatrixForm[obsv]

Because

MatrixRank[obsv]

is less than n, the system is not observable.

Controllability with both inputs

The ControllabilityMatrix is

ctrl=ControllabilityMatrix[linearizedSystem];
MatrixForm[ctrl]

Because

MatrixRank[ctrl]

is equal to n, the system is not controllable using both inputs.

Controllability with radial input

Using only input 1 we obtain the system

linearizedSystem1=SystemsModelExtract[linearizedSystem,{1},{}]

(note that we can ignore the output in this case)

We compute the controllability matrix :

ctrl=ControllabilityMatrix[linearizedSystem1];
MatrixForm[ctrl]

and its rank

MatrixRank[ctrl]

which is less than n and shows that the satelite is not controllable from the radial input.

Controllability with tangential input

Using only input 2 we obtain the system

linearizedSystem2=SystemsModelExtract[linearizedSystem,{2},{}]

We compute the controllability matrix :

ctrl=ControllabilityMatrix[linearizedSystem2];
MatrixForm[ctrl]

and its rank

MatrixRank[ctrl]

which is equal to n and shows that the satelite is controllable from the tangential input.

Stabilizability

The (A,B,C,D) matrices are obtained using:

{AA,BB,CC,DD}=Normal[linearizedSystem];

The poles are the eigenvalues of AA

lambdas=Eigenvalues[AA]

which all have non - negative real part so we check for all of them :

Map[MatrixRank[ArrayFlatten[{{AA-# IdentityMatrix[4],BB}}]]&,lambdas]

which shows the system is stabilizable when using both inputs, as expected since the system is controllable.

Radial input

For the radial input

BB[[All,{1}]]

and the Haltus test leads to

Map[MatrixRank[ArrayFlatten[{{AA-# IdentityMatrix[4],BB[[All,{1}]]}}]]&,lambdas]

showing that the eigenvalue at the origin is not stabilizable from input 1.

Tangential input

For the tangential input

BB[[All,{2}]]

and the Haltus test leads to

Map[MatrixRank[ArrayFlatten[{{AA-# IdentityMatrix[4],BB[[All,{2}]]}}]]&,lambdas]

which shows that all eigenvalues are stabilizable.

Controllability, Observability and Transfer - function representation

We can transform the MIMO system into transfer function - form

tf=TransferFunctionModel[linearizedSystem]

The common denominator have degree 4, as is the order of the state space model.

However, because the system is not observable, there must be pole-zero cancelations, which in this case are revealed by canceling a 
pole and zero a the origin:

Simplify[tf]

with a common denominator of degree 3, less than n = 4, as expected.

A minimal realization for the system, that is one which is controllable and observable is

tfMin=MinimalStateSpaceModel[linearizedSystem]

and has order 3, as expected. Its transfer function is the same as before

TransferFunctionModel[tfMin]//Simplify