How to find RMS bandwidth of the below signal

8 vues (au cours des 30 derniers jours)
Yogesh
Yogesh le 21 Juin 2024
Commenté : Yogesh le 4 Juil 2024
L=10;
n=1.45;
c=2.9979e8;
dt=6e-12;
T=10*2*L*n/c;
fmax =2.5e9
fmax = 2.5000e+09
%fs=80*fmax;
TA=-T/2:dt:T/2;
fs=1/dt;
%t = (-T/2/dt:1:T/2/dt)*dt;
Nt=round(T/dt);
vsine = 1;
phi = vsine*sin(2*pi*fmax*TA);
EL1t=1.274e7*exp(1i*phi);
%plot(TA,(EL1t));
%FA = ((0:Nt-1)-floor(Nt/2))/Nt*fs;
FA = (-Nt/2:Nt/2-1)/Nt*fs;
FP=fft(phi);
%fs=1/dt/Nt;
Z=plot(FA,fftshift(abs(fft(EL1t/Nt))));
I want to find the RMS linewidth of the above signal and the formula for it is given here , but I am confused how to implement it in the code.
  1 commentaire
dpb
dpb le 22 Juin 2024
Modifié(e) : dpb le 22 Juin 2024
Let's get a better picture of what the result actually is...
L=10;
n=1.45;
c=2.9979e8;
dt=6e-12;
T=10*2*L*n/c;
fmax =2.5e9;
fmax = 2.5000e+09;
%fs=80*fmax;
TA=-T/2:dt:T/2;
fs=1/dt;
%t = (-T/2/dt:1:T/2/dt)*dt;
Nt=round(T/dt);
vsine = 1;
phi = vsine*sin(2*pi*fmax*TA);
EL1t=1.274e7*exp(1i*phi);
%plot(TA,(EL1t));
%FA = ((0:Nt-1)-floor(Nt/2))/Nt*fs;
FA = (-Nt/2:Nt/2-1)/Nt*fs;
FP=fft(phi);
%fs=1/dt/Nt;
Z=plot(FA,fftshift(abs(fft(EL1t/Nt))));
set(gca,'YScale','log')
OK, it is all positive; what have you tried so far to simply translate the formula into MATLAB code?
At least make an attempt here...it appears it should be about a two-three line exercise -- note the difference in MATLAB between the "dot" operator times, .* and mtimes, *

Connectez-vous pour commenter.

Réponse acceptée

Chandrika
Chandrika le 4 Juil 2024
Hello Yogesh,
From your code, I could understand that 'FA' is the Frequency vector computed using sampling frequency 'fs' and the number of time samples 'Nt'
Further, in order to implement the formula to compute RMS linewidth in your given code, you may refer the sample code I am attaching below:
L=10;
n=1.45;
c=2.9979e8;
dt=6e-12;
T=10*2*L*n/c;
fmax =2.5e9;
fmax = 2.5000e+09;
TA=-T/2:dt:T/2;
fs=1/dt;
Nt=round(T/dt);
vsine = 1;
phi = vsine*sin(2*pi*fmax*TA);
EL1t=1.274e7*exp(1i*phi);
% Frequency vector computed
FA = (-Nt/2:Nt/2-1)/Nt*fs;
% FFT of the signal copmuted and normalized
EL1t_fft = fft(EL1t) / Nt;
% Power computed
Pow = abs(fftshift(EL1t_fft)).^2;
% Computing rms_linewidth as per the formula
rms_linewidth = 2*(sqrt(sum((FA).^2 .* Pow) / sum(Pow)));
Here, 'Pow' indicating the Power has been calculated premised upon the idea that Power is the squared magnitude of a signal's Fourier transform, normalized by the number of frequency samples as could be found in this documentation: https://in.mathworks.com/help/matlab/math/fourier-transforms.html
I hope you find the above provided workaround useful!
Regards,
Chandrika
  1 commentaire
Yogesh
Yogesh le 4 Juil 2024
hey Chandrika , thank you!!...
Have a good day..

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by