How can I fix the error that produces this peak in Bode plot?

Beginner1 via Help-octave <[email protected]>
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
Hi, 
I am plotting a Bode diagram of a simple resonant control function for a RL
load and there is a 'sharp peak' around the target frequency on both the 
magnitude and the phase diagrams. This sharp peak should not appear and 
without it, the bode plot would be correct. Could you please give me an 
intuition on where the problem is? I know that it has nothing to do with 
the kp_1 and ki_1 parameters, since this peak appears for the complete range
of them. I think there is something wrong on how Matlab treats some
integrators but I am not sure. Here is my code:

 Ub=400/sqrt(3); 
Ib=3.3;% 
w_b=2*pi*50; 
Zbase=(Ub)^2/(sqrt(3)*Ub*Ib); 
Lbase=Zbase/w_b; 
Td=0.00015; 
Rf=0.1; 
Lf=0.0018; 
R=Rf/Zbase; 
L=Lf/Lbase; 
w=2*pi*50; 
kp_1=2*pi*1000*Lf; 
ki_1=(Rf/Lf)*kp_1; 
s=tf('s'); 
G_pwm=(1-(Td/2)*s)/(1+(Td/2)*s);
 G_i_1=kp_1+ki_1*s/(s^2+w^2); 
sys_1_vd=(G_i_1*G_pwm)^2/((L*s+R+G_i_1*G_pwm)*(G_i_1*G_pwm+L*s+R-(1-G_i_1)*G_pwm)); 
bode(sys_1_vd,'r'); 
grid on; 
<https://octave.1599824.n4.nabble.com/file/t372684/Bode2.jpg> 




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.