The modulation classification methods in PPM–VLC systems

Intelligent methods have been applied to many fields for a long time. Recently, Visible Light Communication (VLC) systems widely include learning and classification models to improve their performances. The classification of L-Pulse Position Modulation (L-PPM) formats is crucial for VLC systems since the modulation order L is very effective for providing energy efficiency and increasing the transmission capacity. In this paper, therefore, it is reported for the first time, the classification of L-PPM schemes in VLC systems by using Decision Tree, K-nearest neighbor (KNN), Support Vector Machine, and a Direct Decision-based Linear Model technique. A novel feature extraction model is derived to be able to classify the type of L-PPM modulation schemes. A comparison has been given to observe the performance of classification schemes by taking into account the level of Signal to Noise Ratio and the transmission distance between receiver and transmitter. The 2-PPM scheme has the highest success rate against other schemes in terms of performance metrics at the overall distance. Additionally, the KNN method gives the best accuracy performance at the distance of 2.32 m and more, while it has been obtained the best accuracy of 97.85% by the Decision Tree Model at the distance of 2.20 m.


Introduction
In wireless optical systems, intelligent methods are currently a promising area of research, whose key features include phase estimation, jitter compensation, channel modeling, nonlinear mitigation, dimming control, and error correction (Pham et al. 2020;Chi et al. 2020a;Kumari et al. 2021;Wang et al. 2020). Due to the efficient utilization of energy and channel, the transmitter can adjust the power required to obtain a given Bit Error Rate for 8-superposed pulse amplitude modulation (SPAM) and orthogonal frequency division multiplexing (OFDM) to detect signal levels (Yuan et al. 2017). In another paper, the classification of the symbols was provided by the adaptively generating of nonlinear decision boundaries using SVM .
Although the DL/ML methods were widely applied to VLC systems as mentioned above, there is still a huge gap across applications of modulation classification for L-PPM signals in the VLC networks. This article aims absolutely at filling this gap. Unlike the aforementioned articles, there are many papers related to modulation classification for Radio Frequency (RF) signals using intelligent methods in the literature (Baris et al. 2021;Shah and Dang 2020;Jajoo et al. 2020). Some papers have also focused on modulation classification for VLC (Liu et al. 2020;He et al. 2020), fiber optical communication (Boada et al. 2015;Wang, et al. 2017), and underwater optical communication systems (Zhang et al. 2020). These systems aim to perform the modulation classification for M-ary Phase Shift Keying (M-ary PSK) and M-ary Quadrature Amplitude Modulation (M-ary QAM) schemes (Zhang et al. 2020;Chi et al. 2020). Although some papers have been published to classify M-ary PSK and M-ary QAM transmission methods in optical communication systems, it is considered that the classification of L-PPM signals is missing in the literature. Furthermore, many papers containing DL/ML schemes in VLC systems have been investigated from signal distortion, detection threshold, and positioning perspectives. The main objective of this paper is therefore summarized as follows.
• The modulation classification for L-PPM schemes has not yet been explored in the literature. This lack causes a huge gap in the research area since it is considered that a universal receiver independent from the L-PPM modulation type can improve the system performance in terms of energy efficiency, transmission capacity, and suitable transmission distance. Therefore, in this paper we analyze for the first time, the classification of L-PPM transmission schemes to ensure the usage of optimum modulation schemes in VLC systems. • We have proposed a feature extraction method for the classification of L-PPM modulation schemes. It is considered the time duration of L-PPM schemes to obtain the features of signals. In addition to this, a theoretical framework has been given to observe the validity of the proposed feature extraction method. • This paper focused on classifying the 2-PPM, 4-PPM, 8-PPM, and 16-PPM schemes.
Therefore, L can get 2, 4, 8, and 16, respectively. A linear Method (LM), which can be considered as the traditional method, is proposed for classification. In addition to the LM scheme, the Decision Tree, KNN, and SVM have also been implemented to classify the modulation types and give a performance comparison of classification techniques.

