Bluetooth low energy physical layer (2G4 Phy)
BabbleSim includes a physical layer (Phy) for BLE radio simulation. This physical layer supports an arbitrary number of simulated devices. Devices may at any point transmit, receive, or perform power measurements on the channel.
Simulations are run at a “packet level”: devices interface with the Phy by sending and receiving packets. They do not interface by sending IQ samples. Channel effects and modem analog and digital performance are modeled at any desired level (balancing accuracy and execution time) inside the Phy. When running a simulation you select which channel and modem models are used. Here you can find more info about how.
The Phy coordinates devices by not responding to them until the time in which a given event (for example the end of a transmitted packet) has happened.
Devices may abort transmissions or reception attemps at any arbitrary point before they finish.
The Phy supports 1 & 2 Mbps standard BLE modulations, as well as 2,3 & 4 Mbps propietary modulations.
The Phy can dump all radio activity to files. You control this with the
-dump
and -nodump
command line options.
This radio activity can be easily imported for analysis
into the
Ellisys Bluetooth Analyzer SW.
How the Phy decides if a packet is received:
When a device attemps to receive, the Phy will evaluate if any packet being transmitted could possibly be received. That is, if the packet timing, frequency, modulation and access address would allow for the receiver to correctly receive that packet.
In case the Phy estimates the packet could possibly be received, it proceeds to a more precise evaluation:
-
The Phy invokes the channel model to calculate the attenuation and ISI for all active transmitters to that receiver 1
-
The Phy invokes the modem model with a list of all transmitters, their parameters, the power level with which each is received and the channel ISI. From this, the modem model can estimate:
- The effect of each interferer into the desired signal
- The receiver thermal noise, and any other receiver impairments.
- The probability of the packet being synchronized to, and the bit error probability over the packet.
With this probabilities the Phy then draws if a packet is received, and with which bit errors.
Calculating the received power level:
Each transmitting device communicates to the Phy its packets Tx power (including antenna gain).
The Phy accounts for:
- Channel attenuation as calculated by the channel model
- Receiver antenna gain (as provided by the receiving device)
- Rx modem model effects
-
This is done each time the radio environment changes while receiving a packet. ↩