# Inverted Pendulum Model

## Inverted pendulum model

Newton’s second law of motion states that the force acting on an object is proportional to its mass and the rate of change of its velocity. In the case of rotational motion, the corresponding law is given by the equation:

$$
\tau =I\alpha
$$

where τ is the torque applied to the object, I is the moment of inertia of the object about the axis of rotation, and α is the angular acceleration of the object.

For a single-link pendulum which pivot point is fixed, we have:

$$
\tau =I\ddot{\theta}
$$

where θ is is the angle of the pendulum from the earth vertical.

For a point mass, the moment of inertia is

$$
I =mr^2
$$

Thus, we have

$$
\tau =ml^2\ddot{\theta}
$$

where $$l$$ is the length of the pendulum.

Given Newton’s second law of motion, we have

$$
F=ma
$$

We also know that the acceleration of an inverted pendulum is due to gravity:

$$
F =mg \sin \theta
$$

Thus, the torque can also be expressed as

$$
\tau =mgl \sin \theta
$$

Thus we have

$$
ml^2\ddot{\theta}=mgl \sin \theta
$$

## Human pendulum model

From the inverted pendulum model we have

$$
mh^2\ddot{\theta}=mgh \sin \theta +\eta
$$

where h is the height of the human, and η is noise of this system.

Because human legs can be considered a series of interconnected segments separated by the joints, we will include ankle joint (1). With [parallel-axis theorem](https://www.feynmanlectures.caltech.edu/I_19.html), we have:

$$
(I\_{body}+mh^2)\ddot{\theta}=M\_{ankle} + mgh \sin \theta +\eta
$$

where $$I\_{body}$$represents the moment of inertia of body and $$M\_{ankle}$$ represents a corrective ankle torque that resists postural sway.

## Dynamic human pendulum model

Because postural sway angle and ankle torque change in time, we have:

$$
(I\_{body}+mh^2)\ddot{\theta}(t)=M\_{ankle}(t) + mgh \sin (\theta(t)) +\eta
$$

Ankle torque  $$M\_{ankle}$$ can be divided into passive torque $$M\_{passive}$$ and active torque$$M\_{active}$$ (2):

$$
M\_{ankle}=M\_{passive} + M\_{active}
$$

where $$M\_{passive}$$ is caused by the stiffness and damping of the muscles, whereas $$M\_{active}$$ is based on “active” time-delayed neuromuscular feedback from proprioceptive, vestibular, and visual sensory inputs.

This paper (1) reports that people with profound bilateral vestibular loss had a higher level of muscle stiffness, possibly as a strategy for compensating for their vestibular deficit.

<figure><img src="https://1490490238-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma_JYIRuxx8PCv6UaBM%2Fuploads%2Fw9qGn7TBfYpm6moNrVnk%2FScreen%20Shot%202023-03-07%20at%208.29.42%20PM.png?alt=media&#x26;token=a84e70c5-8b1e-42c4-8a9d-bcbea3596ad7" alt=""><figcaption></figcaption></figure>

Assume η = 0, and that when θ  is small  $$sin \theta ≈ \theta$$. We have

$$
M\_{ankle} = A \theta(t) + B \dot{\theta} + C\ddot{\theta}
$$

Assume there is no delay in feedback

$$
(mh^2-C)\ddot{\theta} - B \dot{\theta} - (mgh+A)\theta = 0
$$

where  $$\theta$$ represents angular distance from heading,  $$\dot\theta$$ represents angular velocity from optic flows, and $$\ddot\theta$$ represents angular acceleration from vestibular inputs.

Let  $$x = mh^2-C$$ and  $$y = -B$$ and  $$z =  - (mgh+A)$$, we have

$$
x\ddot{\theta} + y \dot{\theta} + z\theta = 0
$$

### Analytic solution

Assume answer is&#x20;

$$
\theta = \alpha e^{\beta t}
$$

$$
\dot{\theta} = \beta \alpha e^{\beta t} = \beta \theta
$$

$$
\ddot{\theta} = \beta^2 \alpha e^{\beta t} = \beta^2 \theta
$$

Thus we have

$$
x \beta^2 \theta + y \beta \theta + z \theta = 0
$$

which is  $$x \beta^2 + y \beta + z = 0$$. Thus we have

$$
\beta\_{\pm} = \frac{-y \pm\sqrt{y^2-4xz}}{2x}
$$

#### Condition 1

If $$y^2 - 4xz > 0$$

### Simulation solution in MATLab

For  $$x\ddot{\theta} + y \dot{\theta} + z\theta = 0$$, we have  $$x\ddot{\theta} = - y \dot{\theta} - z\theta$$. Let  $$\dot{\theta} =\phi$$, we have  $$x\dot{\phi} = -y\phi - z \theta$$. Thus

$$
\dot{\phi} = -\frac{y}{x}\phi - \frac{z}{x} \theta
$$

$$
\dot{\theta} =\phi
$$

Combine we have  $$\dot{V} = MV$$:

$$
\begin{pmatrix}
\dot{\phi}\\
\dot{\theta}
\end{pmatrix} = \begin{pmatrix}
-\frac{y}{x} & - \frac{z}{x} \\
1 & 0
\end{pmatrix}
$$

and $$\dot{V\_0} = \begin{pmatrix} \dot{\theta\_0}\ \theta \end{pmatrix}$$.

From $$\dot{V} = MV$$ we have

$$
\frac{V\_{i+1}-V\_i}{\delta t\_i} = M V\_i
$$

$$
V\_{i+1} = V\_i +\delta t\_iMV\_i
$$

and because $$t = \delta t\_i$$.

## Passive torque (assume no time delay)

$$
M\_{passive}(t)=K(t)\[\theta(t)+\beta\theta^3(t)] + C(t)\dot{\theta}(t)
$$

## Active torque (assume time delay)

$$
M\_{active}(t) =
$$

## Center of Pressure (CoP)

$$
CoP (-mh\ddot{\theta}sin\theta-mh\dot{\theta}^2cos\theta+mg+m\_fg)
$$

where $$-mh\ddot{\theta}sin\theta-mh\dot{\theta}^2cos\theta$$  is the second derivative of $$-mhcos\theta$$ and $$h\_fm\_h(\ddot{\theta}cos\theta-\dot{\theta}^2sin\theta)$$ is the second derivative of $$-h\_fm\_hsin\theta$$&#x20;

## References

(1) Peterka, R. J. Sensorimotor integration in human postural control. Journal of Neurophysiology 88, 1097– 1118 (2002). URL <https://www.physiology>. org/doi/10.1152/jn.2002.88.3.1097.&#x20;

(2) Chagdes, J. R. et al. Limit cycle oscilla- tions in standing human posture. Journal of Biomechanics 49, 1170–1179 (2016). URL <https://www.sciencedirect.com/science/> article/pii/S002192901630269X.
