Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

QPSK passband demodulation - For Experts

Status
Not open for further replies.
So Mathuranathan, you are generating bits at a particular data-rate by choosing a sampling frequency (rather, I think an oversampling factor) and the output will be the over sampled version (bit oversampled)

Am I correct?

(I ignore the mapping part and consider my self generating bits).

Matlab is non-real time and does not 'really' implement things with a proper sample time, I guess we have to take the smallest sample time (highest sample-rate) in our system and kind of over-sample all other signals (data,bits,symbols) to match the sample-rate of the that signal (highest sample-rate one).

Do you agree?

I think in his book "Simulation and Software Radio", Dr. Ramjee Prasad also uses oversampling to implement the symbol rate. Although I can state this without doubt after having another look at it.

My way of implementing is that I consider, natural/default sample-time to be what I desire. Since, sample time would not have any difference on BER under AWGN (assuming oversampling is not used, correct me if I'm wrong) but when I generate a Multi-path channel, I define the CIR as the anti-symmetric impulse response of an FIR filter where the coeffs have amplitude equal to the loss in the multipath signal while the taps represent the delays for each of them.

What do you say?
 

mathuranathan said:
For example in the case of GSM the available BW is 200KHz on each channel (25 MHz band subdivided into 125 channels). The bit rate promised by GSM over each channel is 22.8 kbps (full rate). Similarly , for the broad band internet collect at your home or office it will have a specified bandwidth and bit rate (ex:DSL-56 Kbps, 2 Mbps,5 Mbps etc..).

the Absolute Radio Frequency Channels (ARFCN) = 124 with a 200 kHz bandwidth not 125 :) this is for GSM 900
 

Yes This disscation is realy helpful, I have a question about your code

one of the outputs of your function is the time vector, if I want to modulate the bits I understand that first I need to create the complex envalop from the NRZ bits and then multiply the complex envalop by exp(2*pi*fc*time) when time is the time vector created by your function, am I right?
 

I was trying to implement your suggestions in 8PSK demodulation and here is what I got:


clc;
clear all;
close all;

M=16;
k=log2(M);
Nbits=100*k; %Number of bits to transmit
Rb=1e3;
Fc=2e3;
i=sqrt(-1);
msg=randint(1,Nbits,[0 1]);

% Transmitter
%**************************************************
[y, time,Fs,demodu]=bin2Pskconst(msg, M, Rb,0 );
Towpi=2*pi*Fc*time;

In=real(y).*cos(Towpi);
Qa=imag(y).*sin(Towpi);


Trans=In+i*Qa;
%**************************************************


%Freq Domain plotting
%**************************************************
Pyy=abs(fftshift(fft(Trans)))/length(Trans);
ff=Fs*(-0.5:1/length(time):0.5-1/length(time));

%Reciever
%**************************************************

rI=Trans.*cos(Towpi); %downconverting
rQ=Trans.*sin(Towpi);

Pyy2=abs(fftshift(fft(rI)))/length(rI);
subplot(3,1,1);plot(ff,Pyy,ff,Pyy2);



N = 32; F3dB = .35;
d = fdesign.lowpass('N,F3dB',N,F3dB);
Hbutter = design(d,'butter');
Ap = .5;
setspecs(d,'N,F3dB,Ap',N,F3dB,Ap);
Hcheby1 = design(d,'cheby1');
%hfvt = fvtool([Hbutter,Hcheby1],'Color','white');
%axis([0 .44 -5 .1])
%legend(hfvt,'Butterworth','Chebyshev Type I');

%Filters
BB_rI=filter(Hbutter, rI);
BB_rQ=filter(Hbutter, rQ);
BB_rI2=decimate(BB_rI, 32);
BB_rQ2=decimate(BB_rQ, 32);

subplot(3,1,2);plot(time,BB_rI,time,imag(BB_rQ));

Pbb=abs(fftshift(fft(BB_rI)))/length(rI);
subplot(3,1,3);plot(ff,Pbb);



temp=(BB_rI2+i*BB_rQ2)';
reSig=demodulate(demodu, temp)';
Nerr=biterrfnd(reSig,msg)


function[y, time,Fs,demodu]=bin2Pskconst(x, M, Rb, phaseo )
%x - binary vector
%M - integer constalation - for Mpsk
%y - complex envalop for binary vector x (Works only for MQAM)
%sigSym - Symbol mapping of the binary vector x
k=log2(M);
%phaseo=0; %for debuging
modu = modem.pskmod('M', M, 'PhaseOffset', phaseo,'SymbolOrder', 'Gray', 'InputType', 'Bit');
demodu=modem.pskdemod(modu);
Fs=8*Rb; %Sampling frequency , oversampling factor= 32
Ts=1/Fs; % Sampling Period
Tb=1/Rb; % Bit period
Tsym=k*Tb;

envalope=modulate(modu,x');
y=0;

for n=1:length(envalope)

for tempTime=0:Ts:Tsym-Ts,
y=[y envalope(n)];
end

end
y=y(1:length(y)-1);
time=0:Ts:Tsym*length(envalope)-Ts;



function[nErr] = biterrfnd(sig, nsig)
nErr=0;
[m,n] = size(sig);

for i=1:1:m
for j = 1:1:n
nErr = nErr + xor(sig(i,j), nsig(i,j));
end
end

end



Now I get BER equals almost 0.5 and we expect to get zero BER since there is no channel distortion involved.

I believe I have a problem with my code at the filters in the receiver section, if you can kindly look at my code and tell me what I've done wrong it will help me and plenty of others.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top