Bluetooth Low Energy Error Correction Based on Convolutional Coding

Contemporarily, the Internet of Things (IoT) is recently a newly emerging technology for connecting small devices into a platform; the IoT has been an increasingly demanded front-edge technology in terms of connecting different devices using information transmission and storage technology. To adapt to the small capacities of device batteries, Bluetooth Low Energy is adopted as the protocol of communication. However, the existing standards do not have a suitable and specific error correction method. As there is no ideal information transmission channel, there must be errors that occurred during message transmission. The performance and capacity of error correction become decisive factors in evaluating how efficient the IoT communication system performs. This article uses convolutional coding—a better-performing coding scheme than block coding—to correct errors in information transmission and reception on Internet of Things devices. It is better competent to control and correct bit errors in information transmission. To achieve this goal, convolutional coding algorithms devised by Dr Justin Coon at the University of Oxford have been referred to. By simulation using MATLAB, it has been found that the error rate is enhanced significantly for high Signal-to-Noise Ratio (SNR) in convolutional codes compared to uncoded messages.


Introduction
The Bluetooth Low Energy (BLE) standard is one of the most promising Internet of Things (IoT) solutions. Compared with classic Bluetooth, BLE aims to maintain the same communication range while reducing power consumption and cost. Digital binary coding schemes can usually be classified into two types: block code and convolutional code. In [1], convolutional code, compared to block code, can control and correct errors better. Most of the existing designs use Cyclic Redundancy Check (CRC) to correct errors. The CRC code has a great correction capability. However, the CRC code will consume too much energy. In this case, the convolutional codes were chosen to be our error-correcting codes.
This research mainly compares and analyzes three Bluetooth Low Energy 5.0 (BLE5.0) physical layer patterns to explore their differences and characteristics. At the same time, this research summarizes the advantages of GFSK modulation which is always used in Bluetooth Low Energy 4.0 2 (BLE4.0) and later versions. A suitable convolutional coding is designed based on the characteristics of physical layer transmission. By utilizing MATLAB simulation, the performance of the design above can be demonstrated. The design of convolutional coding is compliant with the characteristics of the physical layer transmission. On this basis, the performance comparison of the convolutional codes and block codes proves that the convolutional codes perform better under the same condition.
The rest of this paper is organized as follows. A standard Bluetooth error correction mechanism is introduced in detail. The error correction mechanism of the Bluetooth system can be divided into forward error correction (FEC) and ARQ scheme for data. FEC supports both 1/3 rate and 2/3 rate error correction codes. We adopted different schemes according to the different bit error rates required for voice data and control information. Through discussing the basic principles and applications of several schemes, it can be found that the 1/3 scale FEC scheme is a relatively simple error-correcting code manner. 1/3 scale FEC scheme can be automatically corrected. ARQ scheme only guarantees the correct transmission of payload, while it cannot protect data and voice information. Objectively speaking, the error correction mechanism adopted by Bluetooth is not the most advanced technology in the current field. Bluetooth adopts more straightforward 1/3 rate repetition codes and 2/3 rate Hamming codes instead of more advanced convolutional codes and Turbo codes with the same coding rate to improve decoding speed and reduce commercial costs.

Methodology
In this work, we first collect relevant theoretical knowledge. Through the integration of the corresponding knowledge, we determine the direction of research. With this direction, we design and simulate a convolutional coding in MATLAB. By analyzing the experimental results, the convolutional coding achieves good performance. Compared with other error-correcting codes, convolutional code is more suitable for BLE.

Bluetooth Low Energy Physical Layer
The research uses the BLE protocol for transmission. BLE 5.0 PHY Layer has three patterns: two of them are uncoded physical layer standards. The encoded physical layer standard has two different coding methods.

GFSK Modulation
GFSK modulation is always used in Bluetooth BLE4.0 and later versions. The reasons for using GFSK modulation are summarized in this section.

Design Direction
According to the analysis of the theory above, we compare different error-correcting codes. Considering the cost and performance, we finally choose convolutional code to be our error-correcting code.

Convolutional Code
As the type of channel codes formed by simple mathematical operations, convolutional codes are adopted the most in current communication applications. This type of code provides a reliable capability of error detection and correction.
To generate concatenated convolutional codes, there needs to be a string of raw binary source codes. The string is then pushed into the buffer bit by bit. There are two raw output strings, and these two strings are different based on distinct bit combinations selected for modulo arithmetic. Selected bits on each side operate modulo arithmetic by two and generate two raw output bit strings which are usually different because the two modulo units select different bits. After all source bits and bits in the buffer are exhaustively pushed, the two raw output strings are concatenated bitwise alternatively in the opposite direction, i.e., from right to left. The algorithm then once takes one bit from the upper string and then takes another one from the lower string. The concatenated string is the convolutional code.

