| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Control System Toolbox |
| Contents | Index |
| Learn more about Control System Toolbox |
| On this page… |
|---|
Supported Operations on LTI Arrays Example: Addition of Two 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
The arithmetic operations: +, -, *, /, \, ', .'
The functions: concatenation along I/O dimensions ([,], [;]), feedback, append, series, parallel, and lft
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.
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:
Each model in sys1 and sys2 must have the same number of inputs and outputs. This is required for the addition of two LTI arrays.
The lengths of the array dimensions of sys1 and sys2 must match.
The following sections describe these topics:
In general, when you apply any of these basic operations to two or more LTI arrays:
The I/O dimensions of each of the LTI arrays must be compatible with the requirements of the operation.
The lengths of array dimensions must match.
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.
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:
For operations that apply to LTI arrays, sys2 does not have to be an array. It can be a single LTI model (or a gain matrix) whose I/O dimensions satisfy the compatibility requirements for op (with those of each of the models in sys1). In this case, op applies sys2 to each model in sys1, and the kth model in sys satisfies
sysa(:,:,k) = op(sys1(:,:,k),sys2)
For arithmetic operations, such as +, *, /, and \, sys2 can be either a single SISO model, or an LTI array of SISO models, even when sys1 is an LTI array of MIMO models. This special case relies on scalar expansion capabilities for arithmetic operations in the MATLAB technical computing environment.
When sys2 is a single SISO LTI model (or a scalar gain), op applies sys2 to sys1 on an entry-by-entry basis. The ijth entry in the kth model in sysa satisfies
sysa(i,j,k) = op(sys1(i,j,k),sys2)
When sys2 is an LTI array of SISO models (or a multidimensional array of scalar gains), op applies sys2 to sys1 on an entry-by-entry basis for each model in sysa.
sysa(i,j,k) = op(sys1(i,j,k),sys2(:,:,k))
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.
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
You can also apply the analysis functions, such as bode, nyquist, and step, to LTI arrays.
![]() | Indexing into LTI Arrays |

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 |