discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] how does Doppler shift increment in flat fading c


From: Bastian Bloessl
Subject: Re: [Discuss-gnuradio] how does Doppler shift increment in flat fading channel GNU radio
Date: Mon, 7 Mar 2016 05:15:20 -0800

Hi Stephan,

thank your for looking into that, much appreciated.


On 07 Mar 2016, at 00:57, Ludwig Stephan (CR/AEH4) <address@hidden> wrote:
 
Yes, alpha_n should be different for each of the N micro paths, but should be constant – at least for some certain time – and maybe completely newly after that time.
But AFAIS alpha_n does not grow with time:
alpha_n = (2*pi*n - pi + theta)/(4*N);
ð  n is the index of the micro path.

It does not grow, but change over time. alpha_n depends on theta, which is updated after each sample. Through theta, alpha_n is doing a random walk in the interval [- pi;  pi]  so that the term

d_fDTs *sin(alpha_n)

is a random walk through the Doppler spectrum.


 
Jake’s Sum-pf-sinusoids methods works by adding up – as its name says – several (here N) paths of different sinusoids. And each sinusoid has a different frequency (corresponds to alpha_n) and phase d_phi/d_psi. I use the term micro path in order to make clear that it is not a macro path, i.e. a tap of a frequency-selective channel. With the SOS method macro path (or a flat channel) consists of N micro paths. BTW, the time variable in the GNU radio code is d_m.

I think I really get the SOS method, but consider this term from the GNU Radio model

float s_i = scale_sin*cos(2*M_PI*d_fDTs*d_m*cos(alpha_n)+d_psi[n]);


Assume that fDTS * cos(alpha_n) is zero at two times, let’s say at d_m=0 and d_m=1000. Now, through the random walk fDTs*cos(alpha_n) might change in the next sample to 0.1. This results in phase shifts

between d_m=0 and d_m=1
2*pi*0.1

between d_m=1000 and d_m=1001
2*pi*0.1*1001

That means that the random walk has an amplified effect on the phase shifts between successive samples over time, which changes autocorrelation properties.

It looks like nobody buys that argument. Am I missing something obvious here?


 
I think [2] can be seen as the reference of the implementation (could you add a comment to the code?).

Maybe the parameters for initialisation are taken from [2], but the random walk is not. In

"Efficient Simulation of Rayleigh Fading with Enhanced De-Correlation Properties” by  Alenka G. Zajic  and Gordon L. Stüber

the authors refer to the paper, stating that:

"To improve on previously reported models, Zheng and Xiao proposed several new statistical models [14]-[16]. By allowing all three parameter sets (amplitudes, phases, and Doppler frequencies) to be random variables, Zheng and Xiao’s models obtain statistical properties similar to ones required by the reference model. However, the models are no longer ergodic."

To me it looks like the model was _fixed_ by introducing this random walk that is supposed to make the model great ergodic again. I guess this follows some paper or book since the code mentions a table

d_step( powf(0.00125*fDTs, 1.1) ),  // max step size approximated from Table 2


Best,
Bastian


 
Maybe some background information:
The choice of alpha_n (or the distribution, where it is drawn from) basically determines the shape of the power spectral density. In IT++ for example, the method of exact Doppler spread (MEDS) [1] is implemented, which is requires the least number N of coefficients for equal precision (as of the results of Paetzold’s PhD thesis in 1998). To me it is still not clear, which method is chosen in GNU Radio.
 
The general definition of the SOS method for a complex random process Z of normalized (to sample period, t is the sample time index) maximum Doppler frequency (Doppler spread) f_D is [nomenclature of IT++, 5, line 304]
Z_re = sum_{n=1}^N c1[n] .* cos(2pi * f1[n] * f_D * t + theta1);
Z_im = sum_{n=1}^N c2[n] .* cos(2pi * f2[n] * f_D * t + theta2);
 
Where f1/2 corresponds to alpha_n. For MEDS this means:
n = 1:N;
f1 = sin(pi / (2 * N) * (n - 0.5));
c1 = sqrt(1.0 / N) * ones(N);
theta1 = randu(N) * 2 * pi;
 
n = 1:N + 1;
f2 = sin(pi / (2 * (N + 1)) * (n - 0.5));
c2 = std::sqrt(1.0 / (N + 1)) * ones(N + 1);
theta2 = randu(N + 1) * 2 * pi;
 