Block Coding
Compared to convolutional codes, block codes are much simpler. If the message has the length of k bits, there will be ( ) n k  bits added after that forms codewords with the length of n bits. Usually, people utilize Hamming code, Bose, Chaudhari and Hocquenghem (BCH) code and Reed Solomon code the most among block codes. Their linearity and cyclicity often evaluate block codes. Linear block codewords are derived from combining generator words. In the generator matrix, k and n are the number of rows and columns, respectively. k information bits are concatenated with ( ) n k  parity bits through the block coder that forms n-bit codewords.
Block codes can be generated by multiplying all possible binary numbers from 0 to 1 2 k  sequentially with the generator matrix or adding combinations of two generators while adding the nlength all-0 codeword into the codeword collection.

Hamming Code
The minimum number of different bits between any two codewords within a codeword set in Hamming code is the minimum Hamming distance. This distance can be simply found by counting the minimum number of 1s in a codeword among all codewords except for the all-0 codeword. With the

2/3 scale FEC scheme
1/3 scale FEC scheme is a relatively simple error-correcting code way, which uses a simple 3-fold repetition format to repeat each message 3 times. It then decodes it by using the large number decision method at the receiving end. In the 2/3 scale FEC scheme, (15,10) shortened Hamming codes are used

ARQ scheme
Bluetooth adopts a fast unnumbered ARQ scheme. ARQ scheme's basic principle is, after sending a packet, if the originator does not receive the acknowledgment signal (ACK) correctly received by the other party, the originator will resend the packet. The acknowledgement information is placed in the header of the response packet sent to the other party, and whether the received information is correct is completed by the cyclic redundancy check code (CRC) in the payload. The 16-bit CRC check code is generated by using CCITT polynomial 210041 (octal) [7,8].

Error Checking
To ensure the reliable transmission of data, it is necessary to check whether the identification access code is correct when receiving packets, to prevent erroneous reception of information from other piconets. Since the source of the 64-bit synchronization word in the access code comes from the low address part (LAP) of the 24-bit master unit, it is possible to check whether the LAP is correct and receive information from other piconets. HEC and CRC detection usually include High-end addresses (UAP). Even if a message can be detected by access code, it will still be discarded if UAP does not match. Before calculating HEC and CRC [9], the shift register of the HEC/CRC generator is initialized When coding, the circuit is initialized with 8-bit UAP, and the data enters the encoder bit by bit. When the last bit enters, all parity bits have been generated.
CRC the generation polynomial can be represented as: At the beginning of coding, the leftmost 8 bits are first loaded with 8-bit UAP, and the rightmost 8 bits are set to 0. has an error correction stage [10].  b) LE encode PHY have two different encoding methods, s=8 and s=2. s is the number of symbols per bit [10]. If there is no Gaussian filter, the frequency conversion will be too fast to cause much noise. More than that, GFSK can also control the modulated signal spectrum by changing the 3dB bandwidth of the Gaussian low-pass filter. GFSK modulation has many advantages like a constant envelope, concentrated power spectrum and narrow spectrum [11].

Design direction
In the beginning, we have many choices like CRC, block codes and convolutional codes. But to save energy, we won't transfer too much data, so we exclude CRC. And in the same coding condition, convolutional codes perform better than block codes [12]. Finally, we choose convolutional codes to be our Error-correcting codes.

3.3.1.
By mapping bits-0 and 1-to the two BPSK symbols-"-1" and "1"-and simulating 7-bit convolutional codes, we have got a result that for convolutional codes with Additive White Gaussian Noise (AWGN), the bit error rate (BER) is the highest while the Signal to Noise Ratio (SNR)'s value falls in the range between 1 and 2. When the SNR exceeds 3, especially when it is 10 or higher, the SNR is very low.  Figure 10. Error probability for uncoded random 10000-bit binary message

Conclusion
We use convolutional codes to design an error-correcting code for Bluetooth Low Energy (BLE). As one of the most promising Internet of Things (IoT) solutions, BLE does not have a standard error correction code. In order to be applied in IoT, the BLE needs an appropriate error correction code to improve the transmission efficiency. Based on BLE physical layer transmission characteristics, it can be found that convolutional code is better for BLE. With theoretical assist, we design a convolutional error-correcting code in MATLAB. From the simulation results, the performance of the convolutional error-correcting code can be demonstrated.
In the future, the IoT will become mainstream. At the same time, the BLE will have more applications. For example, smart wearable devices are perfect for the BLE. With the BLE and a suitable error-correcting coding, the smart wearable devices battery will last longer, and the reliability of the smart wearable devices will also be greatly improved. Based on these advantages, people can create a variety of smart wearable devices. Furthermore, we can connect all the tools that we use in our daily life. The low power consumption and reliability reduce the cost without the performance taking a hit. A garden, a water tank, or even a sunshade could be regarded as part of our connection network. Users can receive data and manage equipment through the terminals. The production and operation of the whole society will be changed. We will enter a more efficient and convenient era.