Creating and Manipulating Models    

Building LTI Arrays Using for Loops

Consider the following second-order SISO transfer function that depends on two parameters, and

Suppose, based on measured input and output data, you estimate confidence intervals , and for each of the parameters, and . All of the possible combinations of the confidence limits for these model parameter values give rise to a set of four SISO models.

Figure 4-6: Four LTI Models Depending on Two Parameters

You can arrange these four models in a 2-by-2 array of SISO transfer functions called H.

Figure 4-7: The LTI Array H

Here, for , represents the transfer function

corresponding to the parameter values and .

The first two colon indices () select all I/O channels from the I/O dimensions of H. The third index of H refers to the first array dimension (), while the fourth index is for the second array dimension ().

Suppose the limits of the ranges of values for and are [0.66,0.76] and [1.2,1.5], respectively. Enter these at the command line.

Since the four models have the same parametric structure, it's convenient to use two nested for loops to construct the LTI array.

H now contains the four models in a 2-by-2 array. For example, to display the transfer function in the (1,2) position of the array, type

For the purposes of efficient computation, you can initialize an LTI array to zero, and then reassign the entire array to the values you want to specify. The general syntax for zero assignment of LTI arrays is

To initialize H in the above example to zero, type

before you implement the nested for loops.


  Generating LTI Arrays Using rss Building LTI Arrays Using the stack Function