Performance Improvement of CDMA Wireless Sensor Networks in Low SNR Channels Based on Raptor Codes

Low signal to noise ratio (SNR) channels require careful design of communication systems in order to operate reliably in such extreme channels. Special measures and techniques must be considered when designing communication systems for such environments to counteract the effect of high noise power. Channel coding is a powerful tool to aid against adverse channel conditions including low SNR. Coupling channel coding with a spreading technique can further strengthen the performance of communication systems. Hence, we studied the performance of a system that combines Raptor codes with direct sequence code division multiple access (DS-CDMA) in low SNR scenarios. The studied design can operate in a wide range of low SNR values. Simulation results show that the system can offer satisfactory BER performance at different code rates. Also, combining Raptor codes with DS-CDMA showed an improvement of approximately 6 dB when compared with other schemes using DS-CDMA in low SNR conditions.


Introduction
Wireless Sensor Networks (WSN) are widely used today for various applications. It is one of the most promising technologies because of its unique qualities, including low cost, flexibility, ease of development, and a wide range of applications [1]. In general, a WSN consists of a large number of low-powered sensor nodes that sense, monitor, capture, process, and send the collected data to a base station [2]. The growing need for wireless services with different features and needs brings new technical challenges to wireless communications. The current state of wireless technology is essential for considerable improvement toward realizing this vision of the future [3,4].
One of the most critical issues in the development of telecommunication systems is the required bandwidth. Indeed, the bandwidth requirement has prompted the search for a protocol that can be used to increase bandwidth usage. In the last century, various 1 3 techniques have been proposed to overcome such issues by simultaneously sharing the same data transmission among multiple users [5]. Spread spectrum-based code division multiple access (CDMA) has played an important role in cellular and personal communication systems [6].
It enables multiple users to share the same time slot and bandwidth at the same time. Various access schemes are available, including multiple types of CDMA. Directsequence code-division multiple-access (DS -CDMA), the most common type, will be discussed. CDMA is appealing because of features such as potential capacity increases over competing for multiple access methods such as soft capacity, anti-multipath capabilities, and a gentle handoff [7,8].
Because of these characteristics, DS-CDMA was initially used in military applications. Reliability, security, robustness, and flexibility were the main attributes of the system. Additional factors affecting this method include transmission power, bandwidth, and overall system effectiveness [8,9].
In DS-CDMA technology, each user is given a specific code, which is crucial for modulating the signal as it affects how well the system works. Walsh codes, which are orthogonal codes, are frequently used in CDMA [9] [10]. A critical issue in traditional DS-CDMA systems is how to reduce multiple access interference (MAI) from other users. MAI suppression is also known as multi-user detection [11]. However, interference suppression capability is limited and grows as the number of interfering users grows. The equivalent noise reduces the performance of the bit error rate (BER) [7].
To achieve good transmission performance in digital communication systems, effective channel coding is required. Forward error correction (FEC) is an important factor in improving system performance in CDMA systems. FEC is required to improve system capacity due to MAI observed in asynchronous CDMA. Various alternative coding techniques are available, including CDMA-specific "trellis codes," very low-rate convolutional codes, and conventional convolutional codes [12]. Convolutional error-correcting codes have extensively been used to provide reliable communication over channels with a low signal-to-noise ratio (LSNR) [13].
Turbo code [14] is the most preferred coding method due to its high efficiency in application services with high transmission rates. This code consists of two-block convolutional codes concatenated in parallel and separated by a random interleaver [15]. These codes are highly effective in both the additive white Gaussian noise (AWGN) and fading channels [16].
Fountain codes, a class of error control codes producing an indefinite number of coded symbols from a finite number of source symbols, were first discussed in [17]. Fountain codes have variable code rates and, therefore, they can adapt to different channel qualities and are designed to transmit packet data over erasure channels.
MacKay [17], discusses the key benefits of Fountain codes over AWGN and fading channels in terms of effectiveness, toughness, and dependability [18,19].
Luby proposed the first practical digital fountain code named Luby Transform (LT) code [20]. They have improved the probability distribution for a rateless code [21]. An LT code with direct time encoding and decoding outperforms a low-density paritycheck code (LDPC) in a bursty channel [22]. Shokrollahi suggested the Raptor code as a way to reduce the number of encoded packets produced [23]. It was introduced to improve the error-floor performance and reduce decoding complexity [24]. A rateless code has been applied to other channels, such as binary-input additive white Gaussian noise (BIAWGN) and the erasure channel [19].
Additionally, Raptor codes combine the benefits of block and Fountain codes to produce a variant type of Fountain code with linear encoding and decoding costs. In addition, they use rateless systems to adapt to changing channel conditions. Raptor codes can also completely recover the source block of data with minimal overhead, making them appropriate for various high-data-rate applications [23] [25]. With its rateless codes, a broadcast can avoid feedback overload.
Raptor codes [14] due to their high performance and low complexity, are fountain codes incorporated into the third-generation partnership program (3GPP) Multimedia Broadcast/ Multicast Services Standard (MBMS) [26,27].
Various communication systems, such as wireless ad-hoc networks, sensor networks, and ultra-wideband networks, have low SNR per node despite their high degrees of freedom [13]. Therefore, this study suggested Raptor coding as a performance improvement method for the DS-CDMA multi-user system. However, this study is an extension of our previous work described in [28].
The structure of this paper is as follows: Related work is described in Sect. 2. In Sect. 3, the Raptor code ideas are reviewed while Sect. 4, presents the proposed system. In Sect. 5, a performance analysis of the suggested system using DS-CDMA and a hybrid Raptor code is presented. In Sect. 6, performance metrics for the suggested system are presented, and the final section contains the main conclusions.

