# Modeling and Simulation of a Wave Energy Converter _Nwave_
## 3 Modeling of the Device's Dynamics  
### Buoy-Counterweight Modeling  
A buoy and PTO module are mechanically connected by the rope tensions that are applied by vector decomposition in each moving direction from the relationship between the buoy's posture and pulleys on the sea-bed. In this chapter, to derive this relationship easily, we assume a two-dimensional analysis of the device with two-mooring points. This analysis has the advantage that intuitive consideration can be made by matching the dimension of the traveling direction of the waves and the movement dimension of the mooring ropes. The two-dimensional analysis will be a comparative case that can prove the validity of the complex three-dimensional analysis results. For this reason, we assume a discus-shaped model with mooring points connected by two points that are away from the center of the buoy by \(r\); as seen in Figure 3, even the actual device is a discus-shaped buoy with the mooring point connected by three different points. The buoy has a radius \(R\) and is submerged a distance of \(d\) since it is connected by the counterweight. For the sake of convenience, let us name the left and right mooring ropes as 1, 2, respectively, and the related variables will follow suit. The origin of the coordinate is on the water surface; the water depth is \(h\); and fixed pulleys are away from the origin by \(D\). In two dimensions, the buoy only moves in the directions of surge, heave and pitch, corresponding to the movements in the directions of \(x\), \(y\) and \(\theta\), respectively. The buoy's posture is \(X=[x,y,\theta]^{T}\); the lengths of the mooring ropes are \(l_{1}\) and \(l_{2}\), and the angles of them are \(q_{1}\) and \(q_{2}\), respectively. Then, the angles and lengths of the mooring ropes with the posture of the buoy have a geometric relation as follows:  
\[ \begin{array}{l}(-D,-h)+(l_{1}\cos q_{1},l_{1}\sin q_{1})+(r\cos\theta,r\sin \theta)=(x,y)\,,\\ (D,-h)+(-l_{2}\cos q_{2},l_{2}\sin q_{2})+(-r\cos\theta,-r\sin\theta)=(x,y)\,.\end{array}  \tag{1}\]  
The mooring ropes supply the buoy with tension \(T_{1}\) and \(T_{2}\) that are expressed as follows:  
\[ \begin{array}{l}T_{1}=m_{1}\ddot{l_{1}}+m_{1}g+f_{1},\\ T_{2}=m_{2}\ddot{l_{2}}+m_{2}g+f_{2}.\end{array}  \tag{2}\]  
Figure 3: Geometries of the buoy and ropes. \(m_{1}\) and \(m_{2}\) are the mass of the counterweights connected to Ropes 1 and 2, respectively, since this counterweight only moves vertically (acceleration of gravity \(g\)). \(f_{1}\) and \(f_{2}\) are the load forces related to the generator. Then, the dynamic equation of the buoy is expressed as follows [10]:  
\[M_{b}\ddot{X}\left(t\right)+F_{r}\left(t\right)+K_{h}X\left(t\right)=F_{e} \left(t\right)+H\left[T_{1}\ \ T_{2}\right]^{T}. \tag{3}\]  
Here, \(M_{b}\) is the mass and inertia matrix of buoy and the added mass effect, and \(H\) is the geometric matrix related to how the rope's tensions \(T_{1}\) and \(T_{2}\) that affect the movement of the buoy. These are expressed as follows:  
\[M_{b}=diag\left[m_{b}+\upmu_{x}\left(\infty\right),\ m_{b}+\upmu_{y}\left( \infty\right),\ J_{b}+\upmu_{\theta}\left(\infty\right)\right], \tag{4}\]  
\[H=\left[ \begin{array}{ccc}-\cos q_{1}&\cos q_{2}\\ -\sin q_{1}&-\sin q_{2}\\ r\sin\left(q_{1}-\theta\right)&-r\sin\left(q_{2}+\theta\right)\end{array} \right]. \tag{5}\]  
\(m_{b}\) and \(J_{b}\) are the buoy's mass and the buoy's inertia in the direction of pitch movement, respectively. \(\upmu_{x}\), \(\upmu_{y}\) and \(\upmu_{\theta}\) are the added masses for the buoy's surge, heave and pitch motion, respectively. Diag[] is the diagonal matrix. \(F_{e}(t)\) is the excitation force vector as follows:  
\[F_{e}=\int_{-\infty}^{\infty}\left[ \begin{array}{ccc}-f_{ex}\left(t-\tau \right)^{T}&f_{ey}\left(t-\tau\right)^{T}&f_{e\theta}\left(t-\tau\right)^{T} \end{array} \right]^{T}\psi\left(\tau\right)d\tau, \tag{6}\]  
where:  
\[