FM Stereo transmitter (multiplying the pilot tone signal with the right signal)
4 views (last 30 days)
Show older comments
In the FM stereo transmitter:
when i tried multiplying the R(t) "Right signal" which is a result of subtraction between the left and right signals , with the pilot signal that has a frequency doubled after going through the frequency multiplier , i used the (modulate(m,Fc,fs)) function but i received an error telling me that the carrier frequency should be less than half the sampling frequency, i am confused here because am i supposed to use the sampling frequency resulting from the subtraction of the left and right signals ? , which is zero or am i supposed to use a different sampling frequency?
close all
clc
%Right channel signal R(t)&Left channel singal l(t) details and info.
%Reading the audio files
[y,fs]=audioread("R.wav");
[y_2,fs_2]=audioread("L.wav");
info_R = audioinfo("R.wav");
info_L = audioinfo("L.wav");
%Pilot frequency from the pilot tone signal generator
fp = 19000;
fc = 99100000;
frequency_Multiplier = 2;
%For signal A
%Signals added in time domain
b = padarray(y,14336,0,'post');
sum_y = b+y_2;
sum_fs = fs+fs_2;
%sound(sum_y,sum_fs)
%For signal B
%we are subtracting the sample data and the sampling frequencies from each other as far as i know.
sub_y = (y_2)-(b);
sub_fs = (fs_2)-(fs);
len = size(sub_y,1);
t_2 =(0:len-1)/sub_fs;
signal = cos(4*pi*fp*t_2);
%Im confused here
signal_b = modulate(sub_y,2*fp,sampling_frequency);
0 Comments
Answers (1)
Sugandhi
on 22 Aug 2023
Hi,
I understand that you received an error saying that the carrier frequency should be less than half the sampling frequency and confused in choosing sampling frequency.
In the FM stereo transmitter, the carrier frequency used for modulation should be less than half the sampling frequency to avoid aliasing. In your code, it seems like you are trying to modulate the ‘sub_y’ signal with a carrier frequency of 2*fp using the modulate function. However, you are encountering an error because the carrier frequency exceeds the Nyquist limit.
One of the possible workarounds could be to use a carrier frequency that is less than half the sampling frequency. Similar like below code.
% Other code...
% Calculate the carrier frequency
carrier_frequency = fc / frequency_Multiplier;
% Modulate the signal
signal_b = modulate(sub_y, carrier_frequency, fs);
Above, the carrier frequency is calculated by dividing 'fc' by the 'frequency_Multiplier'. This ensures that the carrier frequency is within the range allowed by the Nyquist criterion. Then, the modulate function is used to modulate the 'sub_y' signal with the calculated carrier frequency using the original sampling frequency 'fs'.
0 Comments
See Also
Categories
Find more on Hamamatsu Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!