| Contents | Index |
B = imp2exp(A,yidx,uidx)
B = imp2exp(A,yidx,uidx) transforms a linear constraint between variables Y and U of the form A(:,[yidx;uidx])*[Y;U] = 0 into an explicit input/output relationship Y = B*U. The vectors yidx and uidx refer to the columns (inputs) of A as referenced by the explicit relationship for B.
The constraint matrix A can be a double, ss, tf, zpk and frd object as well as an uncertain object, including umat, uss and ufrd. The result B will be of the same class.
Consider the constraint 4y + 7u = 0. Solving for y gives y = 1.75u. You form the equation using imp2exp:
A = [4 7]; Yidx = 1; Uidx = 2;
and then
B = imp2exp(A,Yidx,Uidx) B = -1.7500
yields B equal to -1.75.
Consider two motor/generator constraints among 4 variables [V;I;T;W], namely [1 -1 0 -2e-3;0 -2e-3 1 0]*[V;I;T;W] = 0. You can find the 2-by-2 matrix B so that [V;T] = B*[W;I] using imp2exp.
A = [1 -1 0 -2e-3;0 -2e-3 1 0];
Yidx = [1 3];
Uidx = [4 2];
B = imp2exp(A,Yidx,Uidx)
B =
0.0020 1.0000
0 0.0020
You can find the 2-by-2 matrix C so that [I;W] = C*[T;V]
Yidx = [2 4];
Uidx = [3 1];
C = imp2exp(A,Yidx,Uidx)
C =
500 0
-250000 500
Consider two uncertain motor/generator constraints among 4 variables [V;I;T;W], namely [1 -R 0 -K;0 -K 1 0]*[V;I;T;W] = 0. You can find the uncertain 2-by-2 matrix B so that [V;T] = B*[W;I].
R = ureal('R',1,'Percentage',[-10 40]);
K = ureal('K',2e-3,'Percentage',[-30 30]);
A = [1 -R 0 -K;0 -K 1 0];
Yidx = [1 3];
Uidx = [4 2];
B = imp2exp(A,Yidx,Uidx)
UMAT: 2 Rows, 2 Columns
K: real, nominal = 0.002, variability = [-30 30]%, 2 occurrences
R: real, nominal = 1, variability = [-10 40]%, 1 occurrence
Consider a standard single-loop feedback connection of controller C and an uncertain plant P, described by the equations e=r-y, u=Ce; f=d+u; y=Pf.

P = tf([1],[1 0]);
C = tf([2*.707*1 1^2],[1 0]);
A = [1 -1 0 0 0 -1;0 -C 1 0 0 0;0 0 -1 -1 1 0;0 0 0 0 -P 1];
OutputIndex = [6;3;2;5]; % [y;u;e;f]
InputIndex = [1;4]; % [r;d]
Sys = imp2exp(A,OutputIndex,InputIndex);
Sys.InputName = {'r';'d'};
Sys.OutputName = {'y';'u';'e';'f'};
pole(Sys)
ans =
-0.7070 + 0.7072i
-0.7070 - 0.7072i
step(Sys)

The number of rows of A must equal the length of yidx.

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |