| System Identification Toolbox™ | ![]() |
m = idproc(Type) m = idproc(Type,'Property1',Value1,...,'PropertyN',ValueN) m = pem(Data,Type) % to directly estimate an idproc model
The function idproc is used to create typical simple, continuous-time process models as idproc objects. The model has one output, but can have several inputs.
The character of the model is defined by the argument Type. This is an acronym made up of the following symbols:
P: All 'Type' acronyms start with this letter.
0, 1, 2, or 3: This integer denotes the number of time constants (poles) to be modeled. Possible integrations (poles in the origin) are not included in this number.
I: The letter I is included to mark that an integration is enforced (self-regulation process).
D: The letter D is used to mark that the model contains a time delay (dead time).
Z: The letter Z is used to mark an extra numerator term: a zero.
U: The letter U is included to mark that underdamped modes (complex-valued poles) are permitted. If U is not included, all poles are restricted to be real.
This means, for example, that Type = 'P1D' corresponds to the model with transfer function
![]()
while Type = 'P0I' is
![]()
and Type = 'P3UZ' is
![]()
For multiple-input systems, Type is a cell array where each cell describes the character of the model from the corresponding input, like Type = {'P1D'.'P0I'} for the two-input model
|
| (2-1) |
The parameters of the model are
Kp: The static gain
Tp1, Tp2, Tp3: The real-time constants (corresponding to poles in 1/Tp1, etc.)
Tw and Zeta: The "resonance time constant" and the damping factor corresponding to a denominator factor (1+2 Zeta Tw s + (Tw s)^2). If underdamped modes are allowed, Tw and Zeta replace Tp1 and Tp2. A third real pole, Tp3, could still be included.
Td: The time delay
Tz: The numerator zero
These properties contain fields that give the values of the parameters, upper and lower bounds, and information whether they are locked to zero, have a fixed value, or are to be estimated. For multiple-input models, the number of entries in these fields equals the number of inputs. This is described in more detail below.
The idproc object is a child of idmodel. Therefore any idmodel properties can be set as property name/property value pairs in the idproc command. They can also be set by the command set, or by subassignment, as in
m.InputName = {'speed','voltage'}
m.kp = 12
In the multiple-input case, models for specific inputs can be obtained by regular subreferencing.
m(ku)
There are also two properties, DisturbanceModel and InitialState, that can be used to expand the model. See below.
Type: A string or a cell array of strings with as many elements as there are inputs. The string is an acronym made up of the characters P, Z, I, U, D and an integer between 0 and 3. The string must start with P, followed by the integer, while possible other characters can follow in any order. The integer is the number of poles (not counting a possible integration), Z means the inclusion of a numerator zero, D means inclusion of a time delay, while U marks that the modes can be underdamped (a pair of complex conjugated poles). I means that an integration in the model is enforced.
Kp, Tp1, Tp2, Tp3, Tw, Zeta, Tz, Td: These are the parameters as explained above. Each of these is a structure with the following fields:
value: Numerical value of the parameter.
max: Maximum allowed value of the parameter when it is estimated.
min: Minimum allowed value of the parameter when it is estimated. For multiple-input models, these are row vectors.
status: Assumes one of 'Estimate', 'Fixed', or 'Zero'.
'Zero' means that the parameter is locked to zero and not included in the model. Assigning, for example, Type = 'P1' means that the status of Tp2, Tp3, Tw, and Zeta will be 'Zero'.
The value 'Fixed' means that the parameter is fixed to its value, and will not be estimated.
The value 'Estimate' means that the parameter value should be estimated.
For multiple-input modes, status is a cell array with one element for each input, while value, max, and min are row vectors.
DisturbanceModel: Allows an additive disturbance model as in
|
| (2-2) |
where G(s) is a process model and e(t) is white noise, and C/D is a first- or second-order transfer function.
DisturbanceModel can assume the following values:
'None': This is the default. No disturbance model is included (that is, C=D=1).
'arma1': The disturbance model is a first-order ARMA model (that is, C and D are first-order polynomials).
'arma2' or 'Estimate': The disturbance model is a second-order ARMA model (that is, C and D are second-order polynomials).
When a disturbance model has been estimated, the property DisturbanceModel is returned as a cell array, with the first entry being the status as just defined, and the second entry being the actual model, delivered as a continuous-time idpoly object.
InitialState: Affects the parameterization of the initial values of the states of the model. It assumes the same values as for other models:
'Zero': The initial states are fixed to zero.
'Estimate': The initial states are treated as parameters to be estimated.
'Backcast': The initial state vector is adjusted, during the parameter estimation step, to a suitable value, but it is not stored.
'Auto': Makes a data-dependent choice among the values above.
InputLevel: The offset level of the input signal(s). This is of particular importance for those input channels that contain an integration. InputLevel will then define the level from which the integration takes place, and that cannot be handled by estimating initial states. InputLevel has the same structure as the model parameters Kp, etc., and thus contains the following fields:
value: Numerical value of the parameter. For multiple-input models, this is a row vector.
max: Maximum allowed value of the parameter when it is estimated.
min: Minimum allowed value of the parameter when it is estimated. For multiple-input models, these are row vectors.
status: Assumes one of 'Estimate', 'Fixed', or 'Zero' with the same interpretations.
In addition, any idproc object also has all the properties of idmodel. See Algorithm Properties, EstimationInfo, and idmodel.
Note that all properties can be set or retrieved using either the set and get commands or subscripts. Autofill applies to all properties and values, and these are case insensitive. Also 'u' and 'y' are short for 'Input' and 'Output', respectively. You can also set all properties at estimation time as property name/property value pairs in the call to pem. An extended syntax allows direct setting of the fields of the parameter values, so that assigning a numerical value is automatically attributed to the value field, while a string is attributed to the status field.
m.kp = 10
m.tp1 = 'estimate'
% Initializing the parameter Kp at the value 10
m = pem(Data,'P1D','kp',10)
% Fixing the parameter Kp to the value 10
m = pem(Data,'P1D','kp',10,'kp','fix')
% constraining Kp to lie between 3 and 4
m = pem(Data,'P2U','kp',{'max',4},'kp',{'min',3})
% For two inputs, estimate the offset level
% of the first input
m = pem(Data,{'P2I','P1D',},'ulevel',{'est','zer'})
% estimate a noise model
m = pem(Data,'P2U','dist','est')
% Use a fixed noisemodel,
% given by the continuous-time idpoly model noimod
m = pem(Data,'P2U','dist',{'fix',noimod})
% (minimum Kp for the second input)
m.kp.min(2) = 12
% fixing the gain for the second input.
m.kp.status{2} = 'fix'
For a complete list of property values, use get(m). To see possible value assignments, use set(m).
The states of an idproc model are defined as those corresponding to the model obtained by converting them to the state-space format using the idss command. For example, if you have an idproc model defined by m1 = idproc('P1D');, then the initial states of this model correspond to those of m2 = idss(m1). The concept of states is useful for functions such as sim, predict, compare and findstates.
m = pem(Data,'P2D','dist','arma1')
![]() | idpoly | idresamp | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |