[Ns-developers] 802.11 first changesets to comment on.
Timo Bingmann
timo.bingmann at student.kit.edu
Wed Jan 7 04:35:46 PST 2009
On Tuesday 06 January 2009 15:45:33 Mathieu Lacage wrote:
> On Tue, 2009-01-06 at 15:12 +0100, Mathieu Lacage wrote:
>
> > > - Added samples/main-propagation-loss.cc, which outputs a plot of all
> > > loss models (except Jakes', which I couldnt get to work right or don't
> > > understand it.)
> >
> > I am trying to look at it right now: did you try setting a non-zero
> > doppler frequency ? i.e.,
> >
> > DefaultValue::Bind ("ns3::JakesPropagationLossModel::DopplerFreq",
> > StringValue ("0.1"));
No, I used only default values until now. I updated my sample program, but used
// doppler frequency shift for 5.15 GHz at 100 km/h
jakes->SetAttribute("DopplerFreq", DoubleValue(477.9));
> Ok, the problem in your case comes from the fact that the Jakes
> propagation model relies on simulation time actually going forward to
> calculate the fast fading loss. Since I assume your code is doing a
> single loop calling GetLoss repeatedly, the loss is always a constant
> equal to the first loss and never changes. The following code gets me
> the expected output with the patch from bug 459 applied:
>
> Ptr<PropagationLossModel> model = CreateObject<JakesPropagationLossModel> ();
> Ptr<MobilityModel> a = CreateObject<StaticMobilityModel> ();
> a->SetPosition (Vector (0.0, 0.0, 0.0));
> Ptr<MobilityModel> b = CreateObject<StaticMobilityModel> ();
>
> for (double x = 0; x < 2000; x+= 1)
> {
> b->SetPosition (Vector (x, 0.0, 0.0));
> double loss = model->GetLoss (a, b);
> std::cout << x << " " << loss << std::endl;
> Simulator::Stop (Seconds (1.0));
> Simulator::Run ();
> }
>
> regards,
> Mathieu
Yes, that was the problem: the Jakes model uses Simulator::Now() in it's oscillator calculations.
However Seconds(1.0) were too large time steps, I had to decrease it to 0.01 to get better results.
Is it correct that the Jakes model is invariant in respect to node distance? Then the new plot shows the following probability density function:
http://idlebox.net/2008/ns-3-wifi/results/ns-3-main-propagation-loss.pdf?page=4
I don't know enough about this model to actually verify it's results.
Greetings
Timo
More information about the Ns-developers
mailing list