Smooth functions look like straight lines when you zoom in close enough to any point. It turns out something similar is true of dynamical systems. If we “zoom in close enough,” it will look like a linear system. In this section, we will make this idea precise and show how to derive linear approximations of nonlinear dynamical systems.
Linearization is an approximation method. Given a function f(x), consider a reference point x0. If f is a smooth function, f(x) near x=x0 drawing a tangent line on the graph and using the line as the approximation. The line will have slope f′(x0), so the linear approximation will have equation:
Now it truly looks like a linear equation y=kx, but it is linear in the deviations from the reference point. It is not linear in the original coordinates (x,y).
Figure 1:Linearization of a function f(x) about a point x0.
We know that 4.01 is close to 4 and 4=2, so let’s set f(x)=x and pick the reference point x0=4. Then we have f(x0)=4=2 and f′(x)=2x1, so f′(x0)=2⋅21=41. Therefore, our linearized approximation near x0=4 is:
We can make an analogous approximation for multivariable functions, except we approximate the function using a tangent hyperplane rather than a tangent line. For example, for a function f(x,y), we can approximate it about the point (x0,y0) as
where we use the notation ∂x∂f∣∣0 to mean “take the partial derivative of f(x,y) with respect to x and then evaluate the result at x=x0 and y=y0”. Setting z=f(x,y) and z0=f(x0,y0) and defining the deviations δx, δy, δz analogously as before, our linearized equation becomes
An equilibrium point (θ0,T0) is a constant angle θ0 and constant torque T0 that satisfies (7). All time derivatives vanish and we are left with the equation of motion, we have
There are many ways to satisfy Eq. (8). Each is a valid equilibrim point.
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=4π and T0=21mgℓ. The pendulum is perfectly balanced at 45°.
Pick any θ0 and use T0=mgℓsinθ0.
In all cases, if we use θ(0)=θ0 as an initialization and apply the equilibrium torque T(t)=T0 for all t≥0, the pendulum will remain at the angle θ(t)=θ0 for all t≥0.
We typically find equilibrium points in one of two ways. If the system in question has input u and other signals x, then:
We are interested in the zero-input equilibrium, so we use u0=0 and we ask what values of x0 are possible. This is what we did for the first two equilibrium examples for the pendulum above.
We pick a desired x0, and we ask what is the required u0 that will lead to equilibrium. This is what we did for the last two equilibrium examples for the pendulum above.
To linearize a non-LTI system, we carry out the following steps. We will assume the system has inputs u=[u1,…,um] and other signals x=[x1,…,xn] (we use the boldface letters to denote vectors).
We will spend the rest of this section doing specific examples to understand how to derive linearized approximations in practice.
This equation is not linear due to the affine term mg. So let’s linearize!
We want the system to be at rest when F=0 (no applied force), so let’s pick F0=0 and see what x0 must be. Substituting into the equation of motion, we have
Therefore x0=kmg. This is where the mass will sit so that the spring force perfectly balances out the force of gravity.
Our equation of motion (11) is already affine, so we don’t need to take any derivatives. We can simply substitute our deviations from equilibrium: x=x0+δx and F=F0+δF=δF. Substituting into (11), we have
This is an LTI system in the variables (δx,δF). In fact, it looks very similar to our original equations of motion (11), except that the gravity term is gone.
What happened physically? We shifted our coordinate system down by kmg, so that the new “zero” position is where the mass naturally sits under gravity. In this new coordinate system, there is no gravity term, and if we apply a force from this new “zero” position, the mass will move up or down the same way as without gravity, except shifted down by kmg. The equations of motion (14) describe exactly this behavior.
Consider a car moving along a flat road. The motor provides a forward force Fa and the aerodynamic drag provides an opposing force Fd. Let’s derive linearized equations of motion linearized about a nominal speed v0.
Figure 4:Free body diagram of a car with drag force Fd.
Aerodynamic drag is typically proportional to the square of the speed of the object. This drag force is given by the equation
where Cd is the drag coefficient, ρ is the air density, A is the lateral surface area, and v is the speed of the moving object. We replaced all the constant terms by c for simplicity.
The equation of motion for the car is therefore
This is not linear due to the v2 term. Let’s linearize about the nominal speed v0. We will carefully follow the four steps outlined earlier.
Step 1: Let’s identify an equilibrium point. In order to maintain a constant speed v0, what must be the applied force Fa? We can substitute into the equation of motion to obtain:
Step 3: Now we replace all signals with their deviations from equilibrium: v=v0+δv and Fa=F0+δF. Also use the fact that v˙=δv˙ because v0 is constant. Substituting, we have
We can quickly check that this is indeed LTI: all terms are linear functions of the deviations δv and δF.
We can also interpret this result physically. Our linearized equation (21) relates the deviation from F0 to the deviation from v0. If we let δv=δx˙, we can write it as an equation in terms of position:
This is a spring-mass-damper equation with no spring! Moreover, the damping coefficient depends linearly on the nominal velocity: the faster you go, the more damping you have. Makes sense!
This is an LTI system in the variables (δθ,δT), so our linearization is complete!
We can investigate what happens when we use different equilibrium points:
If θ0=0 (pendulum pointing down), we get mℓ2δθ¨+mgℓδθ=δT. This is just what you get when you apply the “small angle formula” sinθ≈θ. Indeed, the small angle formula is simply linearization about zero. The linearized equation of motion is the same as that of a standard spring-mass system.
If θ0=π (pendulum pointing up), we get mℓ2δθ¨−mgℓδθ=δT. This looks similar to the standard linearized pendulum, but with an important negative sign. This is like a spring-mass system with a negative spring constant. When you push the mass, it accelerates away from you rather than returning back.
If θ0=4π (pendulum at 45 degrees), we get mℓ2δθ¨+21mgℓδθ=δT. It’s a spring-mass system with a reduced spring constant.
At equilibrium, x˙=0 and y˙=0. Substituting into the dynamics, we see that this occurs when αx=βy=xy. Excluding the trivial solution x=y=0, we see that
To find the linearized equations of motion, we linearize each equation about the equilibrium point (β,α). For the first equation, let f(x,y)=αx−xy. Evaluating partial derivatives: