## 3 Results and Discussion  
Power allocation for various optical communication channels utilizes OFDM modulation. Since numerous mathematical calculations are required with each change in the atmospheric conditions of the wireless communication channel for effective power allocation, significant processing power is necessary. This high processing demand can lead to longer processing times within the hardware system. In contrast, power allocation using deep neural networks allows for the design of a real-time power allocation system that operates several times faster than traditional methods after a single training session of the network. Additionally, by comparing the output of the neural network with that of the analytical system, it is possible to calculate the accuracy percentage of the neural network system. This paper utilized OFDM modulation of varying orders to create the database necessary for a real-time optimal power allocation system in optical communication channels. This research uses lower-order modulations for highly reliable optical wireless channels and limited power budgets. At the same time, high-order modulations are also used for  
Figure 3: Production of the loss function in different epochs. Figure 2: Proposed embedded system’s structure. optical channels that require high data rates. To design the power allocation system, the bit error rate was first calculated for different values of the signal-to-noise ratio and transmitter power. Table 1 shows the initial design parameters. Figure 4 shows the bit error rate regarding the signal-to-noise ratio and transmitter power for BPSK modulation. It demonstrates that the BER is at its lowest when the SNR exceeds 20 dB and the transmitter power exceeds 4 mW. Additionally, Table 2 indicates that this minimum BER value is \(7.34\times 10^{-15}\) for the optical wireless channel. \begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Value** & **Unit** \\ \hline Modulation orders & 2–4–16–64 & – \\ \hline Number of subcarriers in OFDM & 64 & – \\ \hline Bandwidth & 10 & MHz \\ \hline Transmission power range & 0.01 to 5 & mW \\ \hline Channel range & 500 & m \\ \hline Fog attenuation coefficient & 0.1 & dB/km \\ \hline Speed of light & \(3\times 10^{8}\) & m/s \\ \hline Boltzmann constant & \(1.38\times 10^{-23}\) & J/K \\ \hline Temperature & 300 & K \\ \hline Sampling rate (example) & \(10^{6}\) & – \\ \hline Number of symbols to simulate & \(10^{5}\) & – \\ \hline \(\alpha\) for the Gamma–Gamma channel model & 2 & – \\ \hline \(\beta\) for the Gamma–Gamma channel model & 2 & – \\ \hline Rician K factor & 1 & – \\ \hline Maximum Doppler shift & 3 & – \\ \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 4: Bit error rate in terms of signal-to-noise ratio and transmitter power for BPSK modulation. \begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Data Rate (Gbps)** & **BER** \\ \hline SNR = \(-20\) dB, P = 10 \(\mu\)W & \(3.69\times 10^{-7}\) & 0.5853 \\ \hline SNR = 10 dB, P = 5 mW & 2.8 & \(7.34\times 10^{-15}\) \\ \hline \end{tabular}
\end{table} 
Table 2: Minimum and maximum values for BER and data rate for BPSK modulation. According to Table 2 and Figure 5, the data rate for an SNR above 20 dB and a power of 5 mW in an optical communication channel with BPSK modulation reaches 2.8 Gbps. This modulation has a lower data rate than higher-order modulations and is more tolerant of transmitter power limitations than other forms of OFDM modulation. QPSK modulation offers improved data rates in optical communication compared to BPSK modulation. In this modulation, the data rate for transmitter power values of 3 mW and more than 9 dB for the SNR gradually increases and reaches 5.6 dB. Figure 6 and Table 3 illustrates the changes in the data rate based on the transmitter power and SNR for QPSK modulation. In the QPSK modulation model for optical communication, the lowest bit error rate is \(7.37\times 10^{-7}\), and the highest value is 0.4996.