1
votes

Given a simple Simulink model Model with a single input, a single output and a transfer function in between, I can use linmod('Model') to get the linear state space model. However, when I put the same model into a subsystem called Subsystem under Model and I issue linmod('Model/Subsystem') I get the following error:

Error using dlinmod (line 147)
Subsystem block does not have a parameter named 'SimulationStatus'
Error in linmod (line 59)
[varargout{1:max(1,nargout)}] = dlinmod(model, Ts, varargin{:}, Args);

I am using Matlab/Simulink R2014a. How can this be fixed?

1

1 Answers

1
votes

linmod only works for Simulink models, not subsystems. The input and output points for the linearization are those corresponding to Inports and Outports blocks at the top-level of the model.

If you have Simulink Control Design, you should use linearize, which is much more flexible and powerful (or the equivalent linear analysis tool).