Sei sulla pagina 1di 4

MIMO Model Creation

How to create multi-input, multi-output (MIMO) models.


On this page
MIMO Transf er Function Model
MIMO State-Space Model
MIMO Descriptor State-Space Model
MIMO Frequency Response Data Model
Select Input/Output Pairs in MIMO Models
MIMO Transfer Function Model
This example shows how to create a multi-input, multi-output (MIMO) transf er f unction model by concatenating single-input, single-
output (SISO) transf er f unction models.
To create the one-input, two-output MIMO transf er f unction:
perf orm the f ollowing steps:
1. Create SISO transf er f unctions f or each channel.
g11 = tf([1 -1],[1 1]);
g21 = tf([1 2],[1 4 5]);
Tip Use zpk instead of tf to create MIMO transf er f unctions in f actorized f orm.
2. Concatenate the transf er f unctions.
G = [g11; g21];
More About
MIMO State-Space Model
This example shows how to create a MIMO state-space model using ss.
You create a MIMO state-space model in the same way as you create a SISO state-space model. The only dif f erence between the
SISO and MIMO cases is the dimensions of the state-space matrices. The dimensions of the B, C, and D matrices increase with the
numbers of inputs and outputs as shown in the f ollowing illustration.
In this example, you create a state-space model f or a rotating body with inertia tensor J, damping f orce F, and three axes of
rotation, related as:
The system input T is the driving torque. The output y is the vector of angular velocities of the rotating body.
To express this system in state-space f orm:
rewrite it as:
Then the state-space matrices are:
To create this model, enter the f ollowing commands:
J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -J\F;
B = inv(J);
C = eye(3);
D = 0:
sys_mimo = ss(A,B,C,D);
These commands assume that J is the inertia tensor of a cube rotating about its corner, and the damping f orce has magnitude 0.2.
sys_mimo is an ss model.
More About
MIMO Descriptor State-Space Model
This example shows how to create a continuous-time descriptor (implicit) state-space model using dss.
Note: This example uses the same rotating-body system shown in MIMO State-Space Model, where you inverted the
inertia matrix J to obtain the value of the B matrix. If J is poorly-conditioned f or inversion, you can instead use a descriptor
(implicit) state-space model.
A descriptor (implicit) state-space model is of the f orm:
Create a state-space model f or a rotating body with inertia tensor J, damping f orce F, and three axes of rotation, related as:
The system input T is the driving torque. The output y is the vector of angular velocities of the rotating body. You can write this
system as a descriptor state-space model having the f ollowing state-space matrices:
To create this system, enter:
J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -F;
B = eye(3);
C = eye(3);
D = 0;
E = J;
sys_mimo = dss(A,B,C,D,E)
These commands assume that J is the inertia tensor of a cube rotating about its corner, and the damping f orce has magnitude 0.2.
sys is an ss model with a nonempty E matrix.
More About
MIMO Frequency Response Data Model
This example shows how to create a MIMO f requency-response model using frd.
Frequency response data f or a MIMO system includes a vector of complex response data f or each of the input/output (I/O) pair of
the system. Thus, if you measure the f requency response of each I/O pair your system at a set of test f requencies, you can use
the data to create a f requency response model:
1. Load f requency response data in AnalyzerDataMIMO.mat.
load AnalyzerDataMIMO H11 H12 H21 H22 freq
This command loads the data into the MATLAB

workspace as f ive column vectors H11, H12, H21, H22, and freq. The
vector freq contains 100 test f requencies. The other f our vectors contain the corresponding complex-valued f requency
response of each I/O pair of a two-input, two-output system.
Tip To inspect these variables, enter:
whos H11 H12 H21 H22 freq
2. Organize the data into a three-dimensional array.
Hresp = zeros(2,2,length(freq));
Hresp(1,1,:) = H11;
Hresp(1,2,:) = H12;
Hresp(2,1,:) = H21;
Hresp(2,2,:) = H22;
The dimensions of Hresp are the number of outputs, number of inputs, and the number of f requencies f or which there is
response data. Hresp(i,j,:) contains the f requency response f rom input j to output i.
3. Create a f requency-response model.
H = frd(Hresp,freq);
sys is an frd model object, which is a data container f or representing f requency response data.
You can use frd models with many f requency-domain analysis commands. For example, visualize the response of this two-input,
two-output system using bode.
Tip By def ault, the frd command assumes that the f requencies are in radians/second. To specif y dif f erent f requency
units, use the TimeUnit and FrequencyUnit properties of the frd model object. For example:
sys = frd(Hresp,freq,'TimeUnit','min','FrequencyUnit','rad/TimeUnit')
sets the f requency units to in radians/minute.
More About
Select Input/Output Pairs in MIMO Models
This example shows how to select the response f rom the f irst input to the second output of a MIMO model.
1. Create a two-input, one-output transf er f unction.
N = {[1 -1],[1];[1 2],[3 1 4]};
D = [1 1 10];
H = tf(N,D)
Note: For more inf ormation about using cell arrays to create MIMO transf er f unctions, see the tf ref erence page.
2. Select the response f rom the second input to the output of H.
To do this, use MATLAB array indexing.
H12 = H(1,2)
For any MIMO system H, the index notation H(i,j) selects the response f rom the jth input to the ith output.

Potrebbero piacerti anche