I am modulating a carrier wave with a BPSK data stream. When I select a carrier frequency of 1000 Hz and use 'sound(y)', I am measuring 50 Hz out of my audio jack. Why is this? It is always a lower frequency by about a factor of 20.

3 views (last 30 days)
close all; clear all; clc;
% the binary generated base on AOSCII table
Ob= [0 1 1 0 1 1 1 1]; Ib= [0 1 1 0 1 0 0 1]; Tb= [0 1 1 1 0 1 0 0];
SIG=[Ob Ib Tb]; %SIG = repmat(SIG,10) % repeat signal 10 times
br = 200 ; % bit rate Tb=1/br; fs = 1600*br; % Sampling Frequency. Ts = 1/fs; % Sampling Period. t=0:Ts:Tb*length(SIG)-Ts;
N = 2^14; f = fs/2*linspace(0,1,N/2+1);
SIG2= NRZ_Encode(SIG,br,fs); % NRZ coding
fc = 1500; % Carrier frequency C1 = 4*sin(2*pi*fc*t); % Carrier
% modulatiion
BPSK = SIG2.*C1;
figure(1) plot(t,BPSK);axis tight;box off; ylim([-5 5]); title('BPSK MODULATED SIGNAL'); xlabel('time,s');ylabel('amplitude');
sound(BPSK);

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!