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

5 views (last 30 days)
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;
xlim([80 1300])

Accepted Answer

Ameer Hamza
Ameer Hamza on 14 Oct 2020
This is a problem with MATLAB. It is the expected result based on your transfer function. sys_1_vd is a 17-order transfer function. If you look at the poles of the transfer function
>> pole(sys_1_vd)
ans =
1.0e+04 *
-1.3334 + 0.0000i
-1.3334 - 0.0000i
-1.3333 + 0.0000i
-1.1605 + 0.0000i
-0.9684 + 0.0000i
-0.2047 + 0.0000i
-0.0869 + 0.0000i
-0.0026 + 0.0324i
-0.0026 - 0.0324i
-0.0029 + 0.0319i
-0.0029 - 0.0319i
0.0000 + 0.0314i
0.0000 - 0.0314i
-0.0000 + 0.0314i
-0.0000 - 0.0314i
0.0000 + 0.0314i
0.0000 - 0.0314i
You can see several poles are concentrated in region 314 to 324 rad/s. The peak is the effects of these poles.

More Answers (1)

Manyu Hati
Manyu Hati on 14 Oct 2020
Edited: Manyu Hati on 14 Oct 2020
Thank you for your answer. Based on your reply, I finally found and fixed the error. From now on, I will try this advice if I come across a similar issue. Kind regards

Categories

Find more on Get Started with Control System Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!