Non-Invasive Classiﬁcation of Blood Glucose Level Based on Photoplethysmography Using Time–Frequency Analysis

: Diabetes monitoring systems are crucial for avoiding potentially signiﬁcant medical ex-penses. At this time, the only commercially viable monitoring methods that exist are invasive ones. Since patients are uncomfortable while blood samples are being taken, these techniques have signiﬁcant disadvantages. The drawbacks of invasive treatments might be overcome by a painless, inexpensive, non-invasive approach to blood glucose level (BGL) monitoring. Photoplethysmography (PPG) signals obtained from sensor leads placed on speciﬁc organ tissues are collected using photodi-odes and nearby infrared LEDs. Cardiovascular disease can be detected via photoplethysmography. These characteristics can be used to directly affect BGL monitoring in diabetic patients if PPG signals are used. The Guilin People’s Hospital’s open database was used to produce the data collection. The dataset was gathered from 219 adult respondents spanning an age range from 21 to 86 of which 48 percent were male. There were 2100 sampling points total for each PPG data segment. The methodology of feature extraction from data may assist in increasing the effectiveness of classiﬁer training and testing. PPG data information is modiﬁed in the frequency domain by the instantaneous frequency (IF) and spectral entropy (SE) moments using the time–frequency (TF) analysis. Three different forms of raw data were used as inputs, and we investigated the original PPG signal, the PPG signal with instantaneous frequency, and the PPG signal with spectral entropy. According to the results of the model testing, the PPG signal with spectral entropy generated the best outcomes. Compared to decision trees, subspace k-nearest neighbor, and k-nearest neighbor, our suggested approach with the super vector machine obtains a greater level of accuracy. The super vector machine, with 91.3% accuracy and a training duration of 9 s, was the best classiﬁer.


