A Lab-scale Flywheel Energy Storage System: Control Strategy and Domestic Applications

: Flywheel is a promising energy storage system for domestic application, uninterruptible power supply, traction applications, electric vehicle charging stations, and even for smart grids. In fact, recent developments in materials, electrical machines, power electronics, magnetic bearings, and microprocessors offer the possibility to consider ﬂywheels as a competitive option for electric energy storage, which can be of great interest for domestic applications in the near future. In this paper, a grid-tied ﬂywheel-based energy storage system (FESS) for domestic application is investigated with special focus on the associated power electronics control and energy management. In particular, the overall PMSM-based ﬂywheel conﬁguration is reviewed and a controlling strategy was experimentally implemented using DS1104 controller board from dSPACE. Two case studies were considered for power peak shaving and power backup at domestic level. A lab-scale prototype was built to validate the proposal. The achieved results are presented and discussed to demonstrate the possibilities offered by such an energy storage system for domestic application.


Introduction
Renewable energy technologies, mainly wind turbines, PV, and geothermal, are effective answers for increasing energy demand and CO 2 emission reduction purposes. Unfortunately, renewables are intermittent in nature and depend on weather conditions. Moreover, electric vehicles (EVs) are currently gaining attention as an effective solution to reduce the transportation sector dependency on oil. The increase in the EV fleets in the near future may cause severe congestion of the main grid since these extra electrical loads should have an impact on the distribution grid [1]. This fact increases the need for electric load microforecasting modules development to be integrated into the energy management system for controlling low voltage renewable energy resources of small residential or tertiary prosuming units, and enabling demand response [2][3][4]. Moreover, energy storage systems (ESS) are required to smooth consumers power consumption, ensure constant electricity supply, and improve stability, reliability, efficiency, and power quality of the main grid.
ESSs in electrical power systems offer several possibilities such as electric energy time shift, load following, electric service reliability, electric service power quality, renewable time shift, and capacity firming [3]. There is a diversity of mature and emerging technologies for energy storage such as pumped hydro, compressed air energy storage, batteries (Sodium-Sulfur, Lead-Acid, Nickel-Cadmium, Lithium-Ion, and Redox-Flow), super conducting magnetic energy storage (SMES), supercapacitors, and flywheels [5,6]. The latter, with their high cycle life, low response time, and high power density [7], are good candidates for domestic and industrial applications [8] and even utility grid voltage and frequency regulation [9,10].
FESS are categorized as either low-speed (up to 10, 000 rpm) or high-speed (above 10, 000 rpm). Commercially available low-speed FESS utilizing metal rotor are characterized by low energy density. The most common application for this kind of FESS is enhancing power quality by providing ride-through of interruptions up to few tens of seconds, bridging the shift from one power source to another and acting as an uninterruptible power supply (UPS). Currently, high-speed composite materials-based FESS have gained attention of industry and researchers [11]. In fact, high directional strength properties of composites materials, combined with their comparatively low density and the advancements in electrical machines, mainly permanent magnet synchronous machine (PMSM), and power electronics pave the way for FESS optimal design for a specific energy [12]. It should be pointed out here that FESS capacity is limited by the mechanical properties (shape, strength of material, mass density, and angular velocity) of the flywheel rotor and the limit for power rating is set by the electrical machine and power electronics.
FESS technology has been widely investigated in academia for several applications, such as renewable energy resources output power smoothing and power quality improvement [13][14][15], automotive and railway transportation [16,17], electric vehicles fast charging stations (FCS) [18,19], and even for microgrids [20,21]. PMSM-based flywheels offer several advantages and possibilities in terms of inherent active power transfer, peak power shaving for grid congestion prevention, and reactive power compensation capability. The former capability is characterized by fast dynamic response (the time-constant of the reactive power can be as low as few milliseconds) and can be used to perform grid voltage control. Furthermore, frequency control at distribution grid level can be achieved by controlling the charge/discharge of a group of flywheel systems. Moreover, flywheels with their voltage and frequency control capabilities can significantly sustain the electric network voltage in the case of grid local events (voltage sag or swell) and thus may efficiently support the power system stability (supporting grid in case of sudden and transient events), enhance dynamic behavior, and provide high-quality power [21,22].
Flywheel-based energy storage has been explored for over a decade, particularly to manage short power deficits [23]. Even applications such as power peak shaving and power backup are of interest with the evolution of materials used for flywheels. However, usability of flywheels for long-term power needs (in the order of minutes) is of interest due to life cycle advantages [24,25]. For such applications, flywheel systems suffer from some drawbacks mainly related to low energy density and high price. With the increase of electric energy demand and electric vehicle fleets, the main grid is facing a severe congestion and stability issues mainly during winter [26]. To mitigate these adverse effects, the power distribution grid can be enhanced by integrating energy buffers at residential level [3,23,27]. For instance, Beacon Power proposes a representative flywheel energy storage modules of 25, 30, and 36 kWh [28], which can be convenient for domestic applications at grid distribution level. FESS can be considered as a good candidate for this application thanks to its long lifetime (20 years) and fast response time [29]. Moreover, this system is obviously more eco-friendly compared to batteries (no need for Cobalt or Lithium) and it can carry out around 200, 000 charging cycles. FESS can work continuously to absorb or inject energy, providing a flexible, cost-effective, and low-maintenance grid support.
In this context, this paper presents a PMSM-based flywheel topology, modeling, control, and energy management. Two case studies were investigated for domestic application. Specifically, peak power shaving [30,31] and uninterruptible power supply capability (few seconds) were addressed and experimentally achieved. These key features were successfully implemented and experimentally tested on a low power and low speed flywheel on a laboratory test-bed. Some relevant experimental results are presented and discussed. These results show that PMSM-based flywheel is a promising technology for domestic applications. Based on the previously discussed issues, the contributions of this paper are threefold: • A step-by-step modeling and control design methodology is presented for a simulation and experimental platform that could be used for education and research purposes. • A lab-scale prototype was built to validate the proposal: the use of FESS for domestic applications to manage power peak shaving and achieve power backup service. • Experimental results highlight the advantages and possibilities offered by FESS for domestic application.
The rest of the paper is organized as follows. Section 2 deals with the modeling framework of the considered flywheel. This model is used for control laws design and active and reactive power management laws derivation. Section 3 presents some experimental results on an actual experimental rig equipped with a 1.82 kW PMSM and 0.2 m 2 kg inertia flywheel rotor and provides a discussion about the overall assessment of the capabilities of the PMSM-based flywheel in terms of load power peak shaving and backup power. The conclusion and future works are summarized in Section 4.

