This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Recommended Model Type for Building Block Diagrams

This example shows how choice of model type can affect numerical accuracy when interconnecting models.

You can represent block diagram components with any model type. However, certain connection operations yield better numerical accuracy for models in ss form.

For example, interconnect two models in series using different model types to see how different representations introduce numerical inaccuracies.

Load the models Pd and Cd. These models are ninth-order and second-order discrete-time transfer functions, respectively.

load numdemo Pd Cd

Compute the open-loop transfer function L = Pd*Cd using the tf, zpk, ss, and frd representations.

Ltf = Pd*Cd;     
Lzp = zpk(Pd)*Cd;
Lss = ss(Pd)*Cd; 

w = logspace(-1,3,100);
Lfrd = frd(Pd,w)*Cd;

Plot the magnitude of the frequency response to compare the four representations.


The tf representation has lost low-frequency dynamics that other representations preserve.

Related Topics