Controllability Analysis of Pendulum-on-Cart Variants & Coordinate-Invariant Tests

Linearized Inverted Pendulum on a Cart: Setting-Up the State–Space Model

The original nonlinear dynamics (obtained via Newton–Euler) were first linearised about the upright equilibrium (θ,θ˙,x,x˙)=(0,0,0,0)\bigl(\theta,\dot{\theta},x,\dot{x}\bigr)=(0,0,0,0). The resulting second–order scalar equations are

\begin{aligned}
\ddot{x} &= -\frac{m g}{M}\,\theta + \frac{1}{M} F,\[4pt]
\ddot{\theta} &= \frac{M+m}{M L}\,g\,\theta - \frac{1}{M L} F.
\end{aligned}

Here
MM – mass of the cart,
mm – mass of the pendulum,
LL – pendulum length,
gg – gravitational acceleration,
FF – horizontal force applied to cart (control input).

A state vector is chosen as z=[x,  x˙,  θ,  θ˙]!T.z=[x,\;\dot{x},\;\theta,\;\dot{\theta}]^{!T}. Consequently z˙=[x˙,  x¨,  θ˙,  θ¨]!T\dot{z}=[\dot{x},\;\ddot{x},\;\dot{\theta},\;\ddot{\theta}]^{!T} allowing a first-order representation
<br>z˙=Az+Bu,uF.<br><br>\dot{z}=A z + B u, \qquad u\equiv F.<br>

Construction of the A and B Matrices

Collecting coefficients directly from the formulas of x¨\ddot{x} and θ¨\ddot{\theta} yields

A =
\begin{bmatrix}
0 & 1 & 0 & 0\[4pt]
0 & 0 & -\dfrac{m g}{M} & 0\[6pt]
0 & 0 & 0 & 1\[4pt]
0 & 0 & \dfrac{(M+m)g}{M L} & 0
\end{bmatrix},
\qquad
B=
\begin{bmatrix}
0\[2pt]
\dfrac{1}{M}\[6pt]
0\[2pt]
-\dfrac{1}{M L}
\end{bmatrix}.

Controllability Matrix for the Force-Actuated Cart

Dimension n=4    P=[B  AB  A2B  A3B].n=4\;\Rightarrow\;P=[\,B\;A B\;A^{2}B\;A^{3}B\,]. Direct multiplication (shown step-by-step in lecture) gives

P=
\begin{bmatrix}
0 & \dfrac{1}{M} & 0 & \dfrac{m g}{M^{2}L}\[6pt]
\dfrac{1}{M} & 0 & \dfrac{m g}{M^{2}L} & 0\[8pt]
0 & -\dfrac{1}{M L} & 0 & -\dfrac{(M+m)g}{M^{2}L^{2}}\[10pt]
-\dfrac{1}{M L} & 0 & -\dfrac{(M+m)g}{M^{2}L^{2}} & 0
\end{bmatrix}.

Its determinant evaluates to
<br>detP=g2M4L40for finite M,L.<br><br>\det P = \frac{g^{2}}{M^{4} L^{4}}\neq0\quad\text{for finite }M,L.<br>
Because detP0  (rank=4)\det P\neq0\;(\text{rank}=4), every state of the linearised inverted pendulum is reachable; the system is controllable.

Physical Significance

A non–zero determinant formalises the well-known experience that an inverted broomstick can indeed be balanced by suitably moving the hand (i.e.
applying horizontal forces).
Large MM or LL drive detP\det P towards zero, warning that very heavy carts or extremely long pendulums become hard (ultimately impossible) to control.

Torque-Actuated Pendulum on a Cart ("Actuated Arm")

A variant is next analysed in which the control input is not a horizontal force but a torque τ\tau applied at the pendulum joint, while the cart itself is unactuated (free-sliding). Non-linear equations of motion (omitted in the lecture for brevity) reduce—after linearisation about the hanging equilibrium—to
<br>z˙=Az+Bu,z=[θ,  θ˙,  x,  x˙]T,uτ,<br><br>\dot{z}=A z + B u,\qquad z=[\theta,\;\dot{\theta},\;x,\;\dot{x}]^{T},\quad u\equiv \tau,<br>
with

A=
\begin{bmatrix}
0 & 1 & 0 & 0\[4pt]
-\dfrac{g(M+m)}{M L} & 0 & 0 & \dfrac{g m}{M}\[6pt]
0 & 0 & 0 & 1\[4pt]
0 & 0 & 0 & 0
\end{bmatrix},
\;\;
B=
\begin{bmatrix}
0\[4pt]
\dfrac{M+m}{M L}\[6pt]
0\[2pt]
-\dfrac{m}{M}
\end{bmatrix}.

Controllability Matrix and Rank Deficiency

Computation gives

