Linearizing Simscape Models

The Simulink commands linmod and dlinmod create continuous- or discrete-time linear time-invariant (LTI) state-space models from Simulink models. You can use these commands to generate an LTI state-space model from a model containing Simscape components.

There are two basic ways linmod and dlinmod can be used, and the behavior of linearization differs depending on which method is chosen. If linmod(mdl) is called (that is, the arguments for time, state, and input are not provided), then consistent initial conditions are solved for in the same way as on the first step of a simulation. In particular, any initial conditions, such as initial offset from equilibrium for a spring, are set just as if the simulation were starting from the initial time.

However, if linmod(mdl, t, x, u) is called, it does not solve for the start-of-simulation initial conditions. An important difference from Simulink models is that the states in a Physical Network are not generally independent (some states have algebraic dependencies on other states). Thus, it is possible, though erroneous, to provide linmod with an inconsistent state to linearize about. If the state is not consistent (within a suitably chosen tolerance based on the solver tolerance), then Simscape solver issues a warning at the command line when linearization is attempted. Simscape solver will then attempt to make the provided x consistent by changing some of its components, possibly by large amounts. Thus it is important, when providing a state to linmod and dlinmod, to ensure that the state provided is reasonably consistent. This is most easily done by taking the state from some time in a simulation run, for example, by using the States check box on the Data Import/Export pane of the Configuration Parameters dialog box, accessed by selecting Simulation > Configuration Parameters from the top menu bar.

The technique used to obtain linear models involves obtaining an independent subset of the system states as the states for linearization. These independent state variables are a subset of the dynamic variables of the system. Thus the A matrix, of size n_states by n_states, is all zeros except for a submatrix of size n_ind by n_ind, where n_ind is the number of independent states. The B matrix, of size n_states by n_inputs, is all zeros except for a submatrix of size n_ind by n_inputs. The C matrix, of size n_outputs by n_states, is all zeros except for a submatrix of size n_outputs by n_ind. The D matrix, of size n_outputs by n_inputs, may have nonzeros everywhere. To obtain a model where the number of states equals the number of independent states, use the function sminreal, available with Control System Toolbox™ software.

  


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