0

In OFDM system, I need to transmit a signal $x$ in SIMO channel $H$ of single Tx antenna and $4$ Rx antennas. The initial equation for that convolution is $r = Hx + n$ where $n$ is the noise.

As known, in OFDM, after serial/Parallel conversion with dimension $(Number of subcarriers, Number of symbols)$, we perform the $IFFT$ and then add Cyclic prefix. Than, P/S conversion in order to do convolution between signal and channel. In case if we are using SISO system, we perform in $MATLAB$ the command $conv(H,x)$, regardless the dimensions in length of channel and transmitted signal, but the problem I'm facing now, what's about if we are using SIMO channel? the convolution operation should be replaced by product since we have matrices, as mentioned, $r = Hx$

Below is the code, the issue is in the last line, how can I get the received signal $r$ in case if $H$ and $x$ don't have similar dimensions to do the matrices product operation?

clear all; 
clc; 

    N = 128;       %Number of subcarriers 
    P = 32;        % CP length
    Q = N + P;    % subcarriers + CP 
    AA = 1000;     %number of symbole
    M = 15;        % IR order
    p = 4;         % # of Rx antennas

    sn=sign(randn(N,AA))+1i*sign(randn(N,AA));     %generate a signal ()
    xn=ifft(sn);   %    FFT  
    cp(1:P,1:AA)=xn(N-P+1:N,1:AA);                  % Get CP 
    x=[cp;xn];                                      %Add cp into signal
    H = (randn(p,M+1)+1i*randn(p,M+1));            % randum channle (4x16)       
    r = H*x;                                       %% The received signal should be conv(H,x)  
Fatima_Ali
  • 598
  • 2
  • 12
  • 1
    r = zeros(p,length(x)+M); for i = 1:p r(i,:) = conv(H(i,:),x); end – AlexTP Sep 14 '18 at 18:56
  • OK, thank you very much .. that's ok too.. what I understand is that you did convolution with four channels one by one. that's a great it. But, why didn't you used the idea of multiplication? – Fatima_Ali Sep 15 '18 at 09:09
  • 1
    You can use matrix multiplication if they represent frequency domain information, because circular convolution in time domain is equivalent to multiplication in frequency domain. – AlexTP Sep 15 '18 at 11:37
  • Got it, but can we represent the channel like that also? .

    hm=zeros(plength(x), length(x)+M); for m=1:length(x) hm((m-1)p+1:p*m,m:m+M)=H(:,1:M+1); end

    Then we do convolution hm with signal x . . . is that right too?

    – Fatima_Ali Sep 17 '18 at 04:04
  • 1
    As Dan Boschen said, it seems that you are creating Toeplitz matrix. His answer is a good one, we can follow the discussion of his answer. – AlexTP Sep 17 '18 at 07:46
  • OK . thank you so much Alex for your help. That was is helpful. – Fatima_Ali Sep 17 '18 at 07:50

1 Answers1

2

Your question is specific to how to do the convolution with a matrix multiplication in the case of a SIMO system.

Below is a graphic from Compensating Loudspeaker frequency response in an audio signal showing how the Toeplitz matrix is used to do SISO convolution with matrix multiplication:

convolution using Matrix equation

In your case "r" in the graphic is "x" in your code, and the Toeplitz Matrix A is formed by placing x in the column and shifting this along the diagonal over the number of columns given by your channel length (in your case 12). So if your transmit signal was 160 samples long and your channel 16 long, A would be a 175 x 16 matrix. As shown in the figure above, if you only had a single channel, the channel would be multiplied as a column vector resulting in the matrix product of 175x16 with 16x1 resulting in a solution as a column vector of 175 x 1. (Remember to do the matrix multiplication, the inside dimensions must match and the result will be the outside dimensions).

