Artiﬁcial Neural Network and Kalman Filter for Estimation and Control in Standalone Induction Generator Wind Energy DC Microgrid

: This paper presents an improved estimation strategy for the rotor ﬂux, the rotor speed and the frequency required in the control scheme of a standalone wind energy conversion system based on self-excited three-phase squirrel-cage induction generator with battery storage. At the generator side control, the rotor ﬂux is estimated using an adaptive Kalman ﬁlter, and the rotor speed is estimated based on an artiﬁcial neural network. This estimation technique enhances the robustness against parametric variations and uncertainties due to the adaptation mechanisms. A vector control scheme is used at the load side converter for controlling the load voltage with respect to amplitude and frequency. The frequency is estimated by a Kalman ﬁlter method. The estimation schemes require only voltage and current measurements. A power management system is developed to operate the battery storage in the DC-microgrid based on the wind generation. The control strategy operates under variable wind speed and variable load. The control, estimation and power management schemes are built in the MATLAB / Simulink and RT-LAB platforms and experimentally validated using the OPAL-RT real-time digital controller and a DC-microgrid experimental setup.


Introduction
Different electrical machines are used in wind energy conversion system (WECS) configurations, and one of these is the squirrel cage induction machine applied as a generator, also known as a self-excited induction generator (SEIG). The SEIG has attracted considerable attention due to its applicability as a stand-alone generator using different conventional and nonconventional energy resources with its absence of DC excitation, low cost, simplicity and construction robustness, reliability and almost nil maintenance requirements. However, reactive power consumption, expensive rotor position encoder, reduced voltage and frequency regulation under variable speed are the major drawbacks [1][2][3][4].
During the WECS operation, the amplitude and the frequency of the SEIG voltage are affected by the random variations of the wind speed. Such voltage variation can influence the load side stability in direct interface configurations. Therefore, WECS integrates power electronics converters, at the load side, to regulate the load voltage and frequency and meet the requirements [5][6][7]. At the generator side of the WECS, the turbine-generator is required to operate at an optimum speed in order to extract maximum power from the wind. This speed is varying continuously with the wind speed changes. Therefore, sensorless speed control is of high interest to avoid the use of encoders due to the cost and inaccuracies in measurements [8][9][10]. Model reference adaptive systems (MRAS) are popular estimation methods for the rotor speed and the rotor flux. They are simple and require low computational effort. Conventional MRAS methods depend on the reference model accuracy, which is sensitive to the parametric variations and the overall control system [11][12][13][14][15]. Several solutions for enhancing MRAS performance have been proposed. Adaptive mechanisms, based on the Kalman filter (KF), have been used for flux estimation combined with speed control based on proportional-integrator (PI) regulators [16]. The drawback of the PI control methods is the tuning of the control gains, which are, in most cases, fixed and do not handle all wind speed conditions. KF techniques are considered powerful estimation tools in senseless drives [17]. In reference [18], a fourth-order KF model was used to estimate the rotor flux to be used in the speed estimation based on the least square's algorithm. In references [19] and [20], an extended Kalman filter (EKF) based on the current/voltage model was implemented for the estimation of the rotor speed, rotor/stator flux and stator currents. The EKF model uses the sixth order model of the induction motor drive and heavily depends on the model accuracy, and it is sensitive to parametric variations. In addition, the load torque is estimated but not required in the control system. To achieve high performance of the state estimation using EKF, state and noise covariance matrices must be accurately selected, which have been studied in reference [21] through optimizing these matrices, which increases the complexity of the EKF. In reference [22], the MRAS used a neural network to estimate the rotor flux, which was used in the speed estimation using the least-squares technique. These methods handle the parametric uncertainties by varying the model coefficients in the least-squares algorithm. In reference [23], an extended adaptive-tuning was applied to estimate the rotational speed of the wind turbine-generator system based on a permanent magnet synchronous machine (PMSM). The adaptive tuning mechanism was based on updating the covariance matrices using the observer matrices. The concern was that these matrices depended on the system parameters, and there was no discussion about the estimation robustness to parametric uncertainties. In reference [24], a sliding mode observer was used in the MRAS scheme for stator flux estimation, whereas the speed was estimated using a PI function of an error defined in terms of the stator flux, stator current and machine parameters. Although the stability was guaranteed using this estimation scheme, there was no discussion about the robustness against parametric variations. Similar comments on the study in reference [25], where the errors in the adaptation mechanism were based on the machine models that relied on the system parameters. In reference [26], the adaptive model was based on the estimated speed, found from the PI function, using the error between the reference model and the adaptive model. These models used the nominal values of the machine parameters without any mechanism to deal with parametric variations. In reference [27], in order to avoid the parametric modeling, complex-valued adaptive algorithms were used to estimate the rotor flux and the rotor speed.
Artificial neural networks (ANN) techniques were used for different applications in wind energy. In references [28] and [29], different ANN structures were used for wind speed estimation. In reference [30], ANN was used for speed estimation in WECS and verified, only by real-time simulation, for grid-connected applications. Rotor flux observers, based on ANN, have been used in the reference model for the detection of the thermal variation in the stator resistance or in the current model in order to reduce the reference model dependency operating under different conditions [31,32].
In this paper, the aim is to take advantages of the above methods by proposing a combination of the Kalman filter and artificial neural networks to estimate the speed that is required for the generator side control, and the Kalman filter for the frequency estimation, which is used for the load side control. For the state estimation, the KF is reduced to the fourth-order model, and the artificial neural networks technique is used for the speed estimation, as an adaptation mechanism in the scheme of the MRAS estimation, which will improve the estimation robustness to parametric uncertainties by continuously updating the neural networks parameters. The advantage of the ANN technique, compared to other techniques based on the PI scheme, is that its parameters are updated online to enhance the robustness to uncertainties, whereas the PI scheme has fixed parameters. The sensorless speed operation will enhance the drive control cost by eliminating the speed encoder and its performance by avoiding the measurement noise of the encoder. In addition, the KF technique can eliminate the measurement noises generated by the current and voltage sensors. At the load side, the frequency, required to be maintained constant, is estimated using a Kalman filter strategy to take advantage of its adaptive tuning, compared to the conventional phase-locked loop (PLL) [33][34][35][36][37]. The estimation techniques are used to implement control systems for operating a DC-microgrid that comprises a standalone SEIG based WECS with battery storage as shown in Figure 1a.