PPM schemes
In this section, we give the L-PPM scheme when the L is equal to 2 M . The bit resolution can be represented by M that equals to the bit number consisting of one symbol. One of the main challenges of the L-PPM transmission method is inter-slot interference experienced at high data rates since the transmitted signal is divided by L sub-intervals at each symbol period. Despite limitations of the aforementioned inter-slot interference, the L-PPM scheme is extensively preferred by many researchers in wireless optical systems due to its low complexity. Therefore, one of the strengths of the LPPM scheme doesn't require any threshold value to demodulate the received signal when compared to Pulse Amplitude Modulation (PAM) schemes. Therefore, a threshold detection method isn't necessary for L-PPM schemes. However, the PAM has better spectral efficiency than L-PPM schemes. The reason is that PAM is adjusting the amplitude of the transmitted signal instead of the time of pulse to support multilevel transmission. The L-PPM slot duration T L_PPM can be written by Ghassemlooy et al. (2019) where T b and M are defined as bit period and bit resolution, respectively. By using Eq. (1), the L-PPM slot duration can be determined as given in Fig. 1. The slot duration of the 4-PPM scheme is the same as the slot duration of the 2-PPM scheme. Additionally, the 16-PPM slot duration is shorter than the 4-PPM or the 2-PPM slot duration. In the figure, d(t) which can be referred to as OOK and multilevel PPM schemes are given for comparison in terms of time chart. In the figure, T s,4 , T s,8 , and T s,16 are denoted as slot durations of 4-PPM, 8-PPM, and 16-PPM. The L-PPM transmitter sends an optical pulse among L sub-intervals during one symbol period. This optical pulse is positioned by taking into account the decimal value of data bits. If the orders of the first slot and end slot are indicated as 0 and L-1, the order of the transmitted optical pulse must equal to the decimal value of data bits as shown in Fig. 1.

VLC channel model
This section briefly outlines the channel model of VLC technology by considering the Line of Sight (LoS) condition where the optical signal emitted by the transmitter can directly arrive to the photo receiver. In this paper, therefore, wall or floor reflections and scatterings through the objects are ignored for LoS condition. The relation between transmitted and received optical powers can be given by, where P t and P r can be defined as transmitted and received optical powers, respectively (Din and Kim 2014). There is attenuation between both optical powers due to the distance between the receiver and the transmitter. The H(0) presents the channel DC (Direct Current) gain which can be expressed as Optical Path Loss (OPL) in optical dB (Chen and Zhengyuan 2017). The OPL can be given by, where A r is the surface area of the photodiode. D d , T s and g are defined as the distance between transmitter and receiver, the gain for the optical filter, and the optical concentrator for gain, respectively. ψ and φ are presented as the angle of incidence and the angle of irradiance, respectively (Komine and Nakagawa 2004). In the equation, m indicates the order of Lambertian emission, which is expressed as Komine and Nakagawa (2004): In addition to the order of Lambertian emission m, Eq. (4) is including the Lambertian radiant intensity, which is given by Singh et al. (2019), The transmitted optical signal emitted by LED includes a modulated signal which is generated by the transmitter device. Therefore, the modulated signal can be associated with received and transmitted optical power on VLC links. Hence, the signal detected by the photodiode can be defined as follows (Singh et al. 2019): where n(t), f(t) and s(t) are noise signal caused by thermal and shot effect, modulated signal and the received electrical signal at the output of photodiode, respectively. The n(t) signal can be assumed as additive white Gaussian noise (AWGN) with zero mean. (2)

