c2d function 'zoh' method formula
이전 댓글 표시
Hi!
My following question would be, say i have a continuous time PI controller:
and i apply the function c2d(
,
,'zoh'), then it appears that matlab uses he substitution:
Which is completly fine, however if i have a transfer function like:
then when applying the c2d function c2d(
,
,'zoh'), it appears that the previous substitution in this case changes (s!=(z-1)/Ts)depending on the value of
. I would like to know why Matlab does this, and what is its algebraic formula if possible?
Thank you!
채택된 답변
추가 답변 (4개)
raphael antunes
2022년 10월 3일
n=1.501877347e+06;
d=[1 4.255319149e+03 125.1564456e0+03];
g=tf(n,d)
gz=c2d(g,0.000369,'zoh')
pole(gz)
zero(gz)
댓글 수: 1
Paul
2022년 10월 3일
If this Answer is supposed to be a new Question, I suggest deleting this answer and posting a new Question (with more detail on what the question actually is, in addition to the code).
raphael antunes
2022년 10월 4일
n=1.502e+06;
d=[1 4.255e+03 125.1e+03];
g=tf(n,d)
gz=c2d(g,0.0000125,'zoh')
z=tf('z');
c=(z-0.9998)/(z-1)
step(feedback(gz*c/(1+gz*c)))
%|----------------Função de transferência em tempo continuo----------|
n=1.502e+06;
d=[1 4.255e+03 125.1e+03];
g=tf(n,d)
rlocus(g)
%|-------------------Controlador em tempo continuo-------------------|
s=tf('s');
c=1.1*((s+32.5)/(s+1.2))
%|------------------------Analise de Malha fechada Contínua-----------------------------|
gf=g*c/(1+g*c)
pole(gf)
zero(gf)
step(gf,0.5)
%|----------------------------ZOH--------------------------------|
gz=c2d(g,0.0000125,'zoh')
pole(gz)
zero(gz)
%|----------------------------Discretização--------------------------------|
cz=c2d(c,0.0000125,'tustin')
cprewarping=c2d(c,0.0000125,c2dOptions('Method','tustin','PrewarpFrequency',1))
cmpz=c2d(c,0.0000125,'matched')
%|------------------------Analise de Malha fechada discreta-----------------------------|
gfz=gz*cz/(1+gz*cz)
pole(gfz)
zero(gfz)
%|-------------------------Resposta ao degrau (aproximações discretas)------------------|
step(feedback(cmpz*gz,1),'r',0.5)
hold on
step(feedback(cprewarping*gz,1),'b',0.5)
step(feedback(cmpz*gz,1),'G',0.5)
legend('Tustin','Tustin prewarping ','MPZ')
%|-------------------------continuo x discreto----------------------------|
step(feedback(cmpz*gz,1),'r',0.5)
hold on
step(gf,'b',0.5)
step(feedback(cmpz*gz,1),'r',0.05)
hold on
step(gf,'b',0.05)
raphael antunes
2022년 10월 14일
n=-20.27;
d=[1 0 -66.93];
g=tf(n,d)
s=tf('s');
pi1=1.3*s+6;
g1f=feedback(-13.05*g,pi1)
aux=(-0.1628*s^2+9.81)/s^2
pi2=0.8*s+0.7;
g2f=feedback(pi2*g1f*aux,1)
step(g2f)
카테고리
도움말 센터 및 File Exchange에서 Pole and Zero Locations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


