idproc

Continuous-time process model with identifiable parameters

Syntax

sys = idproc(type)
sys = idproc(type,Name,Value)

Description

sys = idproc(type) creates a continuous-time process model with identifiable parameters. type specifies aspects of the model structures, such as the number of poles in the model, whether the model includes an integrator, and whether the model includes a time delay.

sys = idproc(type,Name,Value) creates a process model with additional attributes specified by one or more Name,Value pair arguments.

Object Description

An idproc model represents a system as a continuous-time process model with identifiable (estimable) coefficients.

A simple SISO process model has a gain, a time constant, and a delay:

sys=Kp1+Tp1seTds.

Kp is a proportional gain. Tp1 is the time constant of the real pole, and Td is the transport delay (dead time).

More generally, idproc can represent process models with up to three poles and a zero:

sys=Kp1+Tzs(1+Tp1s)(1+Tp2s)(1+Tp3s)eTds.

Two of the poles can be a complex conjugate (underdamped) pair. In that case, the general form of the process model is:

sys=Kp1+Tzs(1+2ζTωs+(Tωs)2)(1+Tp3s)eTds.

Tω is the time constant of the complex pair of poles, and ζ is the associated damping constant.

In addition, any idproc model can have an integrator. For example, the following is a process model that you can represent with idproc:

sys=Kp1s(1+2ζTωs+(Tωs)2)eTds.

This model has no zero (Tz = 0). The model has a complex pair of poles. The model also has an integrator, represented by the 1/s term.

For idproc models, all the time constants, the delay, the proportional gain, and the damping coefficient can be estimable parameters. The idproc model stores the values of these parameters in properties of the model such as Kp, Tp1, and Zeta. (See Properties for more information.)

A MIMO process model contains a SISO process model corresponding to each input-output pair in the system. For idproc models, the form of each input-output pair can be independently specified. For example, a two-input, one-output process can have one channel with two poles and no zero, and another channel with a zero, a pole, and an integrator. All the coefficients are independently estimable parameters.

There are two ways to obtain an idproc model:

  • Estimate the idproc model based on output or input-output measurements of a system, using the procest command. procest estimates the values of the free parameters such as gain, time constants, and time delay. The estimated values are stored as properties of the resulting idproc model. For example, the properties sys.Tz and sys.Kp of an idproc model sys store the zero time constant and the proportional gain, respectively. (See Properties for more information.) The Report property of the resulting model stores information about the estimation, such as handling of initial conditions and options used in estimation.

    When you obtain an idproc model by estimation, you can extract estimated coefficients and their uncertainties from the model using commands such as getpar and getcov.

  • Create an idproc model using the idproc command.

    You can create an idproc model to configure an initial parameterization for estimation of a process model. When you do so, you can specify constraints on the parameters. For example, you can fix the values of some coefficients, or specify minimum or maximum values for the free coefficients. You can then use the configured model as an input argument to procest to estimate parameter values with those constraints.

Examples

collapse all

Create a process model with a pair of complex poles and a time delay. Set the initial value of the model to the following:

sys=0.011+2(0.1)(10)s+(10s)2e-5s

Create a process model with the specified structure.

sys = idproc('P2DU')
sys =
Process model with transfer function:      
                  Kp                       
  G(s) = --------------------- * exp(-Td*s)
         1+2*Zeta*Tw*s+(Tw*s)^2            
                                           
         Kp = NaN                          
         Tw = NaN                          
       Zeta = NaN                          
         Td = NaN                          
                                           
Parameterization:
    {'P2DU'}
   Number of free coefficients: 4
   Use "getpvec", "getcov" for parameters and their uncertainties.

Status:                                                         
Created by direct construction or transformation. Not estimated.

The input 'P2DU' specifies an underdamped pair of poles and a time delay. The display shows that sys has the desired structure. The display also shows that the four free parameters, Kp, Tw, Zeta, and Td are all initialized to NaN.

Set the initial values of all parameters to the desired values.

sys.Kp = 0.01;
sys.Tw = 10;
sys.Zeta = 0.1;
sys.Td = 5;

You can use sys to specify this parameterization and these initial guesses for process model estimation with procest.

Create a one-input, three-output process model, where each channel has two real poles and a zero, but only the first channel has a time delay, and only the first and third channels have an integrator.

