Azzera filtri
Azzera filtri

How to use besselj function to plot spectrum of single tone FM signal

6 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Saarthak Gupta
Saarthak Gupta il 18 Dic 2023
Modificato: Saarthak Gupta il 18 Dic 2023
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

Categorie

Scopri di più su Signal Processing Toolbox in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by