0
$\begingroup$

I need to confirm if spreading signal by using walsh code in MATLAB is right or no,

Suppose I'm using QAM modulation, so I need to spread the signal over walsh code, is the below step is right:

M = 4;
alphabit = modem.qammod('M',  M ) ;             %QAM modulation
mod = transpose(modulate( alphabit , (0:M-1)));
avg = mod'*mod / M ;                % average power of constellation points
mod = mod / sqrt(avg);              % to make E[x^t x ] = 1 
H = hadamard(4);   % The walsh code generation 
H_use = H(:,2);  %using the second column for spreading. 
S_coded = kron(mod,H_use);  % Spread the modulated data mod over the walsh code 

My question is about the last step, is that right how we spread the modulated signal? ..

$\endgroup$
0

2 Answers 2

1
$\begingroup$

That's right, you can do spread using the kroon function, but be careful what you spread is not the data, it's the whole possibilities of data which is mod.The data is one of them, which is either, 0.7+0.7i or 0.7-0.7i ...etc.

then you should know how you can do despread in the receiver side too.

Good luck

$\endgroup$
1
  • $\begingroup$ Thank you, then how can I de-spread it in the receiver? $\endgroup$
    – Gze
    Commented Feb 21, 2019 at 9:42
0
$\begingroup$

you need to spreak the actual data being sent with PN/walsh sequence, and for the demodulation is with a correlator

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.