Skip to Main Content Skip to Search
Product Documentation

Identifying Process Models

What Is a Process Model?

The structure of a process model is a simple continuous-time transfer function that describes linear system dynamics in terms of one or more of the following elements:

Process models are popular for describing system dynamics in many industries and apply to various production environments. The advantages of these models are that they are simple, support transport delay estimation, and the model coefficients have an easy interpretation as poles and zeros.

You can create different model structures by varying the number of poles, adding an integrator, or adding or removing a time delay or a zero. You can specify a first-, second-, or third-order model, and the poles can be real or complex (underdamped modes).

For example, the following model structure is a first-order continuous-time process model, where K is the static gain, Tp1 is a time constant, and Td is the input-to-output delay:

To learn more about estimating process models in the GUI, see Tutorial – Identifying Low-Order Transfer Functions (Process Models) Using the GUI in System Identification Toolbox Getting Started Guide.

Data Supported by Process Models

You can estimate low-order (up to third order), continuous-time transfer functions using regularly sampled time- or frequency-domain iddata or idfrd data objects. The frequency-domain data may have a zero sample time.

You must import your data into the MATLAB workspace, as described in Data Import and Processing.

How to Estimate Process Models Using the GUI

Before you can perform this task, you must have

  1. In the System Identification Tool GUI, select Estimate > Process models to open the Process Models dialog box.

  2. If your model contains multiple inputs, select the input channel in the Input list. This list only appears when you have multiple inputs. For more information, see Estimating Multiple-Input, Multi-Output Process Models.

  3. In the Model Transfer Function area, specify the model structure using the following options:

    • Under Poles, select the number of poles, and then select All real or Underdamped.

        Note   You need at least two poles to allow underdamped modes (complex-conjugate pair).

    • Select the Zero check box to include a zero, which is a numerator term other than a constant, or clear the check box to exclude the zero.

    • Select the Delay check box to include a delay, or clear the check box to exclude the delay.

    • Select the Integrator check box to include an integrator (self-regulating process), or clear the check box to exclude the integrator.

    The Parameter area shows as many active parameters as you included in the model structure.

  4. In the Initial Guess area, select Auto-selected to calculate the initial parameter values for the estimation. The Initial Guess column in the Parameter table displays Auto. If you do not have a good guess for the parameter values, Auto works better than entering an ad hoc value.

  5. (Optional) If you approximately know a parameter value, enter this value in the Initial Guess column of the Parameter table. The estimation algorithm uses this value as a starting point. If you know a parameter value exactly, enter this value in the Initial Guess column, and also select the corresponding Known check box in the table to fix its value.

    If you know the range of possible values for a parameter, enter these values into the corresponding Bounds field to help the estimation algorithm.

    For example, the following figure shows that the delay value Td is fixed at 2 s and is not estimated.

  6. In the Disturbance Model list, select one of the available options. For more information about each option, see Disturbance Model Structure for Process Models.

  7. In the Focus list, select how to weigh the relative importance of the fit at different frequencies. For more information about each option, see Assigning Estimation Weightings.

  8. In the Initial state list, specify how you want the algorithm to treat initial states. For more information about the available options, see Specifying Initial Conditions for Iterative Estimation Algorithms.

      Tip   If you get a bad fit, you might try setting a specific method for handling initial states, rather than choosing it automatically.

  9. In the Covariance list, select Estimate if you want the algorithm to compute parameter uncertainties. Effects of such uncertainties are displayed on plots as model confidence regions.

    To omit estimating uncertainty, select None. Skipping uncertainty computation might reduce computation time for complex models and large data sets.

  10. In the Model Name field, edit the name of the model or keep the default. The name of the model should be unique in the Model Board.

  11. To view the estimation progress, select the Display Progress check box. This opens a progress viewer window in which the estimation progress is reported.

  12. Click Estimate to add this model to the Model Board in the System Identification Tool GUI.

  13. To stop the search and save the results after the current iteration has been completed, click Stop Iterations. To continue iterations from the current model, click the Continue button to assign current parameter values as initial guesses for the next search.

Next Steps

How to Estimate Process Models at the Command Line

Prerequisites

Before you can perform this task, you must have

Using procest to Estimate Process Models

You can estimate process models using the iterative estimation method procest that minimizes the prediction errors to obtain maximum likelihood estimates. The resulting models are stored as idproc model objects.

You can use the following general syntax to both configure and estimate process models:

m = procest(data,mod_struc,opt)

