Creating and Manipulating Models | ![]() ![]() |
Setting LTI Properties
There are three ways to specify LTI property values:
tf
, zpk
, ss
, or frd
.
set
.
This section discusses the first two options. See Direct Property Referencing for details on the third option.
The function set
for LTI objects follows the same syntax as its Handle Graphics counterpart. Specifically, each property is updated by a pair of arguments
PropertyName
is a string specifying the property name. You can type the property name without regard for the case (upper or lower) of the letters in the name. Actually, you need only type any abbreviation of the property name that uniquely identifies the property. For example, 'user'
is sufficient to refer to the Userdata
property.
PropertyValue
is the value to assign to the property (see set
for details on admissible property values).
As an illustration, consider the following simple SISO model for a heating system with an input delay of 0.3 seconds, an input called "energy," and an output called "temperature."
Figure 1-1: A Simple Heater Model
You can use a TF object to represent this delay system, and specify the time delay, the input and output names, and the model history by setting the corresponding LTI properties.
You can either set these properties directly when you create the LTI model with tf
, or by using the set
command.
For example, you can specify the delay directly when you create the model, and then use the set
command to assign InputName
, OutputName
, and Notes
to sys
.
sys = tf(1,[1 1],'Inputdelay',0.3); set(sys,'inputname','energy','outputname','temperature',... 'notes','A simple heater model')
Finally, you can also use the set
command to obtain a listing of all settable properties for a given LTI model type, along with valid values for these properties. For the transfer function sys
created above
num: Ny-by-Nu cell of row vectors (Nu = no. of inputs) den: Ny-by-Nu cell of row vectors (Ny = no. of outputs) Variable: [ 's' | 'p' | 'z' | 'z^-1' | 'q' ] Ts: scalar InputDelay: Nu-by-1 vector OutputDelay: Ny-by-1 vector ioDelay: Ny-by-Nu array (I/O delays) InputName: Nu-by-1 cell array of strings OutputName: Ny-by-1 cell array of strings InputGroup: M-by-2 cell array if M input groups OutputGroup: P-by-2 cell array if P output groups Notes: array or cell array of strings UserData: arbitrary
![]() | Model-Specific Properties | Accessing Property Values Using get | ![]() |