Estimate Output-Error polynomial model using time or frequency domain data
sys = oe(data,[nb
sys = oe(data,[nb nf nk],Name,Value)
sys = oe(data,init_sys)
sys = oe(data,___,opt)
y(t) is the output, u(t) is the input, and e(t) is the error.
sys is estimated for the time- or frequency-domain, measured input-output data, data. The orders, [nb nf nk], parameterize the estimated polynomial.
For time domain estimation, data is an iddata object containing the input and output signal values.
For frequency domain estimation, data can be one of the following:
For multi-experiment data, the sample times and inter-sample behavior of all the experiments must match.
[nb nf nk]
Output error model orders.
For a system represented by:
where y(t) is the output, u(t) is the input and e(t) is the error.
For estimation using continuous-time data, only specify [nb nf] and omit nk.
Polynomial model that configures the initial parameterization of sys.
Specify init_sys as an idpoly model having the Output-Error structure.
Use the Structure property of init_sys to configure initial guesses and constraints for B(q) and F(q).
To specify an initial guess for, say, the F(q) term of init_sys, set init_sys.Structure.f.Value as the initial guess.
To specify constraints for, say, the B(q) term of init_sys:
If opt is not specified, and init_sys was created by estimation, then the estimation options from init_sys.Report.OptionsUsed are used.
opt is an options set, created using oeOptions, that specifies estimation options including:
Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Input delay for each input channel, specified as a scalar value or numeric vector. For continuous-time systems, specify input delays in the time unit stored in the TimeUnit property. For discrete-time systems, specify input delays in integer multiples of the sampling period Ts. For example, InputDelay = 3 means a delay of three sampling periods.
For a system with Nu inputs, set InputDelay to an Nu-by-1 vector. Each entry of this vector is a numerical value that represents the input delay for the corresponding input channel.
You can also set InputDelay to a scalar value to apply the same delay to all channels.
Transport delays. ioDelay is a numeric array specifying a separate transport delay for each input/output pair.
For continuous-time systems, specify transport delays in the time unit stored in the TimeUnit property. For discrete-time systems, specify transport delays as integers denoting delay of a multiple of the sampling period Ts. You can specify ioDelay as an alternative to the nk value. Doing so simplifies the model structure by reducing the number of leading zeros the B polynomial. In particular, you can represent max(nk-1,0) leading zeros as input/output delays using ioDelay instead.
For a MIMO system with Ny outputs and Nu inputs, set ioDelay to a Ny-by-Nu array. Each entry of this array is a numerical value that represents the transport delay for the corresponding input/output pair. You can also set ioDelay to a scalar value to apply the same delay to all input/output pairs.
Default: 0 for all input/output pairs
Identified Output-Error polynomial model.
sys is an idpoly model which encapsulates the identified Output Error model and the associated parameter covariance data.
Obtain the estimation data.
filename = fullfile(matlabroot,'examples','ident','oe_data1.mat'); load(filename);
data, an idfrd object, contains the continuous-time frequency response for the following model:
Estimate the model.
nb = 2; nk = 3; sys = oe(data,[nb nk]);
Evaluate the goodness of the fit.
Estimate a high-order OE model from data collected by simulating a high-order system. Determine the regularization constants by trial and error and use the values for model estimation.
load regularizationExampleData.mat m0simdata
Estimate an unregularized OE model of order 30.
m1 = oe(m0simdata, [30 30 1]);
Obtain a regularized OE model by determining Lambda value using trial and error.
opt = oeOptions; opt.Regularization.Lambda = 1; m2 = oe(m0simdata,[30 30 1],opt);
Compare the model outputs with the estimation data.
opt = compareOptions('InitialCondition','z'); compare(m0simdata, m1, m2, opt);
The regularized model m2 produces a better fit than the unregularized model m1.
Compare the variance in the model responses.
h = bodeplot(m1,m2); opt = getoptions(h); opt.PhaseMatching = 'on'; opt.ConfidenceRegionNumberSD = 3; opt.PhaseMatching = 'on'; setoptions(h,opt); showConfidence(h);
The variance of the regularized model m2 is reduced compared to the unregularized model m1.
Obtain the estimation data.
filename = fullfile(matlabroot,'examples','ident','oe_data2.mat'); load(filename,'data','Ts');
data, an iddata object, contains the discrete-time frequency response for the following model:
The sampling time for data, Ts, is 0.001 seconds.
Treat data as continuous-time data. When you plot data, the input/output signals are band-limited, which allows you to treat data as continuous-time data. You can now obtain a continuous-time model.
data.Ts = 0;
Specify the estimation options.
opt = oeOptions('Focus',[0 0.5*pi/Ts]);
Limiting the 'Focus' option to the [0 0.5*pi/Ts] range directs the software to ignore the response values for frequencies higher than 0.5*pi/Ts rad/s.
Estimate the model.
nb = 1; nf = 3; sys = oe(data,[nb nf],opt);
Output-Error models are a special configuration of polynomial models, having only two active polynomials - B and F. For such models, it may be more convenient to use a transfer function (idtf) model and its estimation command, tfest.
Also, tfest is the recommended command for estimating continuous-time models.
The general Output-Error model structure is:
The orders of the Output-Error model are:
If data is continuous-time frequency-domain data, oe estimates a continuous-time model with transfer function:
The orders of the numerator and denominator are nb and nf, similar to the discrete-time case. However, the delay nk has no meaning and you should omit it when specifying model orders for estimation. Use model = oe(data, [nb nf]). Use the ioDelay model property to specify any input-output delays. For example, use model = oe(data, [nb nf], 'ioDelay', iod) instead.
To estimate a continuous-time model when data represents continuous-time frequency response data, omit nk.
For example, use sys = oe(data,[nb nf]).
The estimation algorithm minimizes prediction errors.