data is the estimation data and mod_struc is one of the following:

For more information about validating a process model, see Validating Models After Estimation.

You can use procest to refine parameter estimates of an existing process model, as described in Refining Linear Parametric Models.

For detailed information, see procest and idproc.

Example – Estimating Process Models with Free Parameters at the Command Line

This example demonstrates how to estimate the parameters of a first-order process model:

This process has two inputs and the response from each input is estimated by a first-order process model. All parameters are free to vary.

Use the following commands to estimate a model m from sample data:

% Load sample data
load co2data
% Sampling interval is 0.5 min (known)
Ts = 0.5;
% Split data set into estimation data ze
% and validation data zv
ze = iddata(Output_exp1,Input_exp1,Ts,...
                        'TimeUnit','min');
zv = iddata(Output_exp2,Input_exp2,Ts,...
                        'TimeUnit','min');

Estimate model with one pole, a delay, and a first order disturbance component for this model. The data contains known offsets. Specify them using InputOffset and OutputOffset options.

opt = procestOptions;
opt.InputOffset = [170;50];
opt.OutputOffset = -45;
opt.Display = 'on';
opt.DisturbanceModel = 'arma1';
m=procest(ze,'p1d',opt)

MATLAB computes the following output:

m =
Process model with 2 inputs: y = G11(s)u1 + G12(s)u2      
From input "u1" to output "y1":                           
           Kp                                             
G11(s) = ---------- * exp(-Td*s)                          
           1+Tp1*s                                        
                                                          
      Kp = 2.6542                                         
     Tp1 = 0.15451                                        
      Td = 2.3185                                         
                                                          
From input "u2" to output "y1":                           
           Kp                                             
G12(s) = ---------- * exp(-Td*s)                          
           1+Tp1*s                                        
                                                          
      Kp = 9.9754                                         
     Tp1 = 2.0653                                         
      Td = 4.9195                                         
                                                          
An additive ARMA disturbance model exists for output "y1":
    y = G u + (C/D)e                                      
                                                          
    C(s) = s + 2.677                                      
    D(s) = s + 0.6237                                     
                                                          
Parameterization:
    'P1D'    'P1D'

   Number of free coefficients: 8
   Use "getpvec", "getcov" for parameters and their uncertainties.

Status:                                          
Estimated using PROCEST on time domain data "ze".
Fit to estimation data: 91.07% (prediction focus)
FPE: 2.431, MSE: 2.413 

Use dot notation to get the value of any model parameter. For example, to get the value of dc gain parameter Kp, type:

m.Kp

Example – Estimating Process Models with Fixed Parameters at the Command Line

When you know the values of certain parameters in the model and want to estimate only the values you do not know, you must specify the fixed parameters after creating the idproc model object.

Use the following commands to prepare the data and construct a process model with one pole and a delay:

% Load sample data
load co2data
% Sampling interval is 0.5 min (known)
Ts = 0.5;
% Split data set into estimation data ze
% and validation data zv
ze = iddata(Output_exp1,Input_exp1,Ts,...
                        'TimeUnit','min');
zv = iddata(Output_exp2,Input_exp2,Ts,...
                        'TimeUnit','min');
mod = idproc({'p1d','p1d'},'TimeUnit','min')

The model parameters Kp, Tp1, and Td are assigned NaN values, which means that the parameters have not yet been estimated from the data.

Use the Structure model property to specify the initial guesses for unknown parameters, minimum/maximum parameter bounds and fix known parameters.

Set the value of Kp for the second transfer function to 10 and specify it as a fixed parameter. Initialize the delay values for the two transfer functions to 2 and 5 minutes, respectively. Specify them as free estimation parameters.

mod.Structure(2).Kp.Value = 10;
mod.Structure(2).Kp.Free = false;

mod.Structure(1).Td.Value = 2;
mod.Structure(2).Td.Value = 5;

To estimate Tp1 and Td only, use the following command:

mod_proc = procest(ze, mod, opt)

MATLAB computes the following result:

mod_proc =
Process model with 2 inputs: y = G11(s)u1 + G12(s)u2      
From input "u1" to output "y1":                           
           Kp                                             
G11(s) = ---------- * exp(-Td*s)                          
           1+Tp1*s                                        
                                                          
      Kp = 2.7448                                         
     Tp1 = 0.40544                                        
      Td = 1.9745                                         
                                                          
From input "u2" to output "y1":                           
           Kp                                             
