Error converting discrete to continous transfer function

9 vues (au cours des 30 derniers jours)
Bernie Ngoh
Bernie Ngoh le 16 Avr 2019
Réponse apportée : Raj le 16 Avr 2019
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?

Réponse acceptée

Raj
Raj le 16 Avr 2019
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.

Plus de réponses (0)

Catégories

En savoir plus sur Dynamic System Models dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by