# Design and Analysis of a Hybrid MPPT Method for PV Systems Under Partial Shading Conditions
## 2 Materials and Methods
### Design of the Proposed MPPT Algorithms
#### 2.3.2 Design of Kalman Filter and Perturb & Observe Hybrid MPPT Algorithm  
This algorithm is created by combining the Kalman Filter and the Perturb & Observe MPPT algorithm. An efficient hybrid method is created by combining the strengths of both algorithms. The Kalman Filter (KF) is used to make an accurate estimate in cases of uncertainty or noise. The Kalman Filter observes the previous system state and estimates the next states. It consists of two stages; the first stage is the estimation stage. The second stage is the update stage. The Kalman Filter can be expressed mathematically by the following equations [59]. The estimated state is calculated in Equation (9). \[{x_{k}}^{-}=Ax_{k-1}+Bu_{k-1} \tag{9}\]  
The estimated error covariance is as in Equation (10). \[{H_{k}}^{-}=AH_{k-1}A^{T}+Q \tag{10}\]  
The gain matrix calculation is shown in Equation (11). \[K_{k}={H_{k}}^{-}C^{T}\Big{(}{C{H_{k}}^{-}C^{T}+R}\Big{)}^{-1} \tag{11}\]  
The updated state estimate is represented in Equation (12). \[x_{k}={x_{k}}^{-}+K_{k}\big{(}{z_{k}}-C{x_{k}}^{-}\big{)} \tag{12}\]  
Finally, the updated error covariance calculation is shown in Equation (13). \[H_{k}=(I-H_{k}C){H_{k}}^{-} \tag{13}\]  
The expected condition in the anticipated iteration \(k\) from the preceding iteration is denoted by \({x_{k}}^{-}\). The \(k-1\) iteration process's control step is \(u_{k-1}\). The corrected status in the iteration \(k-1\) is \(x_{k-1}\). \(A\) serves as the preceding state's transition phase. The covariance procedure is denoted by \(Q\). One of the constants utilized in the control process is \(B\). The error in covariance is \(H_{k-1}\). We call the covariance prior \({H_{k}}^{-}\). The rectified state is denoted by \(x_{k}\). Output \(z_{k}\) is used for updating the estimation \(x_{k}\). \(K_{k}\) represents the Kalman gain. \(H_{k}\) represents the error's covariance. \(z_{k}\) represents the value being measured. The noise covariance is denoted by \(R\). \(C\) is a system-related constant [59]. The flowchart of the Kalman Filter and Perturb & Observe MPPT algorithm is shown in Figure 5.  
In this hybrid algorithm, the voltage and current measurements of the PV array are first performed. The power value is calculated using these measurements. When the conventional P&O algorithm is considered, the main advantage of this hybrid algorithm lies behind the determination of the change in power. The instantaneous power value is calculated by using the electrical parameters of the PV module and denoted as \(P_{k-1}\) in the algorithm. Then, a future power state is estimated by the Kalman Filter based on past estimations and stated as \(P_{k}\). 3.3 The Proposed Algorithm: Design of the Perturb & Observe and Particle Swarm Optimization MPPT Algorithm  
This algorithm is formed by combining Perturb & Observe and Particle Swarm Optimization MPPT algorithms. A good hybrid method is developed by using the advantageous aspects of both algorithms. The Particle Swarm Optimization (PSO) algorithm is a method created by taking the swarm behavior of living beings in nature as an example. In this algorithm, a cluster of particles is created. Particles move in the solution space. Theseparticles, which are constantly moving, search for the best solution. In this algorithm, the initial positions are determined randomly. Each particle has speed and position information. Position information also represents a solution. Moving particles make their next moves according to their distance and position to the appropriate value. Speed and positions are constantly updated in the algorithm. The algorithm has various parameters, and the algorithm can gain different advantages according to the values of these parameters. As a result, the algorithm continues to iterate until it finds the best result. The PSO algorithm can be expressed mathematically by Equations (14) and (15) [60].