Introduction
Uncontrolled blood sugar levels in diabetics have the potential to seriously harm organs and result in consequences such as strokes that can lead to death. It is considered a "silent killer" because it can be fatal if not treated early [1,2]. The International Diabetes Federation predicted in 2017 that the prevalence of diabetes would increase internationally [3]. The two main types of diabetes, type 1 (T1D) and type 2 (T2D), have the same symptoms but differ in terms of causes and treatment. Unfortunately, many people with diabetes ignore it and do not realize how serious the side effects can be when their blood sugar levels increase. Type 2 diabetes is the most common and can be prevented or reduced by increasing awareness of its dangers and modifying to a healthy lifestyle [4]. Monitoring blood glucose levels regularly and administering diabetes treatments as needed can effectively prevent diabetes [5,6].
Currently, non-invasive monitoring with laboratory tests or a glucometer is the only method routinely performed and is believed to have a high degree of accuracy [7]. A glucometer is commonly utilized in the home. Both procedures require using needles or finger pricks, which result in minimal tissue damage but discomfort to the patient.
A non-invasive procedure as an alternative to invasive testing is needed as a new method for monitoring BGL. At least four self-administered blood sugar checks are suggested daily, with an increased frequency if the patient's health is poor. However, some statistics indicate that between 40% and 50% of diabetics do not adhere to the recommendations [8,9]. Since this tool would be painless, comfortable, and relatively accurate and could be used repeatedly, it would increase patient compliance and encourage more discipline in monitoring their blood sugar.
Techniques arising from studies into the creation of non-invasive BGL monitoring or prediction systems are shown in Figure 1 [7,10,11]. In general, non-invasive techniques can be separated into two categories: sensors and optical. Sensor approaches detect glucose levels in biofluids such as saliva, tears, urine, and intracellular fluids [12]. The range of glucose concentrations in the intracellular fluid is comparable to that in the blood of healthy and diabetic patients. However, many studies [13] have shown a 4 to 10 min lag between intracellular fluid and blood glucose. method for monitoring BGL. At least four self-administered blood sugar checks are suggested daily, with an increased frequency if the patient's health is poor. However, some statistics indicate that between 40% and 50% of diabetics do not adhere to the recommendations [8,9]. Since this tool would be painless, comfortable, and relatively accurate and could be used repeatedly, it would increase patient compliance and encourage more discipline in monitoring their blood sugar.
Techniques arising from studies into the creation of non-invasive BGL monitoring or prediction systems are shown in Figure 1 [7,10,11]. In general, non-invasive techniques can be separated into two categories: sensors and optical. Sensor approaches detect glucose levels in biofluids such as saliva, tears, urine, and intracellular fluids [12]. The range of glucose concentrations in the intracellular fluid is comparable to that in the blood of healthy and diabetic patients. However, many studies [13] have shown a 4 to 10 min lag between intracellular fluid and blood glucose.
Optical approaches are evolving faster than sensors. As optical methods, near-infrared and mid-infrared spectroscopy, fluorescence, Raman, time of flight, and photoacoustic approaches have been developed in previous studies [10,12]. These non-invasive techniques are still undergoing study and development to meet market expectations [10]. Table 1 displays the strengths and weaknesses of each optical technique. Photoplethysmography (PPG) is a new innovative non-invasive blood glucose monitoring technology that has been widely developed in recent years [14]. Optically based, PPG requires a light source to illuminate tissue and a photodetector to detect minute fluctuations in light intensity induced by perfusion-related capillary volume changes. PPG can operate in two transmission and reflection modes. From these signal intercepts, much information can be obtained, including pulse rate and oxygen levels in the blood.
Other important information that can be explored on the PPG signal [15] includes blood pressure [16], arterial stiffness [17], respiration [18], and diabetes [19]. Sensor placement is generally on the fingers, toes, and ears. Optical approaches are evolving faster than sensors. As optical methods, near-infrared and mid-infrared spectroscopy, fluorescence, Raman, time of flight, and photoacoustic approaches have been developed in previous studies [10,12]. These non-invasive techniques are still undergoing study and development to meet market expectations [10]. Table 1 displays the strengths and weaknesses of each optical technique.
Photoplethysmography (PPG) is a new innovative non-invasive blood glucose monitoring technology that has been widely developed in recent years [14]. Optically based, PPG requires a light source to illuminate tissue and a photodetector to detect minute fluctuations in light intensity induced by perfusion-related capillary volume changes. PPG can operate in two transmission and reflection modes. From these signal intercepts, much information can be obtained, including pulse rate and oxygen levels in the blood.
Other important information that can be explored on the PPG signal [15] includes blood pressure [16], arterial stiffness [17], respiration [18], and diabetes [19]. Sensor placement is generally on the fingers, toes, and ears. In recent years, photoplethysmography (PPG) has gained popularity because of its ability as a simple and inexpensive non-invasive vital sign monitoring device. Another thing that supports PPG's popularity is the use of these sensors in wearable devices [20] and smartphones (webcams) [21,22] that has become possible due to recent technological advances. In addition, embedded system technology advancements and inexpensive sensor costs have enabled the production of PPG signal recorder prototypes.
The human body's tissues are located under the skin, the thickness of which varies depending on the location of the layers in the body. During systole, the volume of blood reaching the skin surface capillaries increases as the heart pumps blood throughout the body and lungs. This condition increases the absorption of light. The blood then returns to the heart via a network of veins, causing a decrease in capillary blood volume and light absorption. Figure 2 illustrates the dual-component structure of the PPG signal, which consists of a pulsatile (AC = alternating current) and a non-pulsatile (DC = direct current) component. The AC component is vital because it contains all the information regarding the coordinated change in blood volume with each heartbeat. The AC component is superimposed on the "DC" component, which is the largest part of the PPG signal and has low-frequency fluctuations [23]. The DC component has information about the absorption of static elements such as muscle, fat, tissue, and bone. The DC component provides vital data regarding respiration, venous flow, sympathetic nervous system activity, and thermoregulation [20]. Depending on body area and skin color, the AC component is often less than 0.2-2% of the DC component. The perfusion index (PI) is the ratio of pulsatile to non-pulsatile absorption [24].  The mechanism of the cardiac cycle alternates between systole (contraction) and diastole (relaxation) (diastolic). During the systolic phase, the heart muscle constricts to pump blood throughout the body's arteries as the heart beats. Contraction of the heart muscle will then put pressure on the arteries. After the ventricles have finished contracting, they will rest. During the relaxation phase (diastolic), the ventricles will fill with blood and become ready to carry out the following contraction process. The second waveform, which arises between the systolic and diastolic phases of the AC component, has a distinguishing and recognizable characteristic called the dicrotic notch [25].
Clinically, autonomic nervous system (ANS) dysfunction is a significant complication of diabetes mellitus. Changes in the autonomic nervous system will impact the heart rate variability (HRV) [26]. In each heartbeat, the heart rhythm varies. Heart rate variability refers to the regular change in milliseconds between heartbeats. HRV monitoring is used in many physiological contexts to evaluate cardiovascular autonomic function [27]. The autonomic nervous system (ANS), which controls various bodily functions and is made up of the sympathetic and parasympathetic nervous systems, can be better understood through heart rate variability (HRV) [28]. Unfortunately, acquisition of the ECG (electrocardiography) signals is required to obtain the R to R interval, requiring clinical supervision.
Theoretically, the PPG can determine the interval between heartbeats and heart rate variability [29]. Cardiac rhythm occurs when the mechanical action of the heart is linked with its electrical activity, although a time lag is necessary for transmitting a pulse wave. Research by Selvaraj et al. demonstrated a high correlation between the R to R ECG interval and the inter-beat interval (IBI). This study corroborates that HRV can be estimated reliably from the peak-to-peak (PP) interval-based method in both time and frequency domains. HRV calculations can be traced using PPG morphology [30]. Previous studies have found some association between HRV and blood sugar levels (BGL) [31].
There is much information about blood in the PPG signal. Many possibilities of data can be explored from the perspective of PPG morphology. The PPG pulse shape contains many intriguing characteristics. One of the features is the dicrotic notch between the systolic and diastolic phases. The effect of physiological changes on PPG waveforms is related to hemodynamics and glucose levels [32,33].
Diabetes can be identified using signal information as a classification feature. The output waves are then examined using the PPG technique to determine whether normal or diabetic individuals have different wave characteristics. Figure 3 illustrates the differences in PPG morphology between healthy and diabetic participants. People with diabetes The mechanism of the cardiac cycle alternates between systole (contraction) and diastole (relaxation) (diastolic). During the systolic phase, the heart muscle constricts to pump blood throughout the body's arteries as the heart beats. Contraction of the heart muscle will then put pressure on the arteries. After the ventricles have finished contracting, they will rest. During the relaxation phase (diastolic), the ventricles will fill with blood and become ready to carry out the following contraction process. The second waveform, which arises between the systolic and diastolic phases of the AC component, has a distinguishing and recognizable characteristic called the dicrotic notch [25].
Clinically, autonomic nervous system (ANS) dysfunction is a significant complication of diabetes mellitus. Changes in the autonomic nervous system will impact the heart rate variability (HRV) [26]. In each heartbeat, the heart rhythm varies. Heart rate variability refers to the regular change in milliseconds between heartbeats. HRV monitoring is used in many physiological contexts to evaluate cardiovascular autonomic function [27]. The autonomic nervous system (ANS), which controls various bodily functions and is made up of the sympathetic and parasympathetic nervous systems, can be better understood through heart rate variability (HRV) [28]. Unfortunately, acquisition of the ECG (electrocardiography) signals is required to obtain the R to R interval, requiring clinical supervision.
Theoretically, the PPG can determine the interval between heartbeats and heart rate variability [29]. Cardiac rhythm occurs when the mechanical action of the heart is linked with its electrical activity, although a time lag is necessary for transmitting a pulse wave. Research by Selvaraj et al. demonstrated a high correlation between the R to R ECG interval and the inter-beat interval (IBI). This study corroborates that HRV can be estimated reliably from the peak-to-peak (PP) interval-based method in both time and frequency domains. HRV calculations can be traced using PPG morphology [30]. Previous studies have found some association between HRV and blood sugar levels (BGL) [31].
There is much information about blood in the PPG signal. Many possibilities of data can be explored from the perspective of PPG morphology. The PPG pulse shape contains many intriguing characteristics. One of the features is the dicrotic notch between the systolic and diastolic phases. The effect of physiological changes on PPG waveforms is related to hemodynamics and glucose levels [32,33].
Diabetes can be identified using signal information as a classification feature. The output waves are then examined using the PPG technique to determine whether normal or  Figure 3 illustrates the differences in PPG morphology between healthy and diabetic participants. People with diabetes usually have PPG signal waves that tend to be bell-shaped without any subsequent peaks, whereas healthy subjects have a slightly elongated shape in the diastole phase [34]. When vascular resistance is unusually high because of atherosclerosis, diabetes, or any vascular pathology that narrows the vessels, the form of the PPG beat detected in the periphery (such as the fingertip) can change significantly from that in the middle artery. In that situation, there is a significant reduction in the blood flow velocity from the big arteries to the tiny capillaries. As a result, when the periphery is reached, the rising pulse wave of blood pressure spreads is delayed and may lose the secondary (dicrotic) peak [35]. usually have PPG signal waves that tend to be bell-shaped without any subsequent peaks, whereas healthy subjects have a slightly elongated shape in the diastole phase [34]. When vascular resistance is unusually high because of atherosclerosis, diabetes, or any vascular pathology that narrows the vessels, the form of the PPG beat detected in the periphery (such as the fingertip) can change significantly from that in the middle artery. In that situation, there is a significant reduction in the blood flow velocity from the big arteries to the tiny capillaries. As a result, when the periphery is reached, the rising pulse wave of blood pressure spreads is delayed and may lose the secondary (dicrotic) peak [35]. Artificial intelligence (AI) is an intelligent system that can be utilized to mimic the ability of medical professionals to assist healthcare providers in their daily work and support decision making and problem solving. Predicting BGL is made possible by combining the PPG signal dataset with AI. Using PPG, machine learning [36,37] and deep learning [38,39] methods have similar effectiveness at predicting BGL classification. The lack of test samples is a frequent problem when implementing machine learning or deep learning.
The paper is structured as follows: Section 2 describes the materials and techniques, Section 3 explains the results, Section 4 analyzes the findings, and Section 5 provides a conclusion of the study.

