Optimal Design of Fractional-Order PID Controllers for a Nonlinear AWS Wave Energy Converter Using Hybrid Jellyfish Search and Particle Swarm Optimization

: In this study, a nonlinear Archimedes wave swing (AWS) energy conversion system was employed to enable the use of irregular sea waves to provide useful electricity. Instead of the conventional PI controllers used in prior research, this study employed fractional-order PID (FOPID) controllers to control the back-to-back configuration of AWS. The aim was to maximize the energy yield from waves and maintain the grid voltage and the capacitor DC link voltage at predetermined values. In this study, six FOPID controllers were used to accomplish the control goals, leading to an array of thirty parameters required to be fine-tuned. In this regard, a hybrid jellyfish search optimizer and particle swarm optimization (HJSPSO) algorithm was adopted to select the optimal control gains. Verification of the performance of the proposed FOPID control system was achieved by comparing the system results to two conventional PID controllers and one FOPID controller. The conventional PID controllers were tuned using a recently presented metaheuristic algorithm called the Coot optimization algorithm (COOT) and the classical particle swarm optimization algorithm (PSO). Moreover, the FOPID was also tuned using the well-known genetic algorithm (GA). The system investigated in this study was subjected to various unsymmetrical and symmetrical fault disturbances. When compared with the standard COOT-PID, PSO-PID, and GA-FOPID controllers, the HJSPSO-FOPID results show a significant improvement in terms of performance and preserving control goals during system instability


Introduction 1.Background and Motivation
Wave energy is one of the most abundant renewable energy resources that can provide enough energy to satisfy the world's needs.According to the World Energy Council, wave energy has an estimated energy of 17.5 PWh/year, which is more than enough to fill the estimated energy requirements of 16 PWh/year globally [1].The benefits of using wave energy include avoiding the need for expensive real estate, and a short distance between wave energy converters and consumption because a large portion of the world lives on the ocean's shores, resulting in lower energy losses; lower investment in transmission lines; and higher power density compared with other renewable resources, such as wind and solar energies.Therefore, a large interest has developed toward convert wave energy into electricity, which led to the invention of numerous wave energy converters, like the Oscillating Water Column, Archimedes Wave Swing (AWS), Wave Dragon, Pelamis Wave Power, Aquabouy, and the Oyster [2].The AWS converter was chosen by the authors for use in this study because it is one of the most regularly used converters and is employed by a well-known company (AWS Ocean Energy) [3,4].
For the AWS, two models were adopted in the literature, namely, the linear and nonlinear models.The linear model is the AWS simplified version that was built by Polinder during an experiment involving AWS in Portugal [5].Since this version of AWS modeling is based on an experiment with limitations on the generated power and many forces were neglected for simplicity, a higher-order nonlinear model was needed for more accurate results.
Numerous studies emphasized the importance of employing nonlinear models to achieve precision in computational outcomes.For instance, a study presented in [6] developed a high-order and efficient numerical technique that was specifically designed for solving the nonlocal neutron diffusion equation, which models neutron transport within a nuclear reactor.In a separate investigation detailed in [7], an H 1 -norm error analysis of a robust ADI method on graded meshes was conducted to address three-dimensional subdiffusion problems.Furthermore, another study [8] examined the preservation of positivity in a nonlinear finite volume method tailored for multi-term fractional subdiffusion equations, particularly on polygonal meshes.These nonlinear models are crucial for understanding reactor behavior and optimizing reactor performance in various applications.
For the AWS, the time domain model of AWS was first introduced in [9] without any practical values that can help build this model.Then, nonlinear model equations were provided by Gieske in [10], along with the parameters' values of the system.Then, the same equations with a grid-connected system and a control system suitable for this nonlinear system were introduced by the authors of this work [11].This model was used in this study.

