1 Introduction

Frequency-locked loops refer to a wide range of closed-loop synchronization systems that have attracted considerable attention in various technological applications encompassing synchronization, signal processing, and control. In single-phase grid applications, the design of frequency-locked loops often depends regarding a second-order generalized integrator. Other alternatives include utilizing the linear Kalman filter, intricate band-pass filter, and circular limit-cycle oscillator. There stands a lack of comprehensive knowledge regarding the actual advantages and disadvantages of these in comparison to the SOGI-FLL [1]. AC inverters commonly utilize current regulators, three main types: hysteresis control, linear PI controller, and deadbeat extrapolative regulators. Synchronous frame regulators are widely acknowledged for their superior performance when compared to stationary frame regulators. This is because they function at direct current levels, enabling them to minimize faults in steady state. This study introduces a theoretical link between two sets of regulators and proposes a novel fixed frame regulator called the resonant regulator. The resonant regulator achieves similar performance to a synchronous frame PI regulator in both transient and steady-state settings. The new regulator is capable of functioning with both single-phase and three-phase inverters [2]. PMSG is most popular in wind energy supply system. Due to magnet self-excitation, the stator operates with enhanced power factor and increased efficiency. This study investigates power quality concerns in a diesel engine-based generating system with an independent permanent magnet synchronous generator. It oversees the tasks of compensating for reactive power, correcting power factor, and controlling voltage. This research proposes a battery energy storage system connected to the distribution static compensator DC bus. The energy storage system utilising batteries lets the distribution static synchronous compensator control active and reactive power. The battery energy storage system charges and discharges via the DC bus during low and high electrical demand. The core component of the control strategy is obtained by the utilization of three conventional phase-locked loop approaches. The system incorporates a double-synchronous reference frame, double-frequency and amplitude compensation, and an adaptive filter with a frequency estimation loop. There are three forms of PLLs, specifically phase-locked loops [4].

Straight-forward movement control and field-oriented control are the attractive standard industrial approaches aimed at induction motor torque control. This study analyzes two control methods, highlighting their pros and cons. The torque and current ripple, transient response to torque command step variations, and performance of the two control systems are evaluated. The analysis used numerical simulation results [5]. Phase voltage-oriented control regulates the power factor of a wind turbine equipped with a permanent magnet synchronous generator. Contrary to the conventional rotor flux-oriented control technique, this approach does not necessitate the use of a position sensor or a sensor-less estimator. The proposed control system operates by synchronously and independently rotating two dq frames. One is utilized for phase-locked loop functionality, while the other is employed for PVOC current regulation. Proportional-integral controller is a type of filter that is specifically intended to isolate and measure the phase voltage angle. The angle in question facilitates the conversion of coordinates between the fixed αβ frame and the rotating dq frame within the PVOC control loop. To create the dq model of the permanent magnet synchronous generator, we need to align the three-phase voltage vector on the d-axis. This model is utilized for the purpose of designing a PI controller and implementing decoupling control [7]. A voltage source converter is operated using second- and third-order generalised integrator-based control in the hybrid order technique. The proposed control technique effectively reduces the impact of DC offset on the disrupted power supply voltage, in contrast to the second-order generalised integrator control, which worsens performance in circumstances with distorted supply. Consequently, unit voltage templates exclusively employ sinusoidal waves to extract the reference source current and generate VSC pulses. The proposed control technique effectively addresses the issues of total harmonics distortion in the supply current, load balancing at the generator terminal, reactive power compensation, and regulation of zero voltage and frequency at the generator ends [8]. Off-grid distributed power producing systems that utilise wind energy and operate on a three-phase four-wire system effectively address power quality problems by employing the quasi-Newton least mean fourth control method. The proposed control system generates a reference current for the voltage source converter to address power quality concerns, including load unbalancing, neutral current compensation, harmonics reduction, reactive power compensation, and voltage and frequency regulation. The step size parameter, which governs system convergence, is unaffected by the input signal’s covariance and means in the proposed control. Conversely, algorithms based on stochastic processes rely entirely on the statistical properties of the input signal to determine the step size [9].