Related Works
The effectiveness of the CDMA technique in wireless communication systems has been evaluated using various techniques over the last few decades. Additionally, several studies have examined the multi-user DS-CDMA scheme's error performance in a Rayleigh fading channel.
Many researchers have used various techniques to assess how well the system handles errors [8]. Convolutional codes with maximum free distance have been studied in channel coded (DS-CDMA) systems [29]. This study provided low-rate convolutional codes for the CDMA scheme with different constrained lengths and varying code rates. In [5], the examination of CDMA under the AWGN channel is highlighted after the performance and evaluation of turbo code are properly presented. For use over a Rayleigh fading channel, a convolutional code for the IS-95 standard CDMA system and a turbo-code for the CDMA 2000 system were also proposed in [14].
Turbo codes have a more efficient construction process because of their recursive design. The simulation, conducted in a Rayleigh fading environment, demonstrated that for both the IS-95 and CDMA 2000 systems, the turbo code performs better at low SNRs than convolutional codes. A method for increasing the capacity of a communication channel was developed by Mohammad and Reza [30] by combining the Raptor code with interference cancellation. The resulting Multiple Access Channel (MAC) virtually eliminates the effects of the interfering channel. Shirvanimoghaddam and Johnson [13] examined the design of Raptor codes over BI-AWGN channels in the LSNR regime. They reported that properly designed Raptor codes could achieve a rate efficiency greater than 0.95 in that regime. The rate efficiency of a Raptor code is defined as the ratio of the realized rate to the channel capacity. According to [31], low-density parity check (LDPC) codes using the DS-CDMA technique should be designed using quadratic residue theory based on pseudonoise (PN) sequences. With this method, the performance of LDPC codes is enhanced over a range of Eb/No ratios from 0 to 6 dB using the efficient decoding algorithm known as the Sum-Product Algorithm (SPA). Similarly, the authors suggested an LDPC coded CDMA receiver system [32]. This method increases security and ensures usability by using the LDPC technique and the CDMA system's scrambling code. The system's performance was confirmed by measuring the BER for various SNR values with limits between 1 and 13 dB. A proposal for a Polar-Coded CDMA system can be found in [33].
This method has demonstrated that, based on the simulation results, the BER of the polar channel-coded with DS-CDMA system performs significantly better than the convolutional DS-CDMA system (about 4 dB gain at E b /N o of 4 dB). According to [34], high error rate performance can be achieved in CDMA systems created using MIMO-LDPC using short LDPC codes and fewer decoding iterations. It was shown that the MIMO-CDMA system performs better than the traditional CDMA system, using one transmission antenna only, with an increase in the signal-to-interference noise ratio (SINR) of about 2.5 dB [34]. Using a minimum mean square error (MMSE) detector, Marcu and Halunga examined the behavior of a multi-user CDMA system [6]. The performance of the LDPC-Code DS-CDMA system is examined in the presence of LDPC/Turbo coding and decoding methods when an ideal multi-user detector is used in the recovery of the information data, and the performance is enhanced with a BER = 10 -3 for SNR = 4 dB in an AWGN channel.
In a Rayleigh fading channel, Khoueiry and Soleymani proposed a system that assessed the effectiveness of combining the LDPC technique with Raptor codes [35]. The BER of the codeless OFDM system was improved by implementing a Raptor-coded OFDM system with Binary Phase Shift Keying (BPSK), which was shown to offer improved error performance for OFDM over AWGN channels [18] Kadoch and Benzida proposed a comprehensive design for a massive MIMO communication system. The receiver uses Raptor decoding symbols in conjunction with the MMSE technique, which estimates the channel without using pilot symbols at the receiver [36]. Comparing Raptor codes to Turbo/convolutional when coupled with codes direct-sequence CDMA systems on BIAWGN channel has been conducted in [28].