Flywheels for Residential Application
This section presents the whole system modeling, which allows computing the control laws and simulating the whole system on Matlab/Simulink software. This is to validate control laws performance before real time implementation on the actual system. Moreover, an energy management system is proposed for flywheel system at domestic level. Both active and reactive powers control are presented and discussed.

FESS Sizing
To demonstrate the feasibility of flywheels for energy storage at domestic level, a design of the flywheel for this typical application should be performed. Typical daily domestic power consumption is given in Figure 1a. In this case, the maximum power is P d max = 6 kW and the daily average power is equal to < P d >= 1.7 kW. The energy consumption evolution is depicted in Figure 1b. It shows that the daily energy consumption is about 40 kWh.   To smooth power consumption (limit the grid power to the consumer average power), an energy storage system based on flywheel can be implemented, as depicted in Figure 2. It is composed of a rotating mass driven by an electrical machine (MPSM, IM, etc.). The electrical energy input causes the rotation of the cylindrical mass at high speeds (8000-16, 000 rpm). The energy is then stored in the flywheel as a kinetic one. It can be recovered instantly using the electrical machine as an electric generator, leading to the decrease in the rotational speed of the flywheel. The system is mounted on magnetic bearings and confined under vacuum in a protective enclosure in order to optimize the performance of the device (rotation time) and thus extend the storage time. In practice, this kind of storage system has an efficiency of about 80%. Under the conditions shown in Figure 2, the storage system's power and energy variations are given in Figure 3. For a constant power delivery, in order to limit the currents flowing into the machine stator windings, the minimum rotational speed is fixed to 50% of the maximum speed, i.e Ω min = 50% Ω max , which means that the minimum flywheel energy is equal to 25% of the maximum energy, i.e. W s min = 25% W s max . To fulfill this constraint and to satisfy the load at any time, the flywheel should be initially charged with W s 0 = 7.4 kWh. This leads to the energy provided to the storage system depicted in Figure 4a        For mechanical constraints reasons, the rotational speed is generally limited to N max = 10, 000 rpm, which allows computing the moment of inertia of the rotor mass J t in order to be able to store W s max = 16 kWh, as shown in Figure 4a.
Let us assume, for example, that the flywheel rotor is composed of a steel rod of radius r and height h. The parameters characterizing the steel are: The cylinder radius r can be calculated based on the maximum peripheral speed as follows: For a solid cylindrical mass, the moment of inertia is given by: Finally, based on the steel density, the cylinder hight can be computed as follows: In [28], typical flywheels energy storage can be found, which are convenient with the performed sizing. The implementation of such flywheels in electrical engineering laboratory is not possible for security and financial support issues. In this study, a proof-of-concept on a small-scale flywheel was performed [19]. Figure 5 depicts the proposed concept for flywheel energy storage system for domestic application. Basically, a modern flywheel energy storage system (FESS) consists of five key components: (1) flywheel rotor (steel or composite materials); (2) bearings (magnetic bearings); (3) electrical machine; (4) power electronic interface; and (5) housing. In this figure, P d stands for daily consumer power, which can be measured, P s corresponds to evolution of flywheel power during a day, and P g is the power delivered by the grid. A suitable control operation of FESS should allow satisfying the load P d , while limiting the grid power to the average consumer power < P d >. The grid power limit can be due to grid congestion or a contract between the householder and energy provider. FESS is storing energy while domestic power is less than grid power limit and it will retrieve power for domestic high consumption periods. Consequently, FESS offers a grid support capability, which can be interesting for main grid upgrade deferral. The developed FESS general scheme is given in Figure 6. A pair of three-phase AC/DC converters are connected around the DC bus with grid and FESS, respectively. The main objective of the control and energy management strategy is to ensure stable and safe operation of the power electronics devices in all operating modes, and satisfy the load at any time.

FESS
In this study, an FESS driven by a permanent magnet synchronous machine is employed. The machine-side converter allows implementing speed variation of PMSM based on field-oriented control algorithm. An additional power loop can be added to control the flywheel delivered or released power.

PMSM Modeling
For PMSM, permanent magnets generate a rotor magnetic field, which creates a sinusoidal rate of change of flux with rotor angle. The PMSM stator windings are star-coupled without neutral connection. Hence, voltages across stator windings are described by [32]: where • v sa , v sb , and v sc are the individual phase voltages across the stator windings.
• R s is the equivalent resistance of each stator winding.
• i sa , i sb , and i sc are the currents flowing in the stator windings.
• Φ sa , Φ sb , and Φ sc are the total fluxes linking each stator windings. The permanent magnet and the three windings contribute to the total flux linking of each winding. The total flux is defined by  where L aa , L bb , and L cc are the self-inductances of the stator windings; L ab , L ac , L ba , etc. are the mutual inductances of the stator windings; and Φ am , Φ bm , and Φ cm are the permanent magnet fluxes linking the stator windings. The inductances in the stator windings are functions of the rotor electrical angle, defined as θ e = N p θ m , with θ m the rotor mechanical angle and N p the number of pole pairs. • Permanent magnet flux linking winding "A" is maximum when θ e = 0 • and zero when θ e = 90 • . Therefore, the linked motor flux is defined by: where Φ m is the permanent magnet flux linkage.
Applying Park's transformation to the two electrical equations in Equations (5) and (6) produces the following equations that define the PMSM behavior in the dq0 reference frame: where L sd , L sq , and L s0 are the stator d-axis, q-axis, and zero-sequence inductances, respectively. These electrical equations allow determining a torque expression that is independent of the rotor angle. The electromagnetic torque is given by the following equation: Finally, the motion equation of the PMSM is governed by the following law: where J t corresponds to the total rotating components inertia, f v is the viscous friction coefficient, and Γ s is the dry friction torque.

