Skip to main content
added some code
Source Link
Juha P
  • 937
  • 4
  • 12
b = [0 1.209e09]
a= [9.2175   -2.6952    1.0000]

sys=tf% original -----------------------
sys = tf(b,a,0.1,'Variable','z^-1');

% fixes --------------------------
sys=sys/dcgain(sys);

% scale coefficients by b(2) 
sys1=tf(b/b(2),a/b(2),0.1,'Variable','z^-1')
sys=syssys1=sys1/dcgain(syssys1); 

bode(sys,'-', sys1,'--')

Which results:

Transfer function 'sys' from input 'u1' to output ...

           1.209e+09 z^-2
 y1:  -------------------------
      9.217 - 2.695 z^-1 + z^-2

Transfer function 'sys1' from input 'u1' to output ...

                         z^-2
 y1:  -------------------------------------------
      7.624e-09 - 2.229e-09 z^-1 + 8.271e-10 z^-2
b = [0 1.209e09]
a= [9.2175   -2.6952    1.0000]

sys=tf(b/b(2),a/b(2),0.1,'Variable','z^-1')
sys=sys/dcgain(sys);
bode(sys)

Which results:

Transfer function 'sys' from input 'u1' to output ...

                         z^-2
 y1:  -------------------------------------------
      7.624e-09 - 2.229e-09 z^-1 + 8.271e-10 z^-2
b = [0 1.209e09]
a= [9.2175   -2.6952    1.0000]

% original -----------------------
sys = tf(b,a,0.1,'Variable','z^-1');

% fixes --------------------------
sys=sys/dcgain(sys);

% scale coefficients by b(2) 
sys1=tf(b/b(2),a/b(2),0.1,'Variable','z^-1')
sys1=sys1/dcgain(sys1); 

bode(sys,'-', sys1,'--')

Which results:

Transfer function 'sys' from input 'u1' to output ...

           1.209e+09 z^-2
 y1:  -------------------------
      9.217 - 2.695 z^-1 + z^-2

Transfer function 'sys1' from input 'u1' to output ...

                         z^-2
 y1:  -------------------------------------------
      7.624e-09 - 2.229e-09 z^-1 + 8.271e-10 z^-2
Source Link
Juha P
  • 937
  • 4
  • 12

b = [0 1.209e09]
a= [9.2175   -2.6952    1.0000]

sys=tf(b/b(2),a/b(2),0.1,'Variable','z^-1')
sys=sys/dcgain(sys);
bode(sys)

Which results:

Transfer function 'sys' from input 'u1' to output ...

                         z^-2
 y1:  -------------------------------------------
      7.624e-09 - 2.229e-09 z^-1 + 8.271e-10 z^-2