In contrast to synchronous reference frame-PLL, which requires two transformations plus a voltage-controlled oscillator for basic component extraction. The recommended solution reduces trigonometric operations’ computing load by removing VCO, resulting in faster dynamic reactions in different scenarios. Its ability to manage frequent and quick changes makes it suitable for distributed power generation. An analysis of a wind-based distributed generating system is presented here. A self-excited induction generator powers a nonlinear load under various electrical conditions. The control technique allows reactive power compensation, harmonics reduction, and load balancing. A star-delta transformer attached to a load terminal helps to modify the neutral current [10]. A voltage-controlled oscillator is employed to regulate the voltage source converter independently of a PLL loop. It improves electrical quality in dispersed power generating. The fundamental component of the load current is extracted by this control via a three-phase alpha–beta transformation [11, 12]. While the standard SRF-PLL provides limited filtering capabilities, it may not be extremely useful for most applications. To overcome this constraint of the SRF-PLL, various advanced three-phase PLLs have been proposed in the current research literature. Incorporating the dynamics of these contemporary phase-locked loops (PLLs) into the existing impedance models is intricate, primarily because of the existence of several feedback/feedforward loops and filters in their formations. The objective of this study is to fill this research void. Research has demonstrated that advanced three-phase phase-locked loops (PLLs) can be expressed in many ways and easily integrated into the current dq-frame impedance model. This notion is validated by the provision of multiple case examples [14]. A hybrid wind-PV system with a lithium-ion battery bank and shunt active power filter is used. Controlled hybrid systems create active power and deliver high-quality power to loads. Controlling the SAPF entirely to offset harmonic currents is the main idea behind this contemporary design. Batteries regulate this connection with a buck-boost converter. In the face of unanticipated nonlinear load changes, a large battery energy storage system allows rapid and steady DC voltage management. Thus, SAPF harmonic filtering improves. Despite abrupt changes in load conditions, the suggested system is regulated to run at the optimal power point and meet load requirements while maintaining optimal output voltage and frequency [15,16,17].

An innovative method quantifies the critical factors of the permanent magnet synchronous generator. Controllers are constructed on measured parameters. Vector control optimizes power extraction from the generator-side converter under varying wind speeds. A model predictive controller regulates the active and reactive power transmission to the power grid using the grid-side voltage source converter. This can be accomplished by effectively controlling the d- and q-axis currents in the synchronous reference frame. The model predictive controller chooses control actions that minimize cost functions based on future estimates of control variables. The system has a redesigned LCL filter design method to meet grid code requirements. The design approach is simple and incorporates crucial filter parameters without repeating computations. Comparing the improved filter design to traditional L, LC, and iterative LCL filters shows its efficacy [19]. A “six-port converter,” as proposed, has nine semiconductor switches. The suggested architecture retains all the basic features of PV and DVR systems while reducing the number of switches from twelve to nine. The dual operating capability further improves the system’s ability to recover from severe symmetrical and asymmetrical grid faults and power dips. This research analyzes six-port converter operational modes in detail. A suitable control algorithm is developed, and simulation and experimental investigations in various operating conditions demonstrate the configuration’s accuracy. [20]. In case of grid disruptions, microgrids should power vital local loads during islanding. Energy storage can keep the point of common coupling voltage within a certain range during microgrid operation. This research proposes a novel method for smooth and uninterrupted transfer in the energy storage equipment system’s three-phase converter. To provide a smooth transition, power and inductance are optimized. The converter’s output voltage, rated power, and inductor voltage loss affect the PCC voltage’s amplitude and frequency due to unintentional islanding. For direct and smooth transfer, modulation waves contain limiters to keep the PCC voltage amplitude and frequency within the prescribed range. Analyzing the vector diagram of voltage and current vectors for different loads determines the ESE’s power consumption and the converter’s inductor voltage drop. The suggested control approach involves limiter setting design, inductor ripple current analysis, and nonlinear load effect on PCC voltage [21]. An assessment is being conducted on a wind generator equipped with a permanent magnet and a complete power converter. Within grid systems that lack strength, the generator must regulate the dc-link voltage. Wind power must help the grid regulate voltage and frequency when it makes up a large share of grid electricity. A variable-step search strategy based on the electro-mechanical dynamic model of the wind turbine can be employed to accomplish this task. This algorithm adjusts wind speed generator output power to match demand, regulating DC-link voltage. Due to wind power curve nonlinearity and slopes, the controller is tailored to different sections [27]. The proposed approach utilizes space vector modulation to attain direct-torque control for a permanent magnet synchronous generator in a variable-speed direct-drive wind power generation system. A novel observer is suggested to estimate the rotor position and stator flux linkage of the permanent magnet synchronous generator utilising the present model. The observer utilizes a finite sample frequency. The optimal torque command is obtained and applied directly to enable direct torque control, allowing the wind turbine generator to achieve precise control of maximum power point tracking, without requiring wind speed or rotor position sensors. The proposed control approach has several benefits, such as attaining a predetermined switching frequency and reducing fluctuations in flux and torque. In addition, it obviates the necessity for a torque observer, leading to reduced processing demands, enhanced dynamic reaction, and heightened system resilience. [29, 30]

In this research paper, the generator-side control involves a two-feedback loop; speed and location of the rotor are both sensed which transforms \(dq\) values into \(\alpha \beta\) quantities. The control system monitors and quantifies direct current voltage, stator currents, and rotor position. This generator side determines the rotor position by examining its encoder. The PI speed controller computes the desired current value for the quadrature axis, while the desired current value for the direct axis is set to zero. The predicted voltages are calculated by two proportional-integral current controllers. The compensation terms are applied at the output of the proportional-integral current controllers to independently regulate the currents by addition and subtraction.

