離散化した伝達関数の応答を調べる。今回はStep応答を調べた。
今プラントをG(z^{-1})、入力をr(t)とすると出力は
\begin{align} y(t)=G(z^{-1}) r(t-1) \end{align}
コード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | s=tf( 's' ); r=ones(1,100); y=zeros(1,100); u=zeros(1,100); for i=3:1:100 y(1,i)=0.936*y(1,i-1)+0.645*r(1,i-2); end P = 10/(15*s+1); A1=c2d(P,1, 'zoh' ) figure subplot(2,1,1) plot(y, 'k' ) grid on subplot(2,1,2) step(A1, 'k' ) grid on |
コメント