[Ns-developers] Antenna Models (UNCLASSIFIED)
nbaldo at cttc.es
Tue Nov 22 11:17:55 PST 2011
Hi Brian, Pavel & all,
at CTTC we are also very much interested in antenna models, in fact we
are just starting some development activity in this field.
Our idea was centered around a new AntennaModel class model with the
AntennaModel::GetGain (theta, phi)
where theta and phi are the azimuth and inclination angle obtained by
expressing the relative position of the TX and RX nodes in spherical
coordinates. This choice is motivated by the fact that antenna radiation
patterns in the literature are mostly represented in this way.
Each PHY object would provide a method like this:
Ptr<AntennaModel> GetAntenna ();
so that the channel object can obtain the TX and RX antenna objects and
calculate the respective antenna gains. This approach is similar to the
approach that we currently use for MobilityModel, in fact most current
wireless PHY implementations have a method like this:
Ptr<MobilityModel> GetMobility ()
Overall, this model is quite similar to the one proposed by Brian
(except for the spherical coordinate thing, and for putting some
functionality in the PHY rather than in the NetDevice).
Below a few comments on the previous emails... just my personal opinion
On 11/21/2011 05:43 PM, Pavel Boyko wrote:
> Hi Brian,
> I am sure ns-3 community will welcome antenna models.
> When I tried to think about this some time ago, I came to the following
> 1. Antenna object should know its position (as well as other properties
> like orientation, height above ground, etc). Different antennas of the
> same node can have different positions which probably should be computed
> from the node position.Node orientation concept can also be introduced if
I am a bit skeptical about multiple antennas per device... I don't see
the practical use case. I argue that using such an approach for MIMO
would be very complex: it would need a model the fading correlation
among antennas based on their relative position, plus a detailed enough
PHY model that can handle this information.
I think that even link-level MIMO simulators with detailed channel and
PHY models don't consider the relative position of the multiple
antennas. For example, if you look at Matlab's "mimochan" function:
it takes as input the matrix of fading correlation among antennas, but
does not consider their relative position.
> 2. Channel propagation models should receive antenna objects instead of TX
> and RX locations (mobility models). Propagation loss models are
> responsible for gain computation, like this:
> rxPower += txAntenna->CalcTotalGain (rxAntenna);
> where Antenna::CalcTotalGain() is implemented in the base class as
> return this->CalcTxGain (other->GetPosition()) + other->CalcRxGain
> 3. At the same time propagation model which cares can use other antenna
> parameters, e.g. height is used for 2-ray ground or Longley-Rice
what about using the z-coordinate to determine the antenna height?
> 4. Radio NetDevice should know its antenna (or antennas) and pass them to
> the PropagationLossModel:
> double rxPowerDbm = m_loss->CalcRxPower(tx->GetAntenna (0), rx->GetAntenna
> where antenna index = 0 can be omitted for SISO channel.
> What do you think about this? I remember that this API has some potential
> problems, but can't remember the details.
> Best regards,
> Pavel Boyko
> -----Original Message-----
> From: ns-developers-bounces at ISI.EDU [mailto:ns-developers-bounces at ISI.EDU]
> On Behalf Of Panneton, Brian C USA CTR (US)
> Sent: Monday, November 21, 2011 7:28 PM
> To: ns-developers at ISI.EDU
> Subject: [Ns-developers] Antenna Models (UNCLASSIFIED)
> Classification: UNCLASSIFIED
> Caveats: NONE
> I'm interested in adding antenna models to ns3. Has anyone already started
> this or have any ideas of how they would like it implemented?
> Currently, I plan to add the model into the NetDevice.
do you target any specific wireless model (e.g.: wifi, wimax, lte)?
Depending on this, you might want to add the antenna in some other
object (e.g., the PHY) instead of the NetDevice.
Besides, NetDevice is used by all devices in ns-3 (including wired
devices), so the impact of modifying this class on the existing code
base will be very high.
> Each antenna model will contain these functions:
> - CalcTxGain(Vector rxPos)
> Calculates the tx gain in regards to the position of the rx NetDevice.
> - CalcRxGain(Vector txPos)
> Calculates the rx gain in regards to the position of the tx NetDevice.
> - GetNetDevice(NetDevice dev)
> - SetNetDevice(NetDevice dev)
> This will result in changes to the channel. There will also be a change to
> the Pathloss Models. I will need to add CalcPathLoss which will return the
> path loss between the two device positions.
> For example, the change to yans-wifi-channel::Send() could look something
> like this:
> double rxPowerDbm = m_loss->CalcRxPower(...)
> Will change to something like this:
> Vector sPos = senderMobility->GetPosition();
> Vector rPos = receiverMobility->GetPosition();
> // Calc TX Power
> // given by txPowerDbm
> // Calc TX Antenna Gain
> double txGain = senderDev->GetAntenna()->CalcTxGain(rPos);
> // Calc Path Loss
> // Added to prop loss models which returns loss instead of rx power
> double pathloss = m_loss->CalcPathLoss(sPos, rPos);
> // Calc RX Antenna Gain
> double rxGain = receiverDev->GetAntenna()->CalcRxGain(sPos);
> // Calc RX Power
> double rxPowerDbm = txPowerDbm + txGain + pathloss + rxGain;
I think your above proposal of adding the antenna gain calculation in
the channel object makes sense.
More information about the Ns-developers