PMSM-side Converter Control
The voltage source converter (VSC) connected to the PMSM (PMSM-side converter) provides a variable speed control capability based on the well known field-oriented control. This VSC is formed by six IGBTs, as shown in Figure 7. Vector control allows separately controlling the developed electromagnetic torque and the magnetizing flux of the stator currents. To achieve this, the d-axis component of the stator current is aligned with the rotor flux. Moreover, the maximum torque for a given stator currents is achieved by maintaining i sd = 0, which leads to the following simplification for the electromagnetic torque: For a balanced three-phase systems, the zero-component is null, i.e. v s0 = 0. Therefore, the PMSM-model reduces to the d and q components. Moreover, let us consider a non-salient PMSM, which implies L sd = L sq = L s . To control the stator currents, a current controller can be derived from the Laplace transform of Equation (8). This expression shows that there is a coupling terms that should be compensated for to enhance the system dynamic response. Let us note This leads to the following decoupled equations The tuning of the two PI-controllers in the current loops is to be performed based on these expressions. The same parameters can be used for these two PI controllers due to the similar dynamics for i d and i q loops. The open-loop transfer function of the PI control based current loop can be expressed as: where K p is and K i is = 1 τ i is are current-loop controller gains and T σ is a time-constant standing for current sensors and power converter delays (T σ is much smaller than L s R s ). Based on the dominant pole cancellation method and with a desired current's time-response T s i (time to achieve 95% of the final value) and neglecting T σ , the following controller gains can be chosen for the for dand q-axes current-loop PI controllers: To keep the dand q-axes components of the stator reference voltages synchronized with the rotor, the electrical angle θ e = N p θ m is used for Clarke/Park transformations. The voltage reference signals issued for the decoupling block are passed to the PWM modulator, which outputs the gate signals to the IGBT bridge, as can be seen in Figure ??. The q-axis current reference i * sq is calculated by a speed controller. The i d current reference is usually set to 0 for maximizing the electromagnetic torque. Assuming that the electrical time-constant is much smaller than the mechanical one, the actual currents can be considered equal to their references for speed regulation. The Laplace transform of Equations (10) and (11) yields the following open-loop mechanical transfer function: The speed controller is implemented based on PI-controller, which can be tuned by many ways such as the non-symmetrical optimum method (NSOM) [33,34]. In this study, the same method as the one described for the currents controllers was chosen. Consequently, speed PI-controller parameters can be computed as follows where T s Ω corresponds to the required speed time-response (time to achieve 95% of the final value, which should be T i Ω ≥ 10T is ). Finally, the power regulator is implemented to control the power stored or released by the flywheel. A PI-controller was adopted with the same parameters as the speed controller. It is worth mentioning that the choice of implementing speed and power control was adopted rather than a direct power control in order to be able to limit the PMSM-speed reference, which is the power regulator output. Power measurement can be performed based on PMSM-electromechanical power or grid electrical power.

Grid-side Converter
The goal of grid-side converter is to keep the DC-link voltage constant regardless of the magnitude and direction of the PMSM power and to control the reactive power flow. The grid-side converter topology is given in Figure 8. This converter is a two-level voltage source converter (2L-VSC), which consists of three-inverter legs, DC bus capacitor C, and smoothing inductance; all connected to three-phase main grid. Since line current reference direction is from the grid to converter, active power is positive when power is from the grid to the converter and negative otherwise. The IGBT switches are controlled using PWM to control DC bus voltage and reactive power flow: power factor control to participate to system services, especially voltage regulation.