Literature Overview
A review of the control systems for AWS in the literature is helpful for comprehending the contribution of this work fully.The first control strategy is the conventional PID controller; this controller is adopted in many research works with different optimization algorithms used.For example, in [12], Feng introduced how to obtain the maximum energy from waves using dq current control with PI controllers.In [13], the water cycle algorithm (WCA) [14] was employed to select the gains of six PI controllers to maximize the energy harvest and maintain the DC link capacitor voltage (V DC ) and the voltage at the point of connection with the grid (point of common coupling) (V PCC ) at the reference values.This system required six conventional PI controllers.The results of this work were compared with the genetic algorithm (GA), which showed a much better response.In [15], the Coot optimization algorithm (COOT) [16] was employed to tune the same controllers.In addition, an anti-windup technique that damps the overshooting of V PCC due to the integrator part of the PI controller was added.The results of this algorithm were compared with six other recent algorithms.The conclusion was that the addition of the anti-windup technique enhanced the system's transient behavior.
Similarly, in [17], the salp swarm algorithm [18] was employed to find the optimal gains of the PI controllers, and the system behavior was observed in the presence of irregular waves.In [19], a supercapacitor with a bidirectional converter was connected in parallel to a DC link to provide constant power to the grid.In [20], the supercapacitor technique was also employed in a hybrid wave-solar power plant to provide constant power to a version three (V3) supercharging station that charges Tesla cars.The golden jackal algorithm [21] tuned the gains of the controllers.Alongside the supercharging station, which is related to the DC microgrid, several research works involved the DC grid.For instance, in [22], the gravitational search algorithm [23] was employed to set the optimal gains of three PI controllers that achieved a successful connection to the DC grid.The gravitational search results were compared with the GA during fault conditions.In [11], the six PI controllers were tuned using the hybrid augmented grey wolf optimizer and cuckoo search (AGWO-CS) algorithm [24].The results were compared with PI controllers optimized using COOT and PSO during different grid faults.Moreover, OP4510, along with the RT-Lab program, was employed to conduct a real-time simulation of the AWS system to experimentally validate the accuracy of results.Other than the PID controllers, other techniques were implemented.For example, in [10,25], a model predictive control was employed for the generator-side converter to maximize energy harvesting.For the same objective, neural network models were established in [26], along with different control strategies.

Objectives and Contributions
Our main objective was to implement a control strategy that had not been employed before for the nonlinear AWS grid-connected system.In this regard, we investigated adopting a fractional-order PID (FOPID) in the back-back configuration controllers as a replacement for the conventional PID adopted in the literature for AWS.The FOPID controllers have several merits compared with the conventional PID controllers.For example, the presence of fractional orders in the integrator and differentiator provides more flexible tuning (extra degrees of freedom) that leads to more stability and robustness in highly nonlinear systems, like AWS.Furthermore, as will be proven in this work, the FOPID controllers lead to a better response of the system and reduced overshooting during transient states.Moreover, the FOPID controllers could lead to lower energy consumption as a result of their fine-tuning control action, as in [27].Additionally, the FOPID controllers were employed in different renewable energy resources, like wind energy [28], solar energy [29], fuel cells [30], and hydroelectric [31].In addition, the FOPID control strategy was utilized in the speed control of a PMSM [32].Furthermore, the control of an automatic voltage regulator using FOPID was achieved in [33,34].Also, improved frequency controllers based on the FOPID strategy regulated the frequency of inter-connected power grids [35].Moreover, a modified version of FOPID was used to regulate a hybrid inter-connected system formed of various renewable resources [36].To implement the FOPID control strategy, a comprehensive understanding of the AWS connected to the power grid is mandatory.The AWS device requires a back-back converter configuration for a successful grid connection.The rectifier's controllers minimize generator losses and generate maximum power from waves by controlling the stator dq currents.Furthermore, the inverter's controllers ensure 1 p.u V PCC and V DC by controlling the output dq currents of the inverter.This back-back configuration requires six fractional-order PID controllers.Each one requires five gains to be tuned using a powerful algorithm.In this work, a hybrid algorithm formed from the jellyfish search optimizer and particle swarm optimization (HJSPSO) was employed [37].The HJSPSO is a hybrid algorithm that takes advantage of the exploitation ability of the jellyfish optimizer (JO) [38] in addition to the exploration advantage of the particle swarm optimization algorithm (PSO) [39].The results were compared with two conventional PID controllers that were optimized using the PSO [39] and COOT [16], in addition to controllers' gains that were tuned using the GA.
The work's main contributions are summarized as follows: • A thorough mathematical modeling of the grid-connected AWS, including the backto-back converter controllers, is presented, together with all of the system's parameter values.• The proposed FOPID controllers, the number of gains that must be tuned, and the HJSPSO method utilized for selecting the best gains are all detailed.• The HJSPSO-FOPID controllers were compared with two conventional PID controllers that were tuned using PSO and COOT, in addition to FOPID controllers that were tuned using the GA.• The controllers' effectiveness and reliability were demonstrated by subjecting the grid-connected system to various unsymmetrical and symmetrical fault disturbances.

