# Anti-Jamming Power Control Algorithm for Wireless Communication Systems Based on MPC
## 5 Simulation Results and Analysis  
In this section, simulation examples are used to validate the control performance of the proposed MPC-based method in the presence of malicious jamming, periodic pulse jamming, and random pulse jamming. A comparative analysis is also conducted with traditional power adaptive methods and integral state feedback control methods. Using BPSK modulation and (2016,504) LDPC codes as an example, the bit error rate curve is fitted to a linear equation \(y(t)=-2.4x(t)-10.8\), where the output matrix is \(C=-2.4\). The state weight is set to \(Q=100\) and the input weight to \(R=0.01\). The simulation time is 10 s, with a sampling interval of 0.01 s. The target bit error rate is \(10^{-4}\), and the prediction horizon is set to N = 3. Figure 5 presents the bit error rate (BER) curves and the simulation comparison results of transmission power between the proposed algorithm, the traditional power adaptive method, and the integral state feedback control method under malicious jamming conditions. As shown in Figure 5(a), the transmission channel of the communication system is an AWGN channel with a signal-to-noise ratio (SNR) of 30 dBm. At t = 2 s, Sudden jamming with a power of 5 dBm attacks on communications systems. Figure 5(b) illustrates that the proposed algorithm responds to the jamming significantly faster than existing methods. In the transmission phase, the radio frequency front-end is monitored in real time by the receiver for signal processing and estimation of the SJNR. The transmitter then utilizes the feedback data to adjust the transmitter power through MPC, thereby stabilizing the SJNR by increasing the transmitter power and thus stabilizing the BER. As shown in Figure 5(c), compared with the integral state feedback control method and the traditional power adaptive method, the proposed algorithm is capable of regulating the output BER to converge to the target value in a more expeditious manner with diminished BER fluctuation by transmitting the optimal power through the MPC state feedback controller when malicious interference occurs during transmission. Figure 5: Flowchart of MPC controller-based algorithm. Figure 7 demonstrates the impact of varying weight settings on the efficacy of the proposed algorithm. The state weight parameter Q and the input weight parameter R play distinct roles, collectively influencing the behavior of the controller and the optimization objective. In the presence of impulse interference, an increase in state weights results in greater emphasis being placed on state error reduction by the power controller. This, in turn, causes the communication system to converge to the target BER at a faster rate, thereby reducing both the BER stabilization and the response time of the transmitted power. When the value of R is larger, it indicates that the controller is placing a greater importance on the saving of control input power. This results in the system achieving the control target with less transmit power, thus reducing energy consumption. The optimization objective of the MPC controller is achieved by minimizing the cost function, which typically comprises two components: the weighted sum of squares of the state errors (weighted by the Q matrix) and the weighted sum of squares of the control inputs (weighted by the R matrix). By modifying the values of Q and R, it is possible to adjust the focus and balance of the different optimization objectives. The proposed algorithm exhibits a significantly faster response to jamming compared to existing methods. As shown in Figure 7(a), the system experiences random pulse jamming with a power of 5 dBm, where the probability of jamming in each time slot is 0.01, and the duration is 0.2 s. In Figure 7(b), it is evident that under random pulse jamming, the system rapidly converges to the target bit error rate of \(10^{-4}\) within 0.01 s of jamming. Additionally, the system reliably adjusts to the target value, with the bit error rate gradually decreasing and communication quality returning to the desired level.