Space vector modulation computes duty cycles for reference voltages, whereas the PWM generator block determines switching signals for power converters. The hysteresis current controller technique generates a highly accurate switching pulse, which is unaffected by variations in the load parameter. The wind velocity and disturbances in the electrical grid are significant factors.

The grid-side control utilizes a steady-state Kalman filter control technique to monitor the reference current generation. The objective is to regulate DC link voltage and power balance for a grid-connected system. In the reference current generation process, the non-linear current is sensed by the Kalman filter control. Direct axis current is extracted, using appropriate Kalman variable factor and it is given to output of PI Controller. Hysteresis current controller gets reference current from Inverse Park Transformation.

Also, improving power quality issues and regulating DC-link voltage to accomplish smooth power transfer under conditions of balance and varying circumstances. The manuscript exhibits plug-out simulation consequences, as shown in Fig. 12, with power balance results at the point of coupling connection.

The structure of this document is as follows: Sect. 1 encompasses the introductory and literature review aspects, along with the benefits of the proposed control algorithm. The system configuration proposed has been presented in Sect. 2. Subsequently, the mathematical representation of control using equations has been provided. The generator-side control utilizes a field control method, while the grid side control demonstrates the generation of the reference current utilizing the steady-state linear Kalman filter control algorithm. Section 3. demonstrates different circumstances using MATLAB Simulink. Eventually, Sect. 4. presents a conclusive summary.

2 System description

Figure 1 depicts the feedback control strategy that is used by the W-PMSG and is connected to the grid. A field-oriented algorithm controls the PMSG output current and regulates the DC link voltage. The parameters being monitored for this control are the stator current and rotor position. This generator side focuses on determining the position of the rotor by considering the presence of an encoder attached to it. The current used as a reference for the direct axis (\({i}_{sd})\) is established as zero, while the reference current for the quadrature axis (\({i}_{sq})\) is determined through the (PI) speed controller.

Fig. 1
figure 1

Integrated Control strategy of PMSG connected to grid

The necessary \(dq\) voltages are derived using two (PI) current controllers’ methodology. To achieve independent control of the currents, the compensation terms \(\omega_{e} \psi_{d}\) and \(\omega_{e} \psi_{q}\) are, respectively, added and subtraction occurs at the output of the PI current controllers. Space vector modulation is used to determine the duty cycles for the given reference voltages, while the PWM generating block creates the switching signals for the power converter.

Steady-state Kalman filter control is implemented on the grid side, and hence the power quality of the grid current is enhanced. Three-phase load current is sensed from where two wires connect. The steady-state Kalman filter senses the direct axis current. The reference and actual DC link voltages are compared to generate an error signal, which is added to the direct axis current component of the Kalman filter. The reference current generation is extracted using the inverse park transformation. The three-phase reference current is derived from the inverse park transformation. Grid angle is sensed from the three-phase source, and it is given to dq0 to ABC block. With the help of hysteresis PWM current controller, measured current and specified current are sensed and error is extracted. As wind velocity changes, it is affected as shown in DC-link voltage.

2.1 PMSG control techniques

There are several different classifications into which control techniques for permanent magnet synchronous generator technologies may be placed. The following are some of the ones that are most often used:

Control of Maximum Power Point Tracking Approach The wind turbine’s generator exploits the maximum power output to control the rotating speed of the rotor and the pitch angles of the blades. This enables the method to pinpoint the spot inside the generator where it generates the maximum power with a greater degree of precision.

Field-Oriented Control (FOC) is a technique employed to regulate the speed and torque of the permanent magnet synchronous generator (PMSG). This is accomplished by managing the rotor position and current vector in a reference frame that is revolving.

Direct Torque regulation, often known as DTC, is a method that does not require a rotation to directly manage PMSG torque and flux.

Sliding Mode Control (SMC) is a robust control technique that effectively compensates for parameter uncertainty and disturbances. It is also known as the sliding mode controller. It employs a sliding surface to maintain the system’s position along the targeted path.

Model Predictive Control, often known as MPC, is a method that makes application of a PMSG framework system to forecast upcoming performance and optimize control inputs to accomplish a certain goal. Adaptive Control adjusts PMSG system control settings depending on the system’s reaction to changing environmental conditions.

2.2 Generator-side closed-loop FOC control and mathematical analysis