Raptor Code
Raptor codes are a class of fountain codes [18]. It is the combination of an LT code and the precode, a high-rate error correction code, which is the outer code. The LT code must enable the receiver to recover an adequate number of input symbols [37]. The precode is in charge of recovering input symbols that the LT code did not successfully recover. As a result, the precode's error-correction ability significantly loosens the fountain code's restrictions. As a result, linear encoding and decoding times can be designed for output degree distributions with a constant average degree [23].
Using error-correction block codes, a collection of input symbols is divided into (n, k) blocks to produce intermediate symbols. The LT codes are then applied to the intermediate symbols to encrypt them. Each encoded symbol is made by randomly selecting the distinct d input symbols, the degree d from the degree distribution Ω(x), and then xoring them. As a result, a Raptor code can be specified using the (k, C, Ω(x)) parameters, where C stands for the (n, k) of the error-correction block codes, also known as the pre-code, and Ω(x) is the generated polynomial for the degree distribution of the LT code [38] Raptor codes are distinct from LT codes because of their high-rate pre-code process performance and degree of distribution. Raptor codes come in two varieties: systematic and non-systematic. The systematic case, where source packets are a part of the set of encoded packets, is the one that interests us the most. Gaussian elimination can be used to determine the inverse of the generated matrix in a methodical Raptor decoding procedure. Following pre-established patterns between intermediate packets and data packets enables this. This results from the source packet symbols being decoded.
The pre-code protects the source packets and corrects erasure packets that the LT code cannot recover. The LT code complexity is reduced to the order ofO (logk) , which is superior to the typical LT code complexity ofO (klogk) . As a result, this serial concatenated block code might have a low level of complexity while still providing a high level of protection [38].
However, the Raptor technique can achieve any coding rate ( k∕n ), depending on the lengths of the produced codewords.
The received signal for an AWGN channel with input data symbols x i = ± 1 is y i = x i + n i , where x i = 1 − 2c i represents the BPSK modulated signal, c i is the encoded symbol, and ni represents the Gaussian noise with zero mean and variance of σ 2 . The Log-Likelihood Ratio (LLR) of the decoder can be computed as follows for each symbol y i that is received [38,39]: where the Gaussian random variable n i ~ N (0, σ 2 ) has a mean of zero and a variance of σ 2 . The inner system is first decoded using the two-step sequential decoding method described in [40], then the outer code.
A Tanner graph with intermediate variable nodes (VNs) is decoded using the sumproduct algorithm (SPA), and the output symbol represents the check nodes (CNs) to an inner decoder. The LLR updates both the ith variable node to jth check node and the link jth CN to ith VN, both of which are referred to as L cjVi , indicating that L Vicj is established as follows [40]: The set of variable nodes connected to the jth check node is represented by N c (j). N v (i) additionally shows the check node collection connected to the ith variable node. Equation (3), which represents the decision rule for each variable node (VN), is used to connect the final value of LLR after decoding to determine the outer decoder's channel estimate. Since the SPA algorithm is used for both the encoding and decoding steps of the Raptor code, the overall code rate (R) and the code rates of the inner (R i ) and outer (R o ) codes are related [40]: where k in the number of the bits per packet entered into the encoder, k' is the number of bits per block at the output of the inner stage of the coder, and n is the number of the bits per block at the output of the channel encoder. It is assumed that for transmitting one codeword, the channel signal to noise ratio is E b /N o and the noise variance is σ 2 = N o /2 [41].

