summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-02-27 14:51:43 +0530
committerSuraj Yerramilli2016-02-27 14:51:43 +0530
commitece6a9f47a7d73061806f2d7e0788be86aa73688 (patch)
treedaf6bbfbe386a1471c88ed061be81a9a647d380f /man
parentae603683420f2782407b798a66de700717aad1af (diff)
downloadSysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.tar.gz
SysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.tar.bz2
SysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.zip
updating sim documentation
Diffstat (limited to 'man')
-rw-r--r--man/sim.Rd21
1 files changed, 12 insertions, 9 deletions
diff --git a/man/sim.Rd b/man/sim.Rd
index 8bf35a5..a4dfe97 100644
--- a/man/sim.Rd
+++ b/man/sim.Rd
@@ -2,27 +2,30 @@
% Please edit documentation in R/sim.R
\name{sim}
\alias{sim}
-\title{Simulate dynamic system}
+\title{Simulate response of dynamic system}
\usage{
-sim(model, input, innov = NULL, sigma = 0, seed = NULL)
+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{innov}{an optional times series of innovations. If not provided,
-innovations are generated using the \code{rnorm} function}
+\item{addNoise}{logical variable indicating whether to add noise to the
+response model. (Default: \code{FALSE})}
-\item{sigma}{standard deviation of the innovations (Default= \code{0})}
+\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}
+\item{seed}{integer indicating the seed value of the random number generator.
+Useful for reproducibility purposes.}
}
\value{
-a vector containing the output
+a vector containing the simulated output
}
\description{
-Simulate the response of a system given the input
+Simulate the response of a system to a given input
}
\details{
The routine is currently built only for SISO systems. Future versions will
@@ -32,7 +35,7 @@ include support for MIMO systems.
# ARX Model
u <- rnorm(200,sd=1)
model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1)
-y <- sim(model,u,sigma=0.1)
+y <- sim(model,u,addNoise=T)
}