diff options
author | Suraj Yerramilli | 2016-01-03 09:56:48 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-01-03 09:56:48 +0530 |
commit | f262485f677d70bd6b3e0edff65f5e5966271ae2 (patch) | |
tree | 461d976b9c3eaf52eb51a9677b4fd648caa1d9cf /R/poly.R | |
parent | 38f94134e67fcb66cbf70db3074fa36bcff5f1a4 (diff) | |
download | SysID-R-code-f262485f677d70bd6b3e0edff65f5e5966271ae2.tar.gz SysID-R-code-f262485f677d70bd6b3e0edff65f5e5966271ae2.tar.bz2 SysID-R-code-f262485f677d70bd6b3e0edff65f5e5966271ae2.zip |
Predictions for OE and Infinite step predictions
Diffstat (limited to 'R/poly.R')
-rw-r--r-- | R/poly.R | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -172,9 +172,12 @@ predict.idpoly <- function(x,data,nahead=1){ G <- signal::Arma(b=c(rep(0,x$ioDelay),x$B), a= as.numeric(polynom::polynomial(x$A)* polynom::polynomial(x$F1))) - - Hden <- as.numeric(polynom::polynomial(x$A)*polynom::polynomial(x$D)) - Hinv <- signal::Arma(b=Hden,a=x$C) + if(x$type=="oe" || nahead==Inf){ + ypred <- signal::filter(G,u) + } else{ + Hden <- as.numeric(polynom::polynomial(x$A)*polynom::polynomial(x$D)) + Hinv <- signal::Arma(b=Hden,a=x$C) + } return(ypred) }
\ No newline at end of file |