Proposed Model of Hybrid Channel Coding with CDMA System
By combining CDMA transmission and Raptor channel coding, a reliable communication system for transmitting data in low SNR channels will be developed. In order to evaluate the impact of incorporating Raptor coding into the CDMA transmission system, the proposed scheme needs to be implemented and tested while creating a general model for the communication system in a fair environment. In this method, the system parameters must be specified before the testing procedure is launched using a Matlab simulation. This section will outline the features of the suggested system, as seen in the two subsections below. Figure 1 shows the transmitter-receiver block diagram of the proposed system, which employs channel coding and DS-CDMA. In this work, we investigated a system based on Raptor codes. The performance of this code is partially influenced by the pre-code paritycheck matrix, H, of the LDPC codes acting as the first layer of the Raptor structure. The parity-check matrix H is assumed to not have a girth of 4. Additionally, we used a standard LDPC with dimensions of (4,204) in H, resulting in a distribution with 4 ones in each column and 204 ones in each row. These codes are distinguished by a high 50/51 code  Fig. 1 Block diagram for the system model rate [42] [42]. The parity-check matrices H of LDPC codes typically have a size of M × K , where M = N − K and H is the null space of the K × N generator matrix G. The second layer of Raptor codes is the LT code, which has a weight distribution Ω(x) optimized for Raptor code and is set as [43] Raptor codes can potentially generate an infinite amount of encoded output symbols, so the realized code rate can be calculated as follows for a given block of source or input symbols:

Raptor Coded DS-CDMA System
The code rate of the LT part: Therefore, the H matrix dimensions ( M LDPC ,N LDPC ) are determined: At the transmitter side, each user's source bits are encoded through a Raptor encoder to produce encoded codeword sequence with the realized rate ofR Raptor , Then, these encoded bits are mapped by BPSK. Afterward, the modulated data streams are multiplexed by Walsh-Hadamard (WH) codes using a sequence of lengthm . Given a BIAWGN channel with inputx = ∓1 , the output of the channel can be described asy = x + n , where, n ∼ N (0,σ 2 ) is the channel noise with mean zero and variance (power) equal toσ 2 .
The received signal can be multiplied by the same Walsh code that was employed during transmission to recover the desired signal. The LT decoder then receives the demapped signal and decodes it using either the belief propagation (BP) or SPA algorithm. The LDPC stage, the fixed-rate outer decoder, receives the LLR output values from the LT decoder. Raptor code uses the final LLR data to estimate the original data.

Turbo/ Convolutional -Coded DS-CDMA System
We also considered the same communication system using turbo and convolutional codes instead of the Raptor codes shown in Fig. 1 On the transmitter side, the data bits are block-interleaved and encoded. Two recursive systematic convolutional (RSC) encoders are concatenated in parallel to create the turbo code's encoding stage, as described in [16].
When using a turbo code, the parity bits are punctured alternately to change the standard 1/3 rate to a rate of 1/2. On the other hand, RSC encoders with a rate of 1/2 are used at the encoding level when designing a convolutional encoder. Each user's convolutional or turbo-encoded bits are modulated with BPSK. The Walsh code pattern is then applied to the modulated data. These are the two encoders used by the Turbo/convolutional coded DS-CDMA system. One of encoders has the constraint length of 7, the code rate of 1/2 and generators 133, 171, expressed in octal notation [44]. The other encoder uses generators 133, 145, and 171 and has the same constraint length. It also has a 1/3 code rate. During the decoding process, each system uses a soft decision Viterbi decoding algorithm.

