Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

simsd - Simulate models with uncertainty using Monte Carlo method

Syntax

simsd(m,u)
simsd(m,u,N,'noise',Ky)
[y,ysd] = simsd(m,u)

Description

u is an iddata object containing the inputs. m is a model given as any idmodel object. N random models are created according to the covariance information given in m. The responses of each of these models to the input u are computed and graphed in the same diagram. If the argument 'noise' is included, noise is added to the simulation in accordance with the noise model of m and its own uncertainty. Ky denotes the output numbers to be plotted. (The default is all).

The default value is N=10.

With output arguments

[y,ysd] = simsd(m,u)

No plots are produced, but y is returned as a cell array with the simulated outputs, and ysd is the estimated standard deviation of y, based on the N different simulations. If u is an iddata object, so are the contents of the cells of y and ysd; otherwise, they are returned as vectors/matrices. In the iddata case,

plot(y{:})

thus plots all the responses.

sim and simsd have similar syntaxes. Note that simsd computes the standard deviation by Monte Carlo simulation, while sim uses differential approximations (the Gauss approximation formula). They might give different results.

Examples

Plot the step response of the model m and evaluate how it varies in view of the model's uncertainty.

step1 = [zeros(5,1); ones(20,1)];
simsd(m,step1)

See Also

compare 
idmdlsim 
pe 
predict 
sim 

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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