summaryrefslogtreecommitdiff
path: root/man/sim.Rd
blob: 9aa1d118344bdf096eb757c73b72eec8ea2a7108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim.R
\name{sim}
\alias{sim}
\title{Simulate response of dynamic system}
\usage{
sim(model, input, addNoise = F, innov = NULL, seed = NULL)
}
\arguments{
\item{model}{the linear system to simulate}

\item{input}{a vector/matrix containing the input}

\item{addNoise}{logical variable indicating whether to add noise to the 
response model. (Default: \code{FALSE})}

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

\item{seed}{integer indicating the seed value of the random number generator.
Useful for reproducibility purposes.}
}
\value{
a vector containing the simulated output
}
\description{
Simulate the response of a system to a given input
}
\details{
The routine is currently built only for SISO systems. Future versions will
include support for MIMO systems.
}
\examples{
# 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=T)

}