Simulate identified linear model in Simulink software
The Idmodel block simulates a linear model in the MATLAB® workspace.
Input signal to the model.
Simulated output from the model.
Name of an estimated linear model in the MATLAB workspace. The model must be an idss, idgrey, idpoly, idtf, or idproc object.
The block supports continuous-time or discrete-time models with or without input-output delays.
Initial states for state-space (idss) and grey-box (idgrey) models. Initial states must be a vector of length equal to the order of the model.
For models other than idss and idgrey, initial conditions are zero.
In some situations, you may want to reproduce the results in the Model Output plot window in the System Identification Tool or those of the compare plot. To do so:
Convert the identified model into state-space form (idss model), and use the state-space model in the block.
Compute the initial state values that produce the best fit between the model output and the measured output signal using findstates(idParametric).
Specify the same input signal for simulation that you used as the validation data in the Tool or in the compare plot.
% Convert to state-space model mss = idss(m); % Estimate initial states from data X0 = findstates(mss,z);
z is the data set you used for validating the model m. Use the model mss and initial states X0 in the Idmodel block to perform the simulation.
Select to add noise. When selected, Simulink® derives the noise amplitude from the model property model.NoiseVariance and the matrices or polynomials that determine the color of the additive noise.
For continuous-time models, the ideal variance of the noise term is infinite. In reality, you see a band-limited noise that takes into account the time constants of the system. You can interpret the resulting simulated output as filtered using a lowpass filter with a passband that does not distort the dynamics from the input.
Seed, specified as an integer, that forces the simulation to add the same noise to the output every time you simulate the model. Applies only when you select the Add noise check box. For more information about using seeds, see rand in the MATLAB documentation.
For multi-output models, you can use independent noise realizations that generate the outputs with additive noise. Enter a vector of Ny entries, where Ny is the number of output channels.
For random restarts that vary from one simulation to another, leave the field empty.