Grid-side converter topology and control
In the abc reference frame, the inverter voltage is given by Applying Park transform allows getting the dq voltages The dq reference frame is chosen in such way that quadrature q-axis is oriented along the grid voltage rotating vector. Hence, the direct voltage V gd is zero. This choice leads to the following simplifications: These expressions show that there is a coupling terms that must be compensated for. Let us consider This leads to the following decoupled equations: Applying Laplace transform leads to the following open-loop transfer function: This transfer function allows computing the PI regulators parameters following the same procedure described abvoe for PMSM currents PI-controllers. They were used since they are easy to tune and offer to easily stabilize the system. Hence, the currents PI regulators parameters are computed as follows for the dand q-axes: where T r i corresponds to the required currents time-response (time to achieve 95% of the final value).
Finally, depending on the operating mode of the flywheel, energy flow can be from the grid to the flywheel (storage) or the opposite (destocking). The active P s and reactive Q s powers flowing through the stator of PMSM are given by Neglecting the back-to-back converter losses and the resistance of the input inductance, power balance allows getting the following equation: where P GSC is the active power at tie-line power flow injection to the main grid and P C is the active power on DC bus capacitor given by The DC bus voltage U 0 (t) is the sum of DC component U 0 and varying componentŨ 0 (t) in steady-state. Using the former expression leads to the following one (neglecting second-order terms) Let us consider, V U 0reg = P GSC −P r U 0 ; hence, the open-loop transfer function allowing to compute regulator parameters is given by Straightforward computations lead to a second-order closed-loop transfer function with a static gain equal to 1. This transfer function depends on two parameters, which are the damping ration Ξ and natural frequency ω 0 . The PI-controllers are computed are follows: where ξ corresponds to the selected damping ratio, which is chosen equal to √ 2 2 in order to get a fastest closed-loop system with less overshoot. Parameter ω 0 = 3 T ru (for ξ = √ 2 2 ) denotes the chosen natural frequency. Parameter T r u corresponds to the chosen voltage time-response (generally, T r u ≥ 10 T r i ).
To perform abc/dq and dq/abc transformations, a PLL for grid voltage angle θ s computation was implemented. Grid angle θ s is estimated based on the measurement of phase-to-phase voltages in order to remove homopolar components (multiple of the third harmonic).
Based on the previously chosen dq reference frame orientation, active and reactive powers can be calculated as follows: Consequently, the d-axis current reference, termed as reactive component of the line (grid) current, can be calculated by

Experimental Platform
The dynamics of the flywheel, PMSM, back-to-back converter, and control algorithm were experimentally implemented. The achieved experimental rig enables accurate dynamic reproduction of a low-speed flywheel behavior under deterministic and realistic conditions. The back-to-back converter is controlled based on DS1104 controller board from dSPACE and real time parameters tuning is performed based on ControlDesk application. The domestic load is emulated based on a variable resistive load connected to the DC bus. The flywheel is used for energy storage during off-peak power periods. During on-peak power periods, mechanical energy stored on FESS is retrieved in order meet the load at any time. The overall FESS control scheme is shown in Figure ??.

Setup Description
To test the feasibility and the effectiveness of FESS for peak power shaving and uninterruptible power supply capability, a downscaled experimental setup was built in the Electrical Engineering Lab of ISEN Yncréa Ouest, Brest. Commercially available flywheels are categorized as either low-speed metal-based flywheels, with speeds up to 10, 000 rpm, and high-speed composite materials-based flywheels, which can run at speeds considerably higher than 10, 000 rpm [28]. Indeed, usable energy at full charge of a flywheel depends on two parameters: the total inertia of the rotating mass J t and the maximum rotational speed of the flywheel Ω max . In this study, a small-scale flywheel was implemented in a laboratory test bench to prove the effectiveness of the proposed application. In fact, this is a kind of proof-of-concept on a lab-scale prototype, which is not suitable for real-world applications. This lab-scale flywheel has been already used in other relevant works (see, e.g., [19]) for electric vehicle fast charging stations. Figure 10 shows the experimental setup consisting of a FESS driven by a 1.82 kW PMSM (Figure 11a), two SEMIKRON inverters (I rms = 30 A, V ac = 440 V, and V DCmax = 750 V) (Figure 11b), voltage and current LEM sensors, input L filter (5 mH/50 A), and two dSpace DS1104 to implement the proposed control algorithm. PMSM parameters are given in Appendix A. The switching frequency of the inverters was set to 10 kHz. The system was connected to the grid through a 4 kW isolation autotransformer, and a resistive load was used to emulate the domestic load. To demonstrate the performance of the system in a reduced time, the experiment was performed in seconds timescale.  The energy management approach implemented for FESS is described by Algorithm 1. Under grid normal operating conditions, grid power is limited to a maximum value corresponding to consumer contract limit or maximum grid capacity. The grid is supplying the load and the remaining power is used to charge the FESS until it is fully charged. In the case where the consumer power is higher than the grid maximum power, FESS is discharged to meet the load. FESS discharging profile is characterized by a constant power delivery until the speed is lower than the minimum speed, which corresponds to the PMSM maximum torque, and then the power is decreased until the FESS is fully discharged. Under grid abnormal operating conditions (voltage sag, for instance), load is disconnected from the grid and FESS energy is used to feed the load. The energy management approach implemented for FESS is described by Algorithm 1. Under grid normal operating conditions, grid power is limited to a maximum value corresponding to consumer contract limit or maximum grid capacity. The grid is supplying the load and the remaining power is used to charge the FESS until it is fully charged. In the case where the consumer power is higher than the grid maximum power, FESS is discharged to meet the load. FESS discharging profile is characterized by a constant power delivery until the speed is lower than the minimum speed, which corresponds to the PMSM maximum torque, and then the power is decreased until the FESS is fully discharged. Under grid abnormal operating conditions (voltage sag, for instance), load is disconnected from the grid and FESS energy is used to feed the load.