Wind turbines transform wind energy into mechanical energy for electricity generation. Wind turbine functioning relies on these main components and principles. The wind turbine’s most visible feature, the rotor blades, collects wind energy. Like aircraft wings, they have air foil profiles. The wind turbine’s rotor blades are positioned on top of a tower, facing the wind. For effective functioning, wind turbines use devices to yaw or turn the rotor to face the wind. A central hub connects the rotor blades to a shaft. The rotor blades cause the hub and shaft to revolve. The generator of the shaft transforms mechanical energy into electrical energy. Advanced wind turbines employ synchronous or permanent magnet generators. Power electronics transform the rotor’s variable-speed rotation into a grid-integrable electrical frequency to provide a steady and synchronized electrical output.

The principle of wind turbine and power equation is shown below,

$$P=\frac{1 }{2}\rho {C}_{p}A{V}^{3}$$
(1)
$${T}_{{\text{turbine}}}=\frac{1}{2}\rho A{C}_{p }\frac{V}{\gamma }$$
(2)

where P is output power (in watts or kilowatts).

ρ is the air density factor (in kilograms per cubic meter).

A is the rotor swept area (in square meters), which is determined by the length of the rotor blades and their arrangement.

v is the wind speed (in meters per second) at the height of the rotor.

The power coefficient, denoted as Cp, quantifies the effectiveness of a wind turbine in acquiring the wind’s energy. The value is dimensionless and usually falls within the range of 0 to 1. The Betz limit, denoting the theoretical upper bound of efficiency, is roughly 0.59. The wind velocity fluctuates between 10 and 12 m per second. As utilizing a PMSG with eight poles, the rotational speed of the generator is 750 revolutions per minute (rpm), while the average wind speed is assumed to be ten meters per second (m/s). The maximum power production is achieved when the generator speed is at 1.2 per unit (PU), and the power steadily decreases below this speed to 0.7 pu. Figure 2 depicts the power characteristics of a turbine.

Fig. 2
figure 2

Turbine power-speed characteristics

The PMSG 3.7 kW wind turbine achieves its highest power output when the wind speed reaches 0.9 pu (nominal mechanical power) during startup and at the point when the velocity of the wind approaches 10 m/s (nominal mechanical power) under normal conditions. The wind turbines’ power characteristics are demonstrated by holding the pitch angle beta constant at zero, and the rotational speed is set at 1.1 times the base generator speed.

Field-oriented control (FOC) is a control technique employed in electric motor control systems, namely in applications such as AC induction motors or permanent magnet synchronous motors. Field-oriented control (FOC) is a deliberate strategy designed to separate the torque and flux components of the motor current, allowing for more precise adjustment of these two aspects. This control technique improves motor performance by optimizing efficiency, enhancing torque responsiveness, and ensuring precise speed regulation. Below is a fundamental summary of the field-oriented control method utilizing sensors.

PMSG currents must be measured with precision for field-oriented control (FOC) to function properly. Current sensors, such as Hall-effect sensors or shunt resistors, are utilized to monitor phase currents.

The Clarke transformation is a technique employed to convert three-phase currents into a two-phase orthogonal reference frame (\(\alpha \beta\)). This process aligns the two-phase currents with the rotor flux, creating a reference frame (\(dq\)) that remains fixed. In this frame, ‘\(q\) ‘ represents the torque component and ‘\(d\) ‘ represents the flux component.

The proportional-integral (PI) controller is responsible for maintaining the desired motor performance by adjusting the reference torque and flux.

Perform the inverse Park and inverse Clarke transformations on transform the control signals back to the three-phase reference frame.

Figure 3 illustrates the control as a space vector diagram. The required torque is controlled by adjusting the current vector. The permanent magnet produces a magnetic flux that is oriented in alignment with the d-axis. The presented diagram, \(\alpha\) represents the torque angle, \(\theta_{r}\) the load angle, and \(I_{s}\) the vector representing the current in the stator, which is where the sum of \(i_{{{\text{sd}}}}\) and \(ji_{{{\text{sq}}}}\).

Fig. 3
figure 3

Phasor representation for field-oriented control

Figure 4 illustrates the generator-side control (GSC) method with a sensor. Variable-speed wind turbines are becoming more prevalent due to their ability to optimize electricity extraction by running at various speeds. Nevertheless, the energy generated the output of a wind turbine is not entirely determined by the wind circumstances at the location, but also by the control employed for the turbine. Field-oriented control is a widely used method for controlling the permanent magnet synchronous generator (PMSG) by precisely measuring the rotor position and speed of the generator.

Fig. 4
figure 4

Field-Oriented Control method using a sensor

Field-oriented control (FOC) is a control method that operates in a closed-loop system. In FOC, the torque component is regulated circuitously by manipulating the PMSG current. The control approach is formulated in the (\(dq\)) reference frame. Equation 3 presents the torque illustration in the (\(dq\)) coordinate system designed for the setting up of a permanent magnet synchronous generator (PMSG) on the surface.

$$ T_{e} = \frac{3}{2}\frac{p}{2}\psi_{m} i_{sq} $$
(3)

