Main Content

Estimate Transfer Function Models with Transport Delay to Fit Given Frequency-Response Data

This example shows how to identify a transfer function to fit a given frequency response data (FRD) containing additional phase roll off induced by input delay.

This example requires a Control System Toolbox™ license.

Obtain frequency response data.

For this example, use bode to obtain the magnitude and phase response data for the following system:

H(s)=e-.5ss+0.2s3+2s2+s+1

Use 100 frequency points, ranging from 0.1 rad/s to 10 rad/s, to obtain the frequency response data. Use frd to create a frequency-response data object.

freq = logspace(-1,1,100);
[mag, phase] = bode(tf([1 .2],[1 2 1 1],'InputDelay',.5),freq);
data = frd(mag.*exp(1j*phase*pi/180),freq);

data is an iddata object that contains frequency response data for the described system.

Estimate a transfer function using data. Specify an unknown transport delay for the identified transfer function.

np = 3;
nz = 1;
iodelay = NaN;
sys = tfest(data,np,nz,iodelay);

np and nz specify the number of poles and zeros in the identified transfer function, respectively.

iodelay specifies an unknown transport delay for the identified transfer function.

sys is an idtf model containing the identified transfer function.