Materials and Methods
As illustrated in Figure 4, we used an indirect technique by using patterns and sample points from PPG signals. The dataset is from the Guilin People's Hospital public database and the figshare public dataset, an online open access repository from the Guilin People's Hospital database [40]. PPG datasets from healthy and diabetic people are required to derive PPG signal patterns linked to BGL. Artificial intelligence (AI) is an intelligent system that can be utilized to mimic the ability of medical professionals to assist healthcare providers in their daily work and support decision making and problem solving. Predicting BGL is made possible by combining the PPG signal dataset with AI. Using PPG, machine learning [36,37] and deep learning [38,39] methods have similar effectiveness at predicting BGL classification. The lack of test samples is a frequent problem when implementing machine learning or deep learning.
The paper is structured as follows: Section 2 describes the materials and techniques, Section 3 explains the results, Section 4 analyzes the findings, and Section 5 provides a conclusion of the study.

Materials and Methods
As illustrated in Figure 4, we used an indirect technique by using patterns and sample points from PPG signals. The dataset is from the Guilin People's Hospital public database and the figshare public dataset, an online open access repository from the Guilin People's Hospital database [40,41]. PPG datasets from healthy and diabetic people are required to derive PPG signal patterns linked to BGL.
Using infrared light and transmission methods, a finger sensor is positioned on the tip of the finger, and PPG waves are utilized as the data. The information is then kept in a database in the text-based Numerical Notation (TXT) format. The corresponding application receives this real-time data through Bluetooth transmission. The PPG sensor model was the SEP9AF-2 ( Korea, SMPLUS Company), which has a dual LED with wavelengths of 660 nm (Red light) and 905 nm (Infrared), a sampling rate of 1 kHz, a 12 bit analog digital converter (ADC), and a hardware filter design of 0.5 to 12 Hz bandpass. The probe's board has an integrated microprocessor with the model number MSP430FG4618 (Dallas, TX, USA, Texas Instruments business) [40].  Using infrared light and transmission methods, a finger sensor is positioned on the tip of the finger, and PPG waves are utilized as the data. The information is then kept in a database in the text-based Numerical Notation (TXT) format. The corresponding application receives this real-time data through Bluetooth transmission. The PPG sensor model was the SEP9AF-2 ( Korea, SMPLUS Company), which has a dual LED with wavelengths of 660 nm (Red light) and 905 nm (Infrared), a sampling rate of 1 kHz, a 12 bit analog digital converter (ADC), and a hardware filter design of 0.5 to 12 Hz bandpass. The probe's board has an integrated microprocessor with the model number MSP430FG4618 (Dallas, TX, USA, Texas Instruments business) [40].
We used MATLAB to process the signals. Signal conversion requires a critical component called time-frequency analysis. The time-frequency analysis (TF) transforms information from the PPG signals into two TF moments in the time domain, i.e., instantaneous frequency (IF) and spectral entropy (SE), using a short-time Fourier transform (STFT). The time-dependent frequency of a signal is determined from the power spectrogram's . Block diagram representation of the suggested BGL classification approach. The three blocks represent the stages of processing: signal processing, classification results, and data collecting. There are 114 normal patients and 114 diabetics in each group's dataset. The instantaneous frequency and spectral entropy of each PPG waveform were obtained using temporal frequency analysis and a short-time Fourier transform (STFT). A machine learning classifier was then used to classify the BGL.
We used MATLAB to process the signals. Signal conversion requires a critical component called time-frequency analysis. The time-frequency analysis (TF) transforms information from the PPG signals into two TF moments in the time domain, i.e., instantaneous frequency (IF) and spectral entropy (SE), using a short-time Fourier transform (STFT). The time-dependent frequency of a signal is determined from the power spectrogram's initial instance using the IF function. Spectral entropy may provide exact information on the complexity of the signal based on the spectrum width. SE is used to compute the data that makes up the different frequency components.