type = {'P2ZDI';'P2Z';'P2ZI'};
sys = idproc(type)
sys =
Process model with 3 outputs: y_k = Gk(s)u     
  From input 1 to output 1:                    
                    1+Tz*s                     
  G1(s) = Kp * ------------------- * exp(-Td*s)
               s(1+Tp1*s)(1+Tp2*s)             
                                               
         Kp = NaN                              
        Tp1 = NaN                              
        Tp2 = NaN                              
         Td = NaN                              
         Tz = NaN                              
                                               
  From input 1 to output 2:                    
                    1+Tz*s                     
  G1(s) = Kp * ------------------              
               (1+Tp1*s)(1+Tp2*s)              
                                               
         Kp = NaN                              
        Tp1 = NaN                              
        Tp2 = NaN                              
         Tz = NaN                              
                                               
  From input 1 to output 3:                    
                    1+Tz*s                     
  G1(s) = Kp * -------------------             
               s(1+Tp1*s)(1+Tp2*s)             
                                               
         Kp = NaN                              
        Tp1 = NaN                              
        Tp2 = NaN                              
         Tz = NaN                              
                                               
Parameterization:
    {'P2DIZ'}
    {'P2Z'  }
    {'P2IZ' }
   Number of free coefficients: 13
   Use "getpvec", "getcov" for parameters and their uncertainties.

Status:                                                         
Created by direct construction or transformation. Not estimated.

idproc creates a MIMO model where each character vector in the type array defines the structure of the corresponding I/O pair. Since type is a column vector of character vectors, sys is a one-input, three-output model having the specified parameterization structure. type{k,1} specifies the structure of the subsystem sys(k,1). All identifiable parameters are initialized to NaN.

Create a 3-by-1 array of process models, each containing one output and two input channels.

Specify the structure for each model in the array of process models.

type1 = {'P1D','P2DZ'};
type2 = {'P0','P3UI'};
type3 = {'P2D','P2DI'};
type = cat(3,type1,type2,type3);
size(type)
ans = 1×3

     1     2     3

Use type to create the array.

sysarr = idproc(type);

The first two dimensions of the cell array type set the output and input dimensions of each model in the array of process models. The remaining dimensions of the cell array set the array dimensions. Thus, sysarr is a 3-model array of 2-input, one-output process models.

Select a model from the array.

sysarr(:,:,2)
ans =
Process model with 2 inputs: y = G11(s)u1 + G12(s)u2
  From input 1 to output 1:                         
  G11(s) = Kp                                       
                                                    
        Kp = NaN                                    
                                                    
  From input 2 to output 1:                         
                           Kp                       
  G12(s) = ---------------------------------        
           s(1+2*Zeta*Tw*s+(Tw*s)^2)(1+Tp3*s)       
                                                    
         Kp = NaN                                   
         Tw = NaN                                   
       Zeta = NaN                                   
        Tp3 = NaN                                   
                                                    
Parameterization:
    {'P0'}    {'P3IU'}
   Number of free coefficients: 5
   Use "getpvec", "getcov" for parameters and their uncertainties.

Status:                                                         
Created by direct construction or transformation. Not estimated.

This two-input, one-output model corresponds to the type2 entry in the type cell array.

Input Arguments

type

Model structure, specified as a character vector or cell array of character vectors.

For SISO models, type is a character vector made up of one or more of the following characters that specify aspects of the model structure:

CharactersMeaning
PkA process model with k poles (not including an integrator). k must be 0, 1, 2, or 3.
ZThe process model includes a zero (Tz ≠ 0). A type with P0 cannot include Z (a process model with no poles cannot include a zero).
DThe process model includes a time delay (deadtime) (Td ≠ 0).
IThe process model includes an integrator (1/s).
UThe process model is underdamped. In this case, the process model includes a complex pair of poles

Every type character vector must begin with one of P0, P1, P2, or P3. All other components are optional. For example:

  • 'P1D' specifies a process model with one pole and a time delay (deadtime) term:

    sys=Kp1+Tp1seTds.

    Kp, Tp1, and Td are the identifiable parameters of this model.

  • 'P2U' creates a process model with a pair of complex poles:

    sys=Kp(1+2ζTωs+(Tωs)2).

    Kp, Tw, and Zeta are the identifiable parameters of this model.

  • 'P3ZDI' creates a process model with three poles. All poles are real, because U is not included. The model also includes a zero, a time delay, and an integrator:

    sys=Kp1+Tzss(1+Tp1s)(1+Tp2s)(1+Tp3s)eTds.

    The identifiable parameters of this model are Kp, Tz, Tp1, Tp2, Tp3, and Td.

The values of all parameters in a particular model structure are initialized to NaN. You can change them to finite values by setting the values of the corresponding idproc model properties after you create the model. For example, sys.Td = 5 sets the initial value of the time delay of sys to 5.

