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.

Help me with software simulation of QPSK

Status
Not open for further replies.

zhanch

Junior Member level 3
Joined
Oct 21, 2003
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
213
Hi, folks

I wanna do software simulation for the quadrature phase shift keying (QPSK), but don't understand the principle very much.

If using the rand function to generate the original message. Then how to divide the original message into I and Q channel. Just simply put the odd number of the original message to I channel and even number to Q channel.

Secondly, after partition the I and Q, hwo to simulation the modulation by software, such as matlab. Multiplied by sin(wt) for Q channel and cos(wt) for I channel, and the final signal is Y = I*cos(wt) + Q*sin(wt). Am I right?

In the demodulation, just do the same operation like the modulation?
Thank you for your help.
 

matlab qpsk

let say you want to simulate based on 8 qpsk......first of all....you have to generate a table .....which is based on imaginary and real part.........then when you received 3 bits input .....convert its from binary digits to decimal.....and recall the I and Q component from the table......you can go matlab website to have more example......
 

qpsk in matlab

You can use dmod(y,Fc,Fd,Fs, ... for modulate and ddemod(y,Fc,Fd, ... for demodulate. I dont have matlab instaled onto this comp so. You will need to use the help to see the parameters.
 

    V

    Points: 2
    Helpful Answer Positive Rating
qpsk modulation matlab

you can use simulation software "systemview", which is very convenient to simulate communication system.
 

qpsk using matlab

If you are using MATLAB
1. generate random signal using randint. Let it called x.
2. get xe = x([2 4 6 8 ......])
and xo = x([1 3 5 7 .......])
3. Multiply the value of the bit with a rectangular pulse corresponding to the bit duration.
4. generate the carriers
ccos = cos(w0*t)
csin = sin(w0*t)
5. perform an element by element multiplication between the even signal and cos carrier then the odd signal with sin carrier using .* operation
6. Add the resulting inphase and quad. modulated signals
 

qpsk simulation in matlab

nj_jack

Do you have Systemview?


afkaron
 

qpsk en matlab

If you are using Matlab, you can simulate in complex domain, so for qpsk, you just use exp(j(wt+phi)) to represent your signal, where phi is the phase. Many communication system simulation is performed in base band equivalent, so just exp(j phi) will do.

And at the receiver, you only have noise corrupted signal(w/wo fading), so you need to make decision based on the received signal. Usually, it's based on phase. If there is fading involved, you need to get the channel information by pilot symbols.
 

qpsk simulation

Do you have Systemview?
 

matlab+modulacion qpsk

Some remarks.

1. Sometimes modulated signal represents as s(t) = I*cos(w0*t) - Q*sin(w0*t) . (You writes "+" sign). It is not principal but this equality also exists.

2. In demodulation you have to apply lowpass filters to multiplications s(t)*cos(w0*t) and s(t)*sin(w0*t) for obtaining of correct I and Q components.
 

qpsk signal matlab

length=8000;

re=sign(randn(1,length));
im=sign(randn(1,length));
seq=re + i.*im;

figure;
plot(real(seq),imag(seq),'x');
axis([-1.5 1.5 -1.5 1.5]);
grid on;

SNR=10;
sigma=2/(10^(SNR/10))
new_seq=seq+sigma*randn(1,length)+i.*sigma*randn(1,length);
hold on;
plot(real(new_seq),imag(new_seq),'+');
 
  • Like
Reactions: Husam Rafiq

    V

    Points: 2
    Helpful Answer Positive Rating

    Husam Rafiq

    Points: 2
    Helpful Answer Positive Rating
matlab qpsk modulation

hi,

pls answer these questions before i tell my view. are u performing the entire modulation and demodulation? i mean the complete transceiver system using matlab? iwhat channels are u simulating for? what results are u aiming at? i mean, any comparison with other schemes showing the potential advantages of this scheme? are u intended to go for a hardware project of the same?

@echo47, i suggest u use randsrc in the place of randn coz u would get 1 & 0 only incase of randn. u must get a 1 & -1 to get teh inphase and quadrature i guess.. am i right?

/cedance

PS: if u are modulating the signal, that is coz and sin terms instead of using them baseband, then, ur simulation may take long long hrs(even days) to complete. so, settle for baseband, Echo47 's way i suggest. keep the 1's and -1's as such.
 

modulacion qpsk matlab

hi! guys
I thinks elcielo makes a very good example.
But I still have some qusetion about elcielo's example code.

about the "noise variance (the noise energy)"

elcielo said:
"SNR=10;
sigma=2/(10^(SNR/10)) "

He is according SNR to find out the noise energy.
SNR=10*log(Eb/No);
% SNR per bit, right here Eb=1,
%cuz re=sign(randn(1,length)); im=sign(randn(1,length));
sigma^2=No/2; isn't it?
so,
new_seq=seq+sigma*randn(1,length)+i.*sigma*randn(1,length);
That will make the QPSK constellation diagram.
 
qpsk simulator

if u are using matlab 6.5 or 7 use the simulink blocks it is the simple way.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top