function [Theta, Sel] = MIMO_ML_MonicModel(Theta, Sel, ModelVar); The (normalised) plant denominator polynomial is made monic z-domain: a0 = 1, s-, and sqrt(s)-domains: ana = 1, and the selection vector is adapted accordingly. Output parameters Theta = estimated value plant, noise, and initial conditions parameters Theta = struct('A', [], 'B', [], 'Ig', []) Theta.A = 1 x (OrderA+1) Theta.A(r) = coefficient a(r-1) of Omega^(r-1) Theta.B = ny x nu x (OrderB+1) Theta.B(i,j,r) = coefficient b(i,j,r-1) of Omega^(r-1) Theta.Ig = ny x (OrderIg+1) Theta.Ig(i,r) = coefficient ig(i,r-1) of Omega^(r-1) Sel = selects the free model parameters in the constrained case Sel = struct('A', [], 'B', [], 'Ig', [], 'C', [], 'D', [], 'Ih', []) Sel.A = 1 x (OrderA+1) Sel.A(r) = 1 if coeff. a(r-1) is unknown Sel.A(r) = 0 if coeff. a(r-1) = 0 Sel.B = ny x nu x (OrderB+1) Sel.B(i,j,r) = 1 if coeff. b(i,j,r-1) is unknown Sel.B(i,j,r) = 0 if coeff. b(i,j,r-1) = 0 Sel.Ig = ny x (OrderIg+1) Sel.Ig(i,r) = 1 if coeff. ig(i,r-1) is unknown Sel.Ig(i,r) = 0 if coeff. ig(i,r-1) = 0 Input parameters Theta = see output parameters, unconstrained model parameters ModelVar = contains the information about the model to be identified structure with fields 'Transient', 'ThePlane', 'TheModel', 'Reciprocal' ModelVar = struct('Transient', [], 'PlantPlane', [], 'NoisePlane', [], 'Struct', [], 'Reciprocal', []) ModelVar.Transient = 1 then the initial conditions of the plant and/or noise are estimated ModelVar.PlantPlane = plane of the plant model 's': continuous-time; 'w': sqrt(s)-domain 'z': discrete-time; '': plane not defined ModelVar.Struct = model structure 'EIV': errors-in-variables (noisy input-output data) 'OE': generalised output error (known input, noisy output) ModelVar.RecipPlant = 1 if plant model is reciprocal: G(i,j) = G(j,i) ModelVar.nu = number of inputs ModelVar.ny = number of outputs ModelVar.na = order polynomial A ModelVar.nb = order matrix polynomial B ModelVar.nig = order vector polynomial Ig Sel = see output parameter, Selects the free model parameters in the unconstrained case Copyright (c) Rik Pintelon, Vrije Universiteit Brussel - dept. ELEC, November 2009 All rights reserved. Software can be used freely for non-commercial applications only.
0001 function [Theta, Sel] = MIMO_ML_MonicModel(Theta, Sel, ModelVar); 0002 % 0003 % function [Theta, Sel] = MIMO_ML_MonicModel(Theta, Sel, ModelVar); 0004 % 0005 % The (normalised) plant denominator polynomial is made monic 0006 % z-domain: a0 = 1, 0007 % s-, and sqrt(s)-domains: ana = 1, 0008 % and the selection vector is adapted accordingly. 0009 % 0010 % 0011 % Output parameters 0012 % 0013 % Theta = estimated value plant, noise, and initial conditions parameters 0014 % Theta = struct('A', [], 'B', [], 'Ig', []) 0015 % Theta.A = 1 x (OrderA+1) 0016 % Theta.A(r) = coefficient a(r-1) of Omega^(r-1) 0017 % Theta.B = ny x nu x (OrderB+1) 0018 % Theta.B(i,j,r) = coefficient b(i,j,r-1) of Omega^(r-1) 0019 % Theta.Ig = ny x (OrderIg+1) 0020 % Theta.Ig(i,r) = coefficient ig(i,r-1) of Omega^(r-1) 0021 % 0022 % Sel = selects the free model parameters in the constrained case 0023 % Sel = struct('A', [], 'B', [], 'Ig', [], 'C', [], 'D', [], 'Ih', []) 0024 % Sel.A = 1 x (OrderA+1) 0025 % Sel.A(r) = 1 if coeff. a(r-1) is unknown 0026 % Sel.A(r) = 0 if coeff. a(r-1) = 0 0027 % Sel.B = ny x nu x (OrderB+1) 0028 % Sel.B(i,j,r) = 1 if coeff. b(i,j,r-1) is unknown 0029 % Sel.B(i,j,r) = 0 if coeff. b(i,j,r-1) = 0 0030 % Sel.Ig = ny x (OrderIg+1) 0031 % Sel.Ig(i,r) = 1 if coeff. ig(i,r-1) is unknown 0032 % Sel.Ig(i,r) = 0 if coeff. ig(i,r-1) = 0 0033 % 0034 % Input parameters 0035 % 0036 % Theta = see output parameters, unconstrained model parameters 0037 % 0038 % ModelVar = contains the information about the model to be identified 0039 % structure with fields 'Transient', 'ThePlane', 'TheModel', 'Reciprocal' 0040 % ModelVar = struct('Transient', [], 'PlantPlane', [], 'NoisePlane', [], 'Struct', [], 'Reciprocal', []) 0041 % ModelVar.Transient = 1 then the initial conditions of the plant and/or noise are estimated 0042 % ModelVar.PlantPlane = plane of the plant model 0043 % 's': continuous-time; 0044 % 'w': sqrt(s)-domain 0045 % 'z': discrete-time; 0046 % '': plane not defined 0047 % ModelVar.Struct = model structure 0048 % 'EIV': errors-in-variables (noisy input-output data) 0049 % 'OE': generalised output error (known input, noisy output) 0050 % ModelVar.RecipPlant = 1 if plant model is reciprocal: G(i,j) = G(j,i) 0051 % ModelVar.nu = number of inputs 0052 % ModelVar.ny = number of outputs 0053 % ModelVar.na = order polynomial A 0054 % ModelVar.nb = order matrix polynomial B 0055 % ModelVar.nig = order vector polynomial Ig 0056 % 0057 % Sel = see output parameter, Selects the free model parameters in the unconstrained case 0058 % 0059 % 0060 % Copyright (c) Rik Pintelon, Vrije Universiteit Brussel - dept. ELEC, November 2009 0061 % All rights reserved. 0062 % Software can be used freely for non-commercial applications only. 0063 % 0064 0065 % constraining the plant model parameters 0066 switch ModelVar.PlantPlane 0067 case 'z' 0068 Scale = Theta.A(1); 0069 Sel.A(1) = 0; 0070 case {'s', 'w'} 0071 Scale = Theta.A(end); 0072 Sel.A(end) = 0; 0073 otherwise 0074 Scale = 1; 0075 end 0076 Theta.A = Theta.A/Scale; 0077 Theta.B = Theta.B/Scale; 0078 Theta.Ig = Theta.Ig/Scale; 0079