# Is it possible to use MRC with DS-CDMA-MIMO [closed]

I'm wondering how to use the Maximum Ratio Combining with MIMO-DS-CDMA, I have used the MIMO with DS-CDMA using Walsh code, then at receiver I couldn't recover the transmit signal using the MRC. here what what I did:

x = [0.7+0.7i; 0.7-0.7i; 0.7i+0.7i; -0.7+0.7i];    %generate signal x size 4x1
h = (randn(4,4) + 1j.*randn(4,4))/sqrt(2);      %Generate 4x4 channel
code = hadamard(4)                                  %generate walsh code
x_s = kron(x,cod(:,1))                              %spread the signal x with one walsh code
r = reshape(h*reshape(x_s,4,[]),[],1);              % the received signal with AWGN


suppose I have perfect knowledge channel at receiver side, it means h is known. how can I use MRC for r in order to recover the transmitted signal? Is that possible?

thank you

## closed as unclear what you're asking by Marcus Müller, MBaz, Stanley Pawlukiewicz, lennon310, jojek♦May 14 at 12:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Did you work out the mathematics? – BlackMath Apr 24 at 12:40
• @BlackMath .. Yes, but in matlab couldn't get the signal back. Could you please help – New_student Apr 24 at 12:45
• @BlackMath .. first the process right till getting the received signal r? – New_student Apr 24 at 12:54
• For me, programming is just translating mathematics to a code. If you have difficulties in the programming, it most likely means you don't get the math right. Can you post the mathematics of the MRC DS-CDMA receiver? – BlackMath Apr 24 at 15:14
• recheck your code, r is not right! when using the DS-CDMA, it's similar if the signal x becomes n times faster than channel (assuming that channel is quasi-static). but what you do is different about that. re check it. – Zeyad_Zeyad Apr 25 at 5:12

OK, let me explain that for you. First, if you want to understand anything in engineering, it's recommended to write it in mathematical form, then try to solve it theoretically and build its code accordingly. Second, regarding your question, is it possible to use MRC for MIMO - CDMA, Yes, that's possible, why not?

Now, The code you provided is not right. Why ? all simply, first check when using simple MIMO without spreading spectrum. You will see that first element in x, which is 0.7+.7i, is multiplied by the first column of channel H and so on. In case if you are using spreading spectrum, it means that instead of having one sample 0.7 + 0.7i, you will have N samples, where N is the code length. it means you will have N samples in the same duration of symbol before spreading. So, all samples should be multiplied by the first column of H.

I think it's clear now, right? so you should just now check how to write the above answer in matlab. . . for example check this command :

r = [];
for kk = 1 : size(h,1)
r_1 = kron(x_s(:,kk),h(:,kk));
r = [rec r_1];
end

r = sum(r,2);


Good luck.

• Thank you .. I got it. and how can I apply MRC for r ? – New_student Apr 26 at 9:57
• I think that's very easy, just check if you get r correctly. Then implement the equation of MRC straightforward. – Zeyad_Zeyad Apr 26 at 11:19
• that worked well, but I have asked the same question before, and I found that answer in this link dsp.stackexchange.com/questions/55623/… ... it's almost totally different of yours ! – New_student Apr 30 at 2:55
• @New_student .. I think there is misunderstanding in that answer. when transmitting the chips in CDMA system, it must be in the same duration of symbol. in other words, if the antennas transmit 4 symbols in one time unit, the spread symbol including 16 samples must be transmitted in one time unit too, not in 4 time units. – Zeyad_Zeyad Apr 30 at 9:19