Induction Generator Model
Using the (α, β) stationary reference frame, the induction generator model is expressed by the electrical equations for stator currents and rotor fluxes as follows where, i sα , i sβ are the α-β stator currents, ϕ rα , ϕ rβ are the α-β rotor fluxes, and v sα , v sβ are the α-β stator voltages, L s , L r , L m are the stator, rotor, and mutual inductances, respectively, R s , R r are the stator, rotor resistances, respectively, τ r = L r /R r is the rotor time constant, p is the number of poles pair, σ is the leakage coefficient, and ω is the rotor speed.
In this work, a dynamometer has been used to emulate the wind turbine. It is small, and its external stiffness is neglected compared to the other quantities. Therefore, its drive train can be represented by a single lumped mass model as follows where, J is the moment of inertia, f r is the damping factor and T r is the wind turbine torque.

Control Scheme
The control scheme, based on the flux weakening vector control, is developed for the SEIG side as shown in Figure 1b. Description of this control scheme can be found in the literature [8]. To implement this control strategy, information about the rotor speed is required, which is, in most applications, available through an encoder. In this work, the rotor speed is estimated for sensorless operation, using the estimation mechanism that is discussed in the next section.

Reference Voltage Model-Based Rotor Flux Estimation
The rotor flux estimator, based on the reference voltage model in the (α, β) stationary reference frame, is provided by reference [11]

Reference Voltage Model-Based Rotor Flux Estimation
The rotor flux estimator, based on the reference voltage model in the (α, β) stationary reference frame, is provided by reference [11] where,φ r is the estimated rotor flux.

