How to generate FSK modulator?
2 次查看(过去 30 天)
显示 更早的评论
I want generate a FSK Modulator and Demodulator. I specify a sampling rate of 44.1 kHz. For a baud rate of 500 1/s, this sampling rate should equate to 44100/500=88.2 samples per symbol. Instead, I am generating 44100 samples per symbol (from T1), thus transmitting at 1 baud instead of 500. It would be nice if you can help me with this problem.
Fb=500;
M=2;
m=log2(M);
num_bit=m*Fb;
Tb = 1/Fb; % Data rate % Bit period
Fs= 44100; %Sampling Freq
A= 1; % Amplitude
Fc1=7000; % Trägerfrequenz für Input 0
Fc2=9000; % Trägerfrequenz für Input 1
T1=Tb/Fs:Tb/Fs:Tb;
t=length(T1);
x= randi ([0 1], 50, 1); % random binary data
N_x=length(x);
% Modulation
modu=[];
for (n=1:1:N_x)
if x(n)==0;
carr=A*sin(2*pi*Fc1*T1); % Carrier Signal
else
carr=A*sin(2*pi*Fc2*T1);
end
modu=[modu carr];
end
y = modu';
op1 = conv(y, sin(2*pi*Fc1*T1)); % Korrelation mit Trägerfrequenz für Input 0
op2 = conv(y, sin(2*pi*Fc2*T1)); % Korrelation mit Trägerfrequenz für Input 1
xHat = [real(op1(t+1:t:end)) > real(op2(t+1:t:end))];
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 BFSK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!