Newsletters - MATLAB Digest
Bluetooth Voice Simulink® Model
by Stuart McGarrity
Send email to Stuart McGarrity
Bluetooth is a short-range wireless networking technology that allows for easy interconnection of mobile computers, mobile phones, headsets, PDAs, and computer peripherals without the need for cables. It is designed to be low-cost and low form-factor, so much design work is required to optimize resource usage.
Promoted by a number of wireless communications equipment manufacturers, the technology uses the unlicensed Instrumentation, Scientific, and Medical (ISM) band around 2.4GHz. It shares this channel with devices used for other applications, including cordless phones, garage door openers, highway toll transponders, and outside broadcasting equipment. It is also susceptible to interference from microwave ovens, which emit radiation in this bandwidth. There are two other wireless networking standards that use this frequency band: 802.11b or "WiFi" and Home RF. 802.11b uses direct sequence spread spectrum and Home RF uses the frequency hopping of 802.11 (a precursor to 802.11b) for data and the DECT (Digital Enhanced Cordless Telecommunications) cordless phone standard for voice. Many networking products based on these technologies are currently available.
When designing Bluetooth systems and semiconductors, you need to simulate and test them in the presence of interference from these other devices. System-level design tools such as Simulink® give you the ability to simulate the behavior of these devices and carry out such tests before commencing costly hardware and embedded software design. Therefore, you can discover design flaws early in the development process while they are inexpensive to correct.
Bluetooth Specifications
The Bluetooth specifications define the requirements for use of voice and data communication over a radio channel with a maximum capacity of 1Mbps. Bluetooth transmits at a low power (1mW) and is therefore designed for short-range use of less than 10 meters. The modulation scheme used in Bluetooth is Gaussian Frequency Shift Keying (GFSK). Frequency hopping is also employed to avoid interfering with other devices transmitting in the band. Although Bluetooth transmissions will occasionally collide with those from another device, this can be tolerated or recovered from with appropriate coding schemes. Transmission time is divided into 625 µs slots, with a new hop frequency being used for each slot. Although the data rate is only 1Mbps, a much larger bandwidth of 79MHz needs to be simulated to accurately model the frequency hopping effects.
Here we will be looking at the design of the physical layer in Simulink. Operations such as link manager protocol and logical link control, which are better modeled as state machines in Stateflow®, are not considered here. We will look at the transmission of voice, for example between a mobile phone and headset. In particular, we will look at the HV3 packet type, which performs no forward error correction (FEC) on the payload.
During communication, Bluetooth devices can be masters or slaves. The master is the device that initiates the connection to one or more slave devices. Figure 1 shows the communications link between the master transmitter and the slave receiver for voice transmissions.
| Figure 1: Communications link between transmitter and receiver for voice transmissions. Click on image to see enlarged view (6 k). |
Figure 2 shows a more detailed block diagram of the transmitter only, including speech coding, whitening, Header Error Check (HEC), Forward Error Correction (FEC), framing, modulation, frequency hopping, and Radio Frequency (RF) subsystem.
![]() |
Figure 2: Transmitter specification. Click on image to see enlarged view (5 k). |
In Bluetooth, voice transmission is known as a Synchronous Connection Oriented (SCO) type of communication, and transmits only every sixth slot. This time period, equal to 3.75ms, is denoted as TSCO. The return (slave to master path) transmits on the next slot as shown in Figure 3. Up to three simultaneous voice calls can be supported this way. The figure shows the transmit slot for each SCO link master (T1, T2, and T3) and the return path slot for the slaves (R1, R2, and R3).
| Figure 3: Timing diagram of three simultaneous voice calls. | ![]() |
Simulink Model
Such a communication system can be constructed from the blocks found in the Simulink, the DSP Blockset, and the Communications Blockset libraries. Custom blocks can be constructed from other primitive blocks or specified with C code if needed. One way to construct such a communication link in Simulink is to start with the channel and work outward, adding modulation and FEC, testing at each stage. It is also useful to design component pairs separately. For example, the speech encoder and decoder can be built and tested in their own model and then inserted into the link once they have been tested.
Figure 4 shows the top level of the complete Bluetooth voice Simulink model. This model, which can be downloaded from MATLAB Central, comprises a master transmitter, radio channel, 802.11b interferer, slave receiver plus error meters, and instrumentation. Here only the top level is shown. Simulink's hierarchical modeling features enable large, complex designs to be managed and modularized into subsystems. Opening up these subsystems reveals further levels of detail.
![]() |
Figure 4: Simulink model of Bluetooth voice transmission. Click on image to see enlarged view (41 k). |
The Simulink model makes extensive use of frame-based processing, which can propagate large frames of samples at each execution step, allowing for much faster simulation of digital systems. For example, a 10-tap FIR filter can process a 1MHz signal in real time on an 800MHz Pentium processor. In this particular model, a top sample rate of 100MHz is used. Frame-based processing also allows for easy modeling of block-based operations, such as forward error correction and cyclic redundancy checks (CRC), which operate on finite length frames of data. The frame widths in this model were displayed next to the signals by selecting the Signal dimensions option from the Format menu. To visualize the many different sample rates in the model, including two speech rates, the Bluetooth slot rate, and the SCO slot rate, select the Sample time colors option from the Format menu, as shown in Figure 5. Yellow denotes a block that has multiple sample rates such as in a Downsample block.
| Figure 5: The Sample time colors option highlights the various model sample rates. Click on image to see enlarged view (30 k). | ![]() |