P=
\bigl[\,B\;A B\;A^{2}B\;A^{3}B\,\bigr]=
\begin{bmatrix}
0 & \dfrac{M+m}{M L} & 0 & -\dfrac{g(M+m)^{2}}{M^{2}L^{2}}\[8pt]
\dfrac{M+m}{M L} & 0 & -\dfrac{g(M+m)^{2}}{M^{2}L^{2}} & 0\[8pt]
0 & -\dfrac{m}{M} & 0 & \dfrac{g m(M+m)}{M^{2}L}\[10pt]
-\dfrac{m}{M} & 0 & \dfrac{g m(M+m)}{M^{2}L} & 0
\end{bmatrix}.

Columns (or rows) appear in pairs proportional to one another, e.g.
[0,M+mML,0,mM]T    [M+mML,0,mM,0]T,\bigl[0,\tfrac{M+m}{M L},0,-\tfrac{m}{M}\bigr]^{T}\;\propto\;\bigl[\tfrac{M+m}{M L},0,-\tfrac{m}{M},0\bigr]^{T},
so only two independent directions exist. Hence \operatorname{rank}P=2<4, detP=0\det P=0 → the system is NOT controllable.

Physical Interpretation of Uncontrollability

Attempting to relocate the cart’s centre of mass using only internal joint torques violates linear momentum conservation; without an external force there is no mechanism to impart net horizontal impulse. The mathematics faithfully reproduces this impossibility via rank deficiency.

Invariance of Controllability Under Coordinate Transformation

Consider any non-singular change of state variables x=Tzx = T z. The transformed dynamics are
z˙=A<em>!hatz+B</em>!hatu,    A<em>!hat=T1AT,  B</em>!hat=T1B.\dot{z}=A<em>{!\text{hat}} z + B</em>{!\text{hat}} u,\;\;A<em>{!\text{hat}} = T^{-1} A T,\;B</em>{!\text{hat}} = T^{-1} B.
The new controllability matrix satisfies
P<em>!hat=T1P,P<em>{!\text{hat}} = T^{-1} P, so rankP</em>!hat=rankP\operatorname{rank} P</em>{!\text{hat}} = \operatorname{rank} P because T1T^{-1} is full rank. Therefore controllability is an invariant property; similarity transformations cannot create or destroy it.

Controllability Criterion in Diagonal (or Jordan) Form

If a similarity transformation places AA into diagonal form
A<em>d=diag(λ</em>1,,λ<em>n),B</em>d=[b<em>1amp;b</em>2amp;amp;b<em>n]T,A<em>{d}=\operatorname{diag}(\lambda</em>{1},\ldots,\lambda<em>{n}), \qquad B</em>{d}=\begin{bmatrix}b<em>{1} &amp; b</em>{2} &amp; \cdots &amp; b<em>{n}\end{bmatrix}^{T}, the resulting controllability matrix is P</em>d=[<br>b<em>1amp;b</em>2amp;!amp;b<em>n λ</em>1b<em>1amp;λ</em>2b<em>2amp;amp;λ</em>nb<em>n amp;amp;amp; λ</em>1n1b<em>1amp;λ</em>2n1b<em>2amp;amp;λ</em>nn1b<em>n].P</em>{d}=\begin{bmatrix}<br>b<em>{1} &amp; b</em>{2} &amp; !\cdots &amp; b<em>{n}\ \lambda</em>{1} b<em>{1} &amp; \lambda</em>{2} b<em>{2} &amp; \cdots &amp; \lambda</em>{n} b<em>{n}\ \vdots &amp; \vdots &amp; &amp; \vdots\ \lambda</em>{1}^{n-1} b<em>{1} &amp; \lambda</em>{2}^{n-1} b<em>{2} &amp; \cdots &amp; \lambda</em>{n}^{n-1} b<em>{n} \end{bmatrix}. Vandermonde structure implies • If all eigenvalues λ</em>i\lambda</em>{i} are distinct and
• every coupling term b<em>i0,b<em>{i}\neq0, then P</em>dP</em>{d} is nonsingular → the original system is controllable.
Repeated eigenvalues require Jordan blocks; the test generalises but diagonal suffices for the distinct-root case discussed.

Forthcoming Topic: Decomposing Mixed-Controllability Systems

If \operatorname{rank}P=q<n, exactly qq independent state directions are reachable. Through an appropriate coordinate partition the model can be written as

\begin{bmatrix}\dot{z}{c}\ \dot{z}{u}\end{bmatrix}=
\begin{bmatrix}A{cc} & A{cu}\ 0 & A{uu}\end{bmatrix} \begin{bmatrix}z{c}\ z{u}\end{bmatrix} +\begin{bmatrix}B{c}\0\end{bmatrix}u,

where $(z{c})$ are controllable and $(z{u})$ uncontrollable states. Practical control is still feasible if $A_{uu}$ is stable. Detailed construction of such transformations will be presented in the next lecture.