1. Introduction
Flywheel energy storage involves a high-speed rotation of the flywheel rotor to store mechanical energy, mainly by combining the motor, support bearing, power electronic conversion circuit, and flywheel rotor components (as well as other components). There are many types of flywheel motors, but high-speed permanent magnet synchronous motors (HSPMSMs) are the best choice for many applications due to their fast dynamic response, high working efficiency, small moment of inertia, high power density, wide speed regulation range, stable operation and small loss [
1]. With the development of HSPMSMs and the decrease in the price of permanent magnet materials, HSPMSM applications are becoming increasingly popular for use in high-power compressors, blowers, etc. New energy flywheel energy storage can eliminate the need for a mechanical speed-up device and improve system operating efficiency, saving energy and reducing consumption. HSPMSMs generally use mechanical sensors such as photoelectric encoders to accurately monitor rotor position and speed. The integration of mechanical sensors inevitably increases system wiring, which directly affects the overall stability of the flywheel energy storage system (FESS). In addition, high-frequency pulses interfere with the power output signal, exacerbate system instability, and increase system cost. Therefore, sensorless vector control technology in HSPMSMs has become a popular solution [
2].
Sensorless technology in HSPMSMs can be divided into two main technical routes [
3]. The first is a calculation method based on the current and voltage equation of the motor; i.e., the method is based on the fundamental wave estimation of the counterelectromotive force, which requires high parameter accuracy and performs inadequately at low speeds. The second is a signal injection method based on magnetic circuit asymmetry; i.e., the method involves extracting position and velocity signals after injecting high-frequency signals using the convex pole rate of the motor. The high-frequency signal injection method [
4] can achieve favorable estimation results in low- and zero-speed ranges, but it is not directly practical for hidden pole motors with low salient pole rates, and the construction of filters leads to a complicated algorithm [
5,
6]. Fundamental wave estimation methods based on the inverse electric potential can be categorized as open-loop or closed-loop. The open-loop method uses the voltage, current, and mechanical equations of the motor to find the rotor position directly. This method is fast and simple but offers low stability and poor dynamic responsiveness and lacks an error adjustment mechanism. The closed-loop method uses a state observer to observe the back electromotive force or estimate the position state. This method has an error adjustment mechanism and offers better dynamic performance and stability than the open-loop method [
7]. Commonly used closed-loop methods include state observers, EKFs, model-reference adaptive observers, and sliding mode observers (SMOs) [
8,
9,
10,
11,
12]. Each method has its own advantages and disadvantages. For example, an SMO handles external disturbances and parameter changes well and is simple to compute. However, the output quantity of the SMO contains high-frequency jitter signals, which requires the addition of a low-pass filter to filter out high-frequency clutter, resulting in phase lag and thus requiring additional phase compensation. An EKF performs similarly to a real system model in terms of system and measurement noise and can accurately estimate the rotor position. However, an EKF approximates a linear system after considering the first-order truncation of the nonlinear system model. Neglecting the higher-order terms leads to an increased estimation error and low observer stability when strong noise and nonlinearity are involved.
Traditional EKFs require repeated trial and error to select noise optimal covariance parameters, which is often time-consuming and interferes with achieving favorable results. If the noise covariance is not selected properly, an EKF system may converge too slowly, jitter too much, or even completely diverge. Therefore, there have been many attempts to select optimal EKF noise covariance matrices [
13,
14,
15,
16,
17].
Zheng et al. [
13] used the particle swarm optimization (PSO) algorithm to optimize the covariance matrix of an EKF. The optimized system can adequately suppress noise and shorten the selection time of the covariance matrix, but the basic PSO algorithm has weak searchability and a slow search speed. Wang et al. [
14] proposed using the ant colony algorithm (ACA) to optimize covariance matrix parameters, but the initial information used in the ACA is deficient, requiring a long search time. Some efforts have also reported selecting the covariance matrix using the trial method. This method is practical and simple, but it takes a long time, has poor accuracy, and depends on user experience. Yu et al. [
15] introduced a real-time coded genetic algorithm to optimize the covariance matrix of an EKF. After optimization, the system could suppress noise well and shorten the covariance matrix selection time. Some efforts [
16,
17] applied the unscented Kalman filter (UKF) to improve nonlinear calculation accuracy. However, the UKF is easily affected by system noise and measurement noise error, which restricts its application.
When such a system is subjected to external disturbances, the speed variation will be greater than that of a system with sensors because the delay effect of the EKF algorithm makes the system less robust [
18,
19,
20,
21,
22,
23,
24,
25]. The controller of the motor needs high precision and fast dynamic response, as well as strong robustness to load disturbances and internal system parameter changes. Therefore, it is difficult for a PI controller to meet the requirements of the control system. An SMC is independent of the control object parameters and perturbations. It has a fast response time, insensitivity to external perturbations and parameter changes, and strong robustness, which are suitable characteristics for controlling an HSPMSM [
26].
Some efforts have introduced an SMC into a rotational speed outer loop controller. The SMC can quickly track rotational speed and has strong robustness, but it will inevitably cause system chattering. To mitigate this issue, the approach law method has been adopted in SMC design. In the process of quickly approaching the sliding mode surface (SMS), the exponential or power method was adopted to design SMCs for the approach law [
27]. A differential state quantity was introduced into the selected SMS, which causes high-frequency noise when obtaining the velocity differential, resulting in a poor control effect. Emre Hasan Dursun proposed a fast terminal sliding mode control (FTSMC)-based MPPT controller and a hybrid MPPT approach that combines chaotic-based particle swarm optimization (PSO) derivatives and the optimal relation-based (ORB) method [
28,
29]. In [
30], a voltage mode second-order sliding mode controller (SO-SMC) was proposed to capture maximum power from WECSs. In reference [
31], an integral sliding mode control law was designed to track the optimal turbine rotation speed based on a recurrent neural network (RNN) that is used to identify uncertain wind turbine dynamics. Reference [
32] proposed a novel high-order sliding mode (HOSM)-based control methodology for the direct power control (DPC) of a doubly fed induction generator (DFIG) wind turbine operating under unbalanced grid voltage conditions.
To solve the above problems, this investigation uses an improved PSO algorithm, namely IPSO, to select and optimize the noise covariance matrix of the EKF. In addition, an SMC is used to control the speed. Three SMSs—linear SMS, global SMS, and integral SMS—are used to design the ordinary SMC, global SMC, and integral SMC for improving control [
33]. Three SMSs are used to improve the approach law, and an optimal controller is selected for subsequent simulation verification via Lyapunov stability proof and characteristic analysis. The simulation results show that the improved algorithm and controller can provide the HSPMSM control system with better control and robustness.
The main contributions of this paper are summarized as follows:
- (1)
A traditional 6-dimensional array composed of a noise matrix and measurement matrix requires considerable trial-and-error and computation time for optimization; this paper provides a new particle swarm optimization algorithm for overcoming this limit through optimization. This algorithm is based on the basic particle swarm algorithm and adds the concept of adaptive weighting and immunity. The method can shorten the optimization time and accelerate the convergence speed. Testing in MATLAB assesses the viability of matrix calculation and calculation speed acceleration.
- (2)
To optimize the dynamic control performance of an HSPMSM, a novel convergence law is proposed to design a sliding-mode speed controller in terms of the controller, and the continuous function sat(s) is utilized instead of the symbolic function sgn(s), which further attenuates system jitter. This new integral sliding mode controller can reach the sliding mode surface quickly to optimize static and dynamic performance.
The remainder of this article is organized as follows.
Section 2 and
Section 3 describe the theoretical principles and methods used in the flywheel control system.
Section 4 outlines the design of the simulation experiments and the compilation and analysis of the experimental results.
Section 5 provides conclusions.
4. Case Study
Reports should discuss not only their results but also how they can be interpreted from the perspective of previous studies and their own working hypotheses. These findings and their implications should be discussed in the broadest possible context possible, and future research directions may also be highlighted.
To verify the feasibility and effectiveness of the optimization scheme here, as well as the superiority of the improved SMC and EKF based on the immune PSO algorithm, a simulation model of the flywheel HSPMSM system based on the EKF is built using MATLAB and Simulink.
The model consists of the HSPMSM, SVPWM converter, and controller. The improved SMC replaces the PI controller and is obtained by the EKF based on the immune PSO. The
id = 0 vector control strategy is adopted, and the immune particle swarm algorithm optimizes the six-dimensional array synthesized using the EKF covariance matrices
Q and
R, namely, the optimal values of 6 parameters. Then, the estimated rotational speed and rotor angle position are calculated using the EKF. The selected flywheel motor parameters are shown in
Table 4.
Figure 6 shows the improved sensorless vector control block diagram of the HSPMSM based on the EKF. The traditional control strategy uses a PI controller for both the outer loop of speed and the inner loop of current, whereas in this thesis, a new SMC controller with an improved convergence law is used to replace the outer loop PI controller to control the speed, after which all the comparison graphs of the simulation results refer to the comparison of the control results under the two control strategies of the outer loop PI controller and the outer loop of the improved SMC controller.
Two experiments are conducted here. The system speed is set at 1000 rpm and 8000 rpm, PI and SMC control are improved, and then comparative analysis is performed after improving the optimization algorithm.
4.1. Simulation Experimental Design
We adopt the dual closed-loop control strategy with a current inner loop and a speed outer loop. The outer-loop controller adopts the improved SMC. The four inputs of the EKF depicted in
Figure 6 are
iα,
iβ,
uα* and
uβ*. The EKF algorithm is used for the online state estimation of angular velocity
ωe and position angle
θe. The whole system is optimized by iterative operations using the IPSO algorithm, and the appropriate noise covariance matrix is selected to achieve the optimal EKF estimation [
37].
4.2. Simulation Experiment I
In the first experiment, the reference speed is first set as n
* = 1000 rpm with a no-load startup condition. The total simulation duration is 0.6 s, and the disturbance load T
m = 10 is suddenly added at 0.4 s.
Figure 7 shows the speed comparison diagram, speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor under the EKF matrix parameter control strategy optimized using the basic PSO algorithm and the immune PSO algorithm under the PI controller.
Figure 8 shows the speed comparison diagram, speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor under the EKF matrix parameter control strategy optimized using the basic PSO algorithm and immune PSO algorithm under the improved SMC controller.
According to the rotational speed curves in
Figure 7a and
Figure 8a,
Table 5 lists the dynamic performance indexes from 0 to 1000 rpm, including the static performance indexes when stabilized at 1000 rpm and the comparison of the dynamic and static indexes after 0.4 s and application of the load.
Table 5 and
Figure 7a and
Figure 8a show that the estimated rotational speed value of the EKF based on the elementary PSO algorithm under either the PI controller or improved SMC controller fluctuates within a range after sudden load addition, oscillates and does not stabilize at a fixed value, while the estimated rotational speed value of the EKF based on the immune PSO algorithm can stabilize at 923.1 rpm and 1001 rpm. Therefore, the data show that the parameters of the EKF covariance matrix obtained using the optimization of the immune PSO algorithm are better than those obtained using the optimization of the elementary PSO algorithm. The rise time, peak time, and regulation time under both the PI and SMC controllers are all within 0.2 without much difference, but the overshoot magnitude using the improved SMC control is significantly less than that of the PI controller. The improved SMC controller is also shown to be more resistant to disturbances and more stable by comparing the steady state error and load recovery time after sudden load application. A comparison of the speed difference between
Figure 7b and
Figure 8b shows that the value of the SMC speed error is very small and almost negligible, but the control under the PI controller is clearly affected. The parameters of the particle swarm search with the same controller improved using the immune algorithm are significantly better than those optimized by the basic particle swarm algorithm in terms of steady-state performance, and the degree of curve smoothing is shown to be superior. The electromagnetic torque comparison diagram of the motor shows that the control strategy after immune PSO under the control of the improved SMC controller is the best. There is no significant difference between the rotor position angle PI and SMC control effect, both of which are optimized using the immune particle swarm optimization algorithm.
4.3. Simulation Experiment II
In the second experiment, the flywheel motor speed is set to n* = 8000 rpm with a no-load startup. The total simulation duration is 1 s, and the disturbance load T
m = 10 is suddenly added at 0.4 s.
Figure 9 shows the speed comparison diagram, speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor using the EKF matrix parameter control strategy optimized by the immune PSO algorithm under the PI controller.
Figure 10 shows the speed comparison diagram, speed error diagram, rotor position angle diagram, and electromagnetic torque diagram of the motor under the EKF matrix parameter control strategy optimized by the immune PSO algorithm using the improved SMC controller.
Comparing the speed tracking and speed error graphs in
Figure 9 and
Figure 10 shows that the PI controller’s system response time under the immune PSO optimization algorithm is within 0.3 s. Under the improved PSO optimization algorithm, EKF matrices R and Q obviously perform poorly. Speed is not completely tracked after it reaches 8000 rpm, and the speed error fluctuates greatly. The fluctuation of electromagnetic torque is also relatively large. However, although the system response time of the improved SMC controller under the immune PSO optimization algorithm is slow, reaching 8000 rpm when it is close to 0.7 s, the tracking effect under load is still very favorable. Basically, the motor speed observed using the EKF algorithm can fully track the actual measured value of the HSPMSM, and the control effect is relatively favorable. Under both control strategies, the load starts at 0.4 s and does not have a large impact on the system. The accuracy of motor speed estimation is greatly improved by the improved control system, and the error between the estimated and actual values of motor speed is greatly reduced.
According to the rotational speed curves in
Figure 9a and
Figure 10a,
Table 6 lists the dynamic performance indexes from 0 to 8000 rpm, the static performance indexes when stabilized at 8000 rpm, and the comparison of the dynamic and static indexes with the load applied after 0.4 s.
Table 6 shows that the rotational speed under the PI controller fluctuates within a range of 7817~8242 and 7932~8107 for both the actual measured value and the estimated value of EKF optimized using IPSO, and the measured and estimated values cannot be kept at a fixed value. The sudden loading of the system causes poor system stability performance and poor tracking ability. The improved SMC controller speed measurement is fixed at 8120, and the estimated value is between 8109 and 8126, with a speed difference of −11 to 6 rpm. After improvements to the controller, the accuracy of the system’s estimation of the motor speed is greatly improved, and the error between the estimated and actual values of the motor speed is greatly reduced.
In summary, the improved control system has a small drop in speed during sudden load addition and can quickly recover to the original state, which proves that this control system has favorable robustness and anti-load disturbance capability.
5. Conclusions
In this paper, a new type of control law SMC and an immune PSO algorithm are used to optimize the control system of an HSPMSM. The improved SMC adopts a new nonlinear function with better smoothness at the origin, which can weaken the chattering phenomenon. The system response time is 0.7 s, the overshoot is approximately 1.5, there is no oscillation, and the rotation speed error is 6 rpm. The system response time under the control of the PI controller is 0.3 s, and the overshoot is approximately 10, but the oscillation is obvious; it cannot keep tracking the actual speed completely, and the range of the speed error is [−300 300], the rotor position of the HSPMSM is extremely poorly tracked during the speed increase of 7500~8000 rpm, and the electromagnetic torque is also not 0. In conclusion, the control performance of the PI controller is not as favorable as that of the SMC in a high-speed steady state, while the dynamic response of the HSPMSM is faster at zero speed as well as in the middle and low speeds.
An improved EKF based on an immune algorithm is used to observe the motor speed. The control effect of the EKF algorithm based on immune-type PSO optimization is better than that of the EKF algorithm based on basic PSO optimization, and it is shown in the figure that the curves are smoother and do not jitter. The two simulation experiments consider operation at 0.4 s after the load is suddenly increased. The simulation results show that the improved control system can improve the interference immunity of the system and can effectively suppress the influence of sudden load changes on the speed. Simultaneously, the estimation accuracy of the speed and rotor position angle is high; thus, the system has strong robustness.
This study applies to the field of sensorless control of PMSMs at medium and high speeds. The new controller design and the new EKF sensorless position estimator algorithm can make the motor control system more accurate and precise in estimating the position state of the motor under the premise of stabilization.