Organization
For a better understanding of this work, it was divided into multiple sections.In the Section 2, the modeling of the nonlinear AWS with detailed equations and parameters' values is presented.In the Section 3, the grid-connected system with the inverter and rectifier in addition to the control system is elaborated.Furthermore, the FOPID controller strategy is explained.In the Section 4, the optimization algorithm of the HJSPSO, the final errors of the different algorithms, and the optimal gains are also presented.In the Section 5, the system's results during steady and transient states and the performance of each controller are discussed in detail.Finally, the Section 6, namely, the conclusion section, contains a summary of this work and future work suggestions.

Modeling of the AWS Wave Energy Conversion System
The wave energy conversion device consists of a floater that moves upward and downward due to the pressure variation on the floater due to the wave crest and trough.The floater's motion generates electricity by employing a linear synchronous generator that converts the vertical motion into three-phase output power.This work adopts the nonlinear version of the AWS explained in [8].The general expression for the nonlinear model is formulated as follows: In these equations, the velocity of the floater and the current floater position are denoted by v and x, respectively.The gravitational force (F grav ) and the drag force of water (F drag ) are mathematically represented as follows: F grav is the gravitational force pushing the device's floater downward.This force relies on the mass of the floater (m f ) and the gravitational acceleration (g), whereas F drag represents the opposite force acting from the fluid (water) against the motion of the floater.This force is controlled by the outer area of the device floater (S F ), v, and the seawater density (ρ), in addition to the upward drag coefficient (C DUP ) during the positive velocity and downward coefficient (C DDW ) during the negative velocity.Moreover, in the model's main equation, we have the end force (F end ) exerting a large force when the floater hits an end position (θ), after which the floater will be damaged.The spring force (F sp ) that returns the floater to the equilibrium position when no waves are available.The water brakes' force (F wb ) acts when a certain vertical violation is reached.These forces are represented as follows: L eq = γF sp−eq In the previous formulas, the end position, the added mass, and the applied force of the spring at the equilibrium position (x eq ) at which all of the forces cancel each other, the spring length at equilibrium, the hydrostatic force at equilibrium, the angular tuning frequency, the heat capacity rate, the position at which the brakes will be activated, and the brakes' coefficient are all denoted by θ, m add , F sp−eq , L eq , F hS−eq , w n , γ, ψ, and β wb , respectively.The radiation force (F rad ) represents a load on the floater when new radiated waves are created due to the floater's motion, the hydrostatic force (F hS ) represents the force affecting the AWS floater due to the pressure of seawater, and the approximated radiation force adopted (F rad−approx ) are expressed as follows [5,10]: where the fluid's retardation function, the ambient pressure, the tide level, the inner crossectional area of the floater, the depth at mid-position, and the height of the floater are denoted by R t , p amp , η, S f , d f , and h f .F rad−approx is very difficult to calculate precisely, and thus, the expressions obtained by Gieske in ( 11) and ( 12) are adopted [10].Furthermore, the approximated excitation forces of sea waves (F e ) and the generator force (F gen ) can be expressed as follows: In the previous equations, the elevation of the resultant sea waves, the wave number, the sea depth, the current depth, the wave decay factor, the elevation of each wave, the phase shift, the angular frequency, the frequency interval, the peak energy density period, the significant wave height of the irregular waves, the spectral density, the wave amplitude, the number of waves, the generator power, the flux linkage of the permanent magnets of the linear generator's translator, the quadrature axis current, and the stator angular frequency are symbolized by η(t), k, h, d, K p , H i , θ i , ω i , ∆ω i , T p , H s , S(ω i ), A i , N, P, ψ PM , i q , and ω gen ω gen = 2πv λ , respectively.The generated elevation of sea waves and the corresponding excitation force based on the Bretschneider spectrum is shown in Figure 1 [40].magnets of the linear generator's translator, the quadrature axis current, and the stator angular frequency are symbolized by () ,  , ℎ,  ,  ,  ,  ,  ,  ,  ,  , ( ),  , , ,  ,  ,   ( = ), respectively.
The generated elevation of sea waves and the corresponding excitation force based on the Bretschneider spectrum is shown in Figure 1 [40].To understand the expression of  , we need to obtain the generated three-phase terminal voltage ( ) during the positive and negative velocities of the floater. is expressed as follows [15]: To understand the expression of F gen , we need to obtain the generated three-phase terminal voltage (v abc ) during the positive and negative velocities of the floater.v abc is expressed as follows [15]: where the three-phase flux linkage, the self-inductance, the mutual inductance, the inductance matrix, and the resistance of the three-phase system are symbolized by ψ PM−abc , L ss , M, and R.
In addition, the generator dq axis model for controlling the AWS during both the positive and negative motion of the floater is mandatory.This expression can be obtained by applying Park's transformation to the three-phase voltages during both motions.The Park's transformation and the dq currents during both motions are expressed as follows [41]: where the linear generator dq and voltages are symbolized by i d , i q , v d , and v q .Moreover, the synchronous reactance, the width of the generator pole, and the transformation angle from the abc frame to the dq frame are denoted by X s (X s = ω gen L s ), λ, and θ t1 (θ t1 = 2πx/λ − π/2), respectively.Finally, the frictional bearing force (F bear ) due to the friction in the bearings of the floater as a result of the applied horizontal force of waves (F H ) on the AWS floater bearings is expressed as follows: .
where c D , d out , µ, c M , u, and .
u represent the drag coefficient of water, the outer diameter of the floater, the friction coefficient, the inertia coefficient, the horizontal velocity of waves, and the horizontal acceleration of the waves.To sum up, the values of all the nonlinear model coefficients are shown in Table 1 [10,11].