which is not the definition of GNU Radio. But from [1] we know, that N=16 already gets pretty precise results.
 
In GNU Radio (for n = 1:N) we have [IT++ notation for consistency]
Z_re = sqrt(1.0 / N) * sum_{n=1}^N  cos(2pi * cos(alpha_n) * f_D * t + theta1);
Z_im = sqrt(1.0 / N) * sum_{n=1}^N sin(2pi * sin(alpha_n) * f_D * t + theta2);
alpha_n = (2*pi*n - pi + theta)/(4*N);
This is very different from Paetzolds/Jake’s approach and [2] explains their correspondence. Basically, here they use the Pop-Beaulieu improvement (reference 8 in [2]), which makes the output process wide-sense stationary. Paetzold’s method (or Jake’s sum-of-sinoids method in general) does not procude (wide-)sense stationary (simulated) random processes. [2] adds the possibility of generating several such processes, which should be uncorrelated for a uncorrelated scattering frequency-selective fading channel. In general they are correlated, because the randomness is taken from the very same random number generator. But with proper choice of the parameters one can achieve uncorrelated processes. There exist further improvements of the group around Zheng and Beaulieu [2,3,4], which all correct some second or higher order statistical properties.
As a conclusion, the GNU Radio should be preferred over the one of IT++, because of its WSS property.
 
From my point of view, I cannot see, why the correlation could increase over time. To make it clear, N sinusoid have to be added up for building one single time sample of the process.
 
I cannot go much into your iPython notebook sheet, but maybe there is a misinterpretation of N?
 
Cheers,
Stephan
 
[1] Pätzold: “Mobile Fading Channels”
[2] "Improved Models for the Generation of Multiple Uncorrelated Rayleigh Fading Waveforms”  by Yahong R. Zheng and Chengshan Xiao, http://web.mst.edu/~xiaoc/Pub/Zheng_Xiao_CommLett.pdf
[3] http://web.mst.edu/~xiaoc/Pub/Xiao_Zheng_Beaulieu_TWireless.pdf
[4] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.333.217&rep=rep1&type=pdf
[5] http://itpp.sourceforge.net/4.3.1/channel_8cpp_source.html
 
 
Mit freundlichen Grüßen / Best regards 

Stephan Ludwig

Communication Technology (CR/AEH4) 
Robert Bosch GmbH | Renningen | 70465 Stuttgart | GERMANY | www.bosch.com 
Tel. +49(711)811-8809 | Mobile +49(172)5630639 | Fax +49(711)811-5187845 | address@hidden 

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart, HRB 14000;
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors: Dr. Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Markus Heyn, Dr. Dirk Hoheisel,
Christoph Kübel, Uwe Raschke, Dr. Werner Struth, Peter Tyroller 


Von: address@hidden [mailto:address@hidden Auftrag von Bastian Bloessl
Gesendet: Montag, 7. März 2016 01:12
An: address@hidden
Betreff: Re: [Discuss-gnuradio] how does Doppler shift increment in flat fading channel GNU radio
 
…looks like this topic isn’t too popular : -)
Anyhow, I wanted to make another attempt as I would really appreciate if someone could comment on this thread or the threads at [1] or [2].
 
Unfortunately, I still fail to understand the implementation of the flat fader and particularly these lines [3]
 
float s_i = scale_sin*cos(2*M_PI*d_fDTs*d_m*cos(alpha_n)+d_psi[n]);
float s_q = scale_sin*cos(2*M_PI*d_fDTs*d_m*sin(alpha_n)+d_phi[n]);

As far as I see, alpha_n is changing from sample to sample, which produces an amplified effect over time that changes autocorrelation properties.
(It behaves as if the instantaneous Doppler frequency would have been present since the start and, thus, produces larger and larger phase shifts between subsequent samples.)
 
I tried to show the effect with an iPython notebook
https://www.bastibl.net/rayleigh-autocorrelation/
 
It would be great if someone could point me to a paper/book with the algorithm that is implemented here. The only thing I could find is 
 
"Improved Models for the Generation of Multiple Uncorrelated Rayleigh Fading Waveforms”  by Yahong R. Zheng and Chengshan Xiao
http://web.mst.edu/~xiaoc/Pub/Zheng_Xiao_CommLett.pdf
 