For a MIMO process model with Ny outputs and Nu inputs, type is an Ny-by-Nu cell array of character vectors specifying the structure of each input/output pair in the model. For example, type{i,j} specifies the type of the subsystem sys(i,j) from the jth input to the yth output.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Use Name,Value arguments to specify parameter initial values and additional properties of idproc models during model creation. For example, sys = idproc('p2z','InputName','Voltage','Kp',10,'Tz',0); creates an idproc model with the InputName property set to Voltage. The command also initializes the parameter Kp to a value of 10, and Tz to 0.

Properties

idproc object properties include:

Type

Model structure, specified as a character vector or cell array of character vectors.

For a SISO model sys, the property sys.Type contains a character vector specifying the structure of the system. For example, 'P1D'.

For a MIMO model with Ny outputs and Nu inputs, sys.Type is an Ny-by-Nu cell array of character vectors specifying the structure of each input/output pair in the model. For example, type{i,j} specifies the structure of the subsystem sys(i,j) from the jth input to the ith output.

The character vectors are made up of one or more of the following characters that specify aspects of the model structure:

CharactersMeaning
PkA process model with k poles (not including an integrator). k is 0, 1, 2, or 3.
ZThe process model includes a zero (Tz ≠ 0).
DThe process model includes a time delay (deadtime) (Td ≠ 0).
IThe process model includes an integrator (1/s).
UThe process model is underdamped. In this case, the process model includes a complex pair of poles

If you create an idproc model sys using the idproc command, sys.Type contains the model structure that you specify with the type input argument.

If you obtain an idproc model by identification using procest, then sys.Type contains the model structures that you specified for that identification.

In general, you cannot change the type of an existing model. However, you can change whether the model contains an integrator using the property sys.Integration.

Kp,Tp1,Tp2,Tp3,Tz,Tw,Zeta,Td

Values of process model parameters.

If you create an idproc model using the idproc command, the values of all parameters present in the model structure initialize by default to NaN. The values of parameters not present in the model structure are fixed to 0. For example, if you create a model, sys, of type 'P1D', then Kp, Tp1, and Td are initialized to NaN and are identifiable (free) parameters. All remaining parameters, such as Tp2 and Tz, are inactive in the model. The values of inactive parameters are fixed to zero and cannot be changed.

For a MIMO model with Ny outputs and Nu inputs, each parameter value is an Ny-by-Nu cell array of character vectors specifying the corresponding parameter value for each input/output pair in the model. For example, sys.Kp(i,j) specifies the Kp value of the subsystem sys(i,j) from the jth input to the ith output.

For an idproc model sys, each parameter value property such as sys.Kp, sys.Tp1, sys.Tz, and the others is an alias to the corresponding Value entry in the Structure property of sys. For example, sys.Tp3 is an alias to the value of the property sys.Structure.Tp3.Value.

Default: For each parameter value, NaN if the process model structure includes the particular parameter; 0 if the structure does not include the parameter.

Integration

Logical value or matrix denoting the presence or absence of an integrator in the transfer function of the process model.

For a SISO model sys, sys.Integration = true if the model contains an integrator.

For a MIMO model, sys.Integration(i,j) = true if the transfer function from the jth input to the ith output contains an integrator.

When you create a process model using the idproc command, the value of sys.Integration is determined by whether the corresponding type contains I.

NoiseTF

Coefficients of the noise transfer function.

sys.NoiseTF stores the coefficients of the numerator and the denominator polynomials for the noise transfer function H(s) = N(s)/D(s).

sys.NoiseTF is a structure with fields num and den. Each field is a cell array of Ny row vectors, where Ny is the number of outputs of sys. These row vectors specify the coefficients of the noise transfer function numerator and denominator in order of decreasing powers of s.

Typically, the noise transfer function is automatically computed by the estimation function procest. You can specify a noise transfer function that procest uses as an initial value. For example:

NoiseNum = {[1 2.2]; [1 0.54]};
NoiseDen = {[1 1.3]; [1 2]};
NoiseTF = struct('num', {NoiseNum}, 'den', {NoiseDen});
sys = idproc({'p2'; 'p1di'}); % 2-output, 1-input process model
sys.NoiseTF = NoiseTF;

Each vector in sys.NoiseTF.num and sys.NoiseTF.den must be of length 3 or less (second-order in s or less). Each vector must start with 1. The length of a numerator vector must be equal to that of the corresponding denominator vector, so that H(s) is always biproper.

Default: struct('num',{num2cell(ones(Ny,1))},'den',{num2cell(ones(Ny,1))})

Structure

Information about the estimable parameters of the idproc model.