Although the control in this development is applied to a PM synchronous machine that exhibits some saliency, this characteristic is disregarded for simplicity. Equation 4 demonstrates \(\psi_{m}\) that by manipulating the (d) axis stator current, the torque may be regulated, assuming a constant.

$$ \xi = \frac{{L_{q} }}{{L_{d} }} = 1.2 $$
(4)

This control system monitors and quantifies direct current voltage, stator currents, and rotor position. This chapter determines the rotor position using an encoder on the rotor. \(I_{sd}\) is set to 0 and \(I_{sq}\) is given by the PI speed controller. The necessary \(dq\) voltages are obtained from two (PI) current controllers. Controlling currents independently requires adding and subtracting compensation terms \((\omega_{e} \psi_{d} )\) and \((\omega_{e} \psi_{q} )\) at the output of proportional-integral (PI) current controllers. Space vector modulation generates duty cycles for reference voltages, whereas PWM generator blocks compute power converter switching signals.

The discrepancy denoting the difference within the range of the reference speed \(w_{r}^{*}\) and the measured speed \(w_{r}\)serves as the input for a speed controller that uses the proportional-integral (PI) method. The quadrature axis of the reference signal is produced when the signal is being output. Two more PI controllers, also known as current controllers, receive their input from the differences in reference currents that are produced by the direct and quadrature components simultaneously. These controllers produce a reference voltage signal that is then supplied to the motor. The decoupling factor obtained by the equations for the stator voltage in the \(dq\) reference frame was used to derive it. The shared element in both voltage equations is referred to as the back-electromotive force (back-emf). By eliminating the back-emf term in the current controller section, the two currents, \(i_{sd}\) and \(i_{sq}\) , will become entirely uncorrelated. This further streamlines the calibration process of the PI current controllers by optimizing the transfer function of the motor.

$$ u_{sq} = R_{s} i_{sq} + \frac{{d\psi_{q} }}{dt} + \omega_{e} \psi_{d} $$
(5)
$$ u_{sd} = R_{s} i_{sd} + \frac{{d\psi_{d} }}{dt} - \omega_{e} \psi_{q} $$
(6)

2.3 Grid-side steady-state Kalman filter Control Algorithm and Mathematical analysis

By integrating these components, it proposes a control approach that utilizes a Kalman filter on the grid side to accurately estimate and manage the current during a stable operation. This involves continuously monitoring the current levels, estimating the current state using the Kalman filter and adjusting control settings to ensure that the current stays within predefined limits. The Kalman filter is a mathematical process employed to estimate the state of a system. Within this framework, it is probable that it pertains to the utilization of a Kalman filter to approximate the present condition regarding the system, specifically considerations connected to the present. This suggests that the control method primarily aims to regulate the flow of electrical current in the power system. Effective regulation is crucial for preserving grid stability, particularly when faced with fluctuating loads or the integration of renewable energy sources. Figures 5 and 6 depict the application of grid-side steady-state Kalman control to enhance the power quality of the inverter’s characteristics.

Fig. 5
figure 5

Grid-side steady-state Kalman filter control

Fig. 6
figure 6

Simplified current control SSLKF

Implementing this control method is especially important in power systems with a significant presence of renewable energy sources or in smart grids that require real-time modifications to accommodate dynamic changes in the system. Utilizing a Kalman filter for state estimation enables the control system to consider uncertainties and disturbances, hence improving the overall stability and performance of the grid.

It should be emphasized that the implementation of the power system would require specific features such as the characteristics of the Kalman filter, control algorithms, and monitoring devices. These details would be determined by the unique requirements and characteristics of the power system in question. Furthermore, the control approach might be integrated into a more comprehensive control system designed to assurance the dependable and effective functioning of the power grid.

In grid applications, it is strongly advised to utilise amplitude normalization due to the potential for significant fluctuations in grid voltage amplitude, such as voltage sags or faults. The SOGI-FLL exhibits certain limitations. The primary limitation of this FLL is its restricted capacity to reject disturbances such as DC offset, harmonics, and inter-harmonics. The Kalman filter is a computational method used to estimate the values of unknown variables (states) in a linear dynamical system based on noisy observations that are linearly correlated with the system states. The LKF FLL employs a LKF to extract the fundamental component of the grid current, along with its quadrature version. Additionally, it utilizes a frequency estimator like the SOGI-FLL to detect the grid frequency and adjust the LKF accordingly to changes in frequency. It is important to observe that extracting the basic component of the grid voltage frequency using only the Kalman filter requires an extended Kalman filter. This approach is both nonlinear and computationally intensive. Park transformation was used to create stationary reference frame (dq algorithm). Park transformations convert three-phase to dq coordinates (rotating reference frame with fundamental frequency). Here, load currents are measured and converted to dq coordinates. Equation (7) presents the equations for transforming a–b–c to αβ–0 coordinates.

