diff options
author | Suraj Yerramilli | 2016-02-27 14:51:43 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-02-27 14:51:43 +0530 |
commit | ece6a9f47a7d73061806f2d7e0788be86aa73688 (patch) | |
tree | daf6bbfbe386a1471c88ed061be81a9a647d380f /R | |
parent | ae603683420f2782407b798a66de700717aad1af (diff) | |
download | SysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.tar.gz SysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.tar.bz2 SysID-R-code-ece6a9f47a7d73061806f2d7e0788be86aa73688.zip |
updating sim documentation
Diffstat (limited to 'R')
-rw-r--r-- | R/sim.R | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1,16 +1,19 @@ -#' Simulate dynamic system +#' Simulate response of dynamic system #' -#' Simulate the response of a system given the input +#' Simulate the response of a system to a given input #' #' @param model the linear system to simulate #' @param input a vector/matrix containing the input -#' @param innov an optional times series of innovations. If not provided, -#' innovations are generated using the \code{rnorm} function -#' @param sigma standard deviation of the innovations (Default= \code{0}) -#' @param seed integer indicating the seed value of the random number generator +#' @param addNoise logical variable indicating whether to add noise to the +#' response model. (Default: \code{FALSE}) +#' @param 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}) +#' @param seed integer indicating the seed value of the random number generator. +#' Useful for reproducibility purposes. #' #' @return -#' a vector containing the output +#' a vector containing the simulated output #' #' @details #' The routine is currently built only for SISO systems. Future versions will @@ -20,7 +23,7 @@ #' # 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) #' #' @export sim <- function(model,input,addNoise = F,innov=NULL,seed=NULL) UseMethod("sim") |