How to create a transfer function system model from code with given parameters?

1 次查看(过去 30 天)
I want to replicate a transfer function system model I created with tfest in code.
Here is the model I want to replicate.
>> tf21 = tfest(data_est,2,1,'Ts',1)
tf21 =
From input "u1" to output "y1":
0.9614 z^-1
----------------------------
1 - 1.663 z^-1 + 0.8313 z^-2
Name: tf21
Sample time: 1 seconds
Discrete-time identified transfer function.
Parameterization:
Number of poles: 2 Number of zeros: 1
Number of free coefficients: 3
Use "tfdata", "getpvec", "getcov" for parameters and their uncertainties.
Status:
Estimated using TFEST on time domain data "data_est".
Fit to estimation data: 84.81%
FPE: 1.025, MSE: 1.013
>> tf21.Numerator
ans =
0 0.9614
>> tf21.Denominator
ans =
1.0000 -1.6634 0.8313
Here's what I tried:
>> numerator = [0 0.9614];
>> denominator = [1.0000 -1.6634 0.8313];
>> tf_si = tf(numerator,denominator,'ts',1)
tfsi =
0.9614
----------------------
z^2 - 1.663 z + 0.8313
Sample time: 1 seconds
Discrete-time transfer function.
This doesn't look right. I need the same function that maps inputs to outputs. How do I set the coefficients for z^-2 and z^-1 on the denominator so they are the same as in the model I am trying to replicate?

采纳的回答

Star Strider
Star Strider 2020-2-4
Try this:
numerator = [0 0.9614 0];
denominator = [1.0000 -1.6634 0.8313 0];
tf_si = tf(numerator,denominator,'ts',1, 'Variable','z^-1')
producing:
tf_si =
0.9614 z^-1
----------------------------
1 - 1.663 z^-1 + 0.8313 z^-2
Sample time: 1 seconds
Discrete-time transfer function.
All the relevant vector elements need to be specified.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Model Identification 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by