Creating and Manipulating Models | ![]() ![]() |
Special Cases for Operations on LTI Arrays
There are some special cases in coding operations on LTI arrays.
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:
op
applies sys2
to each model in sys1
, and the kth model in sys satisfies
+
, *
, /
, 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 MATLAB's scalar expansion capabilities for arithmetic operations.
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
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
.
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]); end H = [h 0; -1 tf(1,[1 0])]; %Concatenation: array h & single models size(H) 3x1 array of continuous-time transfer functions Each transfer function has 2 output(s) and 2 input(s).
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.
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,
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-2 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,
adds a single SISO transfer function model to each entry in each model of the LTI array of MIMO models [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.
![]() | Dimension Requirements | Other Operations on LTI Arrays | ![]() |