top of page
Writer's picturelms editor

Simulation of PID Controller Tuning with Jellyfish Search Algorithm

Simulation of PID Controller Tuning with Jellyfish Search Algorithm

Introduction to the PID Controller and Optimization Objective

The Proportional-Integral-Derivative (PID) controller is one of the most widely used control systems in engineering. It adjusts the control input based on three components: the proportional (P), integral (I), and derivative (D) terms. The challenge in using a PID controller lies in tuning these three parameters—KP (proportional gain), KI (integral gain), and KD (derivative gain)—to achieve optimal system performance.

The goal of the optimization process is to find the best values for these parameters that minimize the system's error. In this case, we are using the mean absolute error (MAE) as the objective function. By minimizing this error, the PID controller can more accurately control the system and track the desired reference signal.

What is the Jellyfish Search Algorithm?

The Jellyfish Search Algorithm is a novel optimization technique inspired by the behavior of jellyfish in the ocean. Jellyfish exhibit unique movement patterns that include both passive and active motion, as well as large-scale group behavior known as jellyfish blooms. These movements help jellyfish navigate and adapt to their environment, which is mathematically modeled in the Jellyfish Search Algorithm.

The algorithm uses these natural behaviors to explore the search space and find optimal solutions to complex problems. For PID controller tuning, this means it can effectively find the best combination of KP, KI, and KD values by mimicking the jellyfish's behaviors, leading to a more efficient search for the optimal solution.

Setting Up the MATLAB Simulation

In the simulation, we use a second-order plant controlled by a PID controller. The output of the plant is compared with a reference signal, and the error between the two is processed by the PID controller. The controller adjusts the output to reduce this error and improve the system’s response.

The optimization process involves adjusting the parameters of the PID controller—KP, KI, and KD—to minimize the MAE. To achieve this, we will employ the Jellyfish Search Algorithm, which will iteratively refine the parameters until the system's performance is optimized.

Implementing the Jellyfish Search Algorithm

In MATLAB, the implementation of the Jellyfish Search Algorithm starts by defining the population size and setting the maximum number of iterations. Each iteration evaluates the performance of the current PID parameters (KP, KI, and KD) by calculating the MAE. The algorithm then adjusts the parameters based on the results of the evaluation.

The algorithm operates through several phases:

  1. Problem Definition: The first step is to define the optimization problem, which includes setting the objective function (MAE) that the algorithm will minimize.

  2. Jellyfish Parameters: The algorithm defines the behavior of jellyfish in the ocean, which includes their passive and active motion patterns.

  3. Fitness Calculation: In each iteration, the algorithm calculates the fitness of the current solution (i.e., the MAE) and adjusts the PID controller parameters based on this fitness.

How the Jellyfish Search Algorithm Works

Once the problem is defined, the Jellyfish Search Algorithm proceeds through a loop where it simulates the jellyfish’s movements. During the passive motion phase, the jellyfish "drift" with the ocean currents. In the active motion phase, they search for better solutions by adjusting their movement. The algorithm evaluates the fitness of each solution by calculating the MAE, and this value is used to update the parameters for the next iteration.

The blooming behavior of jellyfish also plays a role in optimizing the search process. By forming large groups, jellyfish can more efficiently explore their environment. Similarly, the algorithm uses group behavior to refine the search for the optimal PID parameters, ultimately minimizing the error and improving the controller’s performance.

Final Results and Simulation

After 100 iterations of the Jellyfish Search Algorithm, the optimized values for KP, KI, and KD are determined. These values are then input into the MATLAB simulation model. The optimized PID controller parameters are applied, and the resulting system response is significantly improved, with the error minimized and the plant tracking the reference signal more accurately.

Conclusion

The Jellyfish Search Algorithm offers a unique and effective method for optimizing the parameters of a PID controller. By mimicking the natural behavior of jellyfish, this optimization technique efficiently searches for the best PID parameter values, resulting in improved system performance. The MATLAB simulation demonstrates how the Jellyfish Search Algorithm can be applied to tune a PID controller, providing better control and reduced error in the system.

6 views0 comments

Comments


bottom of page