LTI Models Creating LTI Models 2-8 LTI Properties 2-25 Model Conversion Time delays Simulink Block for LTI Systems 2-54 References
2 LTI Models Creating LTI Models . . . . . . . . . . . . . . . . 2-8 LTI Properties . . . . . . . . . . . . . . . . . . . 2-25 Model Conversion . . . . . . . . . . . . . . . . . 2-40 Time Delays . . . . . . . . . . . . . . . . . . . . 2-43 Simulink Block for LTI Systems . . . . . . . . . . . 2-54 References . . . . . . . . . . . . . . . . . . . . . 2-56
2 LTI Models The Control System Toolbox offers extensive tools to manipulate and analyze linear time-invariant(LTD)models. It supports both continuous- and discrete-time systems. Systems can be single-input/single-output (SISO) multiple-input/multiple-output(MIMO). In addition, you can store several LTI models in an array under a single variable name. See Chapter 4, "Arrays oflTI Models"for information on Lti arrays This section introduces key concepts about the matlAB representation of LTI models, including LTI objects, precedence rules for operations, and an analogy between LTI systems and matrices. In addition, it summarizes the basic commands you can use on LTI objects LTI Models You can specify LTi models as: Transfer functions (Tf), for example P(s)= +S+ Zero-pole-gain models(zPK), for example, H()=2(z-0 0)a001 State-space models(SS), for example, d Cx+ Du where A, B, C, and D are matrices of appropriate dimensions, x is the state vector, and u and y are the input and output vectors. data(FRD)models FRD models consist of sampled measurements of a systems frequency response. For example, you can store experimentally collected frequency nse data in an frd 2-2
2 LTI Models 2-2 The Control System Toolbox offers extensive tools to manipulate and analyze linear time-invariant (LTI) models. It supports both continuous- and discrete-time systems. Systems can be single-input/single-output (SISO) or multiple-input/multiple-output (MIMO). In addition, you can store several LTI models in an array under a single variable name. See Chapter 4, “Arrays of LTI Models” for information on LTI arrays. This section introduces key concepts about the MATLAB representation of LTI models, including LTI objects, precedence rules for operations, and an analogy between LTI systems and matrices. In addition, it summarizes the basic commands you can use on LTI objects. LTI Models You can specify LTI models as: • Transfer functions (TF), for example, • Zero-pole-gain models (ZPK), for example, • State-space models (SS), for example, where A, B, C, and D are matrices of appropriate dimensions, x is the state vector, and u and y are the input and output vectors. • Frequency response data (FRD) models FRD models consist of sampled measurements of a system’s frequency response. For example, you can store experimentally collected frequency response data in an FRD. P s( ) s + 2 s2 + +s 10 = --------------------------- H z( ) 2( ) z – 0.5 z z( ) + 0.1 ------------------------- z 2 ( ) + + z 1 ( ) z + 0.2 ( ) z + 0.1 -------------------------------------------- = dx dt ------ = Ax Bu + y Cx Du = +
Using LTI Models in the Control System Toolbox You can manipulate TF, SS, and ZPK models using the arithmetic and model interconnection operations described in Chapter 3, " Operations on LTI Models and analyze them using the model analysis functions, such as bode and step FRD models can be manipulated and analyzed in much the same way you analyze the other model types, but analysis is restricted to frequency-domain Using a variety of design techniques, you can design compensators for systems specified with TF, ZPK, SS, and FRD models. These techniques include root locus analysis, pole placement, LQG optimal control, and frequency domain loop-shaping For FRD models, you can either Obtain an identified TF, SS, or ZPK model using system identification technique Use frequency-domain analysis techniques Other Uses of frd models FRD models are unique model types available in the Control System Toolbox collection of LTI model types, in that they dont have a parametric representation. In addition to the standard operations you may perform on FRD models, you can also use them to Perform frequency-domain analysis on systems with nonlinearities using describing functions. Validate identified models against experimental frequency response data LTI Objects Depending on the type of model you use, the data for your model may consist of a simple numerator/denominator pair for SISo transfer functions, four matrices for state-space models, and multiple sets of zeros and poles for MIMO zero-pole-gain models or frequency and response vectors for FRD models. For convenience, the Control System Toolbox provides customized data structures (LTT objects) for each type of model. These are called the TF, ZPK, SS, and FRD objects. These four LTI objects encapsulate the model data and enable you to manipulate LTI systems as single entities rather than collections of data vectors or matrices
2-3 Using LTI Models in the Control System Toolbox You can manipulate TF, SS, and ZPK models using the arithmetic and model interconnection operations described in Chapter 3, “Operations on LTI Models” and analyze them using the model analysis functions, such as bode and step. FRD models can be manipulated and analyzed in much the same way you analyze the other model types, but analysis is restricted to frequency-domain methods. Using a variety of design techniques, you can design compensators for systems specified with TF, ZPK, SS, and FRD models. These techniques include root locus analysis, pole placement, LQG optimal control, and frequency domain loop-shaping. For FRD models, you can either: • Obtain an identified TF, SS, or ZPK model using system identification techniques. • Use frequency-domain analysis techniques. Other Uses of FRD Models FRD models are unique model types available in the Control System Toolbox collection of LTI model types, in that they don’t have a parametric representation. In addition to the standard operations you may perform on FRD models, you can also use them to: • Perform frequency-domain analysis on systems with nonlinearities using describing functions. • Validate identified models against experimental frequency response data. LTI Objects Depending on the type of model you use, the data for your model may consist of a simple numerator/denominator pair for SISO transfer functions, four matrices for state-space models, and multiple sets of zeros and poles for MIMO zero-pole-gain models or frequency and response vectors for FRD models. For convenience, the Control System Toolbox provides customized data structures (LTI objects) for each type of model. These are called the TF, ZPK, SS, and FRD objects. These four LTI objects encapsulate the model data and enable you to manipulate LTI systems as single entities rather than collections of data vectors or matrices
2 LTI Models Creating an LTI Object: An Example An Lti object of the type TF, ZPK, Ss, or FRD is created whenever you invoke the corresponding constructor function, tf, zpk, ss, or frd. For example P=tf([12],[11101) creates a TF object, P, that stores the numerator and denominator coefficients of the transfer function Ps S+2 See"Creating LTI Models"on page 2-8 for methods for creating all of the LTI bject types LTI Properties and Methods The LTi object implementation relies on MATLAB object-oriented programming capabilities. Objects are MATLAB structures with an additional flag indicating their class (TF, ZPK, SS, or FRD for LTi objects)and have pre-defined fields called object properties. For LTI objects, these properties input or output groups(see "LTI Properties" on page 2-25 for details). The 9 include the model data, sample time, delay times, input or output names, an functions that operate on a particular object are called the object methods. These may include customized versions of simple operations such as addition or multiplication. For example, P=tf(12],[11101) Q=2+P performs transfer function addition. s)=2+P(s) 2s+3s+22 +S+10 operations. For more details on objects, methods, and object-orienteg erloaded The object-specific versions of such standard operations are called programming, see Chapter 14, "Classes and Objects"in Using MATLAB. For details on operations on LTi objects, see Chapter 3, "Operations on LTI Models
2 LTI Models 2-4 Creating an LTI Object: An Example An LTI object of the type TF, ZPK, SS, or FRD is created whenever you invoke the corresponding constructor function, tf, zpk, ss, or frd. For example, P = tf([1 2],[1 1 10]) creates a TF object, P, that stores the numerator and denominator coefficients of the transfer function See “Creating LTI Models” on page 2-8 for methods for creating all of the LTI object types. LTI Properties and Methods The LTI object implementation relies on MATLAB object-oriented programming capabilities. Objects are MATLAB structures with an additional flag indicating their class (TF, ZPK, SS, or FRD for LTI objects) and have pre-defined fields called object properties. For LTI objects, these properties include the model data, sample time, delay times, input or output names, and input or output groups (see “LTI Properties” on page 2-25 for details). The functions that operate on a particular object are called the object methods. These may include customized versions of simple operations such as addition or multiplication. For example, P = tf([1 2],[1 1 10]) Q = 2 + P performs transfer function addition. The object-specific versions of such standard operations are called overloaded operations. For more details on objects, methods, and object-oriented programming, see Chapter 14, “Classes and Objects” in Using MATLAB. For details on operations on LTI objects, see Chapter 3, “Operations on LTI Models.” P s( ) s + 2 s2 + +s 10 = --------------------------- Q s( ) 2 + P s( ) 2s 2 + + 3s 22 s 2 + +s 10 = = ----------------------------------
Precedence rules perations like addition and commands like feedback operate on more than one LTI model at a time. If these LTI models are represented as Lti objects of different types(for example, the first operand is TF and the second operand SS), it is not obvious what type( for example, TF or SS) the resulting model should be Such type conflicts are resolved by precedence rules. Specifically, TF, ZPK, SS, and FRd objects are ranked according to the precedence hierarchy FRD> SS > ZPK> TF Thus ZPK takes precedence over TF, ss takes precedence over both TF and ZPK, and FRD takes precedence over all three. In other words, any operation involving two or more LTi models produces An FRD object if at least one operand is an FRD object An SS object if no operand is an FRD object and at least one operand is an SS object A ZPK object if no operand is an FRD or SS object and at least one is an ZPK A TF object only if all operands are TF objects Operations on systems of different types work as follows: the resulting type is determined by the precedence rules, and all operands are first converted to this type before performing the operation Viewing LTI Systems As Matrices In the frequency domain, an LTI system is represented by the linear input/ output map This map is characterized by its transfer matrix H, a function of either the Laplace or Z-transform variable. The transfer matrix H maps inputs to outputs, so there are as many columns as inputs and as many rows as outputs If you think of Lti systems in terms of(transfer)matrices, certain basic operations on LTI systems are naturally expressed with a matrix-like syntax. For example, the parallel connection of two LTI systems sysl and sys2 can be
2-5 Precedence Rules Operations like addition and commands like feedback operate on more than one LTI model at a time. If these LTI models are represented as LTI objects of different types (for example, the first operand is TF and the second operand is SS), it is not obvious what type (for example, TF or SS) the resulting model should be. Such type conflicts are resolved by precedence rules. Specifically, TF, ZPK, SS, and FRD objects are ranked according to the precedence hierarchy. Thus ZPK takes precedence over TF, SS takes precedence over both TF and ZPK, and FRD takes precedence over all three. In other words, any operation involving two or more LTI models produces: • An FRD object if at least one operand is an FRD object • An SS object if no operand is an FRD object and at least one operand is an SS object • A ZPK object if no operand is an FRD or SS object and at least one is an ZPK object • A TF object only if all operands are TF objects Operations on systems of different types work as follows: the resulting type is determined by the precedence rules, and all operands are first converted to this type before performing the operation. Viewing LTI Systems As Matrices In the frequency domain, an LTI system is represented by the linear input/ output map This map is characterized by its transfer matrix H, a function of either the Laplace or Z-transform variable. The transfer matrix H maps inputs to outputs, so there are as many columns as inputs and as many rows as outputs. If you think of LTI systems in terms of (transfer) matrices, certain basic operations on LTI systems are naturally expressed with a matrix-like syntax. For example, the parallel connection of two LTI systems sys1 and sys2 can be expressed as FRD > SS > ZPK > TF y Hu =