The Grid-Connected System: Block Diagram
The AWS-generated real power is transferred to the power grid via a back-back converter configuration formed of a rectifier and an inverter.The output of the grid-side inverter is filtered using a series RL filter, after which the output will be provided to a power transformer that increases the output voltage to the grid level.Then, the transformer's output is linked to the electrical grid via two parallel transmission lines.The overall system's parameters are listed in Table 2 and the grid-connected system block diagram is depicted in Figure 2.

The Fractional PID (FOPID) Control Strategy
The FOPID controller is considered one of the applications of fractional calculus.This controller is considered an enhanced, extended, and generalized form of the well-known linear PID controller.The FOPID can be mathematically formulated as follows [42,43]: The proportional, integral, and derivative gains are denoted by  ,  , and  , respectively.Furthermore, the integrator's fractional order and the derivative's fractional order are denoted by  and , respectively.Those fractional order values are selected between 0 and 2 [44].To obtain the conventional linear PID controller,  and  are set to 1.

The Back-to-Back Converter Configuration
The back-to-back converter configuration that is used to establish a successful connection with the grid is achieved by using a rectifier connected to a DC link and then connected

The Fractional PID (FOPID) Control Strategy
The FOPID controller is considered one of the applications of fractional calculus.This controller is considered an enhanced, extended, and generalized form of the well-known linear PID controller.The FOPID can be mathematically formulated as follows [42,43]: The proportional, integral, and derivative gains are denoted by K p , K i , and K d , respectively.Furthermore, the integrator's fractional order and the derivative's fractional order are denoted by α and β, respectively.Those fractional order values are selected between 0 and 2 [44].To obtain the conventional linear PID controller, α and β are set to 1.

The Back-to-Back Converter Configuration
The back-to-back converter configuration that is used to establish a successful connection with the grid is achieved by using a rectifier connected to a DC link and then connected to an inverter.The control loops for the rectifier and inverter are shown in Figure 2.
The rectifier's controllers produce the utmost power from sea waves by maintaining the linear generator's dq currents at the reference currents I q−re f and I d−re f [11]: The required control signals are provided by two FOPID controllers that comprise the errors of these dq currents as the input.By using the Park transformation and comparing the reference V a,b,c−re f with a 1 kHz triangular waveform, the required pulses are given to the six IGBTs of the rectifier.For the grid-side inverter, both V PCC and V DC are required to be maintained at 1 p.u.By using a cascaded FOPID configuration, the errors of these voltages are provided to two FOPID controllers in the outer loop that will give the reference values of the dq currents.These values are given to the inner loop consisting of two FOPID controllers that will compare the reference and actual dq currents to generate the appropriate dq voltage signals.
Similar to the rectifier, by using the Park transformation and comparing the reference V a,b,c−re f with the 1 kHz triangular waveform, the required pulses are given to the six IGBTs of the inverter.Unlike the rectifier, in this control loop, the required transformation angle is provided by the phase-locked loop (PLL) by measuring the three-phase voltages at the grid side.

Hybrid Jellyfish Search Optimizer and Particle Swarm Optimization (HJSPSO)
The HJSPSO is a hybrid algorithm that takes advantage of the exploitation ability of the jellyfish optimizer (JO) [38], in addition to the exploration merit of the particle swarm optimization algorithm (PSO) [39].The tuning process alternates between the two algorithms using a time control technique to find the finest solution.Moreover, the hybrid algorithm includes several coefficients that achieve consistency between exploitation and exploration.The hybrid algorithm flowchart is illustrated in Figure 3.

HJSPSO Algorithm Steps
The HJSPSO algorithm starts with the initialization of the positions of jellyfish when searching for food using the following equations: where the ith jellyfish's current position, the gains' lower boundaries, the upper boundaries of the gains, the ith jellyfish's logistic value, the initial logistic value of the jellyfish, the swarm number, and the current iteration are denoted by X i , LB, UB, L i , L i 0 , N, and t, respectively.In addition, η = 4 [37].The fitness values of these positions are evaluated using the following equations [13]: where the generator-side converter integral squared error of the direct axis current (i d ) and quadrature axis current i q ) are denoted by ISE 1 .In addition, the inverter integral squared error of the V PCC , V DC , direct axis current (i dn ), and quadrature axis current i qn ) are combined in ISE 2 .Finally, these integral squared errors form the final objective function (ISE) that is adopted in MATLAB.Due to the same importance of the two controllers, the weighting factors w 1 and w 2 are set to 0.5.

HJSPSO Algorithm Steps
The HJSPSO algorithm starts with the initialization of the positions of jellyfish when searching for food using the following equations: To decide between the selection of PSO or JO for updating the position, the following equations are computed: where r is a random value generated by the code between zero and one and T denotes the iteration number performed by the algorithm.If c(t) ≥ 0.5, then PSO is selected for updating the position as follows: where w min , w max , β 1 , c min , and c max are equal to 0.4, 0.9, 0.1, 0.5, and 2.5, respectively.Also, r 1 and r 2 are random values generated by the code in the range [0 1].Moreover, the velocity of ith particle, the optimal personal position, and the global optimal position are denoted by V i , Pbest, and Gbest, respectively.Otherwise, the JO is used to update the position.However, the JO is divided into different movements: either passive (around its current position) or active (update relative to a randomly selected jth jellyfish).The position update of the two mechanisms is expressed as follows: Step, where X * is the current swarm's best position.The optimal values obtained using the HJSPSO for FOPID, GA for FOPID, the COOT for linear PID, and the PSO for linear PID are given in Table 3.The final errors for each algorithm after 50 iterations are shown in Figure 4.

HJSPSO Algorithm Computational Complexity
The computational complexity of an algorithm refers to the amount of resources required to execute the algorithm, such as time and memory.In the case of the HJSPSO algorithm, its computational complexity can be evaluated by measuring its execution time and comparing it with other optimization algorithms, such as PSO, COOT, and GA.The execution time of an algorithm is affected by various factors, including the size of the problem, the hardware used, and the implementation of the algorithm.The three algorithms, including COOT, PSO, and HJSPSO, had a population size of 20 and iterations of 50.The function evaluations of COOT, PSO, and HJSPSO were calculated as population size multiplied by the number of iterations, yielding a total of 1000 function evaluations.For GA, employing a population size of 15, a generation count of 50, a mutation rate set at 0.01, and a crossover rate of 0.4 were anticipated to yield evaluations closely aligned with those of other algorithms.This configuration is essential for ensuring a valid and equitable comparison between different algorithms.
When comparing the computational complexity of the HJSPSO algorithm with other optimization algorithms, such as PSO, COOT, and GA, it is essential to ensure that the comparison is valid by executing the algorithms on the same hardware specifications.The comparative analysis involved two distinct computing systems.The initial system, namely, the Legion Y520, was equipped with a seventh-generation Intel Core i7-7700HQ processor, a GTX 1060 graphics card with 6 GB GDDR5 VRAM, 16 GB of DDR4 RAM, and a 256 GB SSD.Conversely, the second system, namely, the Legion 5 Pro, featured an eightcore Ryzen 7 5800H processor, an RTX 3070 graphics card with 8 GB GDDR6 VRAM, 16 GB of DDR4 RAM operating at a frequency of 3200 MHz, and a 1 TB SSD.The execution times of different algorithms could provide insights into their relative efficiency and effectiveness in solving optimization problems.Figure 5 can be used to visually represent the comparison of execution times of different algorithms on the two computing systems, allowing readers to quickly understand the differences in their computational complexity.

HJSPSO Algorithm Computational Complexity
The computational complexity of an algorithm refers to the amount of resources required to execute the algorithm, such as time and memory.In the case of the HJSPSO algorithm, its computational complexity can be evaluated by measuring its execution time and comparing it with other optimization algorithms, such as PSO, COOT, and GA.The execution time of an algorithm is affected by various factors, including the size of the problem, the hardware used, and the implementation of the algorithm.The three algorithms, including COOT, PSO, and HJSPSO, had a population size of 20 and iterations of 50.The function evaluations of COOT, PSO, and HJSPSO were calculated as population size multiplied by the number of iterations, yielding a total of 1000 function evaluations.For GA, employing a population size of 15, a generation count of 50, a mutation rate set at 0.01, and a crossover rate of 0.4 were anticipated to yield evaluations closely aligned with those of other algorithms.This configuration is essential for ensuring a valid and equitable comparison between different algorithms.
When comparing the computational complexity of the HJSPSO algorithm with other optimization algorithms, such as PSO, COOT, and GA, it is essential to ensure that the comparison is valid by executing the algorithms on the same hardware specifications.The comparative analysis involved two distinct computing systems.The initial system, namely, the Legion Y520, was equipped with a seventh-generation Intel Core i7-7700HQ processor, a GTX 1060 graphics card with 6 GB GDDR5 VRAM, 16 GB of DDR4 RAM, and a 256 GB SSD.Conversely, the second system, namely, the Legion 5 Pro, featured an eight-core Ryzen 7 5800H processor, an RTX 3070 graphics card with 8 GB GDDR6 VRAM, 16 GB of DDR4 RAM operating at a frequency of 3200 MHz, and a 1 TB SSD.The execution times of different algorithms could provide insights into their relative efficiency and effectiveness in solving optimization problems.Figure 5 can be used to visually represent the comparison of execution times of different algorithms on the two computing systems, allowing readers to quickly understand the differences in their computational complexity.
As illustrated in Figure 5, the COOT and PSO algorithms were executed almost simultaneously, completing one run and tuning 12 gains for the conventional PID controllers.In contrast, the GA and HJSPSO algorithms tuned 30 gains for the FOPID controllers, resulting in longer computational times.Specifically, the HJSPSO took 8.01 h on the Legion 5 Pro and 13.37 h on the Legion Y520, while GA took 18.42 h on the Legion Y520 and 13.37 h on the Legion 5 Pro.Despite this, the HJSPSO outperformed GA in terms of computational time and results, making it a promising choice for the investigated application.
Also, we conducted a comparison of the COOT, PSO, and HJSPSO algorithms on the Legion 5 Pro by optimizing only the 12 gains of a conventional PID controller to assess the complexity of the hybrid algorithm in comparison to PSO and COOT.The results are presented in Figure 6.The computational times of the three algorithms are very similar.However, due to the higher complexity of the HJSPSO algorithm, it required more computational time than the PSO and COOT algorithms.As illustrated in Figure 5, the COOT and PSO algorithms were executed almost simultaneously, completing one run and tuning 12 gains for the conventional PID controllers.In contrast, the GA and HJSPSO algorithms tuned 30 gains for the FOPID controllers, resulting in longer computational times.Specifically, the HJSPSO took 8.01 h on the Legion 5 Pro and h on the Legion Y520, while GA took 18.42 h on the Legion Y520 and 13.37 h on the Legion 5 Pro.Despite this, the HJSPSO outperformed GA in terms of computational time and results, making it a promising choice for the investigated application.
Also, we conducted a comparison of the COOT, PSO, and HJSPSO algorithms on the Legion 5 Pro by optimizing only the 12 gains of a conventional PID controller to assess the complexity of the hybrid algorithm in comparison to PSO and COOT.The results are presented in Figure 6.The computational times of the three algorithms are very similar.However, due to the higher complexity of the HJSPSO algorithm, it required more computational time than the PSO and COOT algorithms.

Nonlinear Grid-Connected AWS System Steady and Transient Responses
In this part, the results are presented for the AWS grid-connected system that was modeled using MATLAB Simulink with a sampling time of 10 microseconds.To verify the robustness of our proposed controller (HJSPSO-FOPID), the system is first presented  As illustrated in Figure 5, the COOT and PSO algorithms were executed almost simultaneously, completing one run and tuning 12 gains for the conventional PID controllers.In contrast, the GA and HJSPSO algorithms tuned 30 gains for the FOPID controllers, resulting in longer computational times.Specifically, the HJSPSO took 8.01 h on the Legion 5 Pro and 13.37 h on the Legion Y520, while GA took 18.42 h on the Legion Y520 and 13.37 h on the Legion 5 Pro.Despite this, the HJSPSO outperformed GA in terms of computational time and results, making it a promising choice for the investigated application.
Also, we conducted a comparison of the COOT, PSO, and HJSPSO algorithms on the Legion 5 Pro by optimizing only the 12 gains of a conventional PID controller to assess the complexity of the hybrid algorithm in comparison to PSO and COOT.The results are presented in Figure 6.The computational times of the three algorithms are very similar.However, due to the higher complexity of the HJSPSO algorithm, it required more computational time than the PSO and COOT algorithms.

Nonlinear Grid-Connected AWS System Steady and Transient Responses
In this part, the results are presented for the AWS grid-connected system that was modeled using MATLAB Simulink with a sampling time of 10 microseconds.To verify the robustness of our proposed controller (HJSPSO-FOPID), the system is first presented

Nonlinear Grid-Connected AWS System Steady and Transient Responses
In this part, the results are presented for the AWS grid-connected system that was modeled using MATLAB Simulink with a sampling time of 10 microseconds.To verify the robustness of our proposed controller (HJSPSO-FOPID), the system is first presented during the steady state without any fault condition.Then, the system was subjected at point "F" depicted in Figure 2 to different faults, including unsymmetrical and symmetrical faults.
The Simulink results involve the current position and velocity of the wave energy conversion system with respect to time, the three-phase currents, the stator dq currents, the generated power, the DC link voltage, the grid voltage, the responses of real and reactive powers at the connection point with the grid (point of common coupling (PCC)), and the dq currents at the grid side.Starting with connecting the system and supplying electrical power to the power grid for 100 s, the simulation results during the steady state of normal operation are provided in Figure 7.
The results show that the dq currents were maintained at the reference values expressed in (36) and (37).This led to the maximization of the generated power similar to [11,20] and the minimization of the stator losses.For the grid-side inverter controllers, both V PCC and V DC were maintained at 1 p.u as intended.Also, the power injected was very close to the generated power; in addition, the reactive power fluctuated around zero.This confirms that the controllers achieved the desired goals.
However, as with any type of controller, the steady-state performance is insufficient to test these controllers' actual performance and reliability.That is why the system was first subjected to a symmetrical 3LG fault after 6.1 s at point F in Figure 2. In this scenario, the breakers successfully cleared the faulty line after 0.1 s of fault occurrence and then successfully reclosed after 0.8 s.The test results are shown in Figure 8. during the steady state without any fault condition.Then, the system was subjected point "F" depicted in Figure 2 to different faults, including unsymmetrical and symm rical faults.The Simulink results involve the current position and velocity of the wave ene conversion system with respect to time, the three-phase currents, the stator dq curren the generated power, the DC link voltage, the grid voltage, the responses of real and active powers at the connection point with the grid (point of common coupling (PCC and the dq currents at the grid side.Starting with connecting the system and supply electrical power to the power grid for 100 s, the simulation results during the steady st of normal operation are provided in Figure 7.A numerical comparison between the performance of these controllers with respect to V PCC , V DC , P PCC , and Q PCC is provided in Table 4.The results show that the HJSPSO-FOPID and the GA-FOPID controllers showed ideal performance in preventing V PCC from overshooting above 1 p.u compared with the conventional PID controllers.Furthermore, V DC had the lowest overshooting and dip in the case of HJSPSO.The P PCC response had the lowest fluctuations and a very quick return to the steady state value of the power in the case of HJSPSO-FOPID.The dq currents at the grid side were also maintained under 1 p.u during the fault conditions.Finally, Q PCC had the best combination of a reasonable balance between overshooting and undershooting compared with the others.For more validation of the FOPID performance, the unsymmetrical fault responses are shown in Figure 9.The results show that the dq currents were maintained at the reference values expressed in (36) and (37).This led to the maximization of the generated power similar to [11] and [20] and the minimization of the stator losses.For the grid-side inverter controllers, both  and  were maintained at 1 p.u as intended.Also, the power injected was very close to the generated power; in addition, the reactive power fluctuated around zero.This confirms that the controllers achieved the desired goals.
However, as with any type of controller, the steady-state performance is insufficient to test these controllers' actual performance and reliability.That is why the system was first subjected to a symmetrical 3LG fault after 6.1 s at point F in Figure 2. In this scenario, the breakers successfully cleared the faulty line after 0.1 s of fault occurrence and then successfully reclosed after 0.8 s.The test results are shown in Figure 8.A numerical comparison between the performance of these controllers with respect to  ,  ,  , and  is provided in Table 4.The performance of the four controllers during the unsymmetrical faults is summarized in Table 5.
Similar to the symmetrical fault results, the HJSPSO-FOPID controllers outperformed the GA-FOPID, PSO-PID, and COOT-PID controllers and prevented V PCC from overshooting above 1 p.u.In summary, without any doubt, the HJSPSO-FOPID had a much better capability in achieving the control goals compared with the GA-FOPID, PSO-PID, and COOT-PID controllers.This made it a more favorable and reliable choice when controlling the grid-connected AWS.
turn to the steady state value of the power in the case of HJSPSO-FOPID.The dq currents at the grid side were also maintained under 1 p.u during the fault conditions.Finally,  had the best combination of a reasonable balance between overshooting and undershooting compared with the others.For more validation of the FOPID performance, the unsymmetrical fault responses are shown in Figure 9.The performance of the four controllers during the unsymmetrical faults is summarized in Table 5.

Conclusions
This paper presents fractional-order PID controllers for successfully connecting the AWS to the electrical power grid and obtaining the maximum energy harvest from waves.These goals require a back-back converter configuration with six controllers.
In this work, six fractional-order PID controllers were proposed as a replacement for the conventional PID controllers.Each FOPID required five gains to be tuned, leading to a total of thirty gains that needed to be adjusted.That is why the HJSPSO optimization algorithm was employed to obtain the controllers' gains that minimized the cost function.The performance of this control system was evaluated against the conventional PID controllers that were tuned using the PSO and COOT algorithms and FOPID controllers that were tuned using the GA.The system was subjected to 3LG, 2LG, LG, and LL grid faults during the success of the breakers' reclosure.The fractional order PID using HJSPSO prevented the grid voltage from overshooting above 1 p.u.The overshooting of V PCC in the three-phase to ground fault was roughly ~0.0 p.u in the cases of HJSPSO-and GA-FOPID.However, the overshooting was ~0.28 p.u using the PSO-PID and ~0.23 p.u using the COOT-PID.Additionally, V DC had the lowest overshooting (~0.006 p.u) and dip (0.01 p.u) in the case of HJSPSO compared with an overshooting of ~0.007 p.u in the GA-FOPID and ~0.03 p.u in both PSO-and COOT-PID.Furthermore, the P PCC had the lowest fluctuations with a rapid return to the actual generated power in the steady state.The grid dq currents were preserved under 1 p.u during the fault conditions.Finally, Q PCC had the best combination of a reasonable balance between overshooting (~0.1 p.u) and undershooting (~0.13 p.u) compared with overshooting (~0.23 p.u) and undershooting (~0.37 p.u) in the PSO-PID case, overshooting (~0.5 p.u) and undershooting (~0.02 p.u) in the COOT-PID case, and overshooting (~0.3 p.u) and undershooting (~0.22 p.u) in the GA-FOPID case.The performance was also assessed in the case of unsymmetrical faults.Similarly, the grid voltage V PCC had an ideal overshooting of ~0.0 p.u in all unsymmetrical faults.For example, in the LG fault, PSO-PID, COOT-PID, and GA-FOPID had overshooting values of ~0.16 p.u, ~0.25 p.u, and ~0.02 p.u, respectively, compared with the ~0.0 p.u overshooting in the case of HJSPSO-FOPID.
Based on the results, the conclusion was that adopting FOPID controllers provided superior results relative to conventional PID controllers.Consequently, this led to an improvement in the system response during grid instabilities.Future research will focus on implementing more complex and nonlinear controllers suitable for the irregular behavior of waves.

Figure 2 .
Figure 2. The grid-connected system block diagram.

Figure 2 .
Figure 2. The grid-connected system block diagram.

Figure 4 .
Figure 4.The final errors for controllers.

Figure 4 .
Figure 4.The final errors for controllers.

Fractal 23 Figure 5 .
Figure 5.Comparison between the execution times of the algorithms.

Figure 6 .
Figure 6.Comparison between the execution times with 12 gains required to be tuned.

Figure 5 .
Figure 5.Comparison between the execution times of the algorithms.

Figure 5 .
Figure 5.Comparison between the execution times of the algorithms.

Figure 6 .
Figure 6.Comparison between the execution times with 12 gains required to be tuned.

Figure 6 .
Figure 6.Comparison between the execution times with 12 gains required to be tuned.

Fractal
Fract.2024, 7, x FOR PEER REVIEW 17 of 23 (d) the real power produced by the linear generator, (e)  and  , (f) the injected real power ( ), and (g) the injected reactive power ( ).

Table 1 .
The values of the model parameters.

Table 2 .
The grid-connected system values.

Table 3 .
The optimal controller gains.

Table 4 .
Summary of the performance of the controllers.

Table 5 .
Comparison between the performances of the controllers.

Table 5 .
Comparison between the performances of the controllers.