Code covered by the BSD License  

Highlights from
Bluetooth Full Duplex Voice and Data Transmission

image thumbnail

Bluetooth Full Duplex Voice and Data Transmission

by

 

27 Aug 2002 (Updated )

Simulink® and Stateflow® model of a full duplex Bluetooth® communication link.

test_data_throughput.m
% Measure thoughput for DM1 packet type for different SNRs
% Copyright 2002-2009 The MathWorks, Inc

tic
clear Throughput_Results1 Throughput_Results2; % Clear previous results
    
% Define model
Modelname='bluetooth_full_duplex';

% Turn on AWGN
set_param([Modelname '/System parameters'],'Channel_type','AWGN');

%  Set devices to DM1 packet type     
set_param([Modelname '/System parameters'],'Packet_type','DM1');

Simulation_time=100/1600; % 100 slots
EsNo_tests = 9:1:14; % Range of SNR

for EsNo_test=1:length(EsNo_tests) % For each SNR level...
    
    EsNo=EsNo_tests(EsNo_test); % Set EbNo level in workspace
    
  
    %  Display SNR currently being simulated
    disp(['Testing EsNo: ' num2str(EsNo_tests(EsNo_test)) '...'] );
    
    % Run simulation
    sim(Modelname, Simulation_time);
 
    % Display results
    disp('Throughput Results:');   
    disp(['Device 1: ' num2str(Throughput1)]);   
    disp(['Device 2: ' num2str(Throughput2)]);  
    disp(' ');
    Throughput_Results1(EsNo_test)=Throughput1;
    Throughput_Results2(EsNo_test)=Throughput2;
end

% Plot total results
plot(EsNo_tests,Throughput_Results1/1000,EsNo_tests,Throughput_Results2/1000);
title('Throughput Results');
xlabel('EsNo');
ylabel('Throughput (kbps)');
axis([EsNo_tests(1)  EsNo_tests(end)  0  130]);
legend('Device 1','Device 2')
grid;
toc

Contact us