sim: Simulate response of dynamic system

Description Usage Arguments Details Value Examples

Description

Simulate the response of a system to a given input

Usage

1
sim(model, input, addNoise = F, innov = NULL, seed = NULL)

Arguments

model

the linear system to simulate

input

a vector/matrix containing the input

addNoise

logical variable indicating whether to add noise to the response model. (Default: FALSE)

innov

an optional times series of innovations. If not supplied (specified as NULL), gaussian white noise is generated, with the variance specified in the model (Property: noiseVar)

seed

integer indicating the seed value of the random number generator. Useful for reproducibility purposes.

Details

The routine is currently built only for SISO systems. Future versions will include support for MIMO systems.

Value

a vector containing the simulated output

Examples

1
2
3
4
5
# ARX Model
u <- idinput(300,"rgs")
model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1,
noiseVar=0.1)
y <- sim(model,u,addNoise=TRUE)

sysid documentation built on May 2, 2019, 4:18 a.m.

Related to sim in sysid...