Evaluating the CDMA System Using Hidden Markov and Semi Hidden Markov Models

CDMA is an important and basic part of today’s communications technologies. This technology can be analyzed efficiently by reducing the time, computation burden, and cost by characterizing the physical layer with a Markov Model. Waveform level simulation is generally used for simulating different parts of a digital communication system. In this paper, we introduce two different mathematical methods to model digital communication channels. Hidden Markov and Semi Hidden Markov models’ applications have been investigated for evaluating the DS-CDMA link performance with different parameters. Hidden Markov Models have been a powerful mathematical tool that can be applied as models of discrete-time series in many fields successfully. A semi-hidden Markov model as a stochastic process is a modification of hidden Markov models with states that are no longer unobservable and less hidden. A principal characteristic of this mathematical model is statistical inertia, which admits the generation, and analysis of observation symbol contains frequent runs. The SHMMs cause a substantial reduction in the model parameter set. Therefore in most cases, these models are computationally more efficient models compared to HMMs. After 30 iterations for different Number of Interferers, all parameters have been estimated as the likelihood become constant by the Baum Welch algorithm. It has been demonstrated that by employing these two models for different Numbers of Interferers and Number of symbols, Error sequences can be generated, which are statistically the same as the sequences derived from the CDMA simulation. An excellent match confirms both models’ reliability to those of the underlying CDMA-based physical layer.


INTRODUCTION
Hidden Markov Models (HMMs) are a powerful and famous mathematical tool that allows us to model a large variety of complex stochastic processes. These models are clear with facile description and can be merged into larger models; moreover, the algorithms for manipulating them are simply applied. Hidden Markov modeling has emerged to be profitable in a number of applications such as speech recognition [1,2] , biology [3] , gesture recognition [4,5] , text processing [6] , biochemistry [7] , electrocardiographic [8] , econometrics [9] , financial stock prediction [10] , signal processing [11] , bioinformatics and genomics [12,13] , machine translation [14] and road sign detection [15] .
A Hidden Markov Model (HMM) was first introduced by Baum and Petri [16] . It is a doubly stochastic process ( , ) with an underlying stochastic process ( ) ∞ =1 which can be viewed only via another stochastic process ( ) ∞ =1 which is observable. In this model (a) is a finite-state Markov chain, and (b) The are conditionally independent, given ( ) and (c). The conditional distribution of depends on only, as illustrated in Figure 1.