which proposes the parameter set, but not the random walk through the Doppler spectrum that seems to be an attempt to make simulations ergodic.
 
Best,
Bastian
 
 
[1] http://lists.gnu.org/archive/html/discuss-gnuradio/2016-02/msg00254.html 
[2] http://lists.gnu.org/archive/html/discuss-gnuradio/2016-02/msg00305.html
[3] https://github.com/gnuradio/gnuradio/blob/next/gr-channels/lib/flat_fader_impl.cc#L76
 
 
On 23 Feb 2016, at 08:35, Bastian Bloessl <address@hidden> wrote:
 

On 23 Feb 2016, at 02:35, Kelvin Augustin <address@hidden> wrote:
 
Hi Bastian
 
What I don’t get (and what I asked in the other thread) is why this is multiplied with d_m. I think that, per sample, the current Doppler Frequency should be used to calculate an incremental angle to the previous value.
 
To answer this, I would consider of the correspondence (via a Fourier Transform) of a Doppler shift in the time domain; A shift in frequency corresponds to a "time" dependant phase shift in the time domain. Thus a Doppler shift of Fd in the time domain corresponds to exp(j*2*pi*Fd*t). And since Dynamic channel model(flat_fader to be precise) in GNURadio models the Doppler in the time domain, the d_m could be a way to model the time. 
 
Yes, I understand that d_m is like time here, and it would be perfectly fine if fD would stay constant during the whole simulation.
 
But as fD changes over time, the phase change from one sample to another (due to the same change in dopplers shift) will be amplified over time. AFAIS, this changes the autocorrelation properties over time.
 
I would have expected something like
 
tap[n+1] = tap[n] exp(2*pi*i*fD*cos(alpha))
 
Best,
Bastian


 
I would also ask a supplementing question that I am having problems understanding. I would expect the Doppler shift to be modelled by a complex exponential(cos[2*pi*Fd*t*cos(alpha)] + i sin [2*pi*Fd*t*cos(alpha)]) which corroborates what we know from the Fourier correspondence of a Doppler shift. Why then, in the Dynamic channel model in GNURadio (flat_fader to be precise), the Doppler is modelled by (cos[2*pi*Fd*t*cos(alpha)] + i cos [2*pi*Fd*t*sin(alpha)]) ?? I.e why is the imaginary part a cos ? Any hints?
 
 
 
On 22 Feb 2016, at 06:41, Nasi <address@hidden> wrote:
 
Hello,

The question is about how does the given Doppler shift progress, or how is the Doppler induced phase shift implemented.

I select a simple frequency selective fading block and feed in it some gr_complex(1, 0) values. For simplicity I run one fader (num of sinusoids).
in file:
https://github.com/osh/gnuradio.old/blob/master/gr-channels/lib/flat_fader_impl.cc 
in the code below,
#elif

 FASTSINCOS == 2


 
float s_i = scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.cos(alpha_n)+d_psi[n+1]);

 
float s_q = scale_sin*d_table.cos(2*M_PI*d_fDTs*d_m*d_table.sin(alpha_n)+d_phi[n+1]);

 
 

 
#else

 d_m shows that the Doppler shift must progress sequencially. However, the value of "2*M_PI*d_fDTs*d_m*d_table.cos(alpha_n)" as a whole, produces floating point numbers which results in kind of random values out of d_table.cos() function in file 
https://github.com/osh/gnuradio.old/blob/master/gr-channels/lib/sincostable.h

Some more explanation:
the value: 2*M_PI*d_fDTs*d_m*d_table.cos(alpha_n) gets in as x below (in file .../lib/sincostable.h)
(((int)(x*d_scale)) + d_sz) % d_sz; - this is a random integer value (may be not, can you please help me with that?)
therefore it returns a random cos value as: return d_cos[idx];

The issue arises when that floating point values inside cos() function is converted to integers as given above.

Now, my question is, did you do that random phase shift/Doppler shift on purpose? If yes, what is the reasoning behind that.
As far as I know, the Doppler shift should be somehow linear progressive.


--
Dipl.-Inform. Bastian Bloessl
Distributed Embedded Systems Group
University of Paderborn, Germany
http://www.ccs-labs.org/~bloessl/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]