sys.Structure includes one entry for each parameter in the model structure of sys. For example, if sys is of type 'P1D', then sys includes identifiable parameters Kp, Tp1, and Td. Correspondingly, sys.Structure.Kp, sys.Structure.Tp1, and sys.Structure.Td contain information about each of these parameters, respectively.

Each of these parameter entries in sys.Structure contains the following fields:

  • Value — Parameter values. For example, sys.Structure.Kp.Value contains the initial or estimated values of the Kp parameter.

    NaN represents unknown parameter values.

    For SISO models, each parameter value property such as sys.Kp, sys.Tp1, sys.Tz, and the others is an alias to the corresponding Value entry in the Structure property of sys. For example, sys.Tp3 is an alias to the value of the property sys.Structure.Tp3.Value.

    For MIMO models, sys.Kp{i,j} is an alias to sys.Structure(i,j).Kp.Value, and similarly for the other identifiable coefficient values.

  • Minimum — Minimum value that the parameter can assume during estimation. For example, sys.Structure.Kp.Minimum = 1 constrains the proportional gain to values greater than or equal to 1.

  • Maximum — Maximum value that the parameter can assume during estimation.

  • Free — Logical value specifying whether the parameter is a free estimation variable. If you want to fix the value of a parameter during estimation, set the corresponding Free = false. For example, to fix the dead time to 5:

    sys.Td = 5;
    sys.Structure.Td.Free = false;
  • Scale — Scale of the parameter’s value. Scale is not used in estimation.

  • Info — Structure array for storing parameter units and labels. The structure has Label and Unit fields.

    Specify parameter units and labels as character vectors. For example, 'Time'.

Structure also includes a field Integration that stores a logical array indicating whether each corresponding process model has an integrator. sys.Structure.Integration is an alias to sys.Integration.

For a MIMO model with Ny outputs and Nu input, Structure is an Ny-by-Nu array. The element Structure(i,j) contains information corresponding to the process model for the (i,j) input-output pair.

NoiseVariance

The variance (covariance matrix) of the model innovations e.

An identified model includes a white, Gaussian noise component e(t). NoiseVariance is the variance of this noise component. Typically, the model estimation function (such as procest) determines this variance.

For SISO models, NoiseVariance is a scalar. For MIMO models, NoiseVariance is a Ny-by-Ny matrix, where Ny is the number of outputs in the system.

Report

Summary report that contains information about the estimation options and results when the process model is obtained using the procest estimation command. Use Report to query a model for how it was estimated, including its:

  • Estimation method

  • Estimation options

  • Search termination conditions

  • Estimation data fit and other quality metrics

The contents of Report are irrelevant if the model was created by construction.

m = idproc('P2DU');
m.Report.OptionsUsed
ans =

     []

If you obtain the process model using estimation commands, the fields of Report contain information on the estimation data, options, and results.

load iddata2 z2;
m = procest(z2,'P2DU');
m.Report.OptionsUsed
DisturbanceModel: 'estimate'
    InitialCondition: 'auto'
               Focus: 'prediction'
  EstimateCovariance: 1
             Display: 'off'
         InputOffset: [1x1 param.Continuous]
        OutputOffset: []
      Regularization: [1x1 struct]
        SearchMethod: 'auto'
       SearchOptions: [1x1 idoptions.search.identsolver]
        OutputWeight: []
            Advanced: [1x1 struct]

Report is a read-only property.

For more information on this property and how to use it, see the Output Arguments section of the corresponding estimation command reference page and Estimation Report.

InputDelay

Input delays. InputDelay is a numeric vector specifying a time delay for each input channel. Specify input delays in the time unit stored in the TimeUnit property.

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

OutputDelay

Output delays.

For identified systems, like idproc, OutputDelay is fixed to zero.

Ts

Sample time. For idproc, Ts is fixed to zero because all idproc models are continuous time.

TimeUnit

Units for the time variable, the sample time Ts, and any time delays in the model, specified as one of the following values:

  • 'nanoseconds'

  • 'microseconds'

  • 'milliseconds'

  • 'seconds'

  • 'minutes'

  • 'hours'

  • 'days'

  • 'weeks'

  • 'months'

  • 'years'

Changing this property has no effect on other properties, and therefore changes the overall system behavior. Use chgTimeUnit (Control System Toolbox) to convert between time units without modifying system behavior.

Default: 'seconds'

InputName

Input channel names, specified as one of the following:

  • Character vector — For single-input models, for example, 'controls'.

  • Cell array of character vectors — For multi-input models.

Alternatively, use automatic vector expansion to assign input names for multi-input models. For example, if sys is a two-input model, enter:

sys.InputName = 'controls';

The input names automatically expand to {'controls(1)';'controls(2)'}.

