How to find area under the curve after converting the power spectrum from Watt to dBm

2 views (last 30 days)
PS=0.2; %Input Power
L=10;
h = 6.62607015e-34;
n=1.45; %Index of refraction
eps0=8.854e-12; % [F/m] Vacuum permittivity
mu0 = 4*pi*1e-7;%[H/m] Vacuum permeability
c=2.9979e8; % [m/sec] Speed of light
Z0=sqrt(mu0/eps0); %[Ohm] Vacuum impedance
dt = 2e-12; dz=dt*c/n; %Spacial and Temporal step sizes.
%dz=2.5e-4;
N=round(L/dz); % Fiber length discretization
z=0:dz:(dz*N-dz);
T=10*2*L*n/c; %time taken for 10 round trips
Nt=round(T/dt);
% Nt=2^18;
% T=Nt*dt;
%% material characteristics
lambdaS=1.064e-6; % [m] signal wavelength
lambdaP=0.915e-6; % [m] pump wavelength
WS=2*pi*c/lambdaS; %[rad/sec] signal frequency
GAMMAb=2*pi*45e6; %[1/t] phonons decay rate
A=19.6e-12; %[m^2] fiber's effective area
Va=5.9e3; %[m/s] Velocity of sound
Omega=2*pi*16e9;%[rad/sec] acoustic frequency
% Omega=2*n*Va*WS/c; %[rad/sec]
WB = WS-Omega;
fB=WB/2/pi;
lambdaB=c/fB;
% gammaE=0.8967; %electrostrictive coefficient
gammaE=1.2; %electrostrictive coefficient
kT=300*1.3806504e-23; %[Joule] at room temprature.
roh0=2201; % [kg/m^3] mean density for SiO2, bulk (http://www.virginiasemi.com/pdf/generalpropertiesSi62002.pdf) .
Q=2*kT*roh0*GAMMAb/(Va^2*A); %Noise std.
g0=(gammaE^2*WS^2)/n/c^3/Va/roh0/GAMMAb; %[m/W]
sigma=(WS*gammaE)/2/n/roh0/c;
q=2*WS*n/c;
t = (-T/2/dt:1:T/2/dt)*dt;
nu=(-1/2/dt:1/T:1/2/dt);
I1_0=PS/A; %[W/m^2] Pump intensity
vpi = 4.5;
Vsine=vpi;
fsine=0;
sine = Vsine*sin(2*pi*fsine*t);
phi=sine;
ES_0t=sqrt(I1_0/2/n/c/eps0)*exp((1i*(pi)*phi)/vpi); % Original signal in time
Power=trapz(t,2*n*c*eps0*A*abs(ES_0t).^2)/T % Area under the curve in time domain
Power = 0.2000
FFt_EL0t=fftshift(abs(fft(ES_0t/Nt))); % fourier transform of the original signal
Power_FFt=T*trapz(nu,2*n*c*eps0*A*(FFt_EL0t).^2) % Area under the curve in frequency domain
Power_FFt = 0.2000
dBm_EL0t=10*log10((2*n*c*eps0*A*abs(FFt_EL0t).^2)./1e-3);
Power_dBm=trapz(nu,dBm_EL0t)
Power_dBm = -Inf
Both area under the curve for time and frequency domain is 0.2 W but when I convert it to dBm area under it seems to be infinity.
Does anyone have any idea??

Answers (1)

dpb
dpb on 22 Sep 2024
Edited: dpb on 22 Sep 2024
PS=0.2; %Input Power
L=10;
h = 6.62607015e-34;
n=1.45; %Index of refraction
eps0=8.854e-12; % [F/m] Vacuum permittivity
mu0 = 4*pi*1e-7;%[H/m] Vacuum permeability
c=2.9979e8; % [m/sec] Speed of light
Z0=sqrt(mu0/eps0); %[Ohm] Vacuum impedance
dt = 2e-12; dz=dt*c/n; %Spacial and Temporal step sizes.
%dz=2.5e-4;
N=round(L/dz); % Fiber length discretization
z=0:dz:(dz*N-dz);
T=10*2*L*n/c; %time taken for 10 round trips
Nt=round(T/dt);
% Nt=2^18;
% T=Nt*dt;
%% material characteristics
lambdaS=1.064e-6; % [m] signal wavelength
lambdaP=0.915e-6; % [m] pump wavelength
WS=2*pi*c/lambdaS; %[rad/sec] signal frequency
GAMMAb=2*pi*45e6; %[1/t] phonons decay rate
A=19.6e-12; %[m^2] fiber's effective area
Va=5.9e3; %[m/s] Velocity of sound
Omega=2*pi*16e9;%[rad/sec] acoustic frequency
% Omega=2*n*Va*WS/c; %[rad/sec]
WB = WS-Omega;
fB=WB/2/pi;
lambdaB=c/fB;
% gammaE=0.8967; %electrostrictive coefficient
gammaE=1.2; %electrostrictive coefficient
kT=300*1.3806504e-23; %[Joule] at room temprature.
roh0=2201; % [kg/m^3] mean density for SiO2, bulk (http://www.virginiasemi.com/pdf/generalpropertiesSi62002.pdf) .
Q=2*kT*roh0*GAMMAb/(Va^2*A); %Noise std.
g0=(gammaE^2*WS^2)/n/c^3/Va/roh0/GAMMAb; %[m/W]
sigma=(WS*gammaE)/2/n/roh0/c;
q=2*WS*n/c;
t = (-T/2/dt:1:T/2/dt)*dt;
nu=(-1/2/dt:1/T:1/2/dt);
I1_0=PS/A; %[W/m^2] Pump intensity
vpi = 4.5;
Vsine=vpi;
fsine=0;
sine = Vsine*sin(2*pi*fsine*t);
phi=sine;
ES_0t=sqrt(I1_0/2/n/c/eps0)*exp((1i*(pi)*phi)/vpi); % Original signal in time
Power=trapz(t,2*n*c*eps0*A*abs(ES_0t).^2)/T; % Area under the curve in time domain
FFt_EL0t=fftshift(abs(fft(ES_0t/Nt))); % fourier transform of the original signal
Power_FFt=T*trapz(nu,2*n*c*eps0*A*(FFt_EL0t).^2); % Area under the curve in frequency domain
dBm_EL0t=10*log10((2*n*c*eps0*A*abs(FFt_EL0t).^2)./1e-3);
Power_dBm=trapz(nu,dBm_EL0t)
Power_dBm = -Inf
all(abs(FFt_EL0t).^2>0)
ans = logical
0
log10(0)
ans = -Inf
Shows why -- at least one element of the spectrum is identically 0 and log10(0) --> -Inf
PSD=abs(FFt_EL0t).^2;
[numel(PSD) nnz(PSD) numel(PSD)-nnz(PSD)]
ans = 1×3
483672 483650 22
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
  3 Comments
Paul
Paul on 22 Sep 2024
"The first value is zero , even if I exclude it , the final answer is infinity."
What about the other valus of Fft_EL0t that are zero?
Also, is integrating dBm_EL0t with respect to nu physically meaningful? How would the result be interpreted?
dpb
dpb on 22 Sep 2024
See the added to prior Answer --
PSD=abs(FFt_EL0t).^2;
[numel(PSD) nnz(PSD) numel(PSD)-nnz(PSD)]
ans = 1×3
483672 483650 22
That shows there are 22 zero elements, not just one...

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!