The proposed feature extraction for PPM-VLC
A feature extraction method must be derived to investigate behavior of the L-PPM signal and apply to ML schemes. On that account, this section presents a feature extraction technique whose main function is to compute input parameters of ML method in the time domain. The technique is proposed for the first time, classification of L-PPM transmission schemes in VLC systems. The received PPM signals are passed through an integrator process to be able to obtain the input parameters of ML schemes. The achieved integral values have been compared with a threshold level to determine the type of modulation method. The period time, which is the least common multiple of period times of 2-PPM, 4-PPM, 8-PPM, and 16-PPM modulation methods, must be determined to compute the threshold values. According to Fig. 1, signal periods for 4-PPM, 8-PPM, and 16-PPM are 2 T, 3 T, and 4 T, respectively when one signal period of 2-PPM is assumed as T. Hence, the least common multiple of period times of modulation schemes is equal to 12 T.
Let us assume the received signal doesn't include the noise n(t). If it is considered that the peak amplitude of s(t) given by (7) is equal to A, the integral value of the 2-PPM signal for the period of time T can be written by, where Y P2 can be defined as the integral value of the 2-PPM signal obtained during one signal period. The integral is taken from 0 to T/2 since the period of the filled slot is equal to the time of T/2 for the 2-PPM scheme. By using Eq. (8), the integral values of 4-PPM, 8-PPM, and 16-PPM schemes can be given by where Y P4 , Y P8 , and Y P16 can be presented as integral values of 4-PPM, 8-PPM, and 16-PPM signals obtained during one signal period, respectively. It is shown from the expressions that it is equal to the integral results of 2-PPM and 4-PPM to each other. To be able to observe the difference between integral values of 2-PPM and 4-PPM, the signal can be integrated through the period 12 T as follows: According to equations, the integration results through the period 12 T are different from each other. Hence, the integration results can be used to perform the classification among the modulation schemes. Figure 2 indicates a VLC system that includes a modulation classification unit.
In Fig. 2a, the received L-PPM signal is detected via a photodiode (PD) device of which the output is connected to a TIA (transimpedance amplifier). The TIA converts the photocurrent generated by PD into the voltage signal. Thanks to the voltage amplifier (VA) stage, it is amplified the amplitude of the voltage signal. The available signal generated by VA is applied to a digital receiver system which consists of a modulation classification unit and demodulation process. The modulation classification unit operates the machine learning algorithm, including KNN, SVM, LM, and Decision Tree. Therefore, an information signal that is defined as the type of modulation in the figure is sent to the demodulation process to adjust the appropriate demodulator scheme.
The Fig. 2b outlines an indoor VLC system containing a modulation classification unit at the receiver side. It is observed from the figure that two users have utilized the VLC link. The transmitter side is including a modulation unit and a LED driver. While one of the users is receiving the VLC signal in the 2-PPM form, another user in Room-2 is receiving the 8-PPM signal form from the transmitter. Therefore, an ML-based classification unit is necessary to employ a universal receiver independent from the modulation type for both user-1 and user-2.

Linear method
A simple, direct decision and linear classification method, which is called the linear method (LM), can be considered by using mean values of integral values. To demonstrate the theoretical framework of the LM method, a geometrical distance can be defined as given in Fig. 3. The LM model needs threshold values to perform the classification process by using the mean value feature of modulation types. The threshold points can be represented as shown in Fig. 3.
Half of the distance between two modulation types can be assigned as the threshold value. Hence, the LM method can be defined as a direct decision technique. According to the figure, it is considered that classification performances of modulation types don't equal each other since there is no fixed distance between two sequential points in the representation. The received signal through the photodiode at the receiver side can be defined as follows: where Y r can be represented as the output of the integrator. The received signal is passed through the integrator block during 12 T periods. Additionally, X t (t) and n(t) indicate the transmitted PPM signal and noise signal, respectively. Figure 4 gives a flowchart and a classification sample for the LM model.
As shown in Fig. 4a, a flowchart is given by considering the threshold point representation as defined in Fig. 3. To perform the classification, the Yr values that are obtained from the output of the integrator must be computed before the classification since they are used for the feature of modulation types. It is given a classification sample in Fig. 4b. Three threshold values are used to classify the modulation schemes.

