0

I am trying to emulate the SFO effect for OFDM system, I did it using linear interpolation as shown HERE . That can be explained as if I have the time domain signal $s_n$ representing the output of ifft (let’s ignore the noise and the guard interval), so the SFO can be inserted using linear interpolation. Below is the code I made for that, and the resulted rotated signal without compensating the SFO.

clc; clear all; close all;
n_sym = 10;  % The number of symbols
N = 1024;    % The symbole length 
mod = 4;     %the modulation order 
len= n_sym* log2(mod)*N;  %Lenght of whole data (N * Number of symbol* M)

%This part will generate binary vector as per length entered by user data=floor(rand(1,log2(mod)*len)+0.5); %Mapping of binary data mapper_out = qammod(bi2de(reshape(data,[],log2(mod))), mod,'UnitAveragePower', true); % Take the iFFt operation after S/P operation sn = ifft(reshape(mapper_out,N,[]));

%===== Here using interpolation to add 1 ppm SFO ===== for sy = 1 : size(sn,2) S_y = sn(:,sy); %Taking every symbol separatly for nn = 1 : length(S_y)-1 X_te(nn) = S_y(nn) + (nn*(S_y(nn+1) - S_y(nn))/1e6); %Doing linear interpolation with 5ppm end X_te2(:,sy) = [S_y(1); X_te.']; %[x[1]; x[nn]] end out = fft(X_te2); out = out(:); %P/S

%===Calculate the BER data_rec = qamdemod(out, mod); b_rec = reshape(de2bi(data_rec,log2(mod)),[],1).'; [BER_1 Ratio_1] = biterr(b_rec(1:68),data(1:68)) %==========

figure;plot(real(out),imag(out),'b+');title('constellation with and without Sampling Frequency Offset'); hold on; plot(real(mapper_out),imag(mapper_out),'r+','LineWidth',3);

enter image description here

The problem is that, when adding an SFO effect of 1 ppm, the signal is completely rotated as shown in the above figure, and the BER cannot be recovered at all as shown in the above code. However, when having 1 ppm SFO, it’s expected to have little bit similar constellation to the ideal signal, and the BER performance is supposed to be almost 0.

Update

Normally, the added SFO effect into the signal $x[n]$ as following:

$y\left [ n \right ] = x\left [ n \right ] + n \times \frac{x\left [ n + 1 \right ] - x\left [ n \right ]}{10^6}$

The dominator is $10^6$ means that 1 ppm is added. Assuming the length of the symbols is $N = 1024$ as I insert the SFO for each symbol alone, so the maximum added SFO will be $1024$ multiplied by the difference between $x[N]$ and $x[N-1]$.

On the other hand, if we can normalize the added SFO by $N$ to have the maximum added SFO 1ppm multiplied by the difference between $x[N]$ and $x[N-1]$, the above equation will be:

$y\left [ n \right ] = x\left [ n \right ] + n \times \frac{x\left [ n + 1 \right ] - x\left [ n \right ]}{N \times 10^6}$

Unfortunately, the rotation is still very big and the signal is completely deteriorated.

Sajjad
  • 167
  • 8
  • I am not sure if I am wrong, but why your transitions are always on the circle? Why not crossing zero? It should (if your constellation plot is for interpolated samples) unless you use OQPSK? –  Jun 23 '22 at 09:52
  • If your interpolated samples are always on the circle and you are not using OQPSK, maybe it is rather a carrier offset frequency that you have –  Jun 23 '22 at 09:54
  • @gotchi85 do you mean it should be similar to this one here ?? https://dsp.stackexchange.com/questions/62831/what-is-the-difference-between-sample-timing-offset-carrier-frequency-offset/62844#62844 – Sajjad Jun 23 '22 at 10:39
  • Yes that is what I have in mind. The link is for a single carrier modulation. But I am wondering if it shouldn't be the same in OFDM –  Jun 23 '22 at 11:51
  • @gotchi85 I think you are right however I am trying to check several papers, they show that effect as a circle as shown here in my question. For that, I am also confused !! For example here https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9207956 fig. 5 !! – Sajjad Jun 23 '22 at 11:57
  • I did a quick simulation in Octave but not of your code. I see also a circle on the constellation with a small sample offset (when symbol demodulation is not exaxtly synchronized) –  Jun 23 '22 at 20:51
  • Sorry for misleading –  Jun 23 '22 at 20:52
  • @gotchi85 could you please share the code you made ? – Sajjad Jun 24 '22 at 04:30
  • Here is the link: https://www.transfernow.net/dl/20220624uR9xmSUI –  Jun 24 '22 at 13:31
  • @gotchi85 I checked your code and I agree with you, but the same question will be asked which is is it possible that 1 ppm will destroy the whole signal? and the other issue that resample(1000001, 1000000); cannot be performed in MATLAB. – Sajjad Jun 26 '22 at 03:23
  • Resample looks to work on Octave. For your question, I think it should be possible to link the sampling ppm with the angle drift on constellation by a formula –  Jun 26 '22 at 06:41
  • The angle drift on the constellation is the consequence for the "destroyed signal" –  Jun 26 '22 at 06:42

1 Answers1

1

The sampling frequency offset will induce a time offset on every symbol that is increasing from symbol to symbol. This results in the rotation as observed.

Frequency is the derivative of phase with respect to time, so a constant frequency offset would result in a linearly increasing phase versus time.

The referenced link provides more detailed formulas as to the actual offsets but the following graphic should provide more intuitive insight into both Sampling Frequency Offset (SFO) and Sampling Time Offset (STO) on one OFDM subcarrier, where below we see the sampling clock versus the ideal sampling location on the time domain.

SFO and STO

What else is interesting which is a direct result of time - frequency duality is if we change the above axis to frequency instead of time. With this we can observe the constellations over frequency at one time instead of above with is at one frequency over time. In this case the results will swap in that if we observed the constellation from sub-carrier to sub-carrier (over frequency) at any given time, the SFT will result in a fixed offset such as the bottom plot and the STO will result in a rotation. This may be the source of confusion for the OP.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • Thank you for your detailed explanation. But, does that justify that 1 ppm SFO will result complete deterioration in the signal?? because I see some references where they add, for example, 20 ppm SFO however the signal can still be recovered. – Sajjad Jun 21 '22 at 14:49
  • It can be recovered only if a tracking loop or equalizer is used to remove the CFO. Do you see how the rotation you see would indeed result? It is easy to measure the rate of rotation and then track that out. Especially in OFDM since we can compare the offset in each subcarrier across frequency bins as well as the offset in a single subcarrier vs time. From this we can determine the errors and remove them. – Dan Boschen Jun 21 '22 at 14:56
  • Yes, I agree with you. But, for example take this reference, Fig. 5 https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9207956 , you can see Fig. 5. The constellation is taken at 100 ppm without recovering that SFO effect; the constellation is not completely rotated, it is still somehow similar to the ideal signal with smaller rotation. According to that figure, if we measure the rotation in 2 ppm, it should be almost without any rotation. I was expecting to also find similar to that results with 1 ppm or 50 ppm. – Sajjad Jun 21 '22 at 15:24
  • Ultimately if you do not track or change your decision boundary- the samples will rotate away from the idea location over time. If you include in your question a clear summary of your own computation on what the rotation should be from symbol to symbol based on your symbol rate, I will check that. – Dan Boschen Jun 21 '22 at 15:46
  • Ok, I updated the question and added the normal rotation which supposed to be. I added only 1 ppm as maximum SFO, but the deterioration is still the same ! – Sajjad Jun 22 '22 at 01:14
  • sorry, I corrected it. – Sajjad Jun 23 '22 at 02:42
  • 1
    @Sajjad It's not completely clear to me what you are doing in the code without seeing actual data-- Are you doing the interpolation processing on the flattened IFFT of the OFDM symbols-- such that the sampling rate of the time domain waveform is 1024 samples per symbol over 10 symbols? – Dan Boschen Jun 23 '22 at 03:46
  • I am doing a interpolation for each symbol separately, for example the size of Symbol is 1024, so I do interpolation processing on the samples representing the output of IFFT whose size is 1024. – Sajjad Jun 23 '22 at 05:13
  • 1
    @Sajjad It is important that you are doing that as one long continuous sequence, 1024 * 10 plus the additional samples due to the cyclic prefix; that way as you transition from symbol to symbol the offsets will continue to linearly grow as you would expect to see in your receiver with a sampling clock offset. Does that makes sense to you? – Dan Boschen Jun 23 '22 at 12:30
  • I totally agree with you. I perform that for only one symbol to simplify the situation, and also to avoid the case you talked about it above. That means I consider 10241 instead of 102410. That do make sense to me. And it can be generalized straightforwardly if we want the frame structure which has more than one symbol. But, I think there is something abnormal as the resulted signal is not as expected. – Sajjad Jun 23 '22 at 14:47
  • 1
    @Sajjad I am starting to see how we might be looking / thinking of different things. I was considering the constellation of just one sub-carrier, and thought you were looking at several successive symbols in time (for that one sub-carrier), which would then be the rotation I described. I may have some time later to make my own example in Python so we can compare notes and your points will then be clearer to me... – Dan Boschen Jun 23 '22 at 18:18
  • Ok, thank you so much your help in advance ! – Sajjad Jun 28 '22 at 05:06
  • 1
    @Sajjad yes I haven’t forgotten you, just got consumed with other things but do intend to look into this further – Dan Boschen Jun 28 '22 at 13:02
  • Thank you for your update, after reading more about those effects; I think both SFO and CFO have the same results effect which is phase rotation as shown in my shown figure. – Sajjad Sep 08 '22 at 11:42