Data Collection
The Guilin People's Hospital's open database was used to produce the data collection. This is available for download via the figshare repository [40,41]. This study was approved by the ethics committee of Guilin People's Hospital and Guilin University of Electronic Technology in China. All participants provided written and informed consent prior to the study. Guilin People's Hospital data include 219 subjects covering the age range of 20-89 years. Information records include ID, gender, age, height, weight, systolic pressure, diastolic pressure, heart rate, BMI and common cardiovascular diseases (CVD) such as hypertension, diabetes, cerebral infarction and cerebrovascular disease. During the acquisition of the signal, the sampling waveform was placed at 1 kHz with a precision of 12 bits for the analog-to-digital conversion. There are 2100 sample points in each section of PPG data [40].
The experiment lasts for around 15 min in its entirety. Photoplethysmography (PPG) data gathering takes around 3 min. As seen in Figure 5, each segment has 2100 sample points, which each take 2.1 s to acquire [40].
to the study. Guilin People's Hospital data include 219 subjects covering the age rang 20-89 years. Information records include ID, gender, age, height, weight, systolic p sure, diastolic pressure, heart rate, BMI and common cardiovascular diseases (CVD) s as hypertension, diabetes, cerebral infarction and cerebrovascular disease. During the quisition of the signal, the sampling waveform was placed at 1 kHz with a precision o bits for the analog-to-digital conversion. There are 2100 sample points in each sectio PPG data [40].
The experiment lasts for around 15 min in its entirety. Photoplethysmography (P data gathering takes around 3 min. As seen in Figure 5, each segment has 2100 sam points, which each take 2.1 s to acquire [40]. We categorized the data into "signal" and "label" categories. As shown in Figur there are two label values: "normal" and "diabetes", whereas the signal includes an rangement of cells containing a variety of PPG signals. The data are analyzed using PPG signal quality throughout the data-collecting phase before being stored. We ch the signals using the waveform to predict poor PPG signals. Figure 6 shows the met for classification of PPG waveforms that was used to evaluate whether each PPG sig segment was acceptable and unacceptable. Perfect PPG waves have a diastolic notch and a distinct rhythm. The unaccepta category included several loud beats without a diastolic notch, while the acceptable c gory featured a clean beat without one. This strategy was inspired by the skewness sig quality index (SSQI), which differentiates the degree of asymmetries in the distribu around the mean [41]. Therefore, the signals are split into training to educate the classi and a testing set to evaluate the classifier's accuracy. Before including the datasets, signal data from each classification level were balanced to ensure that each group c tained the same training datasets (114 normal subjects and 114 diabetic subjects). The c sifier's accuracy was assessed using 20% of the dataset, while the remaining 80% was u as a training set. We categorized the data into "signal" and "label" categories. As shown in Figure 3, there are two label values: "normal" and "diabetes", whereas the signal includes an arrangement of cells containing a variety of PPG signals. The data are analyzed using the PPG signal quality throughout the data-collecting phase before being stored. We chose the signals using the waveform to predict poor PPG signals. Figure 6 shows the method for classification of PPG waveforms that was used to evaluate whether each PPG signal segment was acceptable and unacceptable.

Time Frequency Analysis
The methodology of feature extraction from data may assist in increasing the effectiveness of classifier training and testing. The raw PPG data must be converted into a spectrogram before being used to build a feature representation. TF moments may be used to extract information from spectrograms. A PPG signal's temporal domain features may vary by very little, but the human eye is not sensitive enough to see them. Thus, methods for obtaining features in the time or frequency domain are necessary [42,43]. The signal is separated into small time windows for time-frequency analysis, resulting in a spectrum represented as a sliding window. Each pixel's frequency and time data serve as estimates Perfect PPG waves have a diastolic notch and a distinct rhythm. The unacceptable category included several loud beats without a diastolic notch, while the acceptable category featured a clean beat without one. This strategy was inspired by the skewness signal quality index (SSQI), which differentiates the degree of asymmetries in the distribution around the mean [42]. Therefore, the signals are split into training to educate the classifier and a testing set to evaluate the classifier's accuracy. Before including the datasets, the signal data from each classification level were balanced to ensure that each group contained the same training datasets (114 normal subjects and 114 diabetic subjects). The classifier's accuracy was assessed using 20% of the dataset, while the remaining 80% was used as a training set.

Time Frequency Analysis
The methodology of feature extraction from data may assist in increasing the effectiveness of classifier training and testing. The raw PPG data must be converted into a spectrogram before being used to build a feature representation. TF moments may be used to extract information from spectrograms. A PPG signal's temporal domain features may vary by very little, but the human eye is not sensitive enough to see them. Thus, methods for obtaining features in the time or frequency domain are necessary [43,44]. The signal is separated into small time windows for time-frequency analysis, resulting in a spectrum represented as a sliding window. Each pixel's frequency and time data serve as estimates for the PPG signal's intensity. The high frequency of the sound is easier to locate using a spectrogram. The PPG signal represents a complex interplay between cardiac activity, vascular relaxation, and microcirculation system status. In the temporal frequency domain, PPG signals thus include a lot of different information. PPG data information is modified in the frequency domain by the instantaneous frequency (IF) and spectral entropy (SE) moments using the time-frequency analysis.
The signal's instantaneous frequency (IF) is a property that often has significant practical importance. Physically, it only applies to monochromatic signals with a single frequency or a narrow range of frequencies that fluctuate over time [43]. This situation encourages the development of the IF concept that was recently proposed by Nobel Prize winner Dennis Gabor. The IF, as seen in Figure 7, determines the magnitude of the instantaneous phase shift in time or as a phase trace created from the instantaneous phase's first derivative. The IF is a brief sinusoidal frequency window that precisely matches the seismic trace. The importance of IF arises from the need to often examine signals whose spectral characteristics fluctuate over time, particularly the spectral peak frequencies [43]. The following is a definition of the instantaneous frequency for a real-time signal. The spectral entropy function calculates the spectral entropy based on a power spectrogram. Spectrum entropy presents complete information on the signal structure based on spectrum width. Wider spectrums, such as white noise, are linked to high entropy. Low entropy is reflected by a narrow spectrum, similar to a sum of sinusoids. In actuality, spectral entropy computes the specific functionality in each frequency component. The spectral entropy is calculated using the following equation. ᵢ The spectral entropy function calculates the spectral entropy based on a power spectrogram. Spectrum entropy presents complete information on the signal structure based on spectrum width. Wider spectrums, such as white noise, are linked to high entropy. Low entropy is reflected by a narrow spectrum, similar to a sum of sinusoids. In actuality, spectral entropy computes the specific functionality in each frequency component. The spectral entropy is calculated using the following equation.
where x i is the energy of the ith frequency component of the spectrum, x = (x 1 . . . . . . ., x N ) is the spectrum's probability mass function (PMF) and number of spectrum points. In this work, the spectrogram is computed using 63 time frames using spectral entropy. Each time window's entropy is calculated from x using:

Classifier
The platform we used to choose the most effective machine learning classifier was Classification Learner from MATLAB. The platform provides an appropriate degree of accuracy for the algorithm's BGL categorization based on PPG data. The same dataset, as seen in Figure 8, was used to test each model. Several evaluation indices, including the F1 score, accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), true negative (TN), false negative (FN), true positive (TP), false positive (FP), true negative (TN), and false positive (FN) were utilized to assess the trained models in their entirety. When the cost of a false positive (FN) is large, precision is a reasonable benchmark to use. Recall is beneficial when the expense of false negatives is significant. The F1 score is a comprehensive evaluation of the accuracy of a model, consisting of precision and recall. In comparison to the other variables, the normotension had the best F1 score overall.

Confusion Matrix
The amounts of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN) from the confusion matrix are used to calculate the five formulae men-

