Skip to Main Content Skip to Search
Home |   Select Country  Choose Country  |  Contact Us  |  Cart Store 
Create Account | Log In
Products & Services Solutions Academia Support User Community Company
spacer spacer spacer spacer spacer spacer

 

Control System Toolbox 8.4

Introduction to the Control System Toolbox - 4 - Converting Linear Time-Invariant (LTI) Models from One Type to Another

In this demo, we'll use the Control System Toolbox to convert LTI models from one type to another, using a single command. We show the possible conversions through examples.

Contents

Introduction

In the illustration shown here, we see all the possible LTI model conversions.

GSModelTypeConversions_aux(1) % Draw Diagram

Figure 1: All possible model conversions.

Model Type Conversions

We'll use these functions to covert from one format to another:

sys = tf(sys) % Conversion to TF

sys = zpk(sys) % Conversion to ZPK

sys = ss(sys) % Conversion to SS

sys = frd(sys,frequency) % Conversion to FRD

Note that we cannot convert FRD models to the other model types. Also note that conversion to FRD requires a frequency vector as input.

Example: Converting from State-Space(SS) to Zero-Pole-Gain (ZPK)

This example illustrates a conversion from state-space to zero-pole-gain

GSModelTypeConversions_aux(2) % Draw Diagram

Figure 2: State-space to zero-pole-gain conversion

In this example we convert the state-space model:

sys = ss(-2,1,1,3)
 
a = 
       x1
   x1  -2
 
 
b = 
       u1
   x1   1
 
 
c = 
       x1
   y1   1
 
 
d = 
       u1
   y1   3
 
Continuous-time model.

To a zero-pole-gain model using:

sys = zpk(sys)
 
Zero/pole/gain:
3 (s+2.333)
-----------
   (s+2)
 

Example: Implicit Model Conversion

Next, lets look at an implicit model conversion.

GSModelTypeConversions_aux(3) % Draw Diagram

Figure 3: Implicit model conversion

Some algorithms operate on only one type of LTI model. For convenience, such commands automatically convert LTI models to the appropriate or required model type. In the example below, the function TFDATA internally converts the state-space model 'sys' to an equivalent transfer function model in order to obtain its numerator and denominator data.

sys = ss(0,1,1,0)
[num,den] = tfdata(sys)
 
a = 
       x1
   x1   0
 
 
b = 
       u1
   x1   1
 
 
c = 
       x1
   y1   1
 
 
d = 
       u1
   y1   0
 
Continuous-time model.

num = 

    [1x2 double]


den = 

    [1x2 double]

Additional Information

For more information on feedback control design with the Control System Toolbox, see the Control System Toolbox product information page.

From here you can download a free 30-day trial, read the documentation and user stories, request more information, and get pricing information. See these additional demos of Control System Toolbox functionality:

Contact sales
Free technical kit
Trial software
E-mail this page

Get Pricing and
Licensing Options