In the main text, we discussed linearization of relatively simple dynamical systems, such as a pendulum or a moving car. In this appendix, we provide a more comprehensive and formal treatment of linearization for general nonlinear systems. For the curious and the brave!
A general dynamical system might consist of multiple coupled differential equations involving input signals u1,…,um and other signals x1,…,xn. So it will look something like:
What about higher derivatives? We can always deal with those by introducing additional variables. For example, consider the equations of motion for a pendulum:
We can go a step further, and define x=[x1,…,xn] and u=[u1,…,um], and also let f be the vector-valued function [f1,…,fn]. Then Eq. (1) collapses neatly to a single vector differential equation that can represent pretty much anything:
If we use the constant input u(t)=u0 and initialize our system at x(0)=x0, we will have x˙=0, so x will not change and the system will remain at x(t)=x0 for all t≥0. This is why we call (x0,u0) an equilibrium point.
A system will typically have many possible equilibrium points. For example, consider the pendulum of Eq. (2). We can form many possible equilibria:
Pick θ0=0 and T0=0. The pendulum is pointing down and we apply no torque.
Pick θ0=π and T0=0. The pendulum is pointing up and we apply no torque.
Pick θ0=2π and T0=mgℓ. The pendulum is perfectly balanced at 90°.
We can linearize a dynamical system about an equilibrium point in a similar way to how we linearized a multivariable function about a reference point. Start with a general dynamical system (4), pick an equilibrium point (x0,u0), and apply the linearization of Eq. (5) to the right-hand side. We have one approximation for each i=1,…,n:
Since x0 is a constant, we have δx˙=x˙. Also, we chose (x0,u0) to be an equilibrium point, so f(x0,u0)=0. Therefore, we can write (7) even more compactly as:
Since the Jacobians Jfx(x0,u0) and Jfu(x0,u0) are evaluated at the (constant) equilibrium point (x0,u0), they are just matrices of numbers. In other words, The approximation of Eq. (9)is an LTI system!
Consider an inverted pendulum on a cart. We will not derive the equations of motion here since our focus is on linearization; if you’re interested, there are several nice derivations available online (here and here, for example).
We would like to linearize these equations about the equilibrium point where the pendulum is perfectly upright (θ0=0) and the cart is stationary (x˙0=0, θ˙0=0), with no external force applied (f0=0).
We begin by putting our equations into the standard form x˙=f(x,u). We choose our state variables as
Let’s compute the Jacobian matrices Jfx and Jfu evaluated at the equilibrium point (x0,u0)=0. We will show one sample calculation. To compute the (2,3) entry of Jfx, we need to compute ∂x3∂f2 and evaluate it at the equilibrium:
Finally, substituting these Jacobians into Eq. (9), we obtain the linearized equations of motion for the inverted pendulum on a cart about the upright equilibrium:
So far, we only discussed linearization about an equilibrium point, which leads to an LTI approximation. It is also possible to linearize about a time-varying trajectory (x0(t),u0(t)). This is useful for control systems where we want to follow a desired trajectory rather than stay at a fixed point.
In this case, we must ensure that the trajectory is feasible, meaning that it satisfies the system dynamics:
With this in place, we can linearize the right-hand side of (4) about the time-varying trajectory (x0(t),u0(t)) using the same approach as before. We obtain:
Before we had δx(t)=x(t)−x0 (constant reference), and therefore δx˙(t)=x˙(t), but now x0 is time-varying, so we have to be careful when taking derivatives. We now have: δx(t)=x(t)−x0(t) (time-varying reference), so δx˙(t)=x˙(t)−x˙0(t). Substituting this into (22) and using (21), we obtain:
Although this looks very similar to (9), there is a key difference: we are now evaluating the Jacobians at the time-varying trajectory (x0(t),u0(t)) rather than at the fixed equilibrium point (x0,u0). So the Jacobians Jfx(x0(t),u0(t)) and Jfu(x0(t),u0(t)) will be time-varying matrices, and the resulting linearized system will be a linear time-varying (LTV) system rather than an LTI system.