| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimElectronics |
| Contents | Index |
| Learn more about SimElectronics |
| On this page… |
|---|
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.
For more information about linearizing models that contain blocks from the Simulink Physical Modeling family, see Linearizing Simscape Models.
After you linearize your model, you can perform small-signal analyses such as:
Bode
Step
Impulse
Nyquist
Note If you have Simulink® Control Design™ software installed, you can use its Control and Estimation Tools Manager GUI to linearize models. For more information about using this software for linearization, see Linearizing the Model. |
After you create an LTI state-space model from your SimElectronics model, you can create a Bode plot for small-signal analysis using one of the following approaches:
You can write a MATLAB script to generate a bode plot of the frequency response of the model from the LTI state-space model. The demo Small-Signal Frequency-Domain Analysis uses a linear passive bandpass filter example to show how to useMATLAB to create a Bode plot from an LTI model. The demo shows how to use both the state-space and transfer-function forms of the LTI model.
You can use the built-in analysis and plotting capabilities of Control System Toolbox™ to understand the behavior of a linearized model.
The toolbox function ss converts the state-space model returned by linmod to a continuous-time state-space model.
The toolbox function tf converts the transfer function model returned by linmod to a continuous-time transfer function model.
The toolbox function ltiview opens the LTI viewer for LTI system response analysis.
The following example shows how to create a Bode plot of the frequency-response of the model in the demo Small-Signal Frequency-Domain Analysis.
At the MATLAB prompt:
Type the following to create a LTI state-space model of elec_ss_analysis:
[A B C D] = linmod('elec_ss_analysis',[],[],[1e-5 0 1]);
Type the following to create a LTI transfer function model of elec_ss_analysis:
[num den] = linmod('elec_ss_analysis',[],[],[1e-5 0 1]);
Type the following to plot both the state-space and transfer function models on a Bode plot:
ltiview('bode',ss(A,B,C,D),'b',tf(num,den),'r-.');The toolbox creates the following plot:

The bandpass filter frequency response for the state-space and transfer function representations are different far from the center frequency. These differences arise from numerical noise introduced when calculating the transfer function representation. linmod implicitly derives a state-space representation for a linearized model, and computes the transfer function representation from this state-space model.
Note If you have Simulink Control Design software installed, you can use its Control and Estimation Tools Manager GUI to analyze models. This software uses the Control System Toolbox LTI viewer to display and analyze the dynamic behavior of a model. |
![]() | Running a Time-Domain Simulation |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |