GMSK In the process of implementing the GMSK modulator and demodulator, I ran into a problem in the work of the demodulator. Maybe you will have thoughts as to why the demodulator is not working. Thank you!
4 views (last 30 days)
Show older comments
Maybe you can find a critical error
%% %modulation
Nfft = 512;
Fc = 1600;
Br = 800;
sps = 4;
BT = 0.3;
NT = 1;
Fadc = sps * Br;
Ts = 1/Fadc;
Tb = sps * Ts;
bit = [1,0,1,0,1,0,1,0,1,1];
N = length(bit);
Ng = N;
bits = 2*bit - 1;
H = gaussdesign(BT,NT,sps);
Rashir = repmat(bits,sps,1);
Rashir = Rashir(:);
bt = conv(H,Rashir,'full');
bt = bt/max(abs(bt));
integral = cumsum(bt);
%integral = filter(1,[1,-1],bt);
phi = integral *0.5*pi/Tb;
I = cos(phi);
Q = sin(phi);
S = I - 1i .* Q;
t = ((0:length(I)-1)*Ts).';
St = I .* cos(2*pi*t*Fc) - 1i .* Q .* sin(2*pi*t*Fc);
%% %demodulation
f1 = Fc + 1/(4*Tb);
Fadc = 2*Fadc;
I_reciver = real(St).*cos(2*pi*t*Fc);
Q_reciver = -imag(St).*sin(2*pi*t*Fc);
[b,a] = butter(3,2*f1/(Fadc));
fvtool (b, a, 'Fs' , Fadc)
y1 = filter(b,a,I_reciver);
y2 = filter(b,a,Q_reciver);
z1 = y2.*[zeros(sps,1); y1(1:length(y1)-sps)];
z2 = y1.*[zeros(sps,1); y2(1:length(y1)-sps)];
Z2 = z1 - z2;
a_cap1 = (Z2(2*sps:sps:end-sps)>0);
0 Comments
Answers (0)
See Also
Categories
Find more on Modulation 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!