$$ \left[ {\begin{array}{*{20}c} {i_{0} } \\ {i_{\alpha } } \\ {i_{\beta } } \\ \end{array} } \right] = \frac{\sqrt 2 }{3}\left[ {\begin{array}{*{20}c} {\frac{1}{\sqrt 2 }} & {\frac{1}{\sqrt 2 }} & {\frac{1}{\sqrt 2 }} \\ 1 & { - \frac{1}{2}} & { - \frac{1}{2}} \\ 0 & {\frac{\sqrt 3 }{2}} & { - \frac{\sqrt 3 }{2}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{La} } \\ {i_{Lb} } \\ {i_{Lc} } \\ \end{array} } \right] $$
(7)

Park transformation converts αβ-0 to dq coordinate, as illustrated in Eq. (8):

$$ \left[ {\begin{array}{*{20}c} {i_{d} } \\ {i_{q} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\cos \theta } & {\sin \theta } \\ { - \sin \theta } & {\cos \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{\alpha } } \\ {i_{\beta } } \\ \end{array} } \right] $$
(8)

For simplicity, the single-phase grid current waveform can be expressed by

$$ i_{L} (n) = A(n)sin\{ \phi (n)\} = A(n)sin\{ \omega (n)nT_{s} + \theta_{0} \} $$
(9)

where A is the fundamental voltage amplitude, ϕ is the instantaneous phase angle, ω = 2πf is the fundamental angular frequency, f is the fundamental frequency, \(T_{s}\) is the sampling period, and \(\theta_{0}\) is the initial phase angle. States of the LKF are expressed as,

$$ \begin{gathered} a_{1} (n) = i_{L} (n) = A(n)sin\left\{ {\omega (n)nT_{s} + \theta_{0} } \right\} \hfill \\ a_{2} (n) = qi_{L} (n) = A(n)\cos \left\{ {\omega (n)nT_{s} + \theta_{0} } \right\} \hfill \\ \end{gathered} $$
(10)

The state transition between two sampling instants can be expressed by

$$ \begin{gathered} a_{1} (n + 1) = a_{1} (n)\cos \left\{ {\omega (n)T_{s} } \right\} + a_{2} (n)\sin \left\{ {\omega (n)T_{s} } \right\} \hfill \\ a_{2} (n + 1) = - a_{1} (n)\sin \left\{ {\omega (n)T} \right\}_{s} + a_{2} (n)\cos \left\{ {\omega (n)T_{s} } \right\} \hfill \\ \end{gathered} $$
(11)

The state transition matrix can be expressed by

$$ A\left( n \right) \, = \left[ \begin{gathered} cos\left( {Ts \, \omega \left( n \right)} \right) \, sin\left( {Ts \, \omega \left( n \right)} \right) \, \hfill \\ - sin\left( {Ts \, \omega \left( n \right)} \right) \, cos\left( {Ts \, \omega \left( n \right)} \right) \hfill \\ \end{gathered} \right] \, $$
(12)

The fundamental amplitude estimated from the states \(x_{1}\) and \(x_{2}\) is given by.

$$ a(n + 1) = A(n)a(n) + \varepsilon (n) $$
(13)
$$ y(n) = C(n)a(n) + \gamma (n) $$
(14)
$$ a(n) = \left[ {I_{\alpha } \left( n \right) I_{\beta } \left( n \right)} \right]^{T} \;\;\;\;{\text{is state vector}} $$
(15)

where \(T_{s}\) is sampling period and \(\omega\) is grid angular frequency. \(n\) indicates the current sample. \(y(n)\) is the measurement and \(C(n)\) = [1 0] is the measurement matrix and \(\varepsilon (n) = N(0,Q)\) is process noise vector which is assumed to have a zero mean and a covariance matrix equal to \(Q = qJ\) (where the \(J\) is an identity matrix) \(\gamma (n) = N(0,s)\) is the measurement noise, which is assumed to be independent from \(\varepsilon (n)\) having zero mean and a covariance equal to \(s\) (where \(s\) is scalar because there is only single measuring output). Constructed on the model and assuming with we have a priori information of Q and \(s\), the LKF for extracting the grid voltage fundamental component and its 90º phase shifted version can be implemented by affecting the following prediction-correction algorithm. Prediction and correction equation are represented from 16 to 19.