Kalman Filter Based Rotor Flux Estimation
The rotor flux estimator is developed using the Kalman filter applied to the discretized model of the induction generator (1). The discrete state space model is expressed as where, k is the step, The discretization is carried out on the continuous Model (1) using Euler's method and the matrices A, B and C are given by where, T s is the sampling time.
The Kalman filter algorithm is given in Appendix A. The rotor flux estimation is expressed bŷ

Artificial Neural Network Speed Estimation
The rotor speed is estimated by the artificial neural network (ANN) shown in Figure 2a. The ANN is a recurrent multilayer network, where the hidden layer is activated by a hyperbolic tangent (tanh) function, and the output layer is activated by a linear function. The ANN output is the estimated rotor speed. The ANN has three inputs: • Two external signals (estimated rotor flux from the reference voltage Model (3) and estimated rotor flux from the KF (5)).

•
A feedback from the ANN output with a delay.

of 16
The equation of the neuron at the hidden layer and the output are given by where,ω is the estimated rotor speed, h is the neuron expression at the hidden layer, w ji ; j = 1 · · · 3 are the weights from the input layer to the hidden layer, w i ; i = 1· · · N are the weights from the hidden layer to the output layer, and N is the number of neurons in the hidden layer. The ANN training is carried out online, using the flux error between the rotor flux (φ r ) estimated by the reference voltage Model (3) and the rotor flux (φ rKF ) estimated by the adaptive KF (5), as shown in Figure 2b, to update the ANN weights [30]. The backpropagation algorithm is used for the training process, and the weights are updated using the equations ANN is a recurrent multilayer network, where the hidden layer is activated by a hyperbolic tangent (tanh) function, and the output layer is activated by a linear function. The ANN output is the estimated rotor speed. The ANN has three inputs: • Two external signals (estimated rotor flux from the reference voltage Model (3) and estimated rotor flux from the KF (5)). • A feedback from the ANN output with a delay.
The equation of the neuron at the hidden layer and the output are given by where, is the estimated rotor speed, h is the neuron expression at the hidden layer, ; = 1 ⋯ 3 are the weights from the input layer to the hidden layer, wi; i = 1⋯N are the weights from the hidden layer to the output layer, and N is the number of neurons in the hidden layer. The ANN training is carried out online, using the flux error between the rotor flux ( ) estimated by the reference voltage Model (3) and the rotor flux ( ) estimated by the adaptive KF (5), as shown in Figure 2b, to update the ANN weights [30]. The backpropagation algorithm is used for the training process, and the weights are updated using the equations

Control Design
The three-phase AC load is connected to the DC-link through the DC-AC converter (inverter)

Control Design
The three-phase AC load is connected to the DC-link through the DC-AC converter (inverter) and a resistive-inductive filter to smoothen the signals. In order to match the voltage and the frequency of the AC load with the system requirements, both quantities are controlled to track specific references. The load side control system includes two control loops in cascade, as depicted in Figure 4a.
The outer control loop regulates the load frequency, to be maintained constant at 60 Hz, and provides the reference for the q-component of the load voltage. The inner control loop has a vector control scheme, based on proportional integral (PI) regulators, to control the direct-quadrature (d-q) components of the load voltage. The three-phase voltages and currents at the load are available by measurements. The d-q components are carried out by the Park transformation. The frequency f and the angular position θ of the (d-q) synchronous rotating reference frame, required in the control system implementation, are available by estimation.