G12(s) = ---------- * exp(-Td*s)                          
           1+Tp1*s                                        
                                                          
      Kp = 10                                             
     Tp1 = 2.0734                                         
      Td = 4.92                                           
                                                          
An additive ARMA disturbance model exists for output "y1":
    y = G u + (C/D)e                                      
                                                          
    C(s) = s + 2.702                                      
    D(s) = s + 0.6309                                     
                                                          
Parameterization:
    'P1D'    'P1D'

   Number of free coefficients: 7
   Use "getpvec", "getcov" for parameters and their uncertainties.

Status:                                          
Estimated using PROCEST on time domain data "ze".
Fit to estimation data: 91.06% (prediction focus)
FPE: 2.435, MSE: 2.419           

In this case, the value of Kp is fixed at 12, but Tp1 and Td are estimated.

Process Model Structure Specification

This topic describes how to specify the model structure in the estimation procedures How to Estimate Process Models Using the GUI and How to Estimate Process Models at the Command Line.

In the System Identification Tool GUI. Specify the model structure by selecting the number of real or complex poles, and whether to include a zero, delay, and integrator. The resulting transfer function is displayed in the Process Models dialog box.

At the command line. Specify the model structure using an acronym that includes the following letters and numbers:

Typically, you specify the model-structure acronym as a string argument in the estimation command procest:

For more information about estimating models, see How to Estimate Process Models at the Command Line.

Estimating Multiple-Input, Multi-Output Process Models

If your model contains multiple inputs, multiple outputs, or both, you can specify whether to estimate the same transfer function for all input-output pairs, or a different transfer function for each. The information in this section supports the estimation procedures How to Estimate Process Models Using the GUI and How to Estimate Process Models at the Command Line.

In the System Identification Tool GUI. To fit a data set with multiple inputs, or multiple outputs, or both, in the Process Models dialog box, configure the process model settings for one input-output pair at a time. Use the input and output selection lists to switch to a different input/output pair.

If you want the same transfer function to apply to all input/output pairs, select the All same check box. To apply a different structure to each channel, leave this check box clear, and create a different transfer function for each input.

At the command line. Specify the model structure as a cell array of acronym strings in the estimation command procest. For example, use this command to specify the first-order transfer function for the first input, and a second-order model with a zero and an integrator for the second input:

m = idproc({'P1','P2ZI'})
m = procest(data,m)

To apply the same structure to all inputs, define a single structure in idproc.

Disturbance Model Structure for Process Models

This section describes how to specify a noise model in the estimation procedures How to Estimate Process Models Using the GUI and How to Estimate Process Models at the Command Line.

In addition to the transfer function G, a linear system can include an additive noise term He, as follows:

where e is white noise.

You can estimate only the dynamic model G, or estimate both the dynamic model and the disturbance model H. For process models, H is a rational transfer function C/D, where the C and D polynomials for a first- or second-order ARMA model.

In the GUI. To specify whether to include or exclude a noise model in the Process Models dialog box, select one of the following options from the Disturbance Model list:

At the command line. Specify the disturbance model using the procestOptions option set. For example, use this command to estimate a first-order transfer function and a first-order noise model:

opt = procestOptions;
opt.DisturbanceModel = 'arma1';
model = procest(data, 'P1D', opt);

For a complete list of values for the DisturbanceModel model property, see the procestOptions reference page.

Assigning Estimation Weightings

You can specify how the estimation algorithm weighs the fit at various frequencies. This information supports the estimation procedures How to Estimate Process Models Using the GUI and How to Estimate Process Models at the Command Line.

In the System Identification Tool GUI. Set Focus to one of the following options:

At the command line. Specify the focus using the procestOptions option set. For example, use this command to optimize the fit for simulation and estimate a disturbance model:

opt = procestOptions('DisturbanceModel','arma2', 'Focus','simulation');
model = procest(data, 'P1D', opt);

Specifying Initial Conditions for Iterative Estimation Algorithms

You can optionally specify how the iterative algorithm treats initial conditions for estimation of model parameters. This information supports the estimation procedures How to Estimate Process Models Using the GUI and How to Estimate Process Models at the Command Line.

In the System Identification Tool GUI. Set Initial condition to one of the following options:

At the command line. Specify the initial conditions using the InitialCondition model estimation option, configured using the procestOptions command. For example, use this command to estimate a first-order transfer function and set the initial states to zero:

opt = procestOptions('InitialCondition','zero');
model = procest(data, 'P1D', opt)
  


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