How can I modify this code for frequency modulation to use freq deviation instead of a modulation index?

1 回表示 (過去 30 日間)
MLab
MLab 2012 年 4 月 14 日
回答済み: Vishwa 2023 年 3 月 24 日
I found a way to plot Frequency Modulated signals in the time domain, however, it uses a modulation index instead of Frequency Deviation.
How can I alter this code to use Frequency Deviation instead?
% Carrier Freq (Hz)
fc = 1200;
% Modulating Signal Freq (Hz)
fm = 60;
% Modulation Index
m = 10;
% Carrier Amplitude
Ac = 10;
% Signal Amplitude
Am = 1;
% Frequency deviation
f_delta = 300;
% Number of samples
numSamples = 2^14;
t = linspace(0, 0.05, numSamples);
% Carrier signal
c = Ac * sin(2*pi*fc*t);
% Modulating signal
M = Am * sin(2*pi*fm*t);
y = cos(2*pi*fc*t + (m.*sin(2*pi*fm*t)));
plot(t,y);
xlabel('Time');
ylabel('Amplitude');
title({'FM Signal'});

回答 (1 件)

Vishwa
Vishwa 2023 年 3 月 24 日
Modulation Index is nothing but ratio of peak frequency deviation and highest frequency component.
Hence,
y = cos(2*pi*fc*t + ((f_delta/fm).*sin(2*pi*fm*t)));

カテゴリ

Help Center および File ExchangeModulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by