Documentation |
Continuous-time process model with identifiable parameters
sys = idproc(type)
sys = idproc(type,Name,Value)
sys = idproc(type) creates a continuous-time process model with identifiable parameters. type is a string that 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.
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=\frac{{K}_{p}}{1+{T}_{p1}s}{e}^{-{T}_{d}s}.$$
K_{p} is a proportional gain. K_{p}_{1} is the time constant of the real pole, and T_{d} is the transport delay (dead time).
More generally, idproc can represent process models with up to three poles and a zero:
$$sys={K}_{p}\frac{1+{T}_{z}s}{\left(1+{T}_{p1}s\right)\left(1+{T}_{p2}s\right)\left(1+{T}_{p3}s\right)}{e}^{-{T}_{d}s}.$$
Two of the poles can be a complex conjugate (underdamped) pair. In that case, the general form of the process model is:
$$sys={K}_{p}\frac{1+{T}_{z}s}{\left(1+2\zeta {T}_{\omega}s+{\left({T}_{\omega}s\right)}^{2}\right)\left(1+{T}_{p3}s\right)}{e}^{-{T}_{d}s}.$$
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={K}_{p}\frac{1}{s\left(1+2\zeta {T}_{\omega}s+{\left({T}_{\omega}s\right)}^{2}\right)}{e}^{-{T}_{d}s}.$$
This model has no zero (T_{z} = 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.
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.
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 idtf model with the InputName property set to Voltage. The command also initializes the parameter Kp to a value of 10, and Tz to 0.
idproc object properties include:
Type |
Cell array of strings characterizing the model structure. For a SISO model sys, the property sys.Type contains a single string specifying the structure of the system. For a MIMO model with Ny outputs and Nu inputs, sys.Type is an Ny-by-Nu cell array of strings 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 strings are made up of a series of characters that specify aspects of the model structure, as follows.
If you create an idproc model sys using the idproc command, sys.Type contains the strings that you specify with the type input argument. If you obtain an idproc model by identification using procest, then sys.Type contains the strings describing the model structures that you specified for that identification. In general, you cannot change the type string 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 strings 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 string 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 N_{y} row vectors, where N_{y} 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:
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 N_{y}-by-N_{y} matrix, where N_{y} is the number of outputs in the system. | ||||||||||||
Report |
Information about the estimation process. Report contains the following fields:
| ||||||||||||
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 |
Sampling time. For idproc, Ts is fixed to zero because all idproc models are continuous time. | ||||||||||||
TimeUnit |
String representing the unit of the time variable. This property specifies the units for the time variable, the sampling time Ts, and any time delays in the model. Use any of the following values:
Changing this property has no effect on other properties, and therefore changes the overall system behavior. Use chgTimeUnit to convert between time units without modifying system behavior. Default: 'seconds' | ||||||||||||
InputName |
Input channel names. Set InputName to a string for single-input model. For a multi-input model, set InputName to a cell array of strings. 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:
Default: Empty string '' for all input channels | ||||||||||||
InputUnit |
Input channel units. Use InputUnit to keep track of input signal units. For a single-input model, set InputUnit to a string. For a multi-input model, set InputUnit to a cell array of strings. InputUnit has no effect on system behavior. Default: Empty string '' 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. Set OutputName to a string for single-output model. For a multi-output model, set OutputName to a cell array of strings. 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 to 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:
Default: Empty string '' for all input channels | ||||||||||||
OutputUnit |
Output channel units. Use OutputUnit to keep track of output signal units. For a single-output model, set OutputUnit to a string. For a multi-output model, set OutputUnit to a cell array of strings. OutputUnit has no effect on system behavior. Default: Empty string '' for all input 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. Set Name to a string to label the system. Default: '' | ||||||||||||
Notes |
Any text that you want to associate with the system. Set Notes to a string or a cell array of strings. Default: {} | ||||||||||||
UserData |
Any type of data you wish to associate with system. Set UserData to 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. Default: [] |