summaryrefslogtreecommitdiff
path: root/R/nonparam.R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-06-06 22:45:42 +0530
committerSuraj Yerramilli2015-06-06 22:45:42 +0530
commit50a2a3b9e1316d6f68ae39eced629e352d5546cf (patch)
treee953d06476357ae21612319308e9c4b345fffe54 /R/nonparam.R
parentc451f8846250295fcb7611d1042d7880f8db7ac5 (diff)
downloadSysID-R-code-50a2a3b9e1316d6f68ae39eced629e352d5546cf.tar.gz
SysID-R-code-50a2a3b9e1316d6f68ae39eced629e352d5546cf.tar.bz2
SysID-R-code-50a2a3b9e1316d6f68ae39eced629e352d5546cf.zip
Documenting spa
Diffstat (limited to 'R/nonparam.R')
-rw-r--r--R/nonparam.R21
1 files changed, 20 insertions, 1 deletions
diff --git a/R/nonparam.R b/R/nonparam.R
index 73c76f7..e4d0b07 100644
--- a/R/nonparam.R
+++ b/R/nonparam.R
@@ -114,7 +114,26 @@ step <- function(model){
#' @param npad an integer representing the total length of each time series
#' to analyze after padding with zeros. This argument allows the user to
#' control the spectral resolution of the SDF estimates: the normalized
-#' frequency interval is deltaf=1/npad. (Default:)
+#' frequency interval is deltaf=1/npad. (Default: 255)
+#'
+#' @details
+#' The function calls the \code{SDF} function in the \code{sapa} package to
+#' compute the cross-spectral densities. The method used is \strong{Welch's
+#' Overlapped Segment Averaging} with a normalized \strong{Hanning} window.
+#' The overlap used is 50%.
+#'
+#' @return
+#' an \code{idfrd} object containing the estimated frequency response
+#'
+#' @references
+#' Arun K. Tangirala (2015), \emph{Principles of System Identification:
+#' Theory and Practice}, CRC Press, Boca Raton. Sections 16.5 and 20.4
+#'
+#' @seealso \code{\link[sapa]{SDF}}
+#'
+#' @examples
+#' data(frf)
+#' frf <- spa(data)
#'
#' @export
spa <- function(data,npad=255){