Decision tree classifier
Decision trees are robust, efficient, and popular approaches for exploring large and complex data sets. This method is a good candidate for the modeling of large data sets and information extraction. Additionally, decision trees have been also applied in many areas such as pattern recognition, data mining, machine learning, and information extraction (Priyanka and Kumar 2020). In addition to these advantages, the decision tree is a learning method used in regression and classification problems. The purpose of the decision tree is to estimate the goal variable by the learning rules obtained by the characteristics of the data (Sankari and Manimegalai 2017). A decision tree is a data structure consisting of nodes and edges that are hierarchically arranged.
The decision tree used in classification problems is a greedy approach. The data in the dataset is subdivided by considering the difficulty level of the problem. The decision tree performs the classification by the tree pruning and the tee induction. During the tree induction phase, data belonging to the same class are divided into subsets. In the tree pruning phase, some solutions in the tree are destroyed to improve the accuracy of the decision tree and avoid over-memorization (Jain et al. 2018).

K-nearest neighbor (KNN)
The K-nearest neighbor (KNN) classifier is one of the most widely used classifiers that describe the difference between two samples. KNN classifies a particular input item considering the difference between the closest prototypes in the training set. The performance of KNN increases when expanding the size of the training set. However, it has low memory efficiency since the KNN classifier calculates a new distance between the input sample and the training data for the received samples.
The closest neighbors are assigned to the same cluster in the KNN classifier. Hence, the KNN firstly searches to reach the closest cluster and then to find the nearest neighbors in the cluster samples (Gallego et al. 2018). The main logic in the KNN algorithm is to define training data dynamically and classify new data with the majority vote of its neighbors. The Euclidean distance function is used to measure distances between data points and compare the similarity of samples in the data set. This expression can be given by, The KNN has two disadvantages. One of them is to require an enormous processing time to find the nearest neighbor in a training set that has extensive sizes. Second, the distance to the nearest neighbors increases unless there is an exponentially significant increase in the training set (Panwar et al. 2016). KNN method has been used in many problems such as face recognition, character recognition, and articulated pose estimation. Although the KNN comparator is simple, it performs very well in the solution of complex problems (García-Pedrajas et al. 2015).

SVM method
Support Vector Machines, which is known as one of the prominent ML techniques, have been widely employed to solve the classification, estimation, and regression problems for a Page 11 of 20 223 long term. Hence, it has been applied in many fields i.e., biomedical, communication, and signal processing. Although the SVM model can be used for binary classification, it can be enhanced as a multiclass method to overcome complex problems (Yuan et al. 2017). The SVM model mainly aims to maximize the margin on the feature space for an increase in accuracy (Chen, et al. 2018). A hyperplane y, which can be used to separate two groups of data, can be written by, where W and b are the normal vector and the distance between hyperplane and the origin.
The learning process provides the estimating of the hyperplane by the training set. The distance between the hyperplane and any point x can be expressed by Yuan et al. (2017) where x n , y n can be defined as training data set. To increase the classification performance in the SVM model, a hyperplane of which distance can be very far from the data set must be determined.

