How to use besselj function to plot spectrum of single tone FM signal
24 次查看(过去 30 天)
显示 更早的评论
close all;
clear all;
clc;
fs = 10000;
fc = 1500;
fm=100;
m=5;
n=1:1:m;
for n=1:1:m
x(n)=fs-fc-n*fm;
y(n)=fs+fc+n*fm;
z(n)=x(n)+y(n);
B(n)=besselj(n,z(n));
end
0 个评论
回答(1 个)
Saarthak Gupta
2023-12-18
编辑:Saarthak Gupta
2023-12-18
Hi Devon,
I understand you wish to plot the power spectrum of a single tone FM signal.
For a single tone FM signal of the form
the spectrum in the frequency domain is given as:
This FM spectrum can be plotted as a series of delta functions of height
A negative amplitude in a frequency component indicates a 180-degree phase shift for that component. Usually, we only need to compare the relative intensities of the sidebands for which we plot the amplitudes' absolute values.
Refer to the following code:
% parameter values
fc = 1500;
fm = 100;
M = 5;
beta = 2;
A = 10;
% sideband frequencies
freqs = fc + (-M:M)*fm;
% freqs = -freqs; % negative frequencies
% amplitudes for a given value of beta (modulation index), and sideband frequencies
amps = A/2.*abs(besselj(-M:M,beta));
% plot spectrum
scatter(freqs,amps);
for i=1:numel(freqs)
line([freqs(i) freqs(i)], [0 amps(i)], 'Color', 'red');
end
In case you need to do power calculations, make sure to plot the negative frequencies as well. This can be easily achieved by negating the frequencies vector (code provided).
Refer to the following MATLAB documentation for further reference:
Hope this helps!
Best regards,
Saarthak
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!