# Two-Degrees-of-Freedom (2 DOF) Magnetic Spring-Based Electromagnetic Energy Harvester
## 3 Magnetic Restoring Force of 2 DOF-Based Energy Harvester  
The magnetic poles of each magnet are oriented to repel the adjacent magnet, causing the floating magnets to be suspended by the nonlinear restoring force. The system's nonlinear behavior allows the linear response to be modified by simply varying the position of the floating magnet between the top (fourth magnet) and bottom (first magnet) magnets. The magnetic force between the first magnet (fixed magnet) and second magnet (floating magnet) can be written as it was in [21; 22],  
\[F_{b}=\frac{\mu_{0}Q_{1 st}Q_{2 nd}}{4\pi r_{b}{}^{2}} \tag{1}\]  
where \(r_{b}\) is the distance between the first and second magnet poles. \(Q_{1 st}\) and \(Q_{2 nd}\) are the magnetic field intensities of the first and second magnets, respectively. The permeability of the air is \(\mu_{0}\). Similarly, Equation (1) can be rewritten for the second magnet (first floating magnet from the bottom magnet) and third magnet (second floating magnet) as  
\[F_{m}=\frac{\mu_{0}Q_{2 nd}Q_{3 rd}}{4\pi r_{m}{}^{2}} \tag{2}\]  
Figure 2: Magnetic system where the two magnets are floating. where \(r_{m}\) is the distance between the second magnet and third magnet poles. Equation (1) can also be rewritten for the third magnet (second floating magnet) and fourth magnet (top fixed magnet) as  
\[F_{b}=\frac{\mu_{0}Q_{3 rd}Q_{4 th}}{4\pi{r_{t}}^{2}} \tag{3}\]  
where \(r_{t}\) is the distance between the third magnet and fourth magnet poles. For the case of in-plane movement, the expression for \(r_{m}\) and \(r_{b}\) can be written as  
\[r_{m}=H_{s1}-(r_{b}+H_{2}) \tag{4}\]  
Moreover, for the case of in-plane movement, the expression for \(r_{m}\) and \(r_{t}\) can be written as  
\[r_{t}=H_{s2}-(r_{m}+H_{3}) \tag{5}\]  
where \(H_{s1}\) is the distance between the upper surface of the bottom magnet and the lower surface of the third magnet. On the other hand, \(H_{s2}\) is between the upper surface of the second magnet and the lower surface of the fourth magnet. \(H_{1},\ H_{2}\), \(H_{3}\), and \(H_{4}\) are the heights of the first, second, third, and fourth magnets, respectively. To determine the magnetic restoring force for the first moving magnet, the second moving magnet is considered a fixed magnet. To measure the magnetic restoring force for the second moving magnet, the first moving magnet is considered a fixed magnet. The distance \(y_{2}\) represents the first moving magnet (second magnet), and the distance \(y_{3}\) represents the second moving magnet (third magnet); the resultant magnetic forces or magnetic spring restoring forces (\(F_{res1}\) and \(F_{res2}\)) applied to the moving magnets can be calculated as  
\[F_{res1}=F_{m}-F_{b}=\frac{\mu_{0}Q_{2 nd}}{4\pi}\left(\frac{Q_{3 rd}}{(r_{m}-y_{ 2}(t))^{2}}-\frac{Q_{1 st}}{(r_{b}+y_{2}(t))^{2}}\right) \tag{6}\]  
\[F_{res2}=F_{t}-F_{m}=\frac{\mu_{0}Q_{3 rd}}{4\pi}\left(\frac{Q_{4 th}}{(r_{t}-y_{ 3}(t))^{2}}-\frac{Q_{2 nd}}{(r_{m}+y_{3}(t))^{2}}\right) \tag{7}\]  
The magnetic spring's restoring forces can be calibrated from the calculation of the restoring force [23]. A Taylor series can express the Equations (6) and (7) as  
\[F_{res1}=k_{1}y_{2}+\alpha_{1}{y_{2}}^{2}+\lambda_{1}{y_{2}}^{3} \tag{8}\]  
\[F_{res2}=k_{3}y_{3}+\alpha_{3}{y_{3}}^{2}+\lambda_{3}{y_{3}}^{3} \tag{9}\]  
where \(k_{1}\) and \(k_{3}\) are the linear constants. The nonlinear constants are denoted by \(\alpha_{1}\), \(\lambda_{1}\), \(\alpha_{3}\), and \(\lambda_{3}\). Figure 3 presents the analytical and numerical magnetic restoring forces for different positions of the first and second floating magnets. The distance between the second magnet (first floating magnet) and first magnet (fixed magnet) is smaller than the distance between the second (first floating magnet) and third magnet (second floating magnet). Therefore, the magnetic restoring force is higher between the first and second magnets (second floating magnet) than the restoring force between the second and third magnets, as presented in Figure 3a.