FIGURE 1
The dependent structure of an HMM.
Code Division Multiple Access (CDMA) which employs the spread-spectrum technique, appeared as the most powerful multiple access technologies for the second and third-generation (2-3G) wireless systems. The CDMA capacity is interference limited, while TDMA and FDMA capacities are bandwidth limited. CDMA's capacity has a soft limit because we can add users and tolerate a slight degradation of the signal quality. On the other hand, the capacities of TDMA and FDMA are hard-limited. Moreover, the CDMA is completely robust against different performance downgrading factors, including Pass loss, Multipath fading, Interference, Shadowing, Noise, and Electronic emissions of other devices which are in the same spectrum [17][18][19] . It was proved that the CDMA rectifies the multicore systems [20] . Direct Sequence CDMA (DS-CDMA) is one type of CDMA that utilizes a set of unique spreading codes to modulate various users' data bits.
The wireless communication CDMA has arisen for facing the physical layer challenges of communication networks due to multiple access capability and its robustness against fading. CDMA is a potent approach to bandwidth allocation. The generated internal interference is the most important factor in characterizing system capacity; moreover, the CDMA systems are used as building blocks for more complicated systems. Refer to Shen and Xu [21] , Kim et al. [22] , Ogbodo et al. [23] for more details about CDMA.
Communication channel modeling has been a popular and progressive research field lately. A fast simulation method for evaluating the quality of transmission is required due to new applications in the transmission of Multimedia content over the (3G) and higher-generation wireless communication systems. Markov-based models are playing an important role in this area. Examining the correct or erroneous bits of a wireless digital communication channel successively can express the error patterns of that channel. Several stochastic models are extensively applied in explaining the bursty nature of communication channel errors. The most well-known of these models is HMM, in which Markov chains model the channel states. The received symbol can be observed, but the state in which an error happens is not observable. HMMs were used for modeling the statistics of burst errors in the communication channel [24][25][26][27][28][29][30] . The advantage of HMM compared to the standard wireless channel simulation is its high advance in simulation time. The waveform channel model would need enormous computer resources and is very expensive for assessing the system's performance, which makes the utilizing of the Discrete Channel Model (DCM) essential. DCM probabilistic models are a computationally more qualified and potent model than the waveform channel model. HMM is an efficient, fast, and precise based DCM that can evaluate the channel's performance without executing the complex physical layer and long conditional probability computations. This paper takes a markedly different method to the problem of channel modeling. In previous works, the channel was defined in terms of the interference, noise, and other disturbances that merge with the transmitted signal to generate a noisy and distorted waveform at the input to the receiver. The transmitted signal and the noise, interference, and other channel disturbances were all denoted by samples of waveforms. The result was a waveform-level simulation that processed data on a sample-by-sample basis. We now consider partitioning the system to remove much of the requirement for simulating at the waveform level. The result is a discrete channel model in which simulations work on a symbol-by-symbol basis. The stimulation for replacing a waveform-level channel model with a discrete channel model is the speed of simulation. We will show that the discrete channel model is an abstraction of the physical (waveform) channel in which a small set of parameters completely identifies the channel. Determining these parameters creates an important part of the modeling process. It must be realized through measurements made on the physical channel or through the use of a single waveform-level simulation. Even though many researchers were working on modeling a digital communication system, very few researchers reported the application of the stochastic Markov models in modeling the errors generated by such systems. The availability of methodical, accurate, and fast burst error models is useful for assessing and refining higher communication protocols in many current-generation networks using the basic CDMA and OFDM blocks. The SHMM is a mathematical model employed for modeling data sequences with long runs, memory, and statistical inertia. Since the error sequences generated by the CDMA system are with long runs and the inertia existence is evident so the SHMM can model them.
The novelty of this paper is not only the method but also the results. By considering the errors for the CDMA system with mentioned characteristics in the paper, we prove that the best estimated SHMM can be replaced instead of the complex simulation problems in wireless networks. The SHMM looks more effective as employing it leads to a substantial reduction in time and computations. The advantage is that it is an abstraction of waveform-level models that realize the channel's input-output characteristics but do not model the physical functionality of the channel.
This paper applied the HMM and SHMM for the CDMA system concerning its parameters such as Number of Interferers, Spreading factor, Multipath delay profile, and energy per bit to noise power spectral density ratio. Some comparative criteria such as the log-likelihood, Probability of Error, and Mean Square Error have been employed for the predicted models. In section 2, the CDMA fundamentals are explained briefly. Section 2, the Baum Welch and SHMM method are discussed for parameter estimation. Section 3 discusses the applications of the HMM and SHMM on the errors which occurred in the CDMA. In section 4, the applications of two mathematical models, HMM and SHMM, which can be analyzed efficiently with reducing the time, computation burden, and cost, are applied for error modeling of the CDMA system, and the simulation results are given. We demonstrate that our mathematical discrete channel modeling is as precise as the Waveform channel modeling, and our proposed method can be used instead of physical simulation methods. Moreover, our approach can predict the communication system's future behavior and the errors that will occur in transmissions. Finally, conclusions are presented in section 5.

MATERIAL AND METHOD
The Markov process generally models the correlated error generation mechanism in the DCM with memory. Each state in this process is associated with the transmitter-receiver symbol transition probabilities. Therefore, the parameters should be estimated in this model. The forward-backward HMM and SHMM estimation methods which are very applicable in the CDMA system, are explained. The flow graphs for these methods are given in Figure 2 and Figure 3. Before describing these techniques, the HMM elements are described as follows. In general, the HMM characterized by the following components: • Set of = 1 , 2 , ..., , in which N represents the number of states in the model; • Set of observation symbol = 1 , 2 , ..., • State transmission probability matrix = , where and is the observation made at a moment .
• Initial state probability vector = , where The closed notation = ( , , ) is usually used to express the parameters of HMM.

The Forward-Backward HMM
The Baum-Welch Forward-Backward algorithm is the most proficient and prevailing method for estimating the parameters of HMMs automatically. The Baum-Welch algorithm (BWA) is a particular EM algorithm with the significant feature of robustness. It evermore converges to a local maximum of the log-likelihood function.
In this section, the implementation of the BWA will be illustrated. Assume that the forward and backward variables are defined as for = 1.. = 1.. . These variables can be deduced inductively as forward stage and backward stage. The forward stage is as follows: • Initialization • Induction • Set =t+1 ; If t<T , Return to step 2; Else terminate the algorithm.
• Termination The backward stage is as follows: • Initialization • Induction • Set = − 1; If > 0 return to step 2; Else terminate the algorithm.
• Total Next, in decoding problem for finding the optimal state sequence in the model λ, we define: Now in the learning problem for finding the parameters of the model that maximize the likelihood of the training set, we introduce Finally, the estimation formulas of the model can be obtained as follows: The flow graph of the Forward-Backward HMM is given in Figure 2 .