When you estimate a model using an iddata object, data, the software automatically sets InputName to data.InputName.

You can use the shorthand notation u to refer to the InputName property. For example, sys.u is equivalent to sys.InputName.

Input channel names have several uses, including:

  • Identifying channels on model display and plots

  • Extracting subsystems of MIMO systems

  • Specifying connection points when interconnecting models

Default: '' for all input channels

InputUnit

Input channel units, specified as one of the following:

  • Character vector — For single-input models, for example, 'seconds'.

  • Cell array of character vectors — For multi-input models.

Use InputUnit to keep track of input signal units. InputUnit has no effect on system behavior.

Default: '' for all input channels

InputGroup

Input channel groups. The InputGroup property lets you assign the input channels of MIMO systems into groups and refer to each group by name. Specify input groups as a structure. In this structure, field names are the group names, and field values are the input channels belonging to each group. For example:

sys.InputGroup.controls = [1 2];
sys.InputGroup.noise = [3 5];

creates input groups named controls and noise that include input channels 1, 2 and 3, 5, respectively. You can then extract the subsystem from the controls inputs to all outputs using:

sys(:,'controls')

Default: Struct with no fields

OutputName

Output channel names, specified as one of the following:

  • Character vector — For single-output models. For example, 'measurements'.

  • Cell array of character vectors — For multi-output models.

Alternatively, use automatic vector expansion to assign output names for multi-output models. For example, if sys is a two-output model, enter:

sys.OutputName = 'measurements';

The output names automatically expand to {'measurements(1)';'measurements(2)'}.

When you estimate a model using an iddata object, data, the software automatically sets OutputName to data.OutputName.

You can use the shorthand notation y to refer to the OutputName property. For example, sys.y is equivalent to sys.OutputName.

Output channel names have several uses, including:

  • Identifying channels on model display and plots

  • Extracting subsystems of MIMO systems

  • Specifying connection points when interconnecting models

Default: '' for all output channels

OutputUnit

Output channel units, specified as one of the following:

  • Character vector — For single-output models. For example, 'seconds'.

  • Cell array of character vectors — For multi-output models.

Use OutputUnit to keep track of output signal units. OutputUnit has no effect on system behavior.

Default: '' for all output channels

OutputGroup

Output channel groups. The OutputGroup property lets you assign the output channels of MIMO systems into groups and refer to each group by name. Specify output groups as a structure. In this structure, field names are the group names, and field values are the output channels belonging to each group. For example:

sys.OutputGroup.temperature = [1];
sys.InputGroup.measurement = [3 5];

creates output groups named temperature and measurement that include output channels 1, and 3, 5, respectively. You can then extract the subsystem from all inputs to the measurement outputs using:

sys('measurement',:)

Default: Struct with no fields

Name

System name, specified as a character vector. For example, 'system_1'.

Default: ''

Notes

Any text that you want to associate with the system, stored as a string or a cell array of character vectors. The property stores whichever data type you provide. For instance, if sys1 and sys2 are dynamic system models, you can set their Notes properties as follows:

sys1.Notes = "sys1 has a string.";
sys2.Notes = 'sys2 has a character vector.';
sys1.Notes
sys2.Notes
ans = 

    "sys1 has a string."


ans =

    'sys2 has a character vector.'

Default: [0×1 string]

UserData

Any type of data you want to associate with system, specified as any MATLAB® data type.

Default: []

SamplingGrid

Sampling grid for model arrays, specified as a data structure.

For arrays of identified linear (IDLTI) models that are derived by sampling one or more independent variables, this property tracks the variable values associated with each model. This information appears when you display or plot the model array. Use this information to trace results back to the independent variables.

Set the field names of the data structure to the names of the sampling variables. Set the field values to the sampled variable values associated with each model in the array. All sampling variables should be numeric and scalar valued, and all arrays of sampled values should match the dimensions of the model array.

For example, if you collect data at various operating points of a system, you can identify a model for each operating point separately and then stack the results together into a single system array. You can tag the individual models in the array with information regarding the operating point:

nominal_engine_rpm = [1000 5000 10000];
sys.SamplingGrid = struct('rpm', nominal_engine_rpm)

where sys is an array containing three identified models obtained at rpms 1000, 5000 and 10000, respectively.

For model arrays generated by linearizing a Simulink® model at multiple parameter values or operating points, the software populates SamplingGrid automatically with the variable values that correspond to each entry in the array. For example, the Simulink Control Design™ commands linearize (Simulink Control Design) and slLinearizer (Simulink Control Design) populate SamplingGrid in this way.

Default: []

See Also

| | | | |

Introduced before R2006a