File Exchange

image thumbnail

Simulink Model of Bluetooth Full Duplex Voice and Data

version 1.3.0.3 (241 KB) by Vamsi K
Simulink® and Stateflow® model of a full duplex Bluetooth® communication link.

12 Downloads

Updated 27 May 2020

View Version History

View License

For the latest version of this example and more new examples covering classic Bluetooth, BLE and BLE mesh refer to - https://www.mathworks.com/help/comm/bluetooth.html

Simulink® and Stateflow® model of a full duplex Bluetooth communication link transmitting HV1, HV2, HV3, and SCORT [1] voice packets, and DM1 data packets. A system parameters block configures the whole model's packet type, slot pair and channel type. Stateflow is used to implement the acknowledgement scheme for the data packets and the SCORT receiver state machine.
NOTE: A version of this model which works with the current release of MATLAB and Simulink is shipped with the Communications Blockset™.

The model includes wave file I/O, CVSD speech coding, HEC, payload CRC for DM1, FEC, framing, GFSK Modulation, frequency hopping, hop sequence generation, an 802.11b interferer, BER meters, throughput meters, plus spectrum, timing and spectrogram plot (which can be turned-off).

Instructions: Unzip to a new folder, change the MATLAB current directory to this folder, then open the 'bluetooth_full_duplex' mdl file.

Model Files:
bluetooth_full_duplex.mdl - Model file
bluetooth_lib2.mdl - Library containing complete device, 802.11b transmitter, BT hop generator and BT clock
bluetooth_init.m: Workspace initialization routine called by model PreLoadFcn
device_init.m: Device mask initialization function
poiss_gaus_prc.m: Variable time-step M Code S-function to generate 802.11b Poisson packets
code_data.mat: 2/3 Hanning code matrices and variables
Input1.wav: Input wave file for device 1
Input2.wav: Input wave file for device2
The model will also generate 2 output wave files

Test files (open bluetooth_full_duplex.mdl, turn off instrumentation and run these):
test_voice_basic.m ? Simulate all voice packets and ensure 0 BER for no channel case (1.5 minutes to run of 800MHz machine)
test_data_throughput.m - Simulate and measure throughput of DM1 packet for different SNRs (4.5 mins on 800MHz machine)

Standard:
http://www.bluetooth.com/

[1] SCORT specification doc.: IEEE 802.15-01/145r0

Cite As

Vamsi K (2020). Simulink Model of Bluetooth Full Duplex Voice and Data (https://www.mathworks.com/matlabcentral/fileexchange/2283-simulink-model-of-bluetooth-full-duplex-voice-and-data), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (18)

pu yang

Hi,

Thank you for showing interest in Bluetooth capabilities from MathWorks. We are providing the Bluetooth features and examples ( including BR, EDR and low energy) part of add-on "Communications Toolbox Library for the Bluetooth Protocol".

https://www.mathworks.com/help/comm/bluetooth.html

If you have any specific use cases and requirements, kindly share with us.

Thank you.

Youngjune Choi

I have run the code and got the following result,
Error in 'bluetooth_full_duplex/BT Device/Audio source and speech coding/Optional Random Bit Data for BER tests': Initialization commands cannot be evaluated.
Caused by:
The number of outputs should match the number of inputs.
Am I missing something please?

Rajkeen

Ioanna

Error in 'bluetooth_full_duplex/BT Device/Audio source and speech coding/Optional Random Bit Data for BER tests'

Can anyone help???
Thanks in advanced!

Muhammad Usman Khan

this simulation is not running.any 1 can help???

Mohit Agarwal

gcgc

MINTU PHILIP

Aiman Qais

Is it possible to download it to the phones and make Master/Slave with PC.

slow poison

ROUF UL ALAM BHAT

REALLY GOOD, THANKS

rimon ghhg

An Vincint

I'd like to learn from it!

Prince Charming

Wow

Ammar Awni

very nice

Louay Homssi

karthhi keyan

sunil daddi

nice !!!!!

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!