Semi Hidden Markov Model
The Semi Hidden Markov Model (SHMM) is an advanced stochastic model similar to BWA, including the calculation of the forward and backward variables. It is a modification of HMM and involves the statistical inertia, which admits the generation of symbolic sequences in run-length forms; moreover, it can be employed to analyze and model sequences with memory and long runs. SHMM involves a decreased number of parameters. The length of the input sequence is enormously reduced. As figure 3 indicates, the SHMM only estimated the state transition probability matrix and the initial state probability vector.

THE HMM AND SHMM SIMULATION MODELS FOR THE CDMA
The HMM-based simulation model for the CDMA link is shown in figure 4. The simulation contains the specular multipath, Additive White Gaussian Noise (AWGN), and Multiple Access Interference (MAI). Comparing the received and source data yields the error sequence. The Binary phase-shift keying (BPSK) modulation is used for the user's symbol. It is assumed that each signal arrives at the receiver with equal average power, and the spreading sequence for the desired signal is a PN-sequence which is shifted circularly. The desired and all MAI signals are chip synchronized at the receiver, which is a simple correlation one. Next, the received signal is dispreading and demodulating. Hence the created error sequence is employed to implement the HMM and SHMM.
The rest of the paper, the original, HMM-generated, and the SHMM-generated error sequences are compared according to some statistical measures. The simulation results have been given in the next part.

FIGURE 4
Block diagram for HMM implementation for CDMA.

FIGURE 5
The log-likelihood functions for HMM.

SIMULATION RESULTS
In this section, a CDMA system simulation with a block serial structure running in a fading/multipath environment with interference and thermal noise is performed. Next, the HMM and SHMM are fitted to the error sequence generated by the CDMA model, and as a result, the new error sequence is regenerated by these models. We can compare the original error sequence and the regenerated one. The input parameters are as follows: (i) Number of symbols (N); (ii) spreading factor (SF), which must be taken in the form of 2 − 1, where n is an integer less than or equal to 12; (iii) number of Interferers (0 ≤ ≤ − 1); (iv) ratio of bit energy to noise PSD (Eb/No); (v) Multipath delay profile which is a vector of monotonically increasing non-negative integers and (vi) The KfactordB which is a scalar type is the Ricean K-factor in dB. The simulation was performed with 200000 symbols, SF=31, KfactordB=0, and Multipath delay=[0 4 5]. These values are chosen from Myint et al. [26] . In our work, a three-state Markov model has been supposed. The initial assumptions of the BWA are as follows:

FIGURE 6
The log-likelihood functions for SHMM.
The SHMM, which does not need any initial assumption, was applied to reduce the computational burden. We considered the 30th iteration as the termination point for both BWA and SHMM. We can observe that the log-likelihood function converges after some iterations. The original error sequence generated by the CDMA simulation was performed with the NoI=3, 5,8,11,15,20, and 22. The optimal parameters of fitting both BWA and SHMM to the CDMA error vector were obtained and summarized in Table 1. The error vectors generated based on these parameters were compared to the original error vector.
To assess and compare the error sequences generated by the CDMA, the log-likelihood function ( ) is calculated in each iteration of the estimation algorithm. The likelihood function is a product of probability mass functions (discrete variables) or probability density functions (continuous variables) parametrized by θ and evaluated at the points. Probability densities are non-negative, while probabilities also are less or equal to one. It follows that their product cannot be negative. The natural logarithm function is taken for better indication, which is negative for values less than one and positive for values greater than one. Figure 5 and Figure 6 illustrate these log-likelihood results for different (NoI).
It can be seen from Figure 5 that the log-likelihood values for both the BWA and SHMM become constant after a few numbers of iterations. Increasing the probability of error occurrence made the log-likelihood value more negative when the NoI is increased. The simulation time and the length of the spreading factor are increasing as the NoI increases. The next step compares the Original error sequence from CDMA with the two error sequences resulting from BWA and SHMM. Let 0 denote m successive correct receptions. The probability of m symbol error-free run is the conditional probability of occurrence of m or more successive error-free transmission given an error has occurred. Figure 7 until Figure 10 show (0 1) vs length of the interval for BWA and SHMM with different Numbers of Interferers.

FIGURE 7
The error-free interval distribution comparison for Forward-Backward HMM with NoI=5.

FIGURE 8
The error-free interval distribution comparison for Forward-Backward SHMM with NoI=5.
Both HMM and SHMM have a close match with the original sequence, and hence the results are satisfactory. We can claim that these algorithms are as accurate as of the CDMA channel, enabling us to approximate the error sequences generated from this channel very closely. The Mean Square Error (MSE) between the original sequence and the regenerated error sequences

FIGURE 9
The error-free interval distribution comparison for Forward-Backward HMM with NoI=11.