Confusion Matrix
The amounts of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN) from the confusion matrix are used to calculate the five formulae mentioned above. The confusion matrix is a N x N matrix used to assess the effectiveness of a classification model, where N is the total number of target classes. In the matrix, the actual goal values are contrasted with those that the machine learning model anticipated. A confusion matrix is a table that lists how many guesses a classifier has correctly and incorrectly made. It is used to evaluate a classification model's effectiveness. The fundamental terminology in the confusion matrix is as follows: A. True negatives (TN) occur when the actual value and the prediction are both negative, and true positives (TP) occur when the actual value and the prediction are both positive. B. False positives (FP) occur when a positive outcome is predicted but the actual result is negative, also known as a Type 1 error. C. False negatives (FN) are when a negative outcome is predicted but the actual result is positive, sometimes referred to as a type 2 error.

Results
A training set (182 data) and a testing set (46 data) were created from the dataset for this investigation. Our proposed approach changes from deep learning to machine learning to shorten training time. Since deep learning is computationally intensive and takes some time to train, it might be difficult to evaluate and repeat experiments often in order to improve results. We evaluated the classification accuracy of three distinct data sources. The second and third data inputs are taken from the TF findings, which result in IF and SE with a frequency domain. The first data input is a pure PPG signal with a time domain that has not been treated. The three BGL-adjusted inputs shown in Figure 9 are contrasted in the following.

Original PPG
In the first experiment, we employed the original PPG signals to classify BGL. Each PPG segment comprises 2100 data points. Data distribution is a statistic that displays all data values and the frequency with which those occur to ensure no data outliers, as shown in Figure 10. We ran a comparative analysis of twenty-five classification algorithms to examine the training performance of this experiment. We present the three best machine learning classifiers from the training phase in Table 2 and the ROC curve for the weighted KNN classifier during training in Figure 11.

Original PPG
In the first experiment, we employed the original PPG signals to classify BGL. Each PPG segment comprises 2100 data points. Data distribution is a statistic that displays all data values and the frequency with which those occur to ensure no data outliers, as shown in Figure 10. We ran a comparative analysis of twenty-five classification algorithms to examine the training performance of this experiment. We present the three best machine learning classifiers from the training phase in Table 2 and the ROC curve for the weighted KNN classifier during training in Figure 11.

Original PPG
In the first experiment, we employed the original PPG signals to classify BGL. Ea PPG segment comprises 2100 data points. Data distribution is a statistic that displays data values and the frequency with which those occur to ensure no data outliers, as sho in Figure 10. We ran a comparative analysis of twenty-five classification algorithms examine the training performance of this experiment. We present the three best mach learning classifiers from the training phase in Table 2 and the ROC curve for the weigh KNN classifier during training in Figure 11.     We compared the testing performance based on the accuracy values. The weighted KNN classifier had an accuracy value of 86.9%, which was better than other classification methods. A confusion matrix was utilized to illustrate the performance of classifiers on datasets where the true value is known, as shown in Figure 12. We compared the testing performance based on the accuracy values. The weighted KNN classifier had an accuracy value of 86.9%, which was better than other classification methods. A confusion matrix was utilized to illustrate the performance of classifiers on datasets where the true value is known, as shown in Figure 12. We compared the testing performance based on the accuracy values. The weighted KNN classifier had an accuracy value of 86.9%, which was better than other classification methods. A confusion matrix was utilized to illustrate the performance of classifiers on datasets where the true value is known, as shown in Figure 12. Several classifier evaluation performance indicators were used, such as accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 score. The classification performance of our proposed method is shown in Table 3.  Several classifier evaluation performance indicators were used, such as accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 score. The classification performance of our proposed method is shown in Table 3.

Instantaneous Frequency
In the second experiment, we used instantaneous frequency PPG signals to classify BGL into categories. Each PPG segment consists of 63 sampling points. Data distribution is a statistic that displays all data values and the frequency in which these occur to verify that there are no data outliers, as shown in Figure 13.

