## 6 Analysis and Control of FESS
### System Operation and Control Strategy  
A simplified topology of the FESS connected to an electrical supply with a bi-directional power flow is shown in Figure 4. The FESS and the grid are connected through a DC-link with the help of converters. Converter 1 (C1) is to control the power flow from/to the grid and converter 2 (C2) is for controlling the MG. The working principle of the FESS can be discussed in three modes of operation: charging mode, discharging mode, and standby mode. During charging, C2 draws power from the DC-link to run the MG and accelerate the flywheel. MG is operating as a motor, C2 as an inverter, and C1 as a rectifier to maintain the DC voltage fixed. While discharging, the operation of both converters is inverted, and the flywheel is decelerating to maintain the DC-link voltage by drawing energy from the flywheel. The standby mode is when the flywheel spins at an optimum speed and no energy conversion occurs. The system charging control is performed based on field oriented control (FOC) using space vector pulse width modulation (SVPWM) [80]. FOC, also referred to as vector control, is one of the controlling methods for variable speed drives, particularly those using permanent magnets. The method enables controlling of the torque and flux of the three phase AC motors by controlling the current. The three phase system is transformed into a two coordinate (\(dq\)) time invariant system that allows decoupled control of torque and flux of PMSM, similar to a DC machine [41; 66; 81]. SVPWM is used for controlling and switching the gates of the inverter semiconductors to produce a smooth output waveform [78; 80]. The control block of the PMSM-Flywheel in both charging and discharging states is represented in Figure 5. The system is controlled by an inner current loop and an outer speed/voltage loop using PI controllers. In the inner control loop the three phase stator currents are measured and transformed to two phase \"\(dq\)\" currents using the Clark-Park transformation. The decoupled \"\(dq\)\" currents are controlled separately, with PI current controllers to control flux and torque. The \(d\)-component of the current is the flux producing component, and \(q\)-component is the torque producing component [82]. Similarly, in the outer loop, the PMSM speed is measured and regulated by comparing it with the reference speed. The output of the speed PI regulator is applied as the reference \(q\)-current component for the current PI regulator to control the torque accordingly. Figure 4: Back-to-back bidirectional power converters. Figure 5: Block diagram of flywheel energy storage systems (FESS) controlling scheme. During discharge, when the DC-bus voltage drops below a threshold value, a voltage controller is used to adjust and control the system current to keep the DC-link voltage fixed. The outer speed loop in charging mode is replaced with the outer voltage loop in discharging mode. Similar to the motoring mode where the speed is regulated by the extracting energy from the source, the generating mode allows the DC-link voltage to be measured and regulated by comparing it with the reference voltage. The output of the voltage PI controller is regulated as an input for the current PI controller. As the FESS operates between a minimum and maximum speed range for better utilisation of its useful energy, the speed loop is required to determine and monitor the flywheel's state of charge. The status of the rotor speed and position in any state of operation is essential for controlling flywheel's torque and flux, in order to operate within the specified speed range. On the other hand, the DC bus voltage can be maintained by controlling the power from the PMSM and hence its torque, provided that the motor speed is known. Based on the control strategy explained, the FESS model is implemented in the MATLAB/SIMULINK environment as shown in Figure 6. The interconnected DC-bus is supplied by either the electrical grid or the flywheel system, depending on whether the system is in charging or in discharging state.