Discritization of transfer function

12 次查看(过去 30 天)
Namaste,
I want to implement higher order transfer function in microcontroller. I have used 'c2d' command with all available options but not getting satisfactory results.
So I want to use Al-alaoui transform (s=[8(1-z^-1)]/[7*T(1+(1/(7*z)))] where T is 0.1sec in my program) into my program. I have used symbolic toolbox but not getting simplified results.
Can anyone help me
  2 个评论
David Wilson
David Wilson 2019-6-5
Here's my take on your problem: I've invented an arbitrary continuous TF (since you neglected to tell us what you are dealing with), and then discretised it in a variety of ways, including your "AA" method. Results are relatively poor, except at small sample times.
tau = 2; zeta = 0.5;
Gc = tf([5 2],conv([6 5 4],[tau^2 2*tau*zeta 1])) % continuous TF
Ts = 1; % sampling time [s]
B = cell2mat(Gc.Numerator);
A = cell2mat(Gc.Denominator);
G = poly2sym(B,s)/poly2sym(A,s);
syms s z T
Gd = subs(G,s,8*(1-1/z)/(7*T*(1+1/7/z)))
Gd = subs(Gd,T,Ts); [N,D] = numden(Gd); Gd1 = tf(sym2poly(N), sym2poly(D),Ts);
%Gd = subs(Gd2,T,Ts); [N,D] = numden(Gd); Gd2 = tf(sym2poly(N), sym2poly(D),Ts);
Gd2 = c2d(Gc,Ts,'zoh');
Gd3 = c2d(Gc,Ts,'foh');
Gd4 = c2d(Gc,Ts,'tustin');
step(Gc, Gd1, Gd2, Gd3, Gd4)
legend('G_c','AA')
uttam gavand
uttam gavand 2019-6-8
Thank you ?, with some modifications achieved my desired output.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by