For multiple channels as your case, simply multiply by the 16x4 channel matrix instead. This will result in 175x16 mulitplied with 16x4 resulting in a matrix result of 175 x 4, representing a column for each received signal.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • OK, Got it. Many thanks for your explanation ..I still have a question if we can represent that in another method, like this one, hm=zeros(plength(x), length(x)+M); for m=1:length(x) hm((m-1)*p+1:pm,m:m+M)=H(:,1:M+1); end – Fatima_Ali Sep 17 '18 at 04:06
  • 1
    You are creating the Toeplitz matrix I assume? I haven't debugged your code, but have you tried it and compared? – Dan Boschen Sep 17 '18 at 04:51
  • You mean It's similar to parameter (A) which is in the example you provided in the above answer ? I couldn't try it yet because I get an error of Error using zeros Out of memory. Type HELP MEMORY for your options... So I think I should change the code and made the parameters Number of subcarriers and symbol and upsampling factor fewer in order to enable me to run the code.. So, in that case, this method of creating Toeplitz matrix and method which Alex and you provided above are similar?? – Fatima_Ali Sep 17 '18 at 07:46
  • Sorry .. I mean the method of creating Toeplitz matrix, and then the received signal is just the product of Toeplitz matrix and transmitted signal, and the method which was provided by alex above are similar. is that right? – Fatima_Ali Sep 17 '18 at 09:59
  • @DanBoschen Thank you for that answer, I really enjoyed reading that post and your question. – Zeyad_Zeyad Sep 17 '18 at 10:23
  • 1
    Alex was referring to another method, which is if two vectors you are multiplying are in one domain (frequency or time), the result would be the same as convolution (circular convolution specifically) in the other domain. Did you get an out of memory error using the toeplitz command directly (as I show in the small blue window in the figure)? – Dan Boschen Sep 17 '18 at 12:28
  • No .. when I write the command hm=zeros(plength(x), length(x)+M); it gives me an error ""Error using zeros Out of memory. Type HELP MEMORY for your options"" .. because I'm working with pass-band system with upsampling up to 24 in order to increase the sampling frequency, so the length(x) is 3145728, so MATLAB couldn't create a matrix of zero of that length.. I don't know why !! .. will that error resolve the issue if I used the command toeplitz directly as you mentioned above, with length of h = 16 and length of x = 3145728 ? – Fatima_Ali Sep 17 '18 at 14:25
  • 1
    Don’t try to model the passband (ever!). This is a prime reason not to; what occurs there is identical to the baseband analytic signal- there is NO need to model every cycle of the carrier. I have another post about this that I will look for later. – Dan Boschen Sep 17 '18 at 14:38
  • 1
    But basically model the complex (real and imaginary) baseband signal and then your required sample rate depends on your signal bandwidth only and has nothing to do with the carrier frequency used. – Dan Boschen Sep 17 '18 at 14:39
  • @DanBoschen .. that's surprising and completely new information for me !! OK, what's about if I work in underwater acoustic channel where the bandwidth is very limited 7 to 10 kHz, then when I finish that modeling, I supposed to get real data from sea and simulate them too, so can I do that with baseband signal too? . Please I'm waiting for that post you said, I really need it. So when modeling passband and baseband is completely identical?! – Fatima_Ali Sep 17 '18 at 15:59
  • @Fatima_Ali Here you go: https://dsp.stackexchange.com/questions/51415/why-shannon-theorem-has-nothing-to-do-with-frequency/51436#51436. Passband and baseband are completely identical as long as you use a complex baseband. – Dan Boschen Sep 17 '18 at 16:34
  • @DanBoschen. Thank you for that explanation. but the signal itself if it's Passband or baseband, that will not cause any issue. The problem in my case that I'm using upsampling up to 24, and the width of base-band is 5120 Hz, so in that case, the frequency sampling $Fs$ will be 5120x24 instead of 5120 and the length of signal will be $number of sub-carriers$ x $number of symbols$ x $24$ instead of $number of sub-carriers$ x $number of symbols$. so do you mean either using simulation with upsampling or without that identical? I mean the issue of out of memory was caused by that upsampling. – Fatima_Ali Sep 18 '18 at 07:35
  • @DanBoschen when I used the frequency sampling 5120 and then 5120x24 .. the results of BER is different ! it degraded when I used 5120. ! – Fatima_Ali Sep 18 '18 at 09:19
  • Yes it makes sense to oversample the passband (and then the channel at the same rate), not sure you need to sample all the way to 24 (5 should be sufficient) but even with 5120*24 I am surprised you would get memory errors. However if you are then that might be reason to do each channel separately rather than a large matrix. In that case I usually go to using the filter command. You can go to "help filter" to learn more about that approach. – Dan Boschen Sep 18 '18 at 12:12
  • @DanBoschen .. I got something strange right today .. when I upsample with 24 and use the frequency sampling 51204 I get good results, but when I upsample up to 5 and Fs 51205 the results is worse, or with 30 and the Fs 5120*30 I get also worse results !! any value more or less then 24 .. the results is better than 24 !! I think that doesn't make sense !! – Fatima_Ali Sep 18 '18 at 16:19
  • I tried to read about filter command, you mean filter the data with every channel separately in order to get for copies of signal? I think that will not make sense, am I right? – Fatima_Ali Sep 18 '18 at 16:31
  • 1
  • 1
    @Fatima_Ali .. Doing the convolution using the Toeplitz Matrix or convolution must give the same results. for details you can check this link which included MATLAB example also https://www.gaussianwaves.com/2014/02/survey-of-methods-to-compute-convolution/ .. good luck – Zeyad_Zeyad Oct 03 '18 at 07:56
  • @DanBoschen .. I finally solved that issue and got the toeplitz matrix .. but when have four copies for signal, which one should be used for demodulation? is there any step to do here? – Fatima_Ali Oct 07 '18 at 14:30
  • 1
    For SIMO they are all used for demodulation, but at that point this would be well beyond your question and much more detailed than I could begin to answer. – Dan Boschen Oct 07 '18 at 21:12
  • @DanBoschen Thank you so much ... I got it, and it's OK now. Now I was wondering, when using matched filter in the transmitter and receiver, should I use 4 in receiver in order to downsample the SIMO signal? or one? The problem I don't get examples online for that! – Fatima_Ali Oct 10 '18 at 06:40
  • @Fatima_Ali I Please post that as another question, include a block diagram of what you are doing specifically and how you are doing the rest of your SIMO processing and you should get a best answer or answers from the community. – Dan Boschen Oct 10 '18 at 10:07