diff options
author | Suraj Yerramilli | 2016-02-23 08:36:47 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-02-23 08:36:47 +0530 |
commit | 2fad722f972bc590b18b91c76b2c0541dac6318c (patch) | |
tree | 9c6323c2c74c283b711be30835129c1f273c0cf4 | |
parent | 145057a1e4db56dc61608d2cca2c40f6fea836cb (diff) | |
download | SysID-R-code-2fad722f972bc590b18b91c76b2c0541dac6318c.tar.gz SysID-R-code-2fad722f972bc590b18b91c76b2c0541dac6318c.tar.bz2 SysID-R-code-2fad722f972bc590b18b91c76b2c0541dac6318c.zip |
adding options to specift power spectra and variances
-rw-r--r-- | R/idframe.R | 13 | ||||
-rw-r--r-- | man/idfrd.Rd | 11 |
2 files changed, 19 insertions, 5 deletions
diff --git a/R/idframe.R b/R/idframe.R index 60d8093..8ee668e 100644 --- a/R/idframe.R +++ b/R/idframe.R @@ -119,13 +119,18 @@ deltat.idframe <- function(data){ #' S3 class constructor for storing frequency response data #' -#' @param response frequency response data. For SISO systems, supply a +#' @param respData frequency response data. For SISO systems, supply a #' vector of frequency response values. For MIMO systems with Ny #' outputs and Nu inputs, supply an array of size c(Ny,Nu,Nw). #' @param freq frequency points of the response #' @param Ts sampling time of data #' @param spec power spectra and cross spectra of the system #' output disturbances (noise). Supply an array of size (Ny,Ny,Nw) +#' @param covData response data covariance matrices. Supply an array +#' of size (Ny,Nu,Nw,2,2). covData[ky,ku,kw,,] is the covariance matrix +#' of respData[ky,ku,kw] +#' @param noiseCov power spectra variance. Supply an array of +#' size (Ny,Ny,Nw) #' #' @return an idfrd object #' @@ -135,8 +140,10 @@ deltat.idframe <- function(data){ #' frequency response given input/output data #' #' @export -idfrd <- function(response,freq,Ts,specdata){ - out <- list(response=response,freq=freq,Ts=Ts) +idfrd <- function(respData,freq,Ts,spec=NULL,covData=NULL, + noiseCov=NULL){ + out <- list(response=respData,freq=freq,Ts=Ts,spec=spec,covData= + covData,noiseCov = noiseCov) class(out) <- "idfrd" return(out) } diff --git a/man/idfrd.Rd b/man/idfrd.Rd index a6aa45c..1d3f96e 100644 --- a/man/idfrd.Rd +++ b/man/idfrd.Rd @@ -4,10 +4,10 @@ \alias{idfrd} \title{S3 class constructor for storing frequency response data} \usage{ -idfrd(response, freq, Ts, specdata) +idfrd(respData, freq, Ts, spec = NULL, covData = NULL, noiseCov = NULL) } \arguments{ -\item{response}{frequency response data. For SISO systems, supply a +\item{respData}{frequency response data. For SISO systems, supply a vector of frequency response values. For MIMO systems with Ny outputs and Nu inputs, supply an array of size c(Ny,Nu,Nw).} @@ -17,6 +17,13 @@ outputs and Nu inputs, supply an array of size c(Ny,Nu,Nw).} \item{spec}{power spectra and cross spectra of the system output disturbances (noise). Supply an array of size (Ny,Ny,Nw)} + +\item{covData}{response data covariance matrices. Supply an array +of size (Ny,Nu,Nw,2,2). covData[ky,ku,kw,,] is the covariance matrix +of respData[ky,ku,kw]} + +\item{noiseCov}{power spectra variance. Supply an array of +size (Ny,Ny,Nw)} } \value{ an idfrd object |