FIGURE 10
The error-free interval distribution comparison for Forward-Backward SHMM with NoI=11. by HMM and SHMM and the Probability of Error (PE) for these two models have been computed for various NoI and are summarized in Table 2.
From Figure 11 and Figure 12, it can be seen that both models are in good agreement. The values of (MSE) and (PE), which are the indicators of these Markov models' effectiveness and reliability, are very less. Applying the SHMM is less time-consuming as it uses the run-length of the error vector and requires fewer parameters than HMM.
Finally, we investigated the influence of symbols on the simulation results' accuracy for both HMM and SHMM. The optimal parameters of fitting both HMM and SHMM to the CDMA error vector were calculated and shown in Table 3.
The number of symbols is varied from 25000 to 200000 with an interval of 25000. The results of both models are given in Table  4.
As we can see from Figure 13 and Figure 14, the two models' MSE and PE are very low, which confirms the high precision of the Markov-based models. Although the difference between the HMM and SHMM, which makes the performance slightly superior,

FIGURE 11
The MSE curves for HMM and SHMM.

FIGURE 12
The PE curves for HMM and SHMM.
is negligible, both models are acceptable and adequate. For more symbols, the SHMM looks more proficient as utilizing it leads to a substantial reduction in time and computations. Therefore, we have implemented two Markov models that can replace the Waveform level simulation of the CDMA system, which is less time, cost, and computation consuming.

FIGURE 13
The MSE curves for HMM and SHMM versus the number of symbols MSE curves for HMM and SHMM.

CONCLUSION
Discrete Channel Models are an abridgment of the Waveform level models, which have found widespread application in wireless communication systems. In this paper, all-inclusive simulative analysis has been employed to obtain precise HMM-based Discrete Channel Models. A DS-CDMA link's performance has been evaluated by the computationally powerful Hidden Markov and Semi Hidden Markov Models. Both the HMM and SHMM are so powerful that they can replace by the waveform discrete channel. The two models' MSE and PE are very low, which confirms the high precision of the Markov-based models. Although

FIGURE 14
The PE curves for HMM and SHMM versus the number of symbols.
the difference between the HMM and SHMM, which makes the performance slightly superior, is negligible, both models are permissible and appropriate. The semi-hidden Markov model is a reliable stochastic model for modeling symbolic sequences with long runs and statistical inertia. As the error sequences generated by the CDMA system are with long runs and the inertia's existence is evident, the SHMM can model them. The SHMM looks more proficient as utilizing it leads to a substantial reduction in time and computations. In HMM, the real errors include long zero's, and one's are utilized for modeling, but in SHMM, the run's of the data is required, which reduces the time and computation burden. In HMM, it requires estimating two parameters, but in the SHMM, it needs to estimate two parameters. We give a new simpler approach for complex simulation problems in wireless networks. The simulation contains the Multiple Access Interference, Additive White Gaussian Noise, and Multipath. The CDMA simulation was implemented for the Number of Iterations 3,5,8,11,15,20 and 22. The Error vector and run the length of errors for each case were applied as an input for the Baum Welch based HMM and Semi Hidden Markov Model, respectively; moreover, the log-likelihood functions of both models are calculated for 30 iterations which are become constant after a few iterations, and they become more negative as the NoI is increased. The parameters A"," B"," π for HMM and A"," π for SHMM were estimated in each simulation. These parameters were used as the input for generating the reconstructed error.
Simulation results show that the suggested HMM models empower us to approximate the CDMA system very closely. Validation comprises a comparison of Error-free interval, Loglikelihood, Probability Error, and Mean Square Error. Although the MSE and PE of BWA-based HMM were very trivially lower than for the SHMM, both models are matched closely to the original model. They are efficient, acceptable, and precise. For leading to a substantial reduction in time, the Semi Hidden Markov Model is preferred. This model employed the run-length Error vector and need fewer parameters than the HMM. Finally, we investigated the effect of the variable length of several symbols in the simulation. It was concluded that these two models are precise and efficient in the case of the various number of symbols as well. All in all, as compared to real physical layer simulation of CDMA link, The HMM and SHMM can considerably reduce a computational burden enabling precise, faster, and well-conducted analysis.
The development and use of Markov models for burst error channels present a dynamic area of research. These Markov models are also can be developed for burst errors at the higher layers of communication networks. For instance, packet errors at the transport layer in a network. Moreover, the extended Markov model Hidden Semi Markov Model (HSMM) can be applied to model the error sequences. The precision results of this model can be compared with the HMM and SHMM. The extended model HSMM is considered the sojourn time, and the states are also hidden. It is recommended to use optimization methods such as the Genetic algorithm, ant colony, etc., in HMM and SHMM, and HSMM to improve these models and find the best precise model for difficult simulation problems in wireless networks.