How to use besselj function to plot spectrum of single tone FM signal
조회 수: 4 (최근 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!