Products & Services Solutions Academia Support User Community Company

Learn more about Control System Toolbox   

Operations on LTI Arrays

Supported Operations on LTI Arrays

Using LTI arrays, you can apply almost all of the basic model operations that work on single LTI models to entire sets of models at once. These basic operations include

When you apply any of these operations to two (or more) LTI arrays (for example, sys1 and sys2), the operation is implemented on a model-by-model basis. Therefore, the kth model of the resulting LTI array is derived from the application of the given operation to the kth model of sys1 and the kth model of sys2.

For example, if sys1 and sys2 are two LTI arrays and

sysa = op(sys1,sys2)

then the kth model in the resulting LTI array sys is obtained by adding the kth models in sys1 to the kth model in sys2

sysa(:,:,k) = sys1(:,:,k) + sys2(:,:,k)

You can also apply any of the response plotting functions such as step, bode, and nyquist to LTI arrays. These plotting functions are also applied on a model by model basis.

Example: Addition of Two LTI Arrays

The following diagram illustrates the addition of two 3-by-1 LTI arrays sys1+sys2.

Addition of Two LTI Arrays

The summation of these LTI arrays

sysa = sys1+sys2

is equivalent to the following model-by-model summation:

for k = 1:3
  sysa(:,:,k)=sys1(:,:,k) + sys2(:,:,k)
end

Note that:

The following sections describe these topics:

Dimension Requirements

In general, when you apply any of these basic operations to two or more LTI arrays:

The I/O dimensions of each model in the resulting LTI array are determined by the operation being performed. See Operations on LTI Models for requirements on the I/O dimensions for the various operations.

For example, if sys1 and sys2 are both 1-by-3 arrays of LTI models with two inputs and two outputs, and sys3 is a 1-by-3 array of LTI models with two outputs and 1 input, then

sys1 + sys2

is an LTI array with the same dimensions as sys1 and sys2.

sys1 * sys3

is a 1-by-3 array of LTI models with two outputs and one input, and

[sys1,sys3]

is a 1-by-3 array of LTI models with two outputs and three inputs.

Special Cases for Operations on LTI Arrays

There are some special cases in coding operations on LTI arrays.

Consider

sysa = op(sys1,sys2)

where op is a symbol for the operation being applied. sys1 is an LTI array, and sysa (the result of the operation) is an LTI array with the same array dimensions as sys1. You can use shortcuts for coding sysa = op(sys1,sys2) in the following cases:

Examples of Operations on LTI Arrays with Single LTI Models

Suppose you want to create an LTI array containing three models, where, for in the set , each model has the form

You can do this efficiently by first setting up an LTI array h containing the SISO models and then using concatenation to form the LTI array H of MIMO LTI models , . To do this, type

tau = [1.1 1.2 1.3];
for i=1:3                   % Form LTI array h of SISO models.
  h(:,:,i)=tf(1,[1 tau(i)]); 
end
H = [h 0; -1 tf(1,[1 0])]; %Concatenation: array h & single models
size(H)

3x1 array of transfer functions.
Each model has 2 outputs and 2 inputs.

Similarly, you can use append to perform the diagonal appending of each model in the SISO LTI array h with a fixed single (SISO or MIMO) LTI model.

S = append(h,tf(1,[1 3])); % Append a single model to h.

specifies an LTI array S in which each model has the form

You can also combine an LTI array of MIMO models and a single MIMO LTI model using arithmetic operations. For example, if h is the LTI array of three SISO models defined above,

[h,h] + [tf(1,[1 0]),tf(1,[1 5])]

adds the single one-output, two-input LTI model [1/s 1/(s + 5)] to every model in the 3-by-1 LTI array of one-output, two-input models [h,h]. The result is a new 3-by-1 array of models.

Examples: Arithmetic Operations on LTI Arrays and SISO Models

Using the LTI array of one-output, two-input state-space models [h,h], defined in the previous example,

tf(1,[1 3]) + [h,h]

adds a single SISO transfer function model to each entry in each model of the LTI array of MIMO models [h,h].

Finally,

G = rand(1,1,3,1);
sysa = G + [h,h]

adds the array of scalars to each entry of each MIMO model in the LTI array [h,h] on a model-by-model basis. This last command is equivalent to the following for loop.

hh = [h,h];
for k = 1:3
  sysa(:,:,k) = G(1,1,k) + hh(:,:,k);
end

Other Operations on LTI Arrays

You can also apply the analysis functions, such as bode, nyquist, and step, to LTI arrays.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS