GMSK demodulation
8 views (last 30 days)
Show older comments
Hi all, I am trying to implement a GMSK demodulator. I tried many concepts, nothing seems to work. Finally I settled on with reversing the modulation. I almost succeeded, but stuck at the last.
num=400; %number of symbols T=4; %T is the time period fs=200; %sampling frequency num_sam=8;
% Gaussian filter OF=5; % oversampling factor NT=4; % symbol periods to the peak B=0.5; %Bandwidth 3-dB fil_op=gaussfir(B,NT,OF);
%GMSK modulation mod_sig=randsrc(1,num); %generating 1 and -1
% plot(mod_sig) % evn_bits=kron(mod_sig(1:2:end),ones(1,T)); % odd_bits=kron(mod_sig(2:2:end),ones(1,T)); evn_bits=mod_sig(1:2:end); odd_bits=mod_sig(2:2:end); % odd_bits= % evn_bits=[evn_bits zeros(1,T)]; evn_bits_vec=evn_bits(:); % odd_bits=[zeros(1,T) odd_bits]; %adding delay odd_bits_vec=odd_bits(:); % odd_bits_col=reshape(odd_bits,200,1); % fil_signal=conv2(evn_bits_vec,odd_bits,fil_op); % plot(fil_signal) fil_signal_even=conv(evn_bits,fil_op); %filtered even bits fil_signal_odd=conv(odd_bits,fil_op); %filtered odd bits
fil_signal=fil_signal_even+fil_signal_odd;
theta=zeros(1,length(fil_signal)+1);
for i=2:length(fil_signal)+1 theta(1,i)=theta(1,i-1)+(pi/2).*fil_signal(1,i-1)./num_sam; end
I=cos(theta); Q=sin(theta);
final_op=(1/sqrt(T)).*(I+1i.*Q); figure; plot(final_op)
%demodulation I1=real(sqrt(T).*final_op); Q1=imag(sqrt(T).*final_op);
theta1=acos(I1); theta2=asin(Q1);
for i=2:length(theta1+1) fil_signal_demod(1,i-1)=(2*num_sam.*(theta1(1,i)-theta1(1,i-1)))/pi; end
fil_sig_demod_odd=fil_signal_demod-fil_signal_even;%this %fil_signal_even is used from modulation so that i can check that %i m doing right fil_sig_demod_even=fil_signal_demod-fil_sig_demod_odd;
even_val=deconv(fil_sig_demod_even,fil_op); %(this is the step %where I am stuck.. this line returns NaN)
Sorry for this full page code :(
Kindly help me in solving this. Any help will be appreciated.
Thanks a lot,
Regards,
Raj.
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!