$$ {\mathbf{Prediction}} \, {\mathbf{stage}} \;\;\;\;a\left( {n + 1} \right) \, = A\left( n \right){\text{ a}}\left( n \right) $$
(16)
$$ P\left( {n + 1} \right) \, = A\left( n \right)P\left( n \right)A^{T} \left( n \right) + Q $$
$$ {\mathbf{Correction}} \, {\mathbf{stage}}\;\;\;\;\;a\left( n \right) = a\left( n \right) + K\left( n \right) \, \left[ {i\left( n \right) \, - C\left( n \right)a\left( n \right)} \right] $$
(17)
$$ K\left( n \right) = P\left( n \right)C^{T} \left( n \right)\left( {C\left( n \right)P\left( n \right)C^{T} \left( n \right) + {\text{ s}}} \right)^{ - 1 } $$
$$ P\left( n \right) \, = \, \left[ {J - K\left( n \right)C\left( n \right)} \right]P\left( n \right) $$
$$ K\left( n \right) = \, \left[ {k\alpha \, \left( n \right) \, k\alpha \, \left( n \right)} \right]^{T} $$
(18)
$$ Kc\left( t \right) \, = \, \left[ {k^{\prime } \alpha \, \left( t \right) \, k^{\prime } \beta \, \left( t \right)} \right]^{T} $$
(19)

where \(i_{\alpha }\) is an estimate of the fundamental component of the load current input signal \(i\), and \(i_{\beta }\) is its \(90^{ \circ }\) phase shifted version. \(\lambda\) is the frequency estimator control parameter, and \(k\) is the second-order integral gain.\(I\), \(\omega\) , and \(\theta\) are estimation of amplitude, angular frequency, and phase angle of fundamental component of load current input signal \(i\), respectively. Also, continuous-time Kalman gains \(K{\prime}_{\alpha }\) and \(K{\prime}_{\beta }\) in steady-state linear Kalman filter. Here, optimal case is neglected and simple case (\(K{\prime}_{\beta }\) = 0) is considered. With changes in small perturbation frequency, where frequency control parameter of Kalman filter \(\lambda\) = 49,384,

$$ K{\prime}_{\alpha } = k\omega_{n} = \sqrt 2 \left( {2*3.14*50} \right) = 444.06 $$
(20)

The reason behind the equivalency of the reduced SSLKF-FLL in Fig. 9 is that the frequency of the single-phase input signal consistently remains near its nominal value. This assumption is valid in the grid-connected applications, which is the main emphasis of this work.

3 Simulation results and discussion

The closed-loop control system is constructed and formulated using MATLAB Simulink, and its dynamic performance is assessed under different operational conditions. The findings are shown in Figs. 7 through 12. To enhance clarity and facilitate comprehension of the system research, the findings are given in subsections as outlined below.

Fig. 7
figure 7

Simulation outcome of the generator-side FOC control

3.1 MATLAB simulation result of generator-side FOC control

During the specified time of 0.85 to 1.05 s, the wind speed fluctuates between 10 and 12 m/s, resulting in a subsequent variation in the output current of the PMSG between 8 besides 16 Ampere. The speed of the generator is presently 74 radians per second. With closed-loop control strategies, the rotor angle and motor torque are also changing. The process of sector selection in SVPWM entails identifying an appropriate industry for which the spatial vector is located and creating the relevant switching states to generate the desired output voltage in a three-phase inverter system.

Ensuring that the DC-link voltage remains within predetermined boundaries is a crucial aspect of the control approach for wind power systems that employ permanent magnet synchronous generators (PMSG) with field-oriented control (FOC). The wind turbine system has effective control mechanisms, monitoring, and protection systems to enhance power conversion efficiency and ensure the system’s reliability. Figure 7 demonstrates the MATLAB simulation results of FOC control methods.

3.2 MATLAB simulation result of grid side SSLKF control

The grid-side inverter is actively regulated to inject the generated active power and to balance the harmonic and reactive power required by the nonlinear load at the point of common coupling. This ensures that the current drawn from the grid remains entirely sinusoidal at the unit power factor. The grid current, load current, inverter current, and DC-link voltage are depicted in Fig. 8 showcasing the simulation findings. The current present in the load is comprised of active, reactive, and harmonic elements.

Fig. 8
figure 8

Power factor correction mode of operation at PCC Point

The grid-side inverter is deliberately deactivated to showcase the functionalities of the proposed controller. Hence, the grid provides the load current harmonics and reactive power requirement, resulting in the grid current profile being indistinguishable from the load current profile at this specific time frame. At a time, t = 0.87 s, the wind speed is observed to be on the rise. Consequently, the inverter initiates the injection of current, which is determined by the combined influence of the harmonic component, the reactive component of the nonlinear load, and the active component, in proportion to the amount of wind power created. Therefore, the grid provides sinusoidal current at the accepted power factor and at a reduced magnitude, contingent upon the level of active power supplied by the inverter. At time t = 0.87 s, the inverter’s current is increased by a rise in wind power, leading to a corresponding decrease in grid current. When the wind velocity decreases, the injected inverter current begins to drop at t = 1.06 s. As a result, the grid current increases to satisfy the load requirement. The DC-link voltage remains consistently at a level of 190 V, regardless of any alterations in the operational parameters of the grid.