Instantaneous Frequency
In the second experiment, we used instantaneous frequency PPG signals to classify BGL into categories. Each PPG segment consists of 63 sampling points. Data distribution is a statistic that displays all data values and the frequency in which these occur to verify that there are no data outliers, as shown in Figure 13.
We conducted a comparative analysis with twenty-five machine learning classifiers to assess the training performance of this work. We present the three best machine learning classifiers in the training phase in Table 4 and the ROC curve for the super vector machine classifier during training in Figure 14.
We evaluated testing outcomes on the basis of accuracy values. The super vector machine classifier has an accuracy value of 89.10%, which is better than other classification methods. As shown in Figure 15, a confusion matrix is employed to analyze the performance of classifiers on datasets for which the real value is known.
Several classifier evaluation performance indicators were used, such as accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 score. The classification performance of our proposed method is shown in Table 5.   We conducted a comparative analysis with twenty-five machine learning classifiers to assess the training performance of this work. We present the three best machine learning classifiers in the training phase in Table 4 and the ROC curve for the super vector machine classifier during training in Figure 14.

Spectral Entropy
In the third experiment, we used spectral entropy PPG signals to classify BGL into categories. Each PPG segment consists of 63 sampling points.
Data distribution is a function that shows all the values of data and how often these values occur to ensure that there are no data outliers, as shown in Figure 16. We ran a comparative analysis with twenty-five machine learning classifiers to analyze the performance of the model of this study. We present the three best machine learning classifiers in the training phase in Table 6 and the ROC curve for the weighted KNN classifier during training in Figure 17. We evaluated testing outcomes on the basis of accuracy values. The super vector machine classifier has an accuracy value of 89.10%, which is better than other classification methods. As shown in Figure 15, a confusion matrix is employed to analyze the performance of classifiers on datasets for which the real value is known.

Spectral Entropy
In the third experiment, we used spectral entropy PPG signals to clas categories. Each PPG segment consists of 63 sampling points.
Data distribution is a function that shows all the values of data and ho values occur to ensure that there are no data outliers, as shown in Figure   Figure 15. Confusion matrix for super vector machine with testing accuracy: 89.1034%.
Several classifier evaluation performance indicators were used, such as accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 score. The classification performance of our proposed method is shown in Table 5.

