Error converting discrete to continous transfer function

9 次查看(过去 30 天)
Hello, when i run my code:
z =tf('z',0.001)
P = 5
I = 5;
D = 5;
C= P + I*(1/(1-z^(-1))) + D*(1-z^(-1));
Cs=d2c(C)
it gives the error:
Error using DynamicSystem/d2c (line 101)
The "zoh" and "foh" methods cannot be used for discrete models with poles near z=0.
Error in Untitled3 (line 6)
Cs=d2c(C)
May I know how to fix this error and convert my transfer function to continous?

采纳的回答

Raj
Raj 2019-4-16
Your error message is self explanatory. If you dont specify any method for 'd2c' it takes zero order hold method by default and as the error message says 'zoh' and 'foh' cannot be used when you have a pole at '0'. Infact even 'matched' method will not work in this case.
Just change the method to 'tustin' method with following command:
Cs=d2c(C,'tustin')
For details see here.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dynamic System Models 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by