Sımulatıon results
In this section, it is given the simulation results related to the prediction rate of modulation schemes used in optical wireless communication systems. To be able to classify the type of modulation schemes, it is used the mean value feature that is mentioned in the previous section. In simulation results, it is presented four classification methods including the Tree, the KNN, the SVM, and the LM methods. To measure the performance of classification methods, the simulation results are obtained in terms of sensitivity (Sen), positive predictive value (Ppv), accuracy (Acc), and F1-score (F1) metrics. Additionally, the standard deviation of the noise is 0.25 to observe the maximum success rate of classification methods. It is considered that there is a dynamic distance between the receiver and the transmitter. Hence, it is expected that the performance of classification methods reduce when the distance is increased. The performance metrics are obtained as follows : where TP, TN, FN, and FP are defined as True Positive, True Negative, False Negative, and False Positive, respectively. The simulation results mentioned in this section are achieved considering the Lambertian model. Therefore, it is necessary to explain the simulation parameters which are given in Table 1. As mentioned in the previous section, the detected optical power at the receiver is changing in terms of the distance between the receiver and the transmitter. Let us assume that the noise level generated by the photodiode as expressed in Eq. (7) is constant. In this case, the signal-to-noise ratio (SNR) depends on the distance between the receiver and the transmitter. This is because the power of the detected optical signal is affected by the distance. By using the simulation parameters given in Table 1, waveforms for 2-PPM, 4-PPM, 8-PPM, and 16-PPM are obtained as shown in Fig. 5. In this simulation results, it is aim to observe the distance effect on modulated signal. Figure 6 gives the test results that are used to obtain the performance metrics for classification models. In Fig. 6, 2P, 4P, 8P, and 16P are defined as 2-PPM, 4-PPM, 8-PPM, and 16-PPM, respectively. The 2000 samples are used for modulation classification. The 8-PPM is most affected by transmission distance for Tree, SVM, and LM models since the smallest TN values among the confusion matrixes are obtained for 8-PPM. This is because the 8-PPM is located between 4-PPM and 16-PPM when viewing the threshold boundary levels given in Fig. 3. As shown in the figure, there is not adequate space for 8-PPM when compared to other schemes. According to test results, the accuracy of SVM is equal to the accuracy of the LM model at the distances of 2.20 and 2.25 m but their TP values are different from each other. In addition  to this, the TP values of the Tree model are further decreasing compared to KNN when increasing the distance. Therefore, it is shown that the KNN method has better classification performance than that of the Tree model at a longer distance. It is given the sensitivity performances of classification methods in Fig. 7 for four modulations i.e., 2-PPM, 4-PPM, 8-PPM, and 16-PPM. As shown in Fig. 7, the best-classified modulation type is the 2-PPM technique with a sensitivity of above 96% for all distances compared with other methods. In Fig. 7, the Tree and the KNN models have the best sensitivity of 99.9% at the distance of 2.73 m while the SVM and LM methods give the best sensitivity of 99.55% at the distance of 2.86 m. In addition to these, the most successful sensitivity performance at the distance of 3 m and 3.15 m is accomplished by the KNN method. For the 4-PPM scheme, the Tree model gives the best sensitivity performances of 94.80% and 83.10% at distances of 2.73 m and 3.15 m, respectively while the KNN which is the superior model at the distance of 3 m has a sensitivity of 86.50%. Moreover, the KNN model has better sensitivity performances of 76.70%, 71.00%, 64.10%, and 56.75% at distances of 2.73 m, 2.86 m, 3 m, and 3.15 m, respectively for 8-PPM when compared to other models. It is achieved the sensitivity of 78.00% at the distance of 2.73 m by using the SVM technique whereas the sensitivities of 78.00% and 75.25% at the distances of 2.86 m and 3.15 m are obtained by the Tree model. Overall, the 2-PPM transmission scheme has the highest true positive rate compared with 4-PPM, 8-PPM, and 16-PPM. This is because 2-PPM scheme has maximum threshold distance as shown in the Fig. 3. Additionally, it is shown that the performance difference between ML methods are more prominent when increased the noisy signal effect. In this context, the 8-PPM scheme reaches to maximum successful rate by using the KNN model while the 16-PPM transmission method gives the highest success rate by using the Tree technique. Figure 8 gives the performance of the positive predictive value metric for 2-PPM, 4-PPM, 8-PPM, and 16-PPM. According to the figure, the performance of positive predictive value is increasing while the distance between receiver and transmitter is decreasing at σ of 0.25. The best PPV performance is obtained with a performance rate of 100% at the distance of 2.61 m for the 2-PPM. Its performance rate is 100% as shown by simulation results. Additionally, the tree model is the best classification method for the 4-PPM scheme in terms of PPV performance at the distance of 2.61 m and lesser. The tree model gives the PPV success rate of 97.31% for 4-PPM at 2.61 m. The PPV success rates of the KNN model are 78.37%, 72.15%, 66.57%, 62.35%, and 58.26 for 8-PPM at distances between 2.61 and 3.15 m. To summarize, the 2-PPM scheme has the highest success rate compared with other schemes. Therefore, the PPV success rate has a similar performance compared with sensitivity performance. This is because the number of false positives is close to the number of false negatives. As shown in Fig. 9, the best F1 score performance of the 2-PPM scheme is accomplished by the Tree model for the distances between 2.61 and 3.15 m. The F1 score performance of 99.97% is obtained at the distance of 2.61 m while the F1 score is given as a performance of 96.62% at a distance of 3.15 m. By using the KNN model, the F1 score performances of 90. 31%, 85.14%, and 78.19% are achieved for the 4-PPM scheme at distances of 2.86 m, 3 m, and 3.15 m, respectively. Moreover, the KNN model obtains the best performance in terms of the F1 score for the 8-PPM scheme at distances between 2.73 and 3.15 m. The F1 score performances of KNN and Tree models have a similar success rate for the 16-PPM scheme which has minimum F1 score performance compared with other schemes. The KNN model gives performances of 78.58% and 72.85% at distances of 2.73 m and 3 m, respectively whereas the Tree model achieves the top performances at a distance of 2.86 m. Briefly, the Tree model with %96.62 is the best classification model in terms of F1 score performance for 2-PPM. Additionally, similar F1 score performances are experienced by using Tree and KNN models for 4-PPM, 8-PPM, and 16-PPM schemes. According to simulation results as given in Fig. 7, the 8-PPM method gives the worst classification performance while the 2-PPM technique has the best classification performance in terms of F1-score. This is because the 8-PPM is located between 4-PPM and 16-PPM. Additionally, the best F1-score performance is obtained by Tree Model for the 2-PPM When evaluated the overall F1-score performance results, it is observed that the KNN method is the best classifier for L-PPM signals at the several distances between the receiver and the transmitter.
In Fig. 10, the accuracy performance is illustrated for all transmission distances at σ of 0.25. In addition to this, the results are listed in Table 2 to be able to obtain a better observation related to the performance of classification methods. The KNN method gives better performance at distances of 2.32 m or more while the Tree model is superior at distances of 2.25 m and 2.20 m. As shown in the results, there is a higher performance difference between KNN and Tree models at longer distances. The SVM has a similar accuracy performance to the LM while its performance is lesser than that of Tree at a distance between  Fig. 10 The accuracy performance of classification models 2.86 and 2.20 m. The accuracy difference between SVM and Tree models is decreasing while the distance is increasing.
Briefly, the best accuracy performance is obtained by the 2-PPM scheme, while the KNN gives the best sensitivity performance. Moreover, the Tree model has better performance in terms of Ppv and F1 score when compared to other classification methods. In addition to these, the Tree model is very successful when considering the accuracy, sensitivity, and Ppv for the 4-PPM technique, whereas the KNN that has the best performance for all classification metrics of 8-PPM achieves the best F1 score for 4-PPM. Additionally, the Tree and the KNN models give similar simulation results for 16-PPM. Considering the performance comparisons, the KNN and Tree models are superior to the SVM and LM models in terms of the classification performance of the L-PPM scheme.

Conclusion
It is crucial that a universal receiver independent from the modulation type is designed using classification schemes since L-PPM schemes are superior to each other in terms of energy efficiency, transmission capacity, and suitable transmission distance. A comprehensive receiver must provide the usage of an optimum modulation scheme by taking into account the performance criteria as mentioned above. In this paper, therefore, it has been reported a modulation classification suggestion for the VLC system. The classification has been achieved for 2-PPM, 4-PPM, 8-PPM, and 16-PPM schemes by using the Tree, the KNN, the SVM, and the LM models. The Tree model has given the best accuracy of 97.85% at the distance of 2.20 m and the σ of 0.25. However, the KNN method gives better performance compared to other models when increase the distance from 2.32 to 3.15 m. In addition to this, the best sensitivity, PPV, and F1-score performances have been obtained for the 2-PPM modulation scheme since the threshold distance between 2-PPM and 4-PPM is longer than that of the threshold distance between any two modulation schemes. In the future, it can be investigated the effect of reflective light by walls for the classification of L-PPM schemes. Additionally, it can be obtained a performance comparison of ML methods with DL techniques.
Author contributions Both authors contributed the data collection, data coding and analysis, writing, validation.
Funding Not applicable.
Availability of data and material All data in this work are directed at the authors.