Algorithm 1 FESS energy management system.
if Ω min ≤ Ω ≤ Ω max then P FESS = P gmax − P load else if Ω ≤ Ω min then PMSM current is maintained at its maximum value I smax P FESS decreases else if Ω max ≤ Ω then Ω maintained at its maximum value Ω max P FESS = P losses end if else Disconnect load from utility grid and turn-off the grid-side converter Use the machine-side converter to control the DC bus voltage P FESS = −P load end if Return P FESS

Experimental Results
Several experiments were conducted to demonstrate the ability of the FESS for grid support when the load power exceeds the maximum allowed power (grid power peak shaving) and power backup when grid is lost. Experiments were performed with a resistive load connected to the DC bus to emulate the domestic load. This load corresponds to the load to be fed by the grid-side converter while maintaining a zero consumed reactive power.

Flywheel Charging/Discharging Behavior
The machine-side converter is first operated with speed regulation. Figure 12 represents the experimental results to access the FESS charging and discharging behavior. The DC bus voltage is regulated to 400 V and the rotational speed reference is varied in order to visualize PMSM acceleration and deceleration. FESS stores energy during acceleration and release it during deceleration. Figure 13 gives the experimental results for machine-side converter, which controls the PMSM rotational speed. It can be seen that d-axis current is maintained equal to zero during steady-state conditions, while q-axis current is positive during energy storage and negative during energy retrieval. Figure 14 gives the experimental results for grid-side converter, which controls the DC bus voltage. The grid currents and voltages are in-phase while charging and are of 180 • phase shift while discharging. The DC bus voltage is controlled to its reference value with good dynamics during transients.     A bi-directional energy transfer between utility grid and flywheel is achieved. This energy exchange is performed through the back-to-back converter and the PMSM, which results in losses. These losses decrease the energy conversion efficiency. To visualize the energy flow between FESS and the grid, Figure 15 depicts the grid energy E g , PMSM electromagnetic energy E mec , and FESS energy E sto .  The difference between grid energy E g and the PMSM electromagnetic energy E mec corresponds to copper losses in converters and PMSM. The difference between the stored mechanical energy E sto and the PMSM electromagnetic energy E mec corresponds to iron-core losses and mechanical losses in PMSM.
Experimental results of the system with power regulation are given in Figure 16. FESS is charged with constant power rate equal to 200 W until the speed limit corresponding to Ω max = 157 rad/s is reached, and then it is discharged with a constant power rate of −200 W. The difference between PMSM electromagnetic power and grid power that can be observed from these figures corresponds to the losses on the energy conversion chain. The discharging power is maintained constant as long as the PMSM current limit is not reached. As the current limitation is attained, the power regulation can no longer be achieved and the discharging power decreases until FESS stops.

FESS for Domestic Load Peak Shaving
The developed FESS was used for load power peak shaving. The power delivered by utility grid is limited to P gmax = 550 W, corresponding, for example, to the daily average power consumed by the user. FESS is first charged under a constant power rate. Then, a load with a power demand above the fixed P gmax is connected to the DC bus. The experimental results for this case study are given in Figure 17.
It can be seen in this figure that FESS is charged when load is not connected to the DC bus and discharged if the connected load power demand exceeds the power grid limitation. In this case, the load is satisfied by both the grid and FESS. The grid is supplying its maximum allowed power and the FESS is delivering the remaining power in order to satisfy the load. Moreover, it can be noticed that FESS power is maintained constant and speed decreases until maximum allowed torque is achieved (corresponding to machine maximum windings currents). The required power can no longer be maintained and FESS power decreases, which results in grid power increase in order to be able to regulate the DC bus voltage at its reference value.  In the same way, FESS can be used to limit domestic consumption to a maximum value depending on individual contract or for technical reasons in order to guarantee grid stability during on-peak periods. This can be done by limiting domestic electrical consumption at its mean value, decreasing significantly the grid delivered power especially during on-peak periods. In fact, FESS can be used to store energy during off-peak periods and to supply the load during on-peak periods, which can be a solution for transmission and distribution upgrade deferral. In this case, FESS sizing should be performed in order to ensure that the load is satisfied at any time while FESS constraints are fulfilled (maximum speed, tensile strength of the rotor, maximum power limit, etc.).

