Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 4

Linearizing Nonlinear Systems

Recommended resources

Hello! Welcome to our next lesson on modeling dynamic systems.

In our last session, we mastered the skill of converting the dynamics of linear time-invariant (LTI) systems into the state-space representation . However, most real-world systems, including the rotary inverted pendulum you're interested in, are inherently nonlinear. The neat matrix equations we've been using don't directly apply.

Today, we will bridge that gap. Our learning outcome is to linearize a nonlinear system model around an operating point to obtain a linear state-space representation. This powerful technique allows us to create a linear model that accurately approximates the nonlinear system's behavior, as long as it stays close to a specific point of operation. This is a cornerstone of control engineering, enabling us to apply the vast toolkit of linear control theory to a much wider range of practical problems.

Why and How We Linearize

Many physical laws involve nonlinear relationships. For a pendulum, the restoring force of gravity is proportional to , not . In electrical circuits, components like diodes or transistors have nonlinear current-voltage characteristics.

The core idea of linearization is to pick a specific, steady condition for the system—called an equilibrium point or operating point—and then create a linear model that describes small deviations, or perturbations, around that point.

To get an intuitive overview of this process, let's start with a short video.

EECS - Module 20- Jacobian Linearization

Watch the beginning of 'EECS - Module 20- Jacobian Linearization' by UC Berkeley Events. This section introduces why we need to linearize models derived from physics and sets up the general problem.

Please watch the first 2 minutes and 23 seconds of the video. Focus on the distinction between the linear models we've used so far and the nonlinear models that often arise from physics.


The Mathematics of Linearization: Taylor Series and Jacobians

As the video introduced, the mathematical tool for linearization is the Taylor series expansion. For a general nonlinear system described by:

where is a vector of nonlinear functions, we can expand around an equilibrium point . If we only keep the first-order terms, we get a linear approximation.

This process results in a linear state-space model for the perturbation variables, which are defined as the deviations from the equilibrium point:

The resulting linearized system is:

The crucial question is: what are the and matrices? They are the Jacobian matrices of the function vector evaluated at the equilibrium point.

The Jacobian is the multivariable equivalent of a derivative. The matrix is the Jacobian of with respect to the state vector , and the matrix is the Jacobian of with respect to the input vector .

To understand this formally, let's turn to a clear, well-written document.

Note 17: Linearization

Let's read selected parts of 'Note 17: Linearization' from UC Berkeley's EECS 16B course notes. This will solidify the mathematical foundation of what we're doing.

Please read sections 2.1 ('Linear Approximations'), 2.2 ('Computing the Derivative'), and 3.2 ('Linearization of Continuous-Time... Model'). Focus on understanding Definition 14 for an equilibrium point in a continuous-time system and Proposition 15, which presents the final linearized model.


The Linearization Workflow: A Step-by-Step Example

Now that we have the theory, let's walk through the practical workflow for linearizing a system. The process can be broken down into three main steps:

  1. Find the Equilibrium Point(s): For a given constant input (often zero), find the state where the system is at rest. This means all derivatives are zero, so you solve .
  2. Compute the Jacobian Matrices: Calculate the partial derivatives of with respect to each state variable (to build the matrix) and each input variable (to build the matrix).
  3. Evaluate at the Equilibrium Point: Substitute the values of and into the symbolic Jacobian matrices to get the final constant matrices and for your linearized model.

The following video provides an excellent, clear walkthrough of this exact process.

Intro to Control - 6.4 State-Space Linearization

Let's watch 'Intro to Control - 6.4 State-Space Linearization' by Engineering with Prof. Kim. This video provides a very practical, step-by-step guide to applying the workflow we just discussed.

Watch from 02:51 to 12:09. The video first shows how to find the equilibrium points (Step 1), then demonstrates the calculation of partial derivatives and assembly into the final matrices (Steps 2 & 3).


Application 1: The Inverted Pendulum

Now, let's apply this to a system directly relevant to your project. The inverted pendulum is a classic nonlinear control problem. Let's see how the process works for a simple pendulum.

EECS - Module 20- Jacobian Linearization

We'll return to the 'EECS - Module 20- Jacobian Linearization' video. The second half works through the linearization of an inverted pendulum.

Watch from 13:01 to 18:03. Notice how they define the state variables, write the nonlinear equation, and then compute the Jacobian matrix to get the linearized 'A' and 'B' matrices. Pay close attention to the equilibrium point they linearize around (pendulum pointing up, heta = 0).

A Practical Shortcut: Small Angle Approximations

In the video, the result of the formal Jacobian linearization for the pendulum around was an A matrix with g/l in it. This comes from the fact that the derivative of is , and .

This highlights a very common shortcut in engineering. For systems linearized around a zero angle, you can often use small-angle approximations which are, in fact, the first terms of the Taylor series:

For a more complex system like the inverted pendulum on a cart, applying these approximations can be much faster than computing the full Jacobian.

Inverted Pendulum: System Modeling

Let's look at the document 'Inverted Pendulum: System Modeling' from the University of Michigan's Control Tutorials for MATLAB and Simulink (CTMS).

Read the short section that begins just after equation (6) and ends just before '1. Transfer Function'. This section explicitly shows how substituting small-angle approximations into the nonlinear equations of motion yields a set of linear equations.


Application 2: A Nonlinear Circuit

To connect this concept back to your Electrical Engineering background, let's consider a circuit with a nonlinear component. A tunnel diode is an interesting example where the current can decrease as voltage increases over a certain range.

Note 17: Linearization

Let's return to the 'Note 17: Linearization' document and look at the circuit example.

Read section 4.1 'Circuit Example - Tunnel Diode' (pages 7-8). You don't need to compute the final Jacobian yourself, but focus on how the nonlinear state equations are set up and how the equilibrium condition is defined by setting the derivatives (and thus capacitor current and inductor voltage) to zero.

Test your understanding!

The nonlinear equations for a simple pendulum with viscous damping are:


where (angle) and (angular velocity).

  1. Find the two equilibrium points of the system (assuming no input).
  2. Compute the linearized system matrix for the equilibrium point corresponding to the pendulum being inverted (standing straight up).
Show answer
  1. Equilibrium Points:
    We set and .

    • From , we get .
    • Substituting into the second equation gives . This is true when for any integer .
    • The two distinct physical points are (hanging down) and (inverted).
  2. Linearize around the Inverted Point:
    The equilibrium point is .
    The function vector is .
    The Jacobian matrix is:

    Now, we evaluate this matrix at :

    This is the linearized state matrix for small perturbations around the unstable, inverted equilibrium point.


Conclusion

Today we've added a critical technique to our toolkit. We can now take a nonlinear system, which represents the true physics of many real-world problems, and derive a linear state-space model that is valid for control design around a desired operating point.

Key Takeaways:

  • Linearization approximates a nonlinear system with a linear model .
  • This linear model describes the dynamics of small deviations () from an equilibrium point .
  • An equilibrium point is a steady state where all system derivatives are zero ().
  • The system matrices and are the Jacobians of with respect to and , evaluated at the equilibrium point.

Preview of the Next Lesson:

Now that we have methods to obtain linear state-space models for both inherently linear and linearized nonlinear systems, we can begin to explore their properties. In the next lesson, we will learn how to transform a state-space representation into a canonical form. These are standardized matrix structures, like the Controllable Canonical Form we briefly saw last time, that make it easier to analyze system properties and, eventually, to design controllers.