Skip to Main Content Skip to Search
Product Documentation

Linearizing at an Operating Point

What Is Linearization?

Determining the response of a system to small perturbations at an operating point is a critical step in system and controller design. Once you find an operating point, you can linearize the model about that operating point to explore the response and stability of the system. To find an operating point in a Simscape model, see Finding an Operating Point.

What Is a Linearized Model?

Near an operating point, you can express the system state x, inputs u, and outputs y relative to that operating point in terms of xx0, uu0, and yy0. For convenience, shift the vectors by subtracting the operating point: xx0x, and so on.

If the system dynamics do not explicitly depend on time and the operating point is a steady state, the system response to state and input perturbations near the steady state is approximately governed by a linear time-invariant (LTI) state space model:

dx/dt = A·x + B·u

y = C·x + D·u.

The matrices A, B, C, D have components and structures that are independent of the simulation time. A system is stable to changes in state at an operating point if the eigenvalues of A are negative.

If the operating point is not a steady state or the system dynamics depends explicitly on time, the linearized dynamics near the operating point is more complicated. The matrices A, B, C, D are not constant and depend on the simulation time t0 , as well as the operating point x0 and u0 [3].

Example

A pilot is flying, or simulating, an aircraft in level, constant-velocity, and constant-altitude flight relative to the ground, in a known environment. A crucial question for the aircraft pilot and designers is: will the aircraft return to the steady state if perturbed from it by a disturbance, such as a wind gust — in other words, is this steady state stable? If the operating point is unstable, the aircraft trajectory can diverge from the steady state, requiring human or automatic intervention to maintain steady flight.

Choosing a Good Operating Point for Linearization

Although steady-state and other operating points (state x0 and inputs u0) might exist for your model, that is no guarantee that such operating points are suitable for linearization. The critical question is: how good is the linearized approximation compared to the exact system dynamics?

Operating points with a strongly nonlinear or discontinuous character are not suitable for linearization. You should analyze such models in full simulation, away from any discontinuities, and perturb the system by varying its inputs, parameters, and initial conditions.

Linearizable and Nonlinearizable Operating Points in a Hydraulic Two-Way Valve System

The ssc_hydraulic_system_2_way_valve model simulates a hydraulic system made up of a valve and piston, with a controller based on the linear position of the piston. To examine the valve characteristics, open the Cylinder DA Custom block. Run the model with the Position scope open.

The piston has two natural operating points, at zero position and at the stop. Without feedback control, both operating points are steady states. Create an open-loop system by deleting the feedback signal line from Ideal Translational Motion Sensor to PS Subtract. Then run the model again to see these steady states.

Open the modified version of the model, ssc_hydraulic_system_2_way_valve_trimlin. This version is set up for stability analysis with the hydraulic plant confined to its own subsystem and model-level input and output ports.

To see the simulation results, run the model first. Check the suitability of these operating points for linearization by linearizing to obtain the A, B, C, D matrices.

  1. Linearize at zero piston position. To do this automatically, double-click the Linearize block. The result is plotted as a Bode diagram.

    Then linearize at a few other positions close to zero (slightly more than 0 m).

  2. Linearize at the piston stop, then a few other positions just short of the stop (a little less than 0.3 m).

Once you have a series of A matrices near zero and near the stop, you can define scalar-invariant metrics from A for comparison purposes. One such metric is the trace of A, the sum of its eigenvalues.

Some Linearization Methods

Once you know an operating point, you have three practical methods for investigating the system response to small disturbances.

Full Simulation- or Operation-Based Perturbations

You can experiment with the system or a system simulation by making repeated, different, and slight changes to the system parameters, inputs, and initial conditions, while operating at a steady state. This method requires costly trial and error and generates uncontrolled and imprecise approximations.

Analytic Approximations to Known State Dynamics

If you know the system state dynamics and an operating point x0 and u0 in analytic form, you can apply standard approximation techniques to derive an analytic form for the A, B, C, D matrices.

