diff options
author | Suraj Yerramilli | 2016-02-29 12:56:42 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-02-29 12:56:42 +0530 |
commit | 95b5ab86ba4c7972e6e3a885412853d0bf7b58f6 (patch) | |
tree | 0a1ecfd9e57579e2738020e36f8db4768848c63a | |
parent | b249b416d5960377aa5387bb9d060dc4489d016e (diff) | |
download | SysID-R-code-95b5ab86ba4c7972e6e3a885412853d0bf7b58f6.tar.gz SysID-R-code-95b5ab86ba4c7972e6e3a885412853d0bf7b58f6.tar.bz2 SysID-R-code-95b5ab86ba4c7972e6e3a885412853d0bf7b58f6.zip |
adding FIR type to idpoly models
-rw-r--r-- | R/poly.R | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -45,7 +45,7 @@ idpoly <- function(A=1,B=1,C=1,D=1,F1=1,ioDelay=0,Ts=1, typecheck <- function(x){ y <- lapply(x[1:5],checkUnity) if(y$A){ - out <- if(y$C && y$D) "oe" else "bj" + out <- if(y$C && y$D) if(y$F1) "fir" else "oe" else "bj" } else{ if(y$D && y$F1){ out <- if(y$C) "arx" else "armax" @@ -64,6 +64,8 @@ print.idpoly <- function(mod,se=NULL,dig=3){ if(mod$type=="arx"){ cat("Discrete-time ARX model: A(z)y[k] = B(z)u[k] + e[k] \n\n") + } else if(mod$type=="fir"){ + cat("Discrete-time FIR model: y[k] = B(z)u[k] + e[k] \n\n") } else if(mod$type=="armax"){ cat("Discrete-time ARMAX model: A(z)y[k] = B(z)u[k] + C(z)e[k] \n\n") } else if(mod$type=="oe"){ |