Dynamic Response Under Grid Loss
FESS at domestic level can be used as an uninterruptible power supply. In fact, if utility grid weakens or is completely lost, FESS can be used to supply the load until grid is recovered for short time periods or to ensure a safe shutdown of all critical domestic appliances for a long period shut-downs. An experiment was conducted to illustrate this capability for FESS. In this study, the developed laboratory scale FESS allowed ensuring UPS capability during some seconds. This effectively demonstrates the behavior of FESS for this specific application. For this experiment, FESS is charged until it reaches the maximum capacity. Then, the resistive load emulating the domestic load is connected at t = 58 s. Finally, grid is lost at t = 70 s. The experimental results are given in Figure 18.  It can be seen in this figure that, in the first stage, the grid provide energy to the flywheel from 0 to 58 s. In a second stage (from 58 to 70 s), the load is connected to the DC bus. Hence, the grid allows supplying both the load and the flywheel losses in the energy conversion chain (mechanical losses, power electronics losses, and cooper and iron losses in PMSM). In a third stage starting from 70 s, the grid is shutdown, and the signal related to grid loss is transmitted to the energy management algorithm, which switches the control algorithm in order to maintain a constant DC bus voltage based on the machine-side converter and delivers power to the load at a constant rate (blue curve). The power delivered by the flywheel is maintained at the reference value and the flywheel speed is decreasing. As flywheel speed reaches the minimum allowed speed, corresponding to maximum torque and windings currents, the power reference can no longer be maintained, and the flywheel provided power decreases until the flywheel is completely discharged. In Figure 18, when the grid is lost, the difference that exists between the flywheel delivered power and the load power is due to the losses in the energy conversion chain. These losses include mechanical losses in the rotating mass, copper (Joule effect) and iron (hysteresis and eddy currents) losses in the PMSM, and losses in power converters (conduction and switching losses). Indeed, even though mechanical losses decrease as the flywheel rotational speed decreases, iron losses in the PMSM and power converters losses remain almost the same when the flywheel is discharged. Moreover, copper losses increase. In fact, the flywheel is discharged at a constant power rate, which means that when the rotational speed is decreasing, the electromagnetic torque and consequently PMSM windings currents are increasing, leading to more losses due to the Joule effect.
This figure shows that grid is supplying both load and flywheel during safe operation. In the case of grid failure (grid power equal to zero), flywheel allows meeting the load demand during a short time enabling a safe shutdown of the resistive load. This behavior is characterized by a fast dynamic response. It must be emphasized here that the used laboratory small-scale flywheel is not designed for a long term grid failure and the reason why the load can only be satisfied during some few seconds. To implement a real-world application with a significant autonomy (10-15 min), it is mandatory to size the flywheel for this specific application. In this situation, a possible application of FESS in the near future can be a storage system for electric vehicles' fast charging stations. This should be a technically and economically viable solution for grid support during congestion periods. Indeed, during off-peak periods, energy can be stored in FESS and then released for electric vehicle charging if plugged-in during on-peak periods.

Conclusion and Future Work
This study dealt with a theoretical analysis and experiments on a reduced scale lab prototype for a flywheel-based domestic energy storage system. A case study showed the operational principles of FESS and the possibilities offered by this kind of energy storage devices. The uses of FESS at domestic level include, but are not limited to: • uninterruptible power supply; • power peak shaving and domestic power limitation; • time of use energy cost management; and • domestic electric vehicle fast charging station.
With the development of smart grid technology [3,35], FESS are intended to play a key role, especially for high cycling and fast dynamics applications. It is a promising alternative to battery energy storage systems in the near future. However, there is still a need for extensive research and further cost-reduction in order to make it a competitive alternative.

Acknowledgments:
The authors would like to thank the anonymous reviewers and the editor for their valuable comments and suggestions.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: