| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → System Identification Toolbox |
| Contents | Index |
| Learn more about System Identification Toolbox |
The structure of a continuous-time process model is a simple transfer function that describes linear system dynamics in terms of one or more of the following elements:
Static gain Kp.
One or more time constants Tpk.
For complex poles, the time constant is called
—equal to the inverse
of the natural frequency—and the damping coefficient is
(zeta).
Process zero Tz.
Possible time delay Td before the system output responds to the input (dead time).
Possible enforced integration.
Process models are popular for describing system dynamics in many industries and apply to various production environments. The primary advantages of these models are that they provide delay estimation, and the model coefficients have a physical interpretation.
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 continuous-time process models in the GUI, see Tutorial – Identifying Low-Order Transfer Functions (Process Models) Using the GUI in System Identification Toolbox Getting Started Guide.
You can estimate low-order (up to third order), continuous-time transfer functions from data with the following characteristics:
Regularly sampled time- or frequency-domain iddata or idfrd data object
Real data, or complex data in the time domain only
Single-output data
You must import your data into the MATLAB workspace, as described in Data Import and Processing.
Before you can perform this task, you must have
Imported data into the System Identification Tool GUI. See Importing Time-Domain Data into the GUI. For supported data formats, see Data Supported by a Process Model.
Performed any required data preprocessing operations. If you need to model nonzero offsets, such as when model contains integration behavior, do not detrend your data. In other cases, to improve the accuracy of your model, you should detrend your data. See Ways to Process Data for System Identification.
In the System Identification Tool GUI, select Estimate > Process models to open the Process Models dialog box.

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 Options for Multiple-Input Models.
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.
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.
Note By default, the model Name is set to the acronym that reflects the model structure, as described in Options for Specifying the Process-Model Structure. |
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.

