## 3 Flywheel Electrical Model
### Simulation Scheme  
The flywheel system model is implemented in a Matlab/Simulink(r) code using the parameter values provided in Table 3. It is worth noticing that at \(\Omega_{max}\) the mechanical losses have the most relevant contribution (\(\approx\)1530 W); on the contrary, the ohmic losses are the most important item at \(\Omega_{min}\), ranging from about 435 W to 610 W according to the temperature value.  
Figure 11 shows the scheme implementing the mechanical and the thermal equations (n\({}^{\circ}\) eqq.), as well as the power loss models (colored blocks). The flywheel operation is governed by a saturated PID controller that tunes the current value according to the error between the reference and the output electric power. For a prompter system response, the required power sign is preemptively assigned to \(T_{em}\) value. Finally, the calculation of the mechanical loss torque \(T_{m}=P_{m}/\Omega\) enables the step-by-step integration of the mechanical equation \(Id\Omega/dt=-(T_{em}+T_{m})\) given the initial speed \(\Omega_{0}\). The block 'Speed check' controls prevents the flywheel exceeding the speed limits, excluding it from the power supply if overspeed occurs.  
Figure 11: Simulink implementation of the flywheel system model.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Quantity** & **Value** & **Quantity** & **Value** \\ \hline Phase resistance & \(R_{s,40^{\circ}}=0.3\) m\(\Omega\) & Thermal time constant & \(\tau_{th}=60\) min \\ Torque constant & \(kT_{A40^{\circ}}=0.079\) Nm / A & Thermal capacitance & \(C_{th}=4\) 10\({}^{4}\) J/\({}^{\circ}\)K \\ PM temperature coefficient & \(k_{Br}=-0.2\) \%/\({}^{\circ}\)C & Reference speed & \(\Omega^{*}=32\),500 rpm \\ Mechanical loss & \(a_{fr}=0.0272\) Ws/rad & & \(b_{t\eta_{s},40^{\circ}}=0.081\) Ws/rad \\ coefficients & \(a_{w}=3.63\cdot 10^{-8}\) Ws\({}^{3}\)/rad\({}^{3}\) & Core loss coefficients & \(b_{\alpha,40^{\circ}}=1.3\cdot 10^{-8}\) \\  & & & Ws\({}^{2}\)/rad\({}^{2}\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Parameters of the flywheel system model.  
Figure 12 reports some simulation results to check the proper flywheel operation as a stand-alone storage system. The power reference is intentionally created by a random function providing steep electrical power variations with both positive (generating) and negative (motoring) values. The power levels are within the flywheel rated power; the initial speed is fixed to \(\Omega_{0}=(\Omega_{min}+\Omega_{max})/2\). The curves evidence that:  
* the power error is very low, confirming the current control effectiveness for the output electrical power regulation;
* the speed suitably tracks the requested accelerating and decelerating conditions; however, the prevalent output power requirement during this test results in a temporarily switch off of the flywheel system to recharge it;
* the temperature increase is more significant during the first part of the test because of the higher losses, particularly the mechanical ones; after that, it stabilizes to values compatible with short operating cycles.  
As for the possible thermal issues, a temperature control can be implemented, which switches off the flywheel to prevent the temperature exceeding the maximum allowable value. It is worth pointing out that both \(P_{Fe}\) and \(P_{m}\) occur even under the idle condition; additional cooling could therefore be possibly required to lower more quickly the EM temperature to a satisfactory value.