Performance Analysis of Proposed System Based on Hybrid Raptor Code with DS-CDMA
The performance characteristics of the proposed scheme, which consists of a Raptor channel code in combination with a DS-CDMA multiple access technique, are examined and compared with other channel coding algorithms used with the same DS-CDMA system in this work. The BER versus SNR ratio is evaluated for four types of schemes.
In the first scheme, the DS-CDMA technique is used solely with no channel coding. The second scheme employs a convolutional channel code prior to modulation and multiple access stages, whereas the third scheme employs a turbo channel code in conjunction with the DS-CDMA technique. Raptor coding is used with the DS-CDMA system in the final scheme to demonstrate its unique advantages in reducing the BER for very LSNR.
In the simulation process, data is BPSK modulated before being sent as packets with a block length of k = 1000 bits. The four schemes are then contrasted while maintaining the same channel and SNR parameters. In order to make the system simulation easier, we used Walsh-Hadamard codes with lengths of 4 for the users and set the number of users in each Raptor-CDMA cell to 4. Additionally, we implemented a DS-CDMA system with an 8-bit spreading code and evaluated its performance before adding the channel coding stages for comparison in order to study the performance of the Raptor coded DS-CDMA system. The parameters used in the simulation process are listed in Table 1. Raptor codes have multiple steps or stages, as demonstrated by algorithms (1) and (2). BER results for three Raptor codes with block lengths of 500, 1000, and 2000 bits are displayed in Fig. 2 using sum-product decoding algorithm with 50 iterations. As the code block length is increased, the BER performance improves, as shown in this figure.
The performance of a single-user Raptor-coded DS-CDMA system and a Turbo/Convolutional-coded DS-CDMA system under simulated conditions is shown in Fig. 3. Both systems have common source block lengths of k = 1000, a code rate of 1/3, and spreading codes of length 4. The Raptor coded DS-CDMA system has improved SNR by about 6 dB for a BER = 10 -6 in comparison to the Turbo and convolutional coded CDMA systems.
According to the simulation results, which are shown in Fig. 4. The Raptor-coded CDMA scheme receiver, which uses a spreading factor of length 4, performs better than the traditional DS-CDMA receiver, which uses a higher spreading factor of length 8. Additionally, when comparing the Turbo/Convolutional coded DS-CDMA schemes for a BER = 0.008, message block length of k = 1000, and a code rate R = 1/2 for each system, the Raptor-coded system improves the E b /N o ratio by about 7 dB.
After comparing the theoretical prediction with the actual results, we can see that the test results (Table 1, Fig. 3, and Fig. 4) are consistent and show that Raptor codes perform significantly better than the traditional CDMA transmission scheme under the same circumstances. Convolutional encoders, on the other hand, show lower performance when compared to the turbo and Raptor codes, according to the results of our simulation. It is clear that the Raptor-coded DS-CDMA scheme offers superior performance in low Eb/No channels, and it is therefore strongly advised to be used in these channels.
Using a spreading factor of length 4, Fig. 5 compares the BER performance of a single-user Raptor-coded DS-CDMA system for k = 1000 at different code rates of 1/3, 1/2, and 5/7. Using the distribution Ω(x) provided by Eq. (5), Fig. 6 shows the BER versus overhead performance of Raptor code with a DS-CDMA system. The AWGN channel is used for the simulations. This graph shows how the code length affects

Performance Metrics of the Proposed Raptor Code DS-CDMA System
It is necessary to establish some quantitative performance metrics in order to compare various multiple access techniques when they are combined with channel codes. This section will describe the main performance metrics that were used in this study to assess the suggested system (Raptor code DS-CDMA for WSN). Collectively, these parameters provide a summary of the overall performance of the tested systems.