(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.

In the Disturbance Model list, select one of the available options. For more information about each option, see Options for the Disturbance Model Structure.
In the Focus list, select how to weigh the relative importance of the fit at different frequencies. For more information about each option, see Options for Frequency-Weighing Focus.
In the Initial state list, specify how you want the algorithm to treat initial states. For more information about the available options, see Options for Initial States.
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.
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.
To view the estimation progress in the MATLAB Command Window, select the Trace check box. During estimation, the following information is displayed for each iteration:
Loss function — Equals the determinant of the estimated covariance matrix of the input noise.
Parameter values — Values of the model structure coefficients you specified.
Search direction — Change in parameter values from the previous iteration.
Fit improvements — Shows the actual versus expected improvements in the fit.
Click Estimate to add this model to the Model Board in the System Identification Tool GUI.
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 iter button to assign current parameter values as initial guesses for the next search.
Validate the model by selecting the appropriate check box in the Model Views area of the System Identification Tool GUI. For more information about validating models, see Overview of Model Validation and Plots.
Refine the model by clicking the Value —> Initial Guess button to assign current parameter values as initial guesses for the next search, edit the Model Name field, and click Estimate.
Export the model to the MATLAB workspace for further analysis by dragging it to the To Workspace rectangle in the System Identification Tool GUI.
Example – Estimating Process Models with Free Parameters at the Command Line
Example – Estimating Process Models with Fixed Parameters at the Command Line
Before you can perform this task, you must have
Regularly sampled data as an iddata object. See Representing Time- and Frequency-Domain Data Using iddata Objects. For supported data formats, see Data Supported by a Process Model.
Performed any required data preprocessing operations. If you need to model nonzero offsets, such as when model contains integration behavior, do not detrend your data. In other cases, to improve the accuracy of your model, you should detrend your data. See Ways to Process Data for System Identification.
You can estimate process models using the iterative estimation method pem 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 = pem(data,mod_struc,'Property1',Value1,...,
'PropertyN',ValueN)To capture offsets that are essential to describe the dynamics of interest, such as when the model contains integration behavior, set the InputLevel property set to "estimate".
data is the estimation data and mod_struc is a string that represents the process model structure, as described in Options for Specifying the Process-Model Structure.
Tip You do not need to construct the model object using idproc before estimation unless you want to specify initial parameter guesses or fixed parameter values, as described in Example – Estimating Process Models with Fixed Parameters at the Command Line. |
The property-value pairs specify any model properties that configure the estimation algorithm and the initial conditions. For more information about accessing and setting model properties, see Model Properties.
Note You can specify all property-value pairs in pem as a simple, comma-separated list without worrying about the hierarchy of these properties in the idproc model object. |
For more information about validating a process model, see Overview of Model Validation and Plots.
You can use pem to refine parameter estimates of an existing process model, as described in Refining Linear Parametric Models.
For detailed information about pem and idproc, see the corresponding reference page.
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 and a delay
m = pem(ze,'P1D')MATLAB computes the following output:
Process model with 2 inputs:
y = G_1(s)u_1 + G_2(s)u_2
where
K
G_1(s) = ---------- * exp(-Td*s)
1+Tp1*s
with K = -3.2168
Tp1 = 23.033
Td = 10.101
K
G_2(s) = ---------- * exp(-Td*s)
1+Tp1*s
with K = 9.9877
Tp1 = 2.0314
Td = 4.8368Use dot notation to get the value of any model parameter. For example, to get the Value field in the K structure, type the following command:
m.K.value
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')
MATLAB computes the following output:
Process model with transfer function
K
G(s) = ---------- * exp(-Td*s)
1+Tp1*s
with K = NaN
Tp1 = NaN
Td = NaN
This model was not estimated from data.
The model parameters K, Tp1, and Td are assigned NaN values, which means that the parameters have not yet been estimated from the data.
All process-model parameters are structures with the following fields:
status field specifies whether to estimate the parameter, or keep the initial value fixed (do not estimate), or set the value to zero. This field can have the values 'estimate', 'fixed', or 'zero'. For more information, see Options for Initial States.
min specifies the minimum bound on the parameter.
max specifies the maximum bound on the parameter.
value specifies the numerical value of the parameter, if known.
To set the value of K to 12 and keep it fixed, use the following commands:
mod.K.value=12; mod.K.status='fixed';
Note mod is defined for one input. This model is automatically adjusted to have a duplicate for each input. |
To estimate Tp1 and Td only, use the following command:
mod_proc=pem(ze,mod)
MATLAB computes the following result:
Process model with 2 inputs:
y = G_1(s)u_1 + G_2(s)u_2
where
K
G_1(s) = ---------- * exp(-Td*s)
1+Tp1*s
with K = 12
Tp1 = 7.0998e+007
Td = 15
K
G_2(s) = ---------- * exp(-Td*s)
1+Tp1*s
with K = 12
Tp1 = 3.6962
Td = 3.817In this case, the value of K is fixed at 12, but Tp1 and Td are estimated.
If you prefer to specify parameter constraints directly in the estimator syntax, the following table provides examples of pem commands.
| Action | Example |
|---|---|
Fix the value of K to 12. | m=pem(ze,'p1d','k','fix','k',12) |
Initialize K for the iterative search without fixing this value. | m=pem(ze,'p1d','k',12) |
Constrain the value of K between 3 and 4. | m=pem(ze,'p1d','k',...
{'min',3},'k',{'max',4})
|
This section 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:
(Required) P for a process model
(Required) 0, 1, 2 or 3 for the number of poles
(Optional) D to include a time-delay
term
![]()
(Optional) Z to include a process zero (numerator term)
(Optional) U to indicate possible complex-valued (underdamped) poles
(Optional) I to indicate enforced integration
Typically, you specify the model-structure acronym as a string argument in the estimation command pem:
pem(data,'P1D') to estimate the following structure:
![]()
pem(data,'P2ZU') to estimate the following structure:
![]()
pem(data,'P0ID') to estimate the following structure:
![]()
pem(data,'P3Z') to estimate the following structure:
![]()
For more information about estimating models , see How to Estimate Process Models at the Command Line.
If your model contains multiple inputs, you can specify whether to estimate the same transfer function for all inputs, or a different transfer function for each input. 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 in the Process Models dialog box, configure the process model settings for one input at a time. When you finish configuring the model and the estimation settings for one input, select a different input in the Input Number list.
If you want the same transfer function to apply to all inputs, select the Same structure for all channels 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 pem. 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 = pem(data,m)To apply the same structure to all inputs, define a single structure in idproc.
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:
None — The algorithm does not estimate a noise model (C=D=1). This option also sets Focus to Simulation.
Order 1 — Estimates a noise model as a continuous-time, first-order ARMA model.
Order 2 — Estimates a noise model as a continuous-time, second-order ARMA model.
At the command line. Specify the disturbance model as an argument in the estimation command pem. For example, use this command to estimate a first-order transfer function and a first-order noise model:
pem(data,'P1D','DisturbanceModel','ARMA1')
For a complete list of values for the DisturbanceModel model property, see the idproc reference page.
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:
Prediction — Uses the inverse of the noise model H to weigh the relative importance of how closely to fit the data in various frequency ranges. Corresponds to minimizing one-step-ahead prediction, which typically favors the fit over a short time interval. Optimized for output prediction applications.
Simulation — Uses the input spectrum to weigh the relative importance of the fit in a specific frequency range. Does not use the noise model to weigh the relative importance of how closely to fit the data in various frequency ranges. Optimized for output simulation applications.
Stability — Behaves the same way as the Prediction option, but also forces the model to be stable. For more information about model stability, see Unstable Models.
Filter — Specify a custom filter to open the Estimation Focus dialog box, where you can enter a filter, as described in Simple Passband Filter or Defining a Custom Filter. This prefiltering applies only for estimating the dynamics from input to output. The disturbance model is determined from the estimation data.
At the command line. Specify the focus as an argument in the estimation command pem using the same options as in the GUI. For example, use this command to optimize the fit for simulation and estimate a disturbance model:
pem(data,'P1D','dist','arma2','Focus','Simulation')
Because the process models are dynamic, you need initial states that capture past input properties. Thus, you must specify how the iterative algorithm treats initial states. 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 state to one of the following options:
Zero — Sets all initial states to zero.
Estimate — Treats the initial states as an unknown vector of parameters and estimates these states from the data.
Backcast — Estimates initial states using a backward filtering method (least-squares fit).
U-level est — Estimates both the initial states and the InputLevel model property that represents the input offset level. For multiple inputs, the input level for each input is estimated individually. Use if you included an integrator in the transfer function.
Auto — Automatically chooses one of the preceding options based on the estimation data. If initial states have negligible effect on the prediction errors, the initial states are set to zero to optimize algorithm performance.
At the command line. Specify the initial states as an argument in the estimation command pem using the same options as in the GUI. For example, use this command to estimate a first-order transfer function and set the initial states to zero:
m=pem(data,'P1D','InitialState','zero')
For a complete list of values for the InitialState model property, see the idproc reference page.
![]() | Identifying Impulse-Response Models | Identifying Input-Output Polynomial Models | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |