Skip to Main Content Skip to Search
Product Documentation

oe - Estimate Output-Error polynomial model using time or frequency domain data

Syntax

sys = oe(data,[nb nf nk])
sys = oe(data,[nb nf nk],Name,Value)
sys = oe(data,init_sys)
sys = oe(data,___,opt)

Description

sys = oe(data,[nb nf nk]) estimates an Output Error model, sys, represented by:

Here, 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.

sys = oe(data,[nb nf nk],Name,Value) specifies model structure attributes using additional options specified by one or more Name,Value pair arguments.

sys = oe(data,init_sys) uses the Output-Error structure polynomial model (idpoly) init_sys to configure the initial parameterization of sys.

sys = oe(data,___,opt) estimates a polynomial model using the option set, opt, to specify estimation behavior.

Tips

Input Arguments

data

Estimation data.

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:

  • recorded frequency response data (frd or idfrd)

  • iddata object with its properties specified as follows:

    • InputData — Fourier transform of the input signal

    • OutputData — Fourier transform of the output signal

    • Domain — ‘Frequency'

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.

  • nb — Order of the B polynomial + 1. nb is an Ny-by-Nu matrix, where Ny is the number of outputs and Nu is the number of inputs.

  • nf — Order of the F polynomial. nf is an Ny-by-Nu matrix, where Ny is the number of outputs and Nu is the number of inputs.

  • nk — Input delay, expressed as the number of samples. nk is an Ny-by-Nu matrix, where Ny is the number of outputs and Nu is the number of inputs. The delay appears as leading zeros of the B polynomial.

For estimation using continuous-time data, only specify [nb nf]. That is, omit nk.

init_sys

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:

  • set init_sys.Structure.b.Minimum to the minimum B(q) coefficient values

  • set init_sys.Structure.b.Maximum to the maximum B(q) coefficient values

  • set init_sys.Structure.b.Free to indicate which B(q) coefficients are free for estimation

If opt is not specified, and init_sys was created by estimation, then the estimation options from init_sys.Report.OptionsUsed are used.

opt

Estimation options.

opt is an options set that specifies estimation options. These options include the following:

  • estimation objective

  • handling of initial conditions

  • numerical search method and the associated options

Use oeOptions to create the options set.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where 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.

'InputDelay'

Input delays. InputDelay is a numeric vector specifying a time delay for each input channel. 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, where each entry is a numerical value representing 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.

Default: 0 for all input channels

'ioDelay'

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, where each entry is a numerical value representing 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

Output Arguments

sys

Identified Output Error polynomial model.

sys is an idpoly model which encapsulates the identified Output Error model and the associated parameter covariance data.

Definitions

Output-Error (OE) Model

The general Output-Error model structure is:

The orders of the Output-Error model are:

Continuous-Time Output-Error Model

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. That is, use model = oe(data, [nb nf]) when you are using continuous-time frequency domain data. Use the ioDelay model property to specify any input-output delays. For example, use model = oe(data, [nb nf], 'ioDelay', iod) instead.

Examples

Estimating Output-Error (OE) model of the type :

% Use fast sampled data (Ts = 0.001)
% from a plant with bandwidth of about 500 rad/s.
z = iddata(y,u,0.001);
zf = fft(z);
zf.ts = 0;
opt = oeOptions('Focus',[0 500]);
m = oe(zf,[1 3],opt);
 

Fit continuous-time transfer function to frequency response.

Generate data.

sys1 = tf([1 3],[1 2 1 1]); % TF requires Control System Toolbox
data = idfrd(sys1,logspace(-2,2,256)); % continuous-time FR data

Estimate an OE model to fit the data.

sys = oe(data, [2 3]); % use syntax OE(DATA, [nb, nf])
bode(data,sys) % compare data to model

Algorithms

The estimation algorithm minimizes prediction errors.

Alternatives

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.

See Also

armax | arx | bj | compare | iddata | idfrd | idpoly | iv4 | n4sid | oeOptions | polyest | sim | tfest

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS