Stereo FM modulation in Matlab

1.1k Views Asked by At

My question might be simple, but I am stuck in here for quite a while. I am trying to simulate a stereo FM complex baseband signal in Matlab. I am using "Analysis and Emulation of FM Radio Signals for Passive Radar" paper from an Italian group as my basis. I am actually able to create the proper signal upto radio-phonic signal part. My problem is with the rest, the 2*pi*k_f and integration. I am using cumsum() function of matlab to use as the integration block. Everything seems fine, however when I use k_f = 75000 as stated in the paper, my complex envelop signal is just all out flat, there is no triangle shape similar to the second graph in figure 2.

It is quite important for me to do this without using the fmmod function of Matlab. Here is my code:

clear all
close all
clc

noCh = 1; % number of channels, not important at the moment, just use 1
Fs = 400e3; % sampling frequency
bw_rx = 200e3; % receiver bandwidth (not being used atm)
i_t = 1; % integration time is always 1 second during FM signal generation
[data, Fs_data] = audioread('tool1.mp3'); % music data
t = linspace(0, i_t, Fs*i_t); % time vector
st = zeros(noCh, Fs*i_t);
for k=1:noCh
    l = transpose(data(1e6+1:1e6+Fs_data, 1)); % left channel data
    r = transpose(data(1e6+1:1e6+Fs_data, 2)); % righ channel data

    l = resample(l, Fs*i_t, Fs_data*i_t); % interpolate to Fs for shifting in frequency domain
    r = resample(r, Fs*i_t, Fs_data*i_t); 
    l = l/max(l); % normalize
    r = r/max(r);

    figure
    subplot(2,1,1)

    % message signal
    mt = 0.5*(l+r) + 0.5*(l-r).*cos(2*pi*2*19000*t) + 0.5*cos(2*pi*19000*t);
    mt = mt/max(mt);
    temp = abs(fft(mt))/max(abs(fft(mt)));
    % plot the message signal
    plot(20*log10(fftshift(temp)))
    % integration and multiplication with 2*pi*75000
    mt = 2*pi*75000*cumsum(mt);
    st(noCh, :) = cos(mt) + 1i*sin(mt); % complex envelop stereo FM signal
end
subplot(2,1,2)
% plot the complex envelope signal
plot(20*log10(fftshift(abs(fft(st)))))
0

There are 0 best solutions below