| Contents | Index |
err = pe(sys,data,K)
err = pe(sys,data,K,___,opt)
[err,x0e,sys_pred]
= pe(sys,data,K,___,opt)
pe(sys,data,K,___)
err = pe(sys,data,K) returns the K-step prediction error for the output of the identified model sys. The prediction error is determined by subtracting the K-step ahead predicted response from the measured output. The prediction error is calculated for the time span covered by data. For more information of computation of predicted response, see predict.
err = pe(sys,data,K,___,opt) returns the prediction error using the option set opt to specify prediction error calculation behavior.
[err,x0e,sys_pred] = pe(sys,data,K,___,opt) also returns the estimated initial state, x0e, and a predictor system, sys_pred.
pe(sys,data,K,___) plots the prediction error.
sys |
Identified model. |
data |
Measured input-output history. If sys is a time-series model, which has no input signals, then specify data as an iddata object with no inputs. In this case, you may also specify data as a matrix of the past time-series values. |
K |
Prediction horizon. Specify K as a positive integer that is a multiple of the data sample-time. Use K = Inf to compute the pure simulation error. Default: 1 |
opt |
Prediction options. opt is an option set that configures the computation of the predicted response. Options that you can specify include:
Use peOptions to create the options set. |
Compute the prediction error for an ARIX model.
Use the error data to compute the variance of the noise source e(t).
Obtain noisy data.
noise = [(1:150)';(151:-1:2)']; load iddata1 z1; z1.y = z1.y+noise;
noise is a triangular wave that is added to the output signal of z1, an iddata object.
Estimate an ARIX model for the noisy data.
sys = arx(z1,[2 2 1],'IntegrateNoise',true);Compute the prediction error of the estimated model.
K = 1; err = pe(z1,sys,K);
pe computes the 1-step prediction error for the output of the identified model, sys.
Compute the variance of the noise source, e(t).
noise_var = err.y'*err.y/(299-nparams(sys)-order(sys));
Compare the computed value with model's noise variance.
sys.NoiseVariance
The output of sys.NoiseVariance matches the computed variance.
ar | arx | compare | iddata | idpar | lsim | n4sid | peOptions | predict | resid | sim

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |