# Modeling and Test Results of an Innovative Gyroscope Wave Energy Converter
## 7 Algorithm Simulation and Experimental Verification
### Simulation of Different Sea Conditions  
The motion state of the waves will change with the water depth. Waves in shallow waters will undergo refraction, reflections, and other phenomena due to the impact of coastal terrain and offshore engineering, which can be regarded as a superposition of regular waves. In deep-water areas, the wave period usually fluctuates very little within a few hours. Therefore, the deep-water waves with a narrow spectrum can be regarded as regular waves with relatively excellent predictability, except for occasional amplitude changes. In this section, we analyze the performance of the modified algorithm under different ocean conditions. The simulation model was established by MATLAB/Simulink according to the design to verify the proposed control algorithm. First, under the rated conditions, the wave period is set to 7 s, the pitch amplitude is 10\({}^{\circ}\), and the simulation time is 25 s. A traditional P&O algorithm with a fixed step size of 1e\(-\)1 and 1e\(-\)2 is established to facilitate comparison. The comparison between the outputs and the modified MPPT is shown in Figure 19.  
As mentioned earlier, the choice of step size is particularly important. It can be clearly seen from Figure 19 that the fixed step method has certain disadvantages. When the step size is slightly larger (step size = 1 \(\times\) 10\({}^{-1}\)), the tracking curve has good rapidity, especially in the initial position. However, there are large power fluctuations in the initial stage of the simulation, which has a great impact on the PTO and is not conducive to stable energy generation. Moreover, there will be a short-term constant output phenomenon at non-MPP (2.5-3.5s), which has a certain impact on the rapidity of the algorithm. As for the small step size (step size = 1 \(\times\) 10\({}^{-2}\)), the tracking characteristics are extremely poor, and the MPP cannot be reached before the end of the entire simulation cycle. This dynamic characteristic is not satisfactory. The modified MPPT method has both good speed and excellent stability under rated conditions. Figure 19: Power comparison chart. Figure 18: Power output comparison of different filtering methods under rated conditions. Some scenarios of varying wave pitch amplitude were simulated to test the control strategy of this article, and the ocean state (the MPP of the system) changes. Among them, Figure 20a,b has increased and decreased step signals at 12.5 s, respectively. In Figure 20c,d, the ramp increase and decrease signals last from 10 to 15 s, respectively. In Figure 20e,f, there are half-sine signals that increase and decrease from 10 to 15 s. It can be seen from Figure 20 that the system starts running from 0 and operates stably around the rated MPP from 8 s, which shows that the filter module effectively solves the system oscillation problem near the MPP. At 10-15 s, the pitch amplitude changes differently. However, after a period of time, the system can accurately find a new MPP and operate stably no matter how the wave energy changes. In order to test the performance of the MPPT proposed in this paper, two modified algorithms are added to the comparison; one comes from [9], and algorithm 2 comes from [10]. Figure 21 shows the power output comparison of different methods under rated sea conditions. Figure 21a shows the angular displacement and angular velocity of the flywheel output under rated sea conditions, both of which change smoothly and have the same period. Figure 21b shows the power output of different methods under this sea state. The initial step of algorithm 1 is large, which presents an excellent dynamic response. However, in the process of chasing MPP, a strong oscillation is not conducive to energy output. The proposed algorithm has both rapidity and smooth power output, which avoids system oscillation. The initial step size of algorithm 2 is small, and it takes the longest time to reach the position of MPP, but the output curve of this method is relatively stable.