uan: (fixes #2299) WOSS integration + FH-FSK Interference rev.
This commit is contained in:
@@ -72,8 +72,8 @@ public:
|
||||
* \param txPowerDb Transmission power in dB.
|
||||
* \param txmode UanTxMode defining modulation of transmitted packet.
|
||||
*/
|
||||
void TxPacket (Ptr<UanTransducer> src, Ptr<Packet> packet, double txPowerDb,
|
||||
UanTxMode txmode);
|
||||
virtual void TxPacket (Ptr<UanTransducer> src, Ptr<Packet> packet, double txPowerDb,
|
||||
UanTxMode txmode);
|
||||
|
||||
/**
|
||||
* Adds device to receiver list for this channel.
|
||||
@@ -111,12 +111,12 @@ public:
|
||||
* Clear all pointer references. */
|
||||
void Clear (void);
|
||||
|
||||
private:
|
||||
protected:
|
||||
UanDeviceList m_devList; //!< The list of devices on this channel.
|
||||
Ptr<UanPropModel> m_prop; //!< The propagation model.
|
||||
Ptr<UanNoiseModel> m_noise; //!< The noise model.
|
||||
/** Has Clear ever been called on the channel. */
|
||||
bool m_cleared;
|
||||
bool m_cleared;
|
||||
|
||||
/**
|
||||
* Send a packet up to the receiving UanTransducer.
|
||||
@@ -128,8 +128,7 @@ private:
|
||||
* \param pdp PDP of arriving signal.
|
||||
*/
|
||||
void SendUp (uint32_t i, Ptr<Packet> packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void DoDispose (void);
|
||||
|
||||
}; // class UanChannel
|
||||
|
||||
@@ -78,6 +78,17 @@ UanNetDevice::Clear ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
UanNetDevice::DoInitialize (void)
|
||||
{
|
||||
m_phy->Initialize ();
|
||||
m_mac->Initialize ();
|
||||
m_channel->Initialize ();
|
||||
m_trans->Initialize ();
|
||||
|
||||
NetDevice::DoInitialize ();
|
||||
}
|
||||
|
||||
void
|
||||
UanNetDevice::DoDispose ()
|
||||
{
|
||||
|
||||
@@ -190,8 +190,8 @@ private:
|
||||
bool m_cleared;
|
||||
|
||||
protected:
|
||||
virtual void DoDispose ();
|
||||
|
||||
virtual void DoDispose (void);
|
||||
virtual void DoInitialize (void);
|
||||
}; // class UanNetDevice
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -150,14 +150,17 @@ UanPhyCalcSinrFhFsk::CalcSinrDb (Ptr<Packet> pkt,
|
||||
if (std::abs (pit->GetAmp ()) > maxAmp)
|
||||
{
|
||||
maxAmp = std::abs (pit->GetAmp ());
|
||||
maxTapDelay = pit->GetDelay ().GetSeconds ();
|
||||
// Modified in order to subtract delay of first tap (maxTapDelay appears to be used later in code
|
||||
// as delay from first reception, not from TX time)
|
||||
maxTapDelay = pit->GetDelay ().GetSeconds () - pdp.GetTap(0).GetDelay().GetSeconds();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double effRxPowerDb = rxPowerDb + KpToDb (csp);
|
||||
|
||||
double isiUpa = rxPowerDb * pdp.SumTapsFromMaxNc (Seconds (ts + clearingTime), Seconds (ts));
|
||||
//It appears to be just the first elements of the sum in Parrish paper,
|
||||
// "System Design Considerations for Undersea Networks: Link and Multiple Access Protocols", eq. 14
|
||||
double isiUpa = DbToKp(rxPowerDb) * pdp.SumTapsFromMaxNc (Seconds (ts + clearingTime), Seconds (ts)); // added DpToKp()
|
||||
UanTransducer::ArrivalList::const_iterator it = arrivalList.begin ();
|
||||
double intKp = -DbToKp (effRxPowerDb);
|
||||
for (; it != arrivalList.end (); it++)
|
||||
@@ -178,20 +181,23 @@ UanPhyCalcSinrFhFsk::CalcSinrDb (Ptr<Packet> pkt,
|
||||
}
|
||||
|
||||
double intPower = 0.0;
|
||||
if (tDelta < ts)
|
||||
if (tDelta < ts) // Case where there is overlap of a symbol due to interferer arriving just after desired signal
|
||||
{
|
||||
//Appears to be just the first two elements of the sum in Parrish paper, eq. 14
|
||||
intPower += intPdp.SumTapsNc (Seconds (0), Seconds (ts - tDelta));
|
||||
intPower += intPdp.SumTapsNc (Seconds (ts - tDelta + clearingTime),
|
||||
Seconds (2 * ts - tDelta + clearingTime));
|
||||
}
|
||||
else
|
||||
else // Account for case where there's overlap of a symbol due to interferer arriving with a tDelta of a symbol + clearing time later
|
||||
{
|
||||
// Appears to be just the first two elements of the sum in Parrish paper, eq. 14
|
||||
Time start = Seconds (ts + clearingTime - tDelta);
|
||||
Time end = start + Seconds (ts);
|
||||
Time end = /*start +*/ Seconds (ts); // Should only sum over portion of ts that overlaps, not entire ts
|
||||
intPower += intPdp.SumTapsNc (start, end);
|
||||
|
||||
start = start + Seconds (ts + clearingTime);
|
||||
end = start + Seconds (ts);
|
||||
//Should only sum over portion of ts that overlaps, not entire ts
|
||||
end = end + Seconds (ts + clearingTime); //start + Seconds (ts);
|
||||
intPower += intPdp.SumTapsNc (start, end);
|
||||
}
|
||||
intKp += DbToKp (it->GetRxPowerDb ()) * intPower;
|
||||
|
||||
@@ -177,6 +177,14 @@ public:
|
||||
* clearing time between symbols transmitted on the same frequency.
|
||||
* This clearing time combats ISI from channel delay spread and also has
|
||||
* a byproduct of possibly reducing interference from other transmitted packets.
|
||||
*
|
||||
* Thanks to Randall Plate for the latest model revision based on the following
|
||||
* papers:
|
||||
* <ul>
|
||||
* <li>Parrish, "System Design Considerations for Undersea Networks: Link and Multiple Access Protocols"
|
||||
* <li>Siderius, "Effects of Ocean Thermocline Variability on Noncoherent Underwater Acoustic Communications"
|
||||
* <li>Rao, "Channel Coding Techniques for Wireless Communications", ch 2
|
||||
* </ul>
|
||||
*/
|
||||
class UanPhyCalcSinrFhFsk : public UanPhyCalcSinr
|
||||
{
|
||||
|
||||
@@ -234,6 +234,13 @@ public:
|
||||
*/
|
||||
std::complex<double> SumTapsFromMaxC (Time delay, Time duration) const;
|
||||
|
||||
/**
|
||||
* Creates a new UanPdp normalized to its non coherent sum.
|
||||
* \see SumTapsNc
|
||||
* \returns the new PDP
|
||||
*/
|
||||
UanPdp NormalizeToSumNc (void);
|
||||
|
||||
/**
|
||||
* Get a unit impulse PDP at time 0.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user