Number of Lost Packet (NLP)
This metric is used to assess the error performance of the provided scenarios; it calculates the number of lost packets percentage (NLPP) to estimate the amount of data loss. Additionally, it is necessary to evaluate how well the tested systems can withstand a data loss attack. This scale is determined by the simulation program using the following equations.
The N all N all represents the total number of packets transferred. The N c N c represents received repaired packets. Every packet that has at least one erroneous bit after decoding is referred to as a lost packet. The number of lost packet percentages is used as a metric to compare the error performance of the traditional and proposed LSNR transmission scenarios. This result of this metric is shown in Fig. 7.

Throughput Performance
The throughput assessment is one of the important assessments for wireless networks. It refers to the ability of a wireless network to provide adequate data rates and achieve resource efficiency. Throughput or capacity is the number of bits that can be processed by a decoder, or the amount of data that the decoder can process in a given time [45]. The throughput can be considered one of the vital metrics for measuring the performance of communications systems. In this work, throughput η was defined as: where k is the source data length and n n n is the code word message length. For each value of Eb/No, Fig. 8 depicts the performance of simulated throughput as a function of code rate. The value of Eb/No or the BER of decoded data increases as throughput increases, as can be seen. The used CDMA code length and code rate determine the maximum throughput that can be achieved.

Computational Complexity
Computational complexity represents the number of computations performed by an algorithm, e.g., encoder or decoder, to process a data array. This parameter has impact on the latency of the decoder so low computational complexity is an important requirement for WSNs. In general, the required operations for the encoding or decoding processes are referred to as the computational complexity of coding scheme. The computational complexity of a system/process is described as the total amount of arithmetic, logic, and memory access operations necessary for this process. The combination between the DS-CDMA transmission technique and Raptor channel coding will create a reliable communication system for sending data in LSNR channels. Implementing and testing the proposed scheme needs to build a general model for the communication system under a fair environment to assess the effect of adding Raptor coding into the DS-CDMA transmission system. This approach requires specifying the computational complexity before starting the testing process through hardware implementation. The computations performed by Raptor code need an average number of operations per generated encoded symbol for a given source block of k symbols, and overhead > 0 , where m m is the number of bits and n n is the code length [46,47]. Therefore, the total computational complexity of the proposed system of Raptor code DS-CDMA combines the computational complexity of Raptor code with the Computational complexity of DS-CDMA and is calculated as (Tables 2 and 3): O [klog(1∕ )], is epsilon ∈ isepsilon ∈ isepsilon = 0.038 DS-CDMA with Walsh code O(n 2 ) , where n = 2 m m m is the number of bits and n n is the code length

Conclusions
In this paper, the design and performance of a system combining DS-CDMA with Walsh code were studied. The decoding BER performance was tested and compared with that of a design combining Turbo/Convolutional codes with DS/CDMA in low SNR conditions over the BIAWGN channel. The obtained results show that the DS-CDMA with Walsh code design offers better performance compared to other schemes when operating in low SNR ranges. The simulation results concluded that Raptor codes combined with DS-CDMA using Walsh code length of 4 can achieve better performance than conventional DS-CDMA using Walsh code length of 8. The performance analysis of Raptor with CDMA and Turbo/convolutional coded multiuser DS-CDMA systems for code rates of 1/3, 1/2, and 5/7 is analyzed. Simulation results showed that the Raptor codes with DS-CDMA system is better than the conventional CDMA with Turbo/convolutional coding transmission system under the same channel conditions. Therefore, we can conclude that Raptor codes combined with DS-CDMA system can work reliably in conditions with high noise and low power.
Funding No financial support was received to perform the research work of this manuscript.

Availability of Data and Materials
The corresponding author may provide the data and material used in the manuscript subjected to reasonable request.

Code Availability
The code of the algorithm has been run in MATLAB software.

Conflict of Interest
The authors have no conflicts of interest.