Spectral Entropy
In the third experiment, we used spectral entropy PPG signals to classify BGL into categories. Each PPG segment consists of 63 sampling points.
Data distribution is a function that shows all the values of data and how often these values occur to ensure that there are no data outliers, as shown in Figure 16. We ran a comparative analysis with twenty-five machine learning classifiers to analyze the performance of the model of this study. We present the three best machine learning classifiers in the training phase in Table 6 and the ROC curve for the weighted KNN classifier during training in Figure 17.     We compared the results of testing based on the estimations of accuracy. The accuracy of the super vector machine classifier is 91.30%, which is greater then other classification models. A confusion matrix is applied to evaluate the performance of classifiers on datasets where the true value is known, as shown in Figure 18.  We compared the results of testing based on the estimations of accuracy. The accuracy of the super vector machine classifier is 91.30%, which is greater then other classification models. A confusion matrix is applied to evaluate the performance of classifiers on datasets where the true value is known, as shown in Figure 18. Several classifier evaluation performance indicators were used, s (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 sc cation performance of our proposed method is shown in Table 7.

Final Results
After classifying all the input data, the final results of the compar inputs were obtained, as shown in the Table 8. We conducted a compari outcomes of our approach and those used in earlier research. A perform Several classifier evaluation performance indicators were used, such as accuracy (Ac), recall (Re), specificity (Sp), precision (Pr), sensitivity (Se), and F1 score. The classification performance of our proposed method is shown in Table 7.

Final Results
After classifying all the input data, the final results of the comparison of the three inputs were obtained, as shown in the Table 8. We conducted a comparison between the outcomes of our approach and those used in earlier research. A performance comparison with past investigations is shown in Table 9.

Discussion
The signal is not a single item, but a set of sinusoidal components. The notion of frequency loses all significance when applied to a non-stationary signal, making it essential to use the idea of time-varying process parameters to accurately estimate the sinusoidal transmission frequency.
Similar to many other biological signals, PPG signals are non-stationary. The amplitude, frequency, and oscillation pattern of the PPG impulse change from beat to beat. Its bandwidth and frequency may fluctuate over time. Non-stationary approaches, such as frequency analysis, are necessary for non-stationary signals [43].
A useful method for comprehending a signal's non-stationarity is time-frequency (TF) analysis. In this stage, a spectrogram is utilized to visually evaluate the form of the PPG signal based on its BGL classification and to identify the amount of noise it contains.
Each PPG signal has essential data that are relevant to the degree of precision of the outputs of the machine learning classification procedure in the form of feature points. However, if there are too many feature points, training will take a long time. The original ppg signal has 2100 points and takes roughly 110 s to train, while IF and SE only have 63 points and take less than 10 s to train. To calculate the spectrogram, IF and SE run windows 63 times. The number of feature points in each data point was decreased from 2100 lengthy signal samples to only 63. The training procedure could take just a few seconds with a modest training set.
The final findings are shown in Table 8, and they demonstrate that the input signal that has been processed by TF delivers a higher degree of accuracy. This result further shows the need of signal pre-processing for the PPG signal. In earlier investigations, the steps used during signal pre-processing were mainly focused on removing noise that was built into the PPG. This work establishes that classification accuracy may be improved without noise elimination by converting time-based PPG through the short-time Fourier transform (STFT).
The average of the instantaneous frequency and the spectral entropy differs by almost an order of magnitude. IF and SE signal types are identical in diabetic individuals, as can be seen from Figure 19, but the amplitude values should be noted, since IF has a greater amplitude value. Due to the average instantaneous frequency being too high to investigate machine learning successfully, SE is thus more accurately based on the classification findings. SE is seen based on the significant change in the spectrum of successive frames. Big inputs may create network convergence when the network fits data with a large average and a wide range of values, which can impact the classification accuracy level. The process of selecting the machine learning algorithm that best matches the nonlinear nature of the PPG signal follows signal pre-processing. The accuracy of the outputs, overall cost of misclassification, and training time were factors in the algorithm selection. The top three were discovered after a series of comparisons between several machine learning classifiers using the same dataset. The super vector machine (SVM), with 91.3% accuracy and a training duration of 9 s, was the best classifier. Based on these findings, we decided to use non-invasive PPG and the SVM to categorize BGL.
We conducted a comparison between the outcomes of our approach and those of earlier research. The comparison study's findings demonstrate that the model we suggest produces a superior accuracy score and overall outcome. In general, although using the same classifier, outcomes from quantitative research in earlier studies might vary, as seen in Table 9. We concentrated on comparing the findings to those of earlier scholars. The Gaussian SVM approach was proposed by G. Zhang et al. [21] with a final accuracy rating of 81.5%. The SVM algorithm is taught to split the input data into two groups that are separated by as much space as feasible. The SVM classifier is sometimes referred to as a the broad margin classifier because of the wide space between these category labels. The SVM model, however, is a linear classifier and is unable to map nonlinear functions without the use of kernels. Because it employs the same technique as our suggested approach, the results of G. Zhang et al. offer a unique comparison. However, these findings are less accurate than those from our suggested model. Due to variations in the PPG raw signal's quality and the amount of sample points utilized, the accuracy numbers change.

Conclusions
In comparison to previous BGL estimate techniques, this categorization technique provides benefits. With our suggested procedure, users may quickly determine the state of their BGL to guarantee early diabetes identification. This technique may reduce the chance of mortality while accelerating the healing process. A more ideal accuracy value The process of selecting the machine learning algorithm that best matches the nonlinear nature of the PPG signal follows signal pre-processing. The accuracy of the outputs, overall cost of misclassification, and training time were factors in the algorithm selection. The top three were discovered after a series of comparisons between several machine learning classifiers using the same dataset. The super vector machine (SVM), with 91.3% accuracy and a training duration of 9 s, was the best classifier. Based on these findings, we decided to use non-invasive PPG and the SVM to categorize BGL.
We conducted a comparison between the outcomes of our approach and those of earlier research. The comparison study's findings demonstrate that the model we suggest produces a superior accuracy score and overall outcome. In general, although using the same classifier, outcomes from quantitative research in earlier studies might vary, as seen in Table 9. We concentrated on comparing the findings to those of earlier scholars. The Gaussian SVM approach was proposed by G. Zhang et al. [21] with a final accuracy rating of 81.5%. The SVM algorithm is taught to split the input data into two groups that are separated by as much space as feasible. The SVM classifier is sometimes referred to as a the broad margin classifier because of the wide space between these category labels. The SVM model, however, is a linear classifier and is unable to map nonlinear functions without the use of kernels. Because it employs the same technique as our suggested approach, the results of G. Zhang et al. offer a unique comparison. However, these findings are less accurate than those from our suggested model. Due to variations in the PPG raw signal's quality and the amount of sample points utilized, the accuracy numbers change.

Conclusions
In comparison to previous BGL estimate techniques, this categorization technique provides benefits. With our suggested procedure, users may quickly determine the state of their BGL to guarantee early diabetes identification. This technique may reduce the chance of mortality while accelerating the healing process. A more ideal accuracy value of machine learning classification results will be attained by retaining PPG signal quality from the start. Using our suggested technique, it is not necessary to extract the morphological elements of the PPG signal, making it applicable in a wide range of circumstances. Compared to decision trees, subspace k-nearest neighbor, and k-nearest neighbor, our suggested approach with SVM obtains a greater level of accuracy. With an overall F1 score of 91.99% across the classification levels, the SVM classifier has the greatest overall score. Further enhancing the effectiveness of BGL categorization based on PPG signals may be conducted by using larger sample sizes. We will employ an embedded system in a future study to combine the machine learning algorithms with electrical circuitry to produce portable monitoring devices.