Numerical Approximations to Known State Dynamics

If you have a controlled numerical approximation to your system state dynamics and operating point, you can apply standard computational techniques to generate numerical approximations to the A, B, C, D matrices.

Simulink and Simscape features provide methods for generating numerical linearized models.

Linearizing a Model with Simscape, Simulink, and Related Products

Use the following methods to create numerical linearized state-space models from a model containing Simscape components.

Independent Versus Dependent States

An important difference from normal Simulink models is that the states in a physical network are not independent in general, because some states have dependencies on other states through constraints.

For more information on Simscape dynamic and algebraic variables, see How Simscape Simulation Works.

The complete, unreduced LTI A, B, C, D matrices have the following structure.

Obtaining the Independent Subset of States.  A minimal linearized solution uses only an independent subset of system states. From the matrices A, B, C, D, you can obtain a minimal input-output linearized model with:

Linearizing with Simulink Control Design Software

This approach requires that you start with an operating point object saved from trimming the model to an operating specification, as explained in Using Simulink Control Design Techniques to Find Operating Points.

To linearize a model with an operating point object, use the linearize function, customizing where necessary. The resulting state-space object contains the matrices A, B, C, D.

Additional Simulink Control Design Methods.  You can also use the graphical user interface, through the model menu bar: Tools > Control Design > Linear Analysis. For more details on linearization, operating points and state-space objects, related functions, and the graphical interface, see the Simulink Control Design documentation.

Linearizing with the Simulink linmod and dlinmod Functions

You have several ways that you can use the Simulink functions linmod and dlinmod, and the linearization results can differ depending on the method chosen. To use these functions, you do not have to open the model, just have the model file on your MATLAB path.

For more information about Simulink linearization, see Linearizing Models in the Simulink documentation.

Linearizing with Default State and Input.  You can call linmod without specifying state or input. Enter linmod('modelname') at the command line.

With this form of linmod, Simulink linearization solves for consistent initial conditions in the same way it does on the first step of any simulation. Any initial conditions, such as initial offset from equilibrium for a spring, are set as if the simulation were starting from the initial time.

linmod allows you to change the time of externally specified signals (but not the internal system dynamics) from the default. For this and more details, see the function reference page.

Linearizing with the Steady-State Solver at an Initial Steady State.  You can linearize at an operating point found by the Simscape steady-state solver:

  1. Open one or more Solver Configuration blocks in your model.

  2. Select the Start simulation from steady state check box for the physical networks that you want to linearize.

  3. Close the Solver Configuration dialog boxes and save the modified model.

  4. Enter linmod('modelname') at the command line.

linmod linearizes at the first step of simulation. In this case, the initial state is also an operating point, a steady state.

For more about setting up the steady-state solver, see the Solver Configuration block reference page. For more details on its use, see Using the Simscape Steady-State Solver.

Linearizing with Specified State and Input — Ensuring Consistency of States.  You can call linmod and specify state and input. Enter linmod('modelname',x0,u0) at the command line. The extra arguments specify, respectively, the steady state x0 and inputs u0 for linearizing the simulation. When you specify a state to linmod, ensure that it is self-consistent, within solver tolerance.

With this form of linmod, Simulink linearization does not solve for initial conditions. Because not all states in the model have to be independent, it is possible, though erroneous, to provide linmod with an inconsistent state to linearize about.

If you specify a state that is not self-consistent (within solver tolerance), the Simscape solver issues a warning at the command line when you attempt linearization. The Simscape solver then attempts to make the specified x0 consistent by changing some of its components, possibly by large amounts.

Linearizing with Simulink Linearization Blocks

You can generate linearized state-space models from your Simscape model by adding a Timed-Based Linearization or Trigger-Based Linearization block to the model and simulating. These blocks combine time-based simulation, up to specified times or internal trigger points, with state-based linearization at those times or trigger points.

For complete details about these blocks, see their respective block reference pages.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS