# Modeling a Wave Energy Harvester for Supplying Data Buoys
## 2 Materials and Methods
### Bang-Bang Mode  
Since the bang-bang mode of operation is the most important from a practical point of view, attention will be focused on investigating whether this operation is stable and how it depends on the main parameters of the harvester. In the time interval between the instant the cylinder detaches from one end of the track and the instant it reaches the other end of the track, the forces of the track ends are zero and Equations (4) and (8) reduce to  
\[\ddot{x}=-\frac{g}{k}\text{sin}\,\alpha_{M}\text{sin}\,(\omega\,t+\phi_{0}) \tag{9}\]  
where \(\omega=2\pi/T\). In Equation (9), the electromagnetic force has been neglected compared to the weight force, which usually happens in practical cases and will be shown in Section 3. As shown in Figure 2, at the instant \(t_{1}\) of detachment of the cylinder from the track end 1, its position is \(x(t_{1})=\ x_{1}\), its velocity is zero, \(\dot{x}(t_{1})=0\) and the instantaneous phase of the acceleration is \(\phi=\omega\ t_{1}+\phi_{0}\). Note that, according to (8), \(\phi\) represents also the actual inclination of the track at \(t=t_{1}\). \(\phi=0\) means that the track is horizontal and thus the acceleration is null. For \(0<\phi<\pi\), the acceleration is directed toward the track end 2 and the cylinder will start to move. For \(\phi=\pi/2\), the track is at its maximum inclination angle, i.e., \(\alpha_{M}\), and the acceleration takes its maximum absolute value. For \(-\pi<\phi<\pi\), the acceleration is directed toward the track end 1 and the cylinder cannot move. Let us now calculate two characteristic quantities, the so-called \"inversion length\", i.e., the length of the track that can be traveled by the cylinder before it changes the traveling direction, and the \"half-period length\", i.e., the length of the track traveled by the cylinder in a time interval equal to \(T/2\). By integrating (9), it is possible to obtain the expression of the velocity of the center of mass  
\[\dot{x}=\frac{g\text{sin}\,\alpha_{M}}{k\,\omega}[\text{cos}\,(\omega\ t+\phi _{0})-\text{cos}\,\phi] \tag{10}\]  
and the expression of the position  
\[x=x_{1}+\frac{g\text{sin}\,\alpha_{M}}{k\,\omega^{2}}[\text{sin}\,(\omega\ t+\phi_{0})-\omega\ (t-t_{1})\text{cos}\,\phi-\text{sin}\,\phi] \tag{11}\]  
Figure 3: Time waveforms of the position \(x\) of the center of mass of the magnetic cylinder for three different sets of the parameters \(T\), \(L\) and \(\alpha_{M}\). Blue lines at \(x=x_{1}\) and \(x=x_{2}\) denote the ends of the track. (**a**) Case of irregular behavior. (**b**) Case of periodic motion of the center of mass with period equal to a multiple of the period \(T\) of the track oscillation. (**c**) Case of periodic motion of the center of mass with period equal to the oscillation period \(T\) (“bang-bang” mode of operation). The length of the track that can be traveled by the cylinder before it changes the traveling direction can be calculated by imposing \(\dot{x}=0\) in (10). It results that the time instant in which the cylinder reverses direction is the following:  
\[t_{inv}=t_{1}+2\frac{\pi-\phi}{\omega} \tag{12}\]  
and the traveled length until the inversion, i.e., the inversion length \(L_{inv}=|x(t_{inv})-x_{1}|\), is  
\[L_{inv}=\frac{2\,g\sin\alpha_{M}}{k\,\omega^{2}}[\sin\phi+(\pi-\phi)\text{cos }\phi] \tag{13}\]  
On the other hand, the length of the track traveled by the cylinder in a time interval equal to \(T/2\) can be determined by evaluating (11) in \(t=t_{1}+T/2\). The half-period length \(L_{T/2}=|x(t_{1}+T/2)-x_{1}|\) is thus equal to  
\[L_{T/2}=\frac{2\,g\sin\alpha_{M}}{k\,\omega^{2}}\Big{[}\sin\phi+\frac{\pi}{2} \text{cos}\phi\Big{]} \tag{14}\]  
Note that the quantities \(L_{inv}\) and \(L_{T/2}\) are a function of the instantaneous phase at the detachment instant, \(\phi=\omega\ t_{1}+\phi_{0}\), through trigonometric functions and the same multiplication coefficient.