In general, the simulation results of a Kalman filter control variable should demonstrate its capacity to accurately predict the states of a system, reduce the impact of noise and disturbances caused by load current, and adjust to changing conditions while preserving the robustness and stability of the reference current. Based on the design parameters shown in Fig. 9, the Kalman filter control variable is influenced by the active power support for the grid application. An essential task of a Kalman filter is to estimate the state of a system using measurements that may contain noise. The simulation result would typically demonstrate the effectiveness of the Kalman filter in accurately estimating the true state of the system, even in the presence of measurement noise. Here, the input of the Kalman filter is provided with the load current. The Kalman filter not only provides estimates of the states but also estimates of the error covariance associated with these state estimates. The simulation outcome may include visual representations or numerical data illustrating the evolution of error covariance over time, providing insights into the level of confidence or uncertainty in the state estimates. The Kalman filter utilizes a gain matrix to determine the appropriate weighting between measurements and predicted states during the update of state estimates.

Fig. 9
figure 9

Simulation outcome control variable for Kalman filter

3.3 Performance for DC-Link voltage under wind speed variation

Figure 10 illustrates the DC-link voltage tracking under the wind variation from 0.85 to 1.05. A rise time of 0.03 s indicates the speed at which the system responds to changes. Smaller rise times suggest a faster response. A peak time of 0.06 s indicates how quickly the system reaches its maximum response. Shorter peak times suggest a faster system response. This parameter reflects the extent of overshooting or oscillation in the system’s response. In this case, a 33.66% overshoot suggests a moderate level of oscillation. A delay time of 0.02 s indicates how quickly the system starts responding to changes. Smaller delay times suggest a prompt response. A settling time of 0.2 s reflects how quickly the system stabilizes after a disturbance or change in input. Shorter settling times indicate faster stabilization. A steady-state error of 0.25% indicates the accuracy of the system in maintaining the desired output in a steady state. Lower values are desired for better accuracy. Maintaining a DC-link voltage within a tolerance of 3.3 V is vital for stable operation. It ensures that the voltage remains within an acceptable range. An underdamped system suggests that there might be some oscillatory behaviors, and careful consideration of damping is needed to prevent excessive oscillations and instability (Table 1).

Fig. 10
figure 10

DC-link voltage fluctuates with wind speed

Table 1 DC-link voltage stability analysis

3.4 Power quality indicators under steady-state conditions

Figure 11 illustrates the outcomes of a simulation study conducted on power quality measures under conditions of equilibrium. The collected data indicate that the total harmonic distortion (THD) in the gird current remains below the prescribed threshold of five percent, as mandated by standards, despite the presence of substantial distortion in the load current. The current of the grid demonstrates a distortion magnitude of 2.77%. The total harmonic distortion (THD) is significantly lower than the predetermined thresholds (Table 2).

Fig. 11
figure 11

Waveform distortion in terms of percentage THD A Load current for phase A B Grid current for phase A

Table 2 Current THD Analysis

3.5 Results of simulation when wind speed increased and power balance at PCC point.

The permanent magnet synchronous generator (PMSG) is disabled when the wind speed falls below the cut-in speed. Once the wind velocity reaches a certain level, the wind generator initiates the generation process. Nevertheless, the grid can maintain the supply to fulfill the load requirement even if the permanent magnet synchronous generator (PMSG) is not there. The simulation findings in Fig. 12 provide clear evidence of the demonstrated phenomenon.

Fig. 12
figure 12

Simulation findings as wind speed increased and power balance

The ideal working conditions are attained when the wind speed decreases within the cut-in range. Between the time interval of 0.3 to 0.8 s, the wind speed remains at an approximate value of 2.5 m/s. During this period, the output power of the permanent magnet synchronous generator (PMSG) is zero. During this time limit, a consistent and uninterrupted direct current voltage is seen. This influence leads to a reduction in the power output of the inverter by 800W, while the grid provides 2000W. This guarantees that the load demand remains consistently at 1200W. When wind speed increases significantly within a certain period, the power equilibrium is observed at the point of common coupling (PCC) (Table 3).

Table 3 PMSG Specifications [1]

4 Conclusion

An investigation has been conducted on a grid-connected permanent magnet synchronous generator technology that demonstrates improved power quality. The field-oriented control approach is highly effective in managing the output current of the permanent magnet synchronous generator. The effectiveness of this control minimizes response time and improves dynamic performance, making PMSGs suitable for wind applications with rapidly changing requirements. The converter was operated utilizing the space vector modulation technique, and the accuracy of the simulation findings was confirmed. The SSKLF control is employed to regulate the DC-link voltage and ensure power balance between the source and the output, in response to the detection of nonlinear loads on the grid. The DC-link voltage reaches a stable state within 0.2 s, with a permissible voltage fluctuation of 3.3 V. The control approach that has been provided has exhibited notable efficacy in diminishing the grid current harmonics to 2.77%, a value that is within the acceptable tolerance range as specified by the IEEE Standard.