function [SBS_gl_log SBS_gl_phase]=SBS_gl(P_pump,m,d)
global f L gamma_B
g0=0.2;                 % (Wm)^(-1)
alpha_log=0.2;          % fiber logarithm attenuation, unit: dB/km
alpha_lin=alpha_log/4.343;                                 % fiber linear attenuation, unit: /km
L_eff=(1-exp(-alpha_lin*L))/alpha_lin;                     % effective length, unit: km

G_complex=0.5*g0*P_pump*L_eff./(1-2*i*f/gamma_B)...
    -0.5*g0*P_pump*m*L_eff./(1-2*i*(f-d*gamma_B)/gamma_B)...
    -0.5*g0*P_pump*m*L_eff./(1-2*i*(f+d*gamma_B)/gamma_B);    % complex SBS loss coefficient
SBS_gl_lin=real(exp(G_complex));
SBS_gl_log=10*log10(real(exp(G_complex)));                        % real part: amplitude loss
SBS_gl_phase=imag(G_complex);                                     % imaginary part: phase response
