# Anti-Jamming Power Control Algorithm for Wireless Communication Systems Based on MPC
## 3 Design of the MPC Controller  
The MPC controller is a model-based optimal control method. The MPC controller calculates the optimal control quantity at any given moment by predicting the future behavior of the system in order to achieve the control objective. The MPC controller is capable of dealing with multiple-input multiple-output problems and control quantity constraints and is therefore suitable for complex network control systems. In wireless communication systems, the MPC controller is capable of predicting and adjusting the transmit power in accordance with the real-time state of the system and the network environment, thereby enabling the system to cope with sudden interference. By dynamically adjusting the transmit power, the MPC controller can ensure the stability and reliability of the communication signals, thus maintaining a stable bit error rate during communication transmission [16]. To mitigate the impact of malicious jamming on wireless communication system reliability, an MPC-based state feedback controller is integrated into the system's feedback loop. As shown in Figure 4, at each time step, the target SJNR is calculated based on the target bit error rate and used as the reference trajectory for prediction. The system state at the current time step is used as the initial state for the next step, and the optimal transmission power for the future time period is determined iteratively online. This process can be formulated as a constrained quadratic programming problem [17]. The system's target equilibrium point is \([x_{r}(t),u_{r}(t)]\), where \(x_{r}(t)\) represents the target SJNR and \(u_{r}(t)\) denotes the target transmission power, defined as:  
\[\widetilde{x}(k)=x(k)-x_{r} \tag{9}\]  
\[\widetilde{u}(k)=u_{1}(k)-u_{r} \tag{10}\]  
By minimizing the cost function, an optimal control law is derived which enables the tracking of the system to output SJNR to the target SJNR. Therefore, the optimal control  
Figure 4: Block diagram of the MPC-based state feedback controller. problem is transformed into a standard form of quadratic programming. The quadratic performance index is defined as the cost function:  
\[J=\sum\
olimits_{k=0}^{N-1}{\left[{{E_{k}}^{\mathsf{T}}Q{E_{k}}+{U_{k}}^{\mathsf{ T}}R{U_{k}}}\right]}+{E_{N}}^{\mathsf{T}}{F{E_{N}}} \tag{11}\]  
Here, \(F\), \(Q\), and \(R\) represent the terminal weight, state weight, and input weight of the system, respectively. \({E_{k}}^{T}\) represents the state error, \({U_{k}}\) represents the output, and \({E_{N}}\) represents the terminal error. This is derived by substituting \(\widetilde{x}(k)\) and \(\widetilde{u}(k)\) into the quadratic Equation (10) as the state error and output error, respectively:  
\[J=\sum\
olimits_{k=0}^{N-1}{\left[{\widetilde{x}(k+i|k)^{\mathsf{T}}Q \widetilde{x}(k+i|k)+\widetilde{u}(k+i|k)^{\mathsf{T}}\mathrm{R}\widetilde{u}( k+i|k)}\right]}+\widetilde{x}(k+N|k)^{\mathsf{T}}\mathrm{F}\widetilde{x}(k+N|k) \tag{12}\]  
In this expression, \(\widetilde{x}(k+i|k)\) represents the predicted value of the state variables of the system at time \(k+i\), while \(\widetilde{u}(k+i|k)\) indicates the transmission power of the system at time \(k+i\). The goal is to determine the input \(\widetilde{u}(k)\) of the system. To achieve this, it is necessary to eliminate the state term \(\widetilde{x}(k)\). First, the initial value of the system is defined as:  
\[\widetilde{x}(k|k)=\widetilde{x}_{k} \tag{13}\]  
The present SJNR of the system is determined through state estimation, which serves as the initial value of the system. Based on this initial value and the state equation, it is possible to determine the predicted values for future time steps. \(N\) represents the prediction horizon. At time \(k\), the system will predict the trend of changes in state variables within the horizon \(N\).