Frequency Estimation
The implementation of the load side control scheme, shown in Figure 4a, requires information about the frequency. In general, a phase-locked loop (PLL) structure is used for its estimation. The PLL strategy involves the tuning of the voltage control gains to deal with the measurement uncertainties [33,34]. To overcome this issue, an estimation method, based on the Kalman filter, is adopted in this work. It consists of obtaining the fundamental component and an orthogonal component of the three-phase voltages at the load side that is used in the frequency estimation. The advantage of the Kalman filter is the ability to deal with measurement noises through adapting its gains [35][36][37].
The three-phase AC load is considered balanced, and the observed voltages can be expressed as (9) where, V m is the amplitude, ω e = 2πf is the angular frequency and φ is the phase angle.
A discrete state space model of the balanced three-phase sinusoidal system can be generated as follows where, is the state vector of the three-phase filtered voltage signals (v La , v Lb , v Lc ) and the orthogonal signal, respective to the phase a, is the measured output of the load voltages, w and z are independent noises.
The matrices A and C are given by where, N = f s /f is the number of samples in the fundamental component and f s is the sampling frequency. The Kalman filter algorithm, described in Appendix A, is used to estimate the state vector V L using x = V L , y = v, and w and z are independent measurement noises with covariance [37]. Then, the instantaneous phase angle is obtained by The fundamental frequency f can be estimated from zero-crossing detection of the signal θ(k).
The frequency estimation algorithm is illustrated in Figure 4b. From the load voltage measurements v abc , the Kalman filter is applied to estimate the voltages (v abc , v a⊥ ). Then, the angle θ is carried out using (v La , v La⊥ ) as defined in Model (11). Finally, the zero-crossing detection method is used to determine the frequency f. The Kalman filter algorithm, described in appendix A, is used to estimate the state vector VL using x = VL, y = v, and w and z are independent measurement noises with covariance [37]. Then, the instantaneous phase angle is obtained by The fundamental frequency f can be estimated from zero-crossing detection of the signal θ(k). The frequency estimation algorithm is illustrated in Figure 4b. From the load voltage measurements , the Kalman filter is applied to estimate the voltages ( , ). Then, the angle θ is carried out using ( , ⊥ ) as defined in Model (11). Finally, the zero-crossing detection method is used to determine the frequency f.

Battery Storage System and Power Management
The wind energy-based microgrid operates in standalone mode by integrating a battery storage system (BSS). The BSS includes a battery bank and a DC-DC buck-boost converter connected to the DC-link, as shown in Figure 5a. The BSS control system regulates the DC-link voltage, to be maintained constant, through the buck-boost converter by charging-discharging the battery bank to meet the load demand. As illustrated in Figure 5a, the bidirectional buck-boost converter is run in continuous conduction mode. The insulated-gate bipolar transistor (IGBT) states s1 and s2 are selected, based on the control system, to operate the converter for charge and discharge modes. The control system includes a PI controller to regulate the DC-link voltage (Vdc) for tracking the voltage reference (Vdc*), and the battery charge-discharge is operated through controlling its current (Ibat) to track a current reference carried out from the powers: Wind generator power (Pw), battery power (PB), and load power (PL); and the battery voltage (Vbat), as shown in Figure 5b.

Battery Storage System and Power Management
The wind energy-based microgrid operates in standalone mode by integrating a battery storage system (BSS). The BSS includes a battery bank and a DC-DC buck-boost converter connected to the DC-link, as shown in Figure 5a. The BSS control system regulates the DC-link voltage, to be maintained constant, through the buck-boost converter by charging-discharging the battery bank to meet the load demand. As illustrated in Figure 5a, the bidirectional buck-boost converter is run in continuous conduction mode. The insulated-gate bipolar transistor (IGBT) states s 1 and s 2 are selected, based on the control system, to operate the converter for charge and discharge modes. The control system includes a PI controller to regulate the DC-link voltage (V dc ) for tracking the voltage reference (V dc *), and the battery charge-discharge is operated through controlling its current (I bat ) to track a current reference carried out from the powers: Wind generator power (P w ), battery power (P B ), and load power (P L ); and the battery voltage (V bat ), as shown in Figure 5b.
In this work, it is assumed that the battery bank can store any excess power produced by the wind turbine generator. The charge-discharge process is conducted through a power management system (PMS).
The PMS checks the battery state of charge (SOC) carried out by where, I bat is the battery current and Q is the battery capacity. The constraints on the SOC for the battery storage is given as where, SOC min and SOC max are the minimum and the maximum allowable states for safety. The power management system provides the references to the local controllers (generator and battery) based on the net power (P net ) and the battery SOC. It follows the flowchart shown in Figure 6. SOC = 100 1 + (12) where, Ibat is the battery current and Q is the battery capacity. The constraints on the SOC for the battery storage is given as where, SOC and SOC are the minimum and the maximum allowable states for safety. The power management system provides the references to the local controllers (generator and battery) based on the net power (Pnet) and the battery SOC. It follows the flowchart shown in Figure  6.

Experimental Results
Experiments were conducted using the DC-microgrid experimental setup illustrated in Figure  7. The electric schematic for wiring is shown in Figure 8. The setup includes the following modules: 1. Three-phase squirrel-cage induction generator.
2. Capacitor bank connected to the generator stator terminal for running as a self-started generator.
3. Four-quadrant dynamometer, coupled with the induction generator, for wind turbine Figure 6. Flowchart of the power management system.

Experimental Results
Experiments were conducted using the DC-microgrid experimental setup illustrated in Figure 7. The electric schematic for wiring is shown in Figure 8. The setup includes the following modules:

2.
Capacitor bank connected to the generator stator terminal for running as a self-started generator.

3.
Four-quadrant dynamometer, coupled with the induction generator, for wind turbine emulation.

4.
Back-to-back IGBT converters to connect the generator to the load.

5.
Bidirectional IGBT DC-DC converter and line inductor to connect the BSS to the DC-link. 6.
Battery bank based on lead acid batteries. 7.
Three-phase inductor as the filter to connect the DC-AC converter to the load. 8.
Variable switching resistor to vary the three-phase AC load. 9.
The specifications of the squirrel-cage induction machine, the OPAL-RT system, and the other components are available in references [30,34]. The elements' characteristics are provided in Tables 1  and 2.
The control and estimation algorithms and the data acquisition were implemented in the MATLAB/Simulink environment and executed in the real-time digital simulator OP5600 through the RT-LAB software, which compiles the Simulink model and runs it in the OP5600 [34]. The control gains were selected by trial and error, to achieve successful performance for the estimation (generator state and load frequency) and the control (rotor speed and DC-link voltage).
The artificial neural network was implemented with N = 6 as the number of neurons in the hidden layer. The sampling time for the ANN and the Kalman filter execution was T s = 100 µs.
The first experiment was carried out to operate the wind turbine-generator under a variable wind speed profile and a variable load by varying the resistances' values. Figure 9 presents the responses of the microgrid. The rotor speed estimation and the tracking are shown Figure 9a, where it can be observed that the rotor speed, estimated by the ANN estimation scheme, was well achieved, and the rotor speed was tracking its reference. It can be observed for the speed response in Figure 9a, a zero steady-state error, while a small steady-state error was observed in the speed tracking in reference [24], using the MRAS-sliding mode observer. Furthermore, the speed tracking occurred without an overshoot, compared to the result in reference [15], where a small overshoot was seen at the step transition as the speed estimation depended on the model parameters. In reference [22], the speed response had some oscillations, whereas these fluctuations were not observed in the speed tracking shown in Figure 9a. The power management system operates the charge-discharge of the battery adequately at each change in the load to keep the power balanced in the system, as shown in Figure 9b. The DC-link voltage was successfully regulated, as shown in Figure 9c, despite the step variations in the generator power and the load demand. The battery current, required for such operation, is shown in Figure 9d, and as observed, it follows the variation between the generator power and the load demand. In Figure 10, the d-q components of the load voltage track the voltage references with a good performance, and the frequency was well estimated and regulated to track the reference value despite the variations in the load demand. These results prove the robustness of the proposed estimation-control system to uncertainties due to step variations in the wind speed and the load demand. operation, is shown in Figure 9d, and as observed, it follows the variation between the generator power and the load demand. In Figure 10, the d-q components of the load voltage track the voltage references with a good performance, and the frequency was well estimated and regulated to track the reference value despite the variations in the load demand. These results prove the robustness of the proposed estimation-control system to uncertainties due to step variations in the wind speed and the load demand.         In this experiment, the control and the estimation schemes were verified for a random ramp variation of the wind speed by running the dynamometer at a random ramp speed. The estimated rotor speed tracked the dynamometer speed with a good performance, as illustrated in Figure 11a. In this ramp response, it can be observed that a small deviation, between the estimated rotor speed and the reference, was present in a similar way, as in the results of reference [26], which shows a common behavior in the different control methods. The power response was appropriately balanced in order to feed the load with a constant power, as shown in Figure 11b. Again, the DC-link voltage was well regulated, as shown in Figure 11c, despite the speed variation. For the load voltage regulation, a variable profile for the d-component of the load voltage had been used to test the frequency estimation and regulation, as shown in Figure 12a. It can be observed that the d-component of the load voltage tracked the variable reference, and an opposite variable q-component of the load voltage was generated to compensate for the variation of the d-component and maintain the frequency constant, as shown in Figure 12a,b. A closer look at the frequency response, shown in Figure 12b, shows that the frequency is affected by the variation of the d-q components of the load voltage with a fast action of the controller to bring back the frequency to the constant value, which demonstrates the capability of the estimation and control system to overcome the disturbances effect. In this experiment, the control and the estimation schemes were verified for a random ramp variation of the wind speed by running the dynamometer at a random ramp speed. The estimated rotor speed tracked the dynamometer speed with a good performance, as illustrated in Figure 11a. In this ramp response, it can be observed that a small deviation, between the estimated rotor speed and the reference, was present in a similar way, as in the results of reference [26], which shows a common behavior in the different control methods. The power response was appropriately balanced in order to feed the load with a constant power, as shown in Figure 11b. Again, the DC-link voltage was well regulated, as shown in Figure 11c, despite the speed variation. For the load voltage regulation, a variable profile for the d-component of the load voltage had been used to test the frequency estimation and regulation, as shown in Figure 12a. It can be observed that the d-component of the load voltage tracked the variable reference, and an opposite variable q-component of the load voltage was generated to compensate for the variation of the d-component and maintain the frequency constant, as shown in Figure 12a,b. A closer look at the frequency response, shown in Figure 12b, shows that the frequency is affected by the variation of the d-q components of the load voltage with a fast action of the controller to bring back the frequency to the constant value, which demonstrates the capability of the estimation and control system to overcome the disturbances effect. In this experiment, the control and the estimation schemes were verified for a random ramp variation of the wind speed by running the dynamometer at a random ramp speed. The estimated rotor speed tracked the dynamometer speed with a good performance, as illustrated in Figure 11a. In this ramp response, it can be observed that a small deviation, between the estimated rotor speed and the reference, was present in a similar way, as in the results of reference [26], which shows a common behavior in the different control methods. The power response was appropriately balanced in order to feed the load with a constant power, as shown in Figure 11b. Again, the DC-link voltage was well regulated, as shown in Figure 11c, despite the speed variation. For the load voltage regulation, a variable profile for the d-component of the load voltage had been used to test the frequency estimation and regulation, as shown in Figure 12a. It can be observed that the d-component of the load voltage tracked the variable reference, and an opposite variable q-component of the load voltage was generated to compensate for the variation of the d-component and maintain the frequency constant, as shown in Figure 12a,b. A closer look at the frequency response, shown in Figure 12b, shows that the frequency is affected by the variation of the d-q components of the load voltage with a fast action of the controller to bring back the frequency to the constant value, which demonstrates the capability of the estimation and control system to overcome the disturbances effect.

Conclusions
An estimation strategy, for the rotor speed, the rotor flux and the load frequency, is proposed to implement a vector control scheme on a standalone wind energy DC-microgrid based on induction generator and battery storage. For sensorless operation, the rotor speed is estimated by an ANNbased MRAS method through estimating the rotor flux by a Kalman filter. The adaptive Kalman filter and the artificial neural network, used as estimation models, improve the MRAS scheme due to their online adaptation to deal with parametric variations and uncertainties. At the load side, the frequency is estimated by a Kalman filter to avoid the PLL use due to its drawbacks. The proposed estimation strategy can also be applied for the experimental implementation of other control schemes in wind energy conversion systems based on induction generators.

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