Reply by mnentwig August 20, 20072007-08-20
Well...

imagine we compare time on our wristwatches today.
Mine is five minutes late.

We do the same again tomorrow:
case a) Still five minutes - the difference hasn't changed
case b) The watches have drifted further apart - maybe six minutes
difference.

OFDM is quite sensitive to case b) because the subcarriers lose their
orthogonality... the "O" in OFDM :) 

Cheers

Markus


Reply by Krishna August 20, 20072007-08-20
On Aug 20, 5:55 pm, "mnentwig" <mnent...@elisanet.fi> wrote:
Hi Markus,

> there are two things that might get mixed up: > - sampling clock offset (in terms of absolute time delay) > - sampling frequency offset
Did not understand the difference. Can you please explain.
> The first is trivial in OFDM, it simply appears as frequency dependent > phase shift inside the FFT. But the number of samples before / after the > offset model remain the same.
hmmm...need not be. If the packet is long, the presence of sampling clock offset can result in drifts more than the sampling period.
> The latter may do real damage to OFDM reception, but is harder to model
Am unable to understand the difference between the first and second. Thanks, Krishna http://dsplog.blogspot.com
Reply by mnentwig August 20, 20072007-08-20
>Problem: >the first value in resampled is NaN.
Right... it falls out of the range. A quick hack is to use resampled=interp1(origSampleTime, testsig, nonidealSampleTime, 'extrap'); instead. Or offset the "nonidealSampleTime", so that it falls in range. If you're building a simulator, it may be useful to generate two extra symbols, one before and one after your simulation length. -Markus
Reply by nomee97 August 20, 20072007-08-20
On Aug 20, 2:55 pm, "mnentwig" <mnent...@elisanet.fi> wrote:
> Hi, > > there are two things that might get mixed up: > - sampling clock offset (in terms of absolute time delay) > - sampling frequency offset > > The first is trivial in OFDM, it simply appears as frequency dependent > phase shift inside the FFT. But the number of samples before / after the > offset model remain the same. > > The latter may do real damage to OFDM reception, but is harder to model > (because the model produces more or less samples than it consumes). > You could use interp1, but it may introduce too much aliasing unless your > signal is heavily oversampled. > > Here is some quick+dirty matlab program tested on octave: > Note, this signal _is_ heavily oversampled, so you can't see the > aliases... > Higher order interpolation might do the job, though. > > The "exact" solution is band limited interpolation with sinc pulses around > each sample (polyphase filtering). > > Cheers > > Markus > > origSampleTime=1:30; > nonidealSampleTime=origSampleTime*0.99; > testsig=sin(origSampleTime/30*2*pi); > resampled=interp1(origSampleTime, testsig, nonidealSampleTime); > figure(); hold on; > plot(origSampleTime, testsig, 'r+-'); > plot(nonidealSampleTime, resampled, 'g+-');
I am exactly simulating the same thing as you wrote in the above code , Problem: the first value in resampled is NaN. So how can I take FFT ?? I tried to put some arbitrary value or a 0 in testsig before the first value to get some value instead of NaN in the resampled. Now I can take FFT but due to this arbitrary value or 0 , the result at the output of FFT is not accurate and my algorithm of sampling clock offset estimate is not giving correct result. How will you address the problem ?? Thanks a lot for your reply.
Reply by mnentwig August 20, 20072007-08-20
Hi,

there are two things that might get mixed up:
- sampling clock offset (in terms of absolute time delay)
- sampling frequency offset

The first is trivial in OFDM, it simply appears as frequency dependent
phase shift inside the FFT. But the number of samples before / after the
offset model remain the same. 

The latter may do real damage to OFDM reception, but is harder to model
(because the model produces more or less samples than it consumes).
You could use interp1, but it may introduce too much aliasing unless your
signal is heavily oversampled.

Here is some quick+dirty matlab program tested on octave: 
Note, this signal _is_ heavily oversampled, so you can't see the
aliases...
Higher order interpolation might do the job, though.

The "exact" solution is band limited interpolation with sinc pulses around
each sample (polyphase filtering).

Cheers

Markus

origSampleTime=1:30;
nonidealSampleTime=origSampleTime*0.99;
testsig=sin(origSampleTime/30*2*pi);
resampled=interp1(origSampleTime, testsig, nonidealSampleTime);
figure(); hold on;
plot(origSampleTime, testsig, 'r+-');
plot(nonidealSampleTime, resampled, 'g+-');

Reply by John August 20, 20072007-08-20
On Aug 18, 11:46 am, nomee97 <nomi9...@hotmail.com> wrote:
> On Aug 17, 6:09 pm, Krishna <krishna.pil...@gmail.com> wrote: > > > > I mean I want to see my symbols after the FFT block and they should > > > have sampling clock offset which should be zero for the first > > > subcarrier and should accumulate as the sub carrier number increases. > > > Noman, > > > Corresponding to the sampling clock offset, one can see a linearly > > increase phase > > in frequency domain. Recall that delay in time domain corresponds to > > phase growth > > in frequency domain. > > > HTH, > > Krishnahttp://dsplog.blogspot.com > > Thanks for the information, > I am using the function resample as > resample(data,3,2); > in this was it will be resampled at the rate of 1.5 but in this was I > am getting 64 + 32 points if I use the data with 64 points. > Now I need to take the FFT which is 64 point FFT at the OFDM receiver > which 64 points do I need to take from these 64+32 points ?? > > Regards, > Noman.
That's a ridiculously large offset. Try it with 100 ppm. John
Reply by Krishna August 20, 20072007-08-20
> I am using the function resample as > resample(data,3,2); > in this was it will be resampled at the rate of 1.5 but in this was I > am getting 64 + 32 points if I use the data with 64 points. > Now I need to take the FFT which is 64 point FFT at the OFDM receiver > which 64 points do I need to take from these 64+32 points ??
I do not think that the scenario you tried is exact. Typically, the clock offset between the transmitter and receiver wont be at the rate 3/2. Maybe a 10MHz clock at the Tx and a 10.0001MHz clock at the Rx is reasonable. Try looking at M. Speth, S. A. Fechtel, G. Fock, H. Meyr, "Optimum Receiver Design for Wireless Broad-Band Systems Using OFDM-Part I," IEEE Transactions on Communications, Vol. 47, No. 11, November 1999, pp. 1668- 1677 Regards, Krishna http://dsplog.blogspot.com
Reply by nomee97 August 18, 20072007-08-18
On Aug 17, 6:09 pm, Krishna <krishna.pil...@gmail.com> wrote:
> > I mean I want to see my symbols after the FFT block and they should > > have sampling clock offset which should be zero for the first > > subcarrier and should accumulate as the sub carrier number increases. > > Noman, > > Corresponding to the sampling clock offset, one can see a linearly > increase phase > in frequency domain. Recall that delay in time domain corresponds to > phase growth > in frequency domain. > > HTH, > Krishnahttp://dsplog.blogspot.com
Thanks for the information, I am using the function resample as resample(data,3,2); in this was it will be resampled at the rate of 1.5 but in this was I am getting 64 + 32 points if I use the data with 64 points. Now I need to take the FFT which is 64 point FFT at the OFDM receiver which 64 points do I need to take from these 64+32 points ?? Regards, Noman.
Reply by Krishna August 17, 20072007-08-17
> I mean I want to see my symbols after the FFT block and they should > have sampling clock offset which should be zero for the first > subcarrier and should accumulate as the sub carrier number increases. >
Noman, Corresponding to the sampling clock offset, one can see a linearly increase phase in frequency domain. Recall that delay in time domain corresponds to phase growth in frequency domain. HTH, Krishna http://dsplog.blogspot.com
Reply by nomee97 August 17, 20072007-08-17
On Aug 16, 1:30 pm, John <sampson...@gmail.com> wrote:
> On Aug 16, 3:51 am, nomee97 <nomi9...@hotmail.com> wrote: > > > I am simulationg an OFDM system in Matlab for which I need to generate > > a sampling clock offset in my transmitted signal so that I can write > > an algorithm at the receiver to correct it. > > > Can any body tell me how to generate a sampling clock offset in the > > Transmitted signal. I think I have to use interp1 function but I dont > > have a clear idea. Sampling Clock offset should be a linear function > > of frequency number. > > > Any help will be highly appreciated. > > Thanks in advance. > > > Noman. > > You might consider using Matlab's 'resample' function. > > John
Ok fine I am using the matlab function resample to generate the Sampling clock offset in time domain in the transmitted signal, How can I see my symbols in frequency domain with the sampling clock offset linearly increasing with frequency numbers. I mean I want to see my symbols after the FFT block and they should have sampling clock offset which should be zero for the first subcarrier and should accumulate as the sub carrier number increases. Thanks.