 Research
 Open access
 Published:
A quantum particle swarm optimizationbased optimal LQRPID controller for load frequency control of an isolated power system
Journal of Engineering and Applied Science volumeÂ 70, ArticleÂ number:Â 97 (2023)
Abstract
One of the characteristics of a robust power grid is minimal variations in its frequency to load change or loss in generating unit(s). From the perspective of optimal control theory, the issue of load frequency control in the context of the interconnected functioning of power systems is investigated in this work, and a novel load frequency controller is proposed for a single area isolated power network. This novelty incorporates all the primary characteristics of the solutions that are based on a mixture of optimal controller designs by establishing a linear quadratic regulator optimized with quantum particle swarm optimization to design a proportional integral derivative (PID) controller unlike the conventional PID controller designs that are based on a combined ZieglerNichols and root locus (ZNRL) method and manual tuning. The simulation results of the proposed controller using MATLAB show its efficacy in not only ensuring that there is no steadystate error in terms of the system frequency with load changes but also in achieving smoother transients. Following these landmark achievements, a transfer function model of the resulting power grid is constructed. The outcome of the model reveals that the system transients have been improved while keeping the intended steadystate characteristics. Furthermore, it is observed that the proposed load frequency controller has the best performance when compared with the combined ZNRL method and the manual PID designs. This, therefore, demonstrates the superiority of the proposed design for load frequency control in power systems.
Introduction
The conventional power grid whose main purpose was to generate electricity in bulk at far away generating stations and transmitting it at high voltages to load centers through transmission lines is rapidly evolving with the introduction of distributed generation (DG), storage, and Internet of things [1]. All these have tremendously increased the complexity of the power grid and have brought in numerous challenges one of which being load frequency control (LFC) [2]. As the frequency of the network must always be within set tolerances, frequency stability is a critical component of the power system. The tripping of big production units or tie lines, a sudden change in loads, or an imbalance between the power generated and the power requested by the loads are all examples of events that can cause frequency deviations [3]. Frequency response services are used by distribution service providers to balance the grid in real time by enabling generating units and loads to adjust their input or output powers in response to changes in the frequency of the power grid [4]. A lot of control strategies have been proposed in the literature for LFC of the power grid. The proportionalintegralderivative (PID) controller is of interest in this research work. PID controllers are one of the most prevalent controllers that are available for industrial applications because of their ease of use, straightforward functionality, and simplicity [5, 6]. PID controllers are used to accomplish both the improvement of the dynamic response and the reduction or elimination of the steadystate error.
Numerous scholars have proposed the use of PID controllers for the LFC of isolated power grids. In [7], the authors used active disturbance rejection control for the LFC of a power grid highly penetrated with wind power taking into consideration the randomness of the generated wind power. Simulation results demonstrated the effectiveness of their proposed solution over the conventional proportional integral (PI) controller and its ability in controlling the grid frequency within small margins. In [8], quadratic regulator approach with compensating pole technique is used to optimize the design of a PID controller to control the frequency of a single area as well as a multiarea power system. To demonstrate the robustness, the proposed design was tested with external disturbance, uncertainties in parameters, and nonlinearities such as governor dead band and generation rate constraint. The authors in [9] proposed a state feedback control based on proportionalintegral observer (PI observer) to control the load frequency of an isolated singlearea power grid. The result obtained was compared with those obtained with a state feedback control based on a fullstate Luenberger observer, and the response of the former showed to be better than that of the latter. Twodegreeoffreedom (2DOF) controllers are proposed to control the frequency of a hybrid islanded power grid made up of a solar thermal power plant, a diesel generator, a wind turbine, fuel cells, and a battery bank in [10]. The results obtained were compared with the primitive PI controller, classical PID controller, and 2DOFPI controllers. The researchers in [11] were able to control the load frequency of a multiarea power grid by using a fuzzy PID controller taking into account uncertainties in parameters in addition to external disturbances. The proposed design was observed to have good transient behavior, could reliably reject disturbances, and was not sensitive to changes in parameters. An optimum way of tuning the PID controller together with the corresponding transient droop compensator (TDC) for a hydraulic turbine is present in [12]. The suggested approach was based on the input guide vane servomotorâ€™s desired time response specification (DTRS), which covered typical rate limiters and gain saturation in power plants. In [13], the authors proposed a decentralized brain emotional learningbased intelligent controller (BELBIC) to control the frequency of a microgrid where in each DG is equipped with a BELBIC and particle swarm optimization (PSO) is used to get the parameters of the controller based on integral time square error (ITSE) criterion. The results obtained are compared with those obtained using decentralized PID controllers, and also, fractional order PID (FOPID) controllers and their proposed design are shown to be outstanding. The research presented in [14] made used genetic algorithms, firefly, and bacterial foraging to tune decentralized PID controllers used for each generating unit/source in a microgrid. The simulation results demonstrated the superiority of firefly for the task compared to GA and BF.
This research aims at designing a linear quadratic regulator optimized with quantum particle swarm optimization proportional integral derivative (LQRQPSO PID) controller for load frequency control of a single area power grid. The effectiveness of the proposed controller is validated by comparing its results with those obtained when the combined ZieglerNichols and root locus (ZNRL) tuned, and manually tuned PID controllers are used. The contribution of this work to the body of knowledge is as follows:

The utilization of QPSO to optimize the design of an LQR to tune a PID controller for load frequency control

The design of the transfer function of the power grid with the proposed LFC integrate
The next section of this paper will elaborate on the methodology used in this research, followed by the presentation and discussion of the results and then a conclusion.
Methods
LFC strives to regulate the tieline interchange schedules while also dividing the load between the generators of the same network, which is one of its operational goals. Other goals include maintaining a relatively constant frequency. The variation in frequency and the active power of the tieline network are both detected, and this provides a measure of the variation in the rotor angle \(\delta\). This change in \(\delta\) provides an error \(\Delta \delta\) that has to be minimized. The corresponding change (error signal) in frequency \(\Delta f\) and real power of the tie line \(\Delta {P}_{tie\, line}\) are amplified, combined, and converted into a real power command signal \(\Delta {P}_{valve}\) before being sent to the prime mover (turbine). This signal command goes to request for an increase or a decrease in the torque being produced by the machine. To modify the values of \(\Delta f\) and \(\Delta {P}_{tie\, line}\) within the required tolerance, the prime mover changes the generator output by an amount \(\Delta {P}_{gen}\). FigureÂ 1 shows the block diagram of a power system with the load frequency control and automated voltage regulator.
Mathematical modeling of an isolated power system
The process of mathematically modeling a control system is the initial stage in its study and design. The state variable technique and the transfer function approach are the two most popular approaches. The state variable method may be used to represent both linear and nonlinear systems. The system must first be linearized before the linear state equations and transfer function can be used. In this work, the transfer function model has been created for the following elements using the right hypotheses and approximations to linearize the mathematical equations characterizing the system [15].
Generator modeling
The power angle \(\delta\) between the rotor axis and the resulting magnetic field is always kept constant while the machine is in its steadystate condition. Any disturbance will cause the rotor to slow down or speed up, causing a relative motion between the rotor and the air gap MMF (magnetomotive force). When there is no significant change in the total amount of power generated \({P}_{elect}\), the rotor will return to its starting position. The swing equation is the equation that accurately describes this relative motion as given by [1].
where \({P}_{mech}\) and \({P}_{elect}\) are respectively the per unit electrical and mechanical power, \({\omega }_{s}\) is the electrical angular velocity, and \(H\) is the per unit inertia constant defined by the following:
\(H\) is measured in seconds and usually lies in the range \(\left[1, 10\right]\) depending on the type or size of the machine.
For \(\frac{d\delta }{dt}\) as a state variable, we obtain the following:
where \(\Delta \omega\) is the angular frequency change of the grid due to perturbation. Hence, in terms of a small change in the angular velocity, Eq.Â (1) becomes as follows:
Expressing \(\Delta \omega\) as per unit we obtain the following:
Transforming Eq.Â (5) as Laplace function yields the following:
Load modeling
The load of a power system can be either resistive or reactive. However, only reactive loads like motors are sensitive to changes in the frequency of the power system. Their sensitivity depends on the combined speedload characteristics of all the devices (loads) driven by the power system. The approximation of these characteristics can be represented by [16].
where \(\Delta {P}_{load}\) denotes the change in the load that is not sensitive to frequency and \(D\Delta \omega\) denotes the change in the load that is sensitive to frequency. The value of D is calculated by taking the percentage of change in load and dividing it by the percentage of change in frequency.
Taking the Laplace transform of Eq.Â (7) and combining it with Eq.Â (6) give the following:
where \({K}_{gen}=\frac{1}{D}\) is the power system gain and \({\tau }_{\mathrm{gen}}=\frac{2H}{D}\) is the power system time constant.
Turbine modeling (prime mover)
The mechanical power provided by the prime mover may be derived from the mechanical action of hydraulic turbines at waterfalls or steam turbines whose energy is derived from the combustion of coal, gas, nuclear fuel, and gas turbines. The turbine model connects changes in mechanical power output \({\Delta P}_{mech}\) to changes in the steam valve position \({\Delta P}_{valve}\). The simplest prime mover model (for a nonreheat steam turbine) may be approximated with a single time constant \({\tau }_{turbine}\), having the transfer function defined by Eq.Â (10). The time constant \({\tau }_{\mathrm{turbine}}\) is usually between \(\left[0.2, 2\right]\) s [17].
where \({K}_{turbine}\) is the gain factor of the turbine.
Governor modeling
The turbine governor detects the change in speed and adjusts the turbine input valve and mechanical power output to restore the speed to a constant state. Watt governors which are the earliest use rotating flyballs to detect speed and respond to variations in speed with mechanical motion. The modem governors detect speed variations electronically. The governors are usually designed to allow the speed to decrease as the load demand increases to ensure stable operation. This variation between the speed and the load demand is governed by the speed regulation gain \(R\).
Governors often have a 5 to 6% speed control from no load to full load. The governor speed mechanism functions as a comparator, with the output \({\Delta P}_{gov}\) equal to the difference between the reference power \({\Delta P}_{ref}\) and the power \(\frac{1}{R} \Delta \omega\) as determined by the governorâ€™s speed characteristics [18]. That is as follows:
Taking the Laplace transform of Eq.Â (9) gives the following:
A large amount of force is usually needed to operate the steam/hydro turbine valves. This force comes from the hydraulic amplifier. It converts the command \({\Delta P}_{gov}\) to the steam valve position command \({\Delta P}_{valve}\). With a linear connection and a time constant \({\tau }_{\mathrm{gov}}\), we get the relation in the Laplace domain as below.
where \({K}_{gov}\) is the speed governor gain.
Load frequency control of a single area network
In the process of modeling the power system for a singlearea network, the development of the integrated structure of the speed governor, turbine, and generator load has to be formulated. Combining Eqs. (9), (10), (12), and (13) in a block diagram yields the complete schematic representation of a single area network as shown in Fig.Â 2.
Transfer function model
The steadystate analysis may be carried out by assuming that the speed changer is set to a fixed value, denoted by \({\Delta P}_{ref}(s)=0\), while the demanded load changes. Free governor operation is the term used to describe this scenario.
FigureÂ 3 is the result of redrawing the block diagram shown in Fig.Â 2 with the load change \({\Delta P}_{load}\left(s\right)\) serving as the input and the frequency deviation \(\Delta \Omega \left(s\right)\) serving as the output. EquationsÂ (14) and (15) present respectively the open loop and the overall closedloop transfer function of the design representing frequency change in response to load change.
\({K}_{gov}\)Â andÂ \({K}_{turbine}\) are respectively the static gains of the governor and turbine, and \({K}_{gen}\) is the generatorâ€™s gain which is the inverse of the damping coefficient \(D\).
Steadystate analysis
For a unit step change in the load demand \(\Delta {P}_{D}\), the accompanying Laplace transform is given by the following:
The frequency response now becomes the following:
Considering the final value theorem, the steadystate response of the frequency change can be obtained by the following:
Substituting for \({K}_{gen}=\frac{1}{D}\) gives the following expression for the steadystate value of the frequency.
From Eq.Â (21), it can be seen that in the absence of a frequencysensitive load (when \(D=0\)), the steadystate deviation in frequency is determined by the governor speed regulation and the static gains of the turbine and the generator and is given by the following:
Load frequency control in response to load change
The purpose of the control strategy is to monitor and control the grid frequency with changes in load demand. The frequency response controller will need to be designed to robustly restore the frequency to its nominal value when a change in load occurs.
PID controller design
The proportional integral derivative (PID) controller is one of the most prevalent controllers that are available for purchase in commercial settings. The PID controller is used to accomplish both the improvement of the dynamic response and the reduction or elimination of the steadystate error. The derivative controller incorporates a finite zero into the openloop plant transfer function, which helps to enhance the plantâ€™s reaction to transients. The integral controller raises the system type by one, adds a pole at the origin, and brings the steadystate error to zero. The time domain function used by the PID controller is as follows:
where \({K}_{p}\), \({K}_{i}\), and \({K}_{d}\) are respectively the proportional, integral, and derivative gains of the controller, \(u\left(t\right)\) is the control input, and \(e\left(t\right)\) is the error signal. EquationÂ (24) is Eq.Â (23) expressed in the sdomain.
The controller gains of the PID controller are calculated by picking the closedloop poles that fulfill the performance criterion by appropriately optimizing the controller using swarm intelligence. This is done regardless of which controller is being used. PID controller design makes use of three distinct gains, which results in the introduction of two zeros and a pole at the origin of the system. This causes the system as a whole to become a type 1 system, which enables them to have no steadystate error. The difficulty encountered during system controls using PID is locating the control rule vector \(K=\left[{K}_{p}\,{ K}_{i}\, {K}_{d}\right]\) of the controller, and as such, a more optimal control strategy is needed.
A change in system load will result in a steadystate frequency variance with the main LFC loop, dependent on the governor speed control. We must offer a reset operation to minimize the frequency deviation to zero. The rest action is accomplished by including an inbuilt proportionalintegralderivative controller that acts on the load reference setting to modify the speed set point. The proportional controller increases the speed of the response to bring the system to stability quickly. The integral controller raises the system type by one, causing the ultimate frequency deviation to equal zero. The derivative controller adds zero which helps enhance the system from heavy overshoots and oscillations. FigureÂ 4 depicts the LFC system with the controller added. For an acceptable transient response, the controller gain \(\left[{K}_{p}\,{ K}_{i}\, {K}_{d}\right]\) must be adjusted.
From Fig.Â 4, the closedloop transfer function is obtained assuming that the speed changer is set to a fixed value, denoted by \({\Delta \mathrm{P}}_{\mathrm{ref}}(\mathrm{s})=0\), while the demanded load changes. This gives the following:
Optimal PID design with combined ZieglerNichols tuning method and root locus
Ziegler and Nichols, who were Taylor Instruments employees, proposed two simple mathematical approaches for adjusting PID controllers in 1942. These approaches are now considered standard practice in the field of control systems. Both strategies involve a priori assumptions about the system model, but none requires these models to be explicitly understood. The first approach is used on plants that have step response; while the second method is used on plants that may be driven to instability with proportional control [2]. The ZieglerNichols formulas for controller specification are based on plant step responses. In this research, only the second method has been chosen because of its complex dynamics. The approach is intended to produce a closedloop system with some acceptable percentage overshoot. However, this is most of the time not achieved since Ziegler and Nichols had predicted the changes on a unique plant model.
To move forward with the ZieglerNichols tuning procedure, it is needed to convert Eq.Â (23) into the form as follows:
where,
\({K}_{p }=K\) is the proportional gain
\({K}_{i }={ K}_{p }/{T}_{i}\) is the integral gain
\({K}_{d }={{K}_{p}T}_{d}\) is the derivative gain
\({T}_{i}\) is the reset time (integration time constant)
\({T}_{d}\) is the rate time (derivative time constant)
The tuning procedure is as follows:

Step 1: The gain \(K\) is adjusted until the system bursts into continuous oscillations that neither decay nor explode.

Step 2: The value of \(K = {K}_{c}\) is noted for this condition. \({K}_{c}\) is known as the critical or ultimate gain.

Step 3: The oscillation is noted, and the period of the oscillation \({T}_{c}\) is measured. \({T}_{c}\) is known as the critical or the ultimate period.

Step 4: \({K}_{p}\), \({T}_{i}\), and \({T}_{d}\) are determined.

Step 5: \({K}_{i}\) and \({K}_{d}\) are computed as a result.
According to the ZieglerNichols, the following Table 1 can be used to compute the \(\left[{K}_{p}\,{ K}_{i}\, {K}_{d}\right]\) gains. This research focuses on the design of a classical PID.
To start establishing the controller design using the ZieglerNichols method, the characteristic question \(q(s)\) of the closedloop system is obtained to compute the critical frequency since the response of the system is already known. \(q(s)\) can be obtained following Eq.Â (25) with integral and derivative terms ignored and \({K}_{p}=K\).
The parameters used in this research for the generating power plant are shown in Table 2 [1].
The root locus diagram is obtained following the openloop transfer function in Eq.Â (14) with a forward gain \(K\) (step 1 of the ZieglerNichols procedure). The governor speed regulation \(R\) is assumed to be constant.
Substituting the parameters of the plant in Eq.Â (21) gives the following:
The basic goal of a root locus diagram is to predict the behavior of the closedloop response using the root locus plot, which is derived from the openloop transfer function. This plot shows the complex plane of the closedloop pole locations. The root locus may be altered through the controller to provide the required closedloop response by adding zeros and/or poles or simply shifting the closedloop poles by adjusting \(K\). \(K\) is given a value such that it drives the system to marginal instability under the given change in load demand. The root locus response is shown in Fig.Â 5.
From the openloop response of the root locus, the critical frequency \({\omega }_{c}\) is computed to deduce the gain at the point where the root locus crosses the stability boundary. This gain is \({K}_{c}\) according to Ziegler Nichols since it is at this gain that the system will undergo an infinite simple harmonic motion.
\({K}_{c}=3.74\) is the proportional gain at marginal stability. From the root locus plot, it can be seen that \(s=\pm j3.26\) at the limit of stability. The control system is said to have a pair of conjugate poles on the \(j\omega\)axis and is only marginally stable. Hence, marginal stability is obtained at around 14.96% of the overall system gain which is \(25\).
For \(\omega =3.26rads/s,\) a similar value of \({K}_{c}\) is obtained using the system parameters and solving closedloop characteristic equation \(q\left(s\right)=0\) in Eq.Â (27). The time response of the system at the critical gain is obtained and shown in Fig.Â 6 to compute the critical period \({T}_{c}\) which is found to be 1.935Â s. The above results are expressed in Table 3 below.
PIDbased optimal LQR controller
The design of controllers in classical feedback control is based on output feedback. Such a control scheme is referred to as a feedback control scheme. The design of controllers in the state space is based on different feedback control scheme which is referred to as state feedback scheme. The use of state feedback gives the possibility of designing controllers with properties that cannot be obtained from classical feedback controllers. In this work, a state feedback controller known as a linear quadratic regulator (LQR) has been used to optimally design a PID controller for load frequency control. LQR is the designed optimal controller for linear systems with quadratic performance index and is based on minimal error and energy criteria [3].
The LQR is a state feedback controller which is designed to maintain the state vector \(\widetilde{x}\), to the origin of the state space. The state vector here is \(\widetilde{x}={\left[{\Delta P}_{valve}{ \Delta P}_{mech} \Delta \Omega \right]}^{T}\). If disturbance as a result of load change should cause \(\widetilde{x}\) to shift from its nominal value \({\widetilde{x}}_{0}= {{\left[{ { \Delta P}_{valve} \Delta P}_{mech} \Delta \Omega \right]}_{o}}^{T}\) in the state space, the controller will act to bring back \(\widetilde{x}\) as closed to \({\widetilde{x}}_{0}\) as possible (the origin). Another method of optimal control like pole placement is a feasible option but finding the best place put the closedloop poles have not been intuitive in higherorder systems or system with more actuators or states. The control law is designed to minimize the following parabolic objective function, \(J\):
where \(Q\) is the positive semidefined matrix and \(R\) is the real symmetric matrix, \(A\) is the state matrix, and B is the input gain matrix. If the marked minors of all the elements of \(Q\) matrix are not negative, \(Q\) matrix is a positive semidefined matrix. The selection of \(Q\) and \(R\) elements is determined according to the weighted relations of state variables and control inputs. With LQR, pole locations are not selected but rather an optimal gain matrix \({K}_{opt}\) is determined by choosing closedloop characteristics that are important for the control operation. This may include characteristics like how well the system performs and how much effort is needed to get that performance.
The objective of optimal regulator design is the determination of the optimal control rule \({u}^{*}\left(t\right)={K}_{opt}\widetilde{x}(t)\) for the combined system to reject the step disturbance from a change in load demand \({\Delta P}_{load}\), which implies converging the initial states to zero and minimizing the cost function defined by Eq.Â (30). In most research paper, the minimization of the above quadratic cost function has followed solving the Riccati equation [3] which is the solution to the Lagrange multiplier or Hamiltonian equation when the dynamics of the system is known to enable obtaining the gain \({K}_{opt}\) that returns the best control input \(u\) defined by Eq.Â (31). The Hamiltonian is a mathematically advanced description of dynamic systems, a concept from the theory of classical mechanics. It is also regarded as a more sophisticated form of the Lagrangian dynamic equation.
where \(\mathrm{B}\) and \(R\) are respectively the input matrix and weighting matrix that is specified in Eq.Â (30) and \(P\) is a symmetric positive definite matrix that is created by solving the algebraic Riccati equation that is described in Eq.Â (25) [4] and is a rich version of the Lyapunov equation (which solves a globally asymptotically stable system at zero input cost).
where \(A\) represents the state matrix and \(Q\) represents the symmetric positive semidefinite weighting matrix as specified in Eq.Â (32) and \(P\) is a symmetric positive definite matrix satisfying the equation. That is the solution to the Riccati equation. At times, Eq.Â (32) or the Lagrange multiplier equation [1] with higher dimension (system with a large number of state variables and control loops) may become difficult and expensive to solve. As a result, finding the best control input \(u\) which minimizes the objective function \(J\) to give the optimal PID parameters for a given \(Q\) and \(R\) that give \({K}_{opt}\) need to be known by the controls engineer. In this research work, using the LQR method, the gain parameters of the PID controller are optimally determined stochastically using the swarm intelligence technique known as quantum particle swarm optimization.
Quantum particle swarm optimization
Kennedy and Eberhart created the particle swarm optimization (PSO) method in 1995, drawing inspiration from the social behavior of fish and birds. This method is based on evolutionary swarm intelligence and is used to address numerous optimization tasks [19]. Due to its few adjustable parameters, quick convergence, simplicity, and ease of coding, as well as the fact that the initial solution does not significantly affect its convergence, PSO has been frequently utilized to address a range of engineering tasks [20].
In PSO, there are two main concepts: the local optimum \({p}_{best}\) and the global optimum \({g}_{best}\). The global optimum is the optimum solution obtained by the entire swarm, while the local optimum is the optimum solution obtained by every particle that makes up the swarm. Given a swarm with particles P, every particle i, in the swarm at iteration t, has a position vector \({X}_{i}^{t}= {({x}_{i1}{x}_{i2}{x}_{i3}\dots {x}_{in})}^{T}\) and velocity vector \({V}_{i}^{t}= {({v}_{i1}{v}_{i2}{v}_{i3}\dots {v}_{in})}^{T}\). EquationsÂ (33) and (34) are used to update these vectors during every iteration via j dimension.
where:
\(i=\mathrm{1,2},3,\dots ,P\) and \(j=\mathrm{1,2},3,\dots ,n,{c}_{1}\, and\, {c}_{2}\) are learning factors and \({r}_{1}^{t}\) and \({r}_{2}^{t}\) are random numbers between 0 and 1.
From Eq.Â (26), we can see that there are three contributions to the movement of the particle in an iteration. On the other hand, Eq.Â (27) updates the position of the particle. The parameter \(w\) is an initial weight constant, usually positive for classical PSO, and serves to balance the global search (known as exploration in the case of being set with higher values) as well as the local search (known as exploitation when being set with lower values) [19].
The risk of getting trapped in the local optimum solution is a difficulty for the primitive PSO, which prevents it from ever obtaining the global best solutions [21]. Because of this, many variants of PSO have been developed over the years [22]. The quantum PSO (QPSO) was introduced by J. Sun et al. in [23], after being inspired by the convergence of PSO, followed by a detailed analysis of the behavior of each particle making up the swarm. In [24], it is derived that the complexity of the behavior of social organisms is far greater to be able to be simplified by linear equations as is the case of the classical PSO. The QPSO particle movement rhythm is very different from the classical PSOs. The position and velocity of a particle cannot be determined simultaneously because, according to the quantum worldâ€™s unpredictability theory, they become observable at any location in the search space with a given probability. In the case of infinite searching iterations, the global convergence of QPSO ensures that the global optimal solution is calculated. Experimental findings on several benchmark functions have shown the superiority of QPSO over the classical PSO making QPSO very promising over PSO [25].
The different steps associated with QPSO are outlined below:

Step I: Generation of the initial random population of the swarm within the Ddimensionâ€™s space boundaries

Step II: Estimation of the fitness value of each particle

Step III: Comparison of the actual fitness of each particle with its personal best (\({p}_{best}\)). Should in case the actual fitness is greater than \({p}_{best}\), then \({p}_{best}\) is updated with the actual fitness value.

Step IV: Calculate the average best position (\({av}_{best}\)) of all the P particles present in the swarm using Eq.Â (35) shown below.
$${av}_{best}= \frac{1}{P}\sum_{j}^{P}{av}_{bestj}$$(35) 
Step V: From the entire swarm, determine the actual overall best fitness and its coordinate and compare it with the global best (\({g}_{best}\)). If is greater than the global best (\({g}_{best}\)), then it becomes the new \({g}_{best}\).

Step VI: Calculate the vector local focus of the particles.
$${VLF}_{jd}^{jt}= {rand1}_{jd}^{jt}\times \left({{p}_{best}}_{jd}\right)+\left(1{rand1}_{jd}^{jt}\right)\times {g}_{best}$$ 
Step VII: The position \({x}_{jd}\) of the d^{th} dimension of the j^{th} particle is updated using Eq.Â (36).
$${x}_{jd}^{jt}= {VLF}_{jd}^{jt}+\left[{\left(1\right)}^{ceil\left(0.5+{rand2}_{jd}^{jt}\right)}\right]*\beta *\left{avbestx}_{jd}^{jt1}\right*{log}_{e}\left(\frac{1}{{rand3}_{jd}^{jt}}\right)$$(36)
If \({x}_{jd}^{jt}< {x}_{min}^{d}\)
Then
If \({x}_{jd}^{jt}> {x}_{max}^{d}\)
Then
where \(rand1\), \(rand2\), \(rand3\), \(rand4\), and \(rand5\) are random numbers between 0 and 1 and \(jt\) is the present iteration.
EquationsÂ (37) and (38) are applied in every dimension in the interval (\({x}_{min}^{d}\), \({x}_{max}^{d}\)) to ensure that the particles do not exit the domain of interest.
The flowchart in Fig.Â 7 summarizes the operation of QPSO.
Results and discussion
System with no controller
According to the parameters provided in Table 2 as the plant parameters, when there is a step change in the load demand of 0.2 p.u. (50Â MW), the following results shown in Fig.Â 8 are obtained. The frequency responses (the change in frequency and the measured frequency) related to a 0.2 p.u change in the load demand when the plant is under an uncontrolled state can be observed. The steadystate change in frequency \(\Delta f\) is noticeable around 0.4794Â Hz from the nominal system frequency, and it takes more than 6Â s to transit to achieve this value. A maximum overshoot of 0.7437Â Hz from the reference frequency also occurred. Though this may sound appealing in the context of control theory, however, for large changes in load, the frequency may run far from the normal and cause the system to be heavily unstable which has an adverse consequence on the generators as control action becomes very important.
System with manually tuned PID controller
When the control method that involves using PID that has been manually tuned is used as shown in Fig.Â 9, the change in frequency becomes more stable in comparison to the condition it was in before a controller was introduced. The time it takes to change the frequency in power networks must always not be too long (a requirement for every control) while also minimizing overshoots. This control system satisfies the requirements in certain respects with regard to stability. This system becomes acceptably stable before the 6s mark before settling for a value of \(1.267\times {10}^{4}\) Hz at 10Â s unlike when a controller is not used. However, the system still suffers some degree of overshoot of \(2.962\times {10}^{1}\) Hz which the controller could not remove. The controller design consideration was made to get the desired settling time while keeping the overshoot margin minimal. Using manual tuning to design a PID control may be one of the easiest ways towards designing this type of control, but this method becomes extremely challenging for complex systems with many control loop systems, and at times, finding the optimal gains can even be impossible. As a result, a classical design technique becomes handy as such a controller may not be very robust.
Table 4 below shows the result of the obtained PID gains from manual tuning.
Combine ZieglerNichols and root locus PID controller
The performance of the closedloop step response using the combined ZieglerNichols and root locus method reveals a maximum overshoot difference of \(3.485\times {10}^{1}\) Hz above the goal compared to the manual tuning which is less than 0.3Â Hz. This is shown in Fig.Â 10.
The controller was still able to bring the power system frequency to acceptable stability after 8Â s which was too long. The controller finally had a steadystate error of \(7.038\times {10}^{1}\) Hz within a simulation time of 10Â s. Given that the ZieglerNichols method relies on a standard model, the design goals will nearly never be accomplished according to transient response. This method seems to operate best in providing an efficient basis for getting started with controller tuning and does not require expert knowledge or a model of the system before designing the controller. Following Table 1, the ZieglerNichols formulation is now applied to obtain the different PID gains depicted in Table 5.
QPSOLQR PID controller
As can be observed in Fig.Â 11, the load frequency of the system according to the QPSOLQR controller achieved better stability in a relatively short amount of time when the load is placed, precisely before 4Â s compared to the other controllers that were unable to achieve this amount of stability during this time. Because of the QPSOLQR optimum control design, the frequency of the load is not significantly altered by the changes that occur in the system parameters, and the load is less than 4Â s. The maximum overshoot difference with the LQR controller is also found to be around \(0.4521\times {10}^{1}\) Hz margin compared to the other approaches. The QPSOLQR is able to implement a control for dynamic systems with rapidly changing dynamics and fast transients, hence demonstrating the robustness of the controller. The PID gains obtained for the optimal control theory of LQR have been shown in Table 6.
Validation of proposed QPSOLQR PID controller
A MATLAB Simulink program has been used to obtain all the above findings for the LFC of an isolated power system. Each of the three distinct cases of an optimal controller design was carried out under the same condition of load change. When observing the performance of a control algorithm, it becomes necessary to compare controller design with other control laws to test its effectiveness in meeting system requirements. It can be seen from Figs. 9, 10, and 11 that the frequency deviation was overall improved when a controller was used compared to the case of no controller action. That is the case in Fig.Â 9. The combined results of all the controlled case have been presented in Fig.Â 12.
Table 7 has been used to summarize the results of the transient responses and the controller gains of the different design approaches. In the combined ZNLR method, a noticeable overshoot of 0.3485Â Hz and a steadystate error 0.0007038Â Hz after 10Â s were found compared to the case of the manual PID controller which had 0.2962Hz overshoot above the nominal frequency and a steadystate error of 0.0007038Â Hz for the same transient analysis of 10Â s. This was however achieved after several trials and efforts of manual tuning. The ZieglerNichols method showed lower performance with respect to manual tuning because the method however has been built based on a generic plant model, and design requirements are usually subjective with no standard design rule. The method is also not mathematically rigorous since most of the time a real experiment is usually needed if you do not have the model or simulation of the system; this could be expensive. Also, systems that cannot be driven to instability with proportional gain cannot be designed from this method. On the other hand, the design rule for manual control is nonexhaustive, and the final controller is conclusive in terms of its optimality.
In the case of a QPSOLQR controller, the frequency has greater stability in a short amount of time following the load change. The maximum overshoot and steadystate error are found to be respectively 0.04521Â Hz and 0.00007Â Hz which is found to be a significant improvement compared to the manual and ZNLR designs. The frequency of the load is not significantly altered by the adjustments made to the system parameter with the QPSOLQR control. The controller produces satisfactory results compared to the manual PIDtuned controller which takes a lot of time to find the best tune and the ZieglerNichols method that has been constructed based on a general model that does not consider some of the intrinsic dynamics of the plant.
Conclusions
In this paper, an improved LQRPID controller has been developed to control the load frequency of a singlearea power system. The controller was designed using a QPSO optimization technique. The effectiveness of the suggested control strategy was implemented in the LFC of a single area power system in the presence of external disturbances and parametric uncertainties, as well as load changes. Additionally, the results of damping for frequency deviation profile from the QPSObased LQRPID controller were compared with those designed from combined ZNRL and manual methods. The obtained results confirmed the validity of this strategy. Simulation results show that the proposed QPSObased LQRPID controller has a superior control effect of good transient behavior with less overshoot, smaller settling time, and less sensitivity to parameter variations and load disturbances. Moreover, it was discovered that the QPSOLQR design process was clearer and easier than the conventional controller designs. It should be emphasized that the findings were achieved for all three controllers using different approaches.
The load frequency regulation of two separate power systems linked by a tie line will be considered in the future. Furthermore, before validating its robustness, the suggested technique shall be evaluated with a more sophisticated realworld application such as LFCintegrated electric cars, wind, and solar systems. The power system will be divided into two parts: a microgrid with DGs and the main grid. The intermittent nature of the microgrid power production will be modeled, and an appropriate control law will be developed to control frequency when the load suddenly changes.
Availability of data and materials
All data and materials have been included in the manuscript.
Abbreviations
 2DOF:

Twodegreeoffreedom
 BELBIC:

Brain emotional learningbased intelligent controller
 DG:

Distributed generation
 DTRS:

Desired time response specification
 FOPID:

Fractional order proportionalintegral derivative
 ITSE:

Integral time square error
 LFC:

Load frequency control
 LQR:

Linear quadratic regulator
 PI:

Proportional integral
 PID:

Proportionalintegral derivative
 PI observer:

Proportionalintegral observer
 PSO:

Particle swarm optimization
 QPSO:

Quantum particle swarm optimization
 TDC:

Transient droop compensator
 ZNRL:

ZieglerNichols and root locus
References
Hassan AS, Othman EA, Bendary FM, Ebrahim MA (2020) Optimal integration of distributed generation resources in active distribution networks for technoeconomic benefits. Energy Rep 6:3462â€“3471. https://doi.org/10.1016/j.egyr.2020.12.004
Chauhan J, Surjan BS (2020) Impact of distributed generation in single area load frequency control on system frequency. In: 2020 IEEE International Studentsâ€™ Conference on Electrical, Electronics and Computer Science (SCEECS). IEEE, pp 1â€“5. https://doi.org/10.1109/SCEECS48394.2020.77
Shi Q, Cui H, Li F, Liu Y, Ju W, Sun Y (2017) A hybrid dynamic demand control strategy for power system frequency regulation. CSEE J Power Energy Syst 3(2):176â€“185. https://doi.org/10.17775/CSEEJPES.2017.0022
Homan S, Brown S (2021) The future of frequency response in Great Britain. In: Energy reports. Elsevier Ltd, pp 56â€“62. https://doi.org/10.1016/j.egyr.2021.02.055
Hote YV, Jain S (2018) PID controller design for load frequency control: past, present and future challenges. In: IFACPapersOnLine. Elsevier B.V., pp 604â€“609. https://doi.org/10.1016/j.ifacol.2018.06.162
National Instrument (2023) The PID controller & theory explained. https://www.ni.com/dede/shop/labview/pidtheoryexplained.html
Xu T, Zhuang Y, Li Y, Zhang E, Kong L (2020) Loadfrequency control strategy of power grid with high penetration wind power based on active disturbance rejection control. In: Journal of physics: conference series. Institute of Physics Publishing, pp 1â€“6. https://doi.org/10.1088/17426596/1550/6/062022
Hanwate SD, Hote YV (2018) Optimal PID design for load frequency control using QRAWCP approach. In: IFACPapersOnLine. Elsevier B.V., pp 651â€“656. https://doi.org/10.1016/j.ifacol.2018.06.170
Hussein AA, Salih SS, Ghasm YG (2017) Implementation of proportionalintegralobserver techniques for load frequency control of power system. In: Procedia computer science. Elsevier B.V., pp 754â€“762. https://doi.org/10.1016/j.procs.2017.05.307
Hussain I, Das DC, Latif A, Sinha N, Hussain SMS, Ustun TS (2022) Active power control of autonomous hybrid power system using two degree of freedom PID controller. Energy Rep 8:973â€“981. https://doi.org/10.1016/j.egyr.2022.05.202
Jalali N, Razmi H, DoagouMojarrad H (2020) Optimized fuzzy selftuning PID controller design based on TribeDE optimization algorithm and rule weight adjustment method for load frequency control of interconnected multiarea power systems. Appl Soft Comput J 93:106424. https://doi.org/10.1016/j.asoc.2020.106424
Oliveira EJ, HonÃ³rio LM, Anzai AH, Oliveira LW, Costa EB (2015) Optimal transient droop compensator and PID tuning for load frequency control in hydro power systems. Int J Electr Power Energy Syst 68:345â€“355. https://doi.org/10.1016/j.ijepes.2014.12.071
Mohamed A, AbdelGhany AG, Bahgat M (2019) Frequency control in a microgrid using decentralized brain emotional learning based intelligent controllers. In: 21stInternational Middle East Power Systems Conference (MEPCON), Tanta University, Egypt. IEEE, pp 265â€“270. https://doi.org/10.1109/MEPCON47431.2019.9008221
Sawarni A, Dhamane K, Kumar D (2019) Decentralized frequency control for an isolated microgrid using nature inspired algorithms. In: IEEE International Conference on Electrical, Computer and Communication Technologies (ICECCT). https://doi.org/10.1109/ICECCT.2019.8869310
Saadat H (1999) Powersystemanalysis
Ellis G (2012) Four types of controllers. In: Control system design guide. Elsevier, pp 97â€“119. https://doi.org/10.1016/B9780123859204.000060
Kakilli A, Oguz Y, Ã‡alik H (2009) The modelling of electric power systems on the state space and controlling of optimal LQR load frequency. J Electr Electron Eng 9(2):977â€“982
Cheng Z, Li X, Ma J, Teo CS, Tan KK, Lee TH (2019) Datadriven tuning method for LQR based optimal PID controller. In: IECON 2019  45th Annual Conference of the IEEE Industrial Electronics Society. IEEE, pp 5186â€“5191. https://doi.org/10.1109/IECON.2019.8927075
Seixas Gomes de Almeida B, Coppo Leite V (2019) Particle swarm optimization: a powerful technique for solving engineering problems. In: Swarm intelligence  recent advances, new perspectives and applications. pp 1â€“21. https://doi.org/10.5772/intechopen.89633
Jordehi AR, Jasni J, Izzri N, Wahab A, Zainal M, Abd A (2013) Particle swarm optimisation applications in FACTS optimisation problem. In: IEEE 7th International Power Engineering and Optimization Conference (PEOCO), pp 193â€“198. https://doi.org/10.1109/PEOCO.2013.6564541
PalupiRini D, MariyamShamsuddin S, SophiyatiYuhaniz S (2011) Particle swarm optimization: technique, system and challenges. Int J Comput Appl 14(1):19â€“27. https://doi.org/10.5120/18102331
Kumar S, Sau S, Pal D, Tudu B, Mandal KK, Chakraborty N (2013) Parametric performance evaluation of different types of particle swarm optimization techniques applied in distributed generation system S. In: Proceedings of the International Conference on Frontiers of Intelligent Computing: Theory and Applications (FICTA). pp 349â€“356. https://doi.org/10.1007/9783642353147_40
Sun J, Feng B, Xu W (2004) Particle swam optimization with particles having quantum behavior. In: Congress on Evolutionary Computation (IEEE Cat. No.04TH8753). pp 325â€“331. https://doi.org/10.1109/CEC.2004.1330875
Sun J, Xu W, Feng B (2004) A global search strategy of quantumbehaved particle swarm optimization. In: IEEE conference on cybernetics and intelligent systems. pp 111â€“116. https://doi.org/10.1109/ICCIS.2004.1460396
Liu G, Chen W, Chen H, Xie J, Zheng Q (2019) A quantum particle swarm optimization algorithm with teamwork evolutionary strategy. Math Probl Eng 2019:1â€“13. https://doi.org/10.1155/2019/1805198
Patidar H, Mahanti GK, Muralidharan R (2017) Synthesis of nonuniformly spaced linear array of unequal length parallel dipole antennas for impedance matching using QPSO solar photo voltaic cellsextraction of parameters view project synthesis of nonuniformly spaced linear array of unequal length parallel dipole antennas for impedance matching using QPSO. Int J Microw Opt Technol 12(3):172â€“181. Available:https://www.researchgate.net/publication/317216937.
Acknowledgements
This investigation did not receive a specific grant from any public, commercial, or nonprofit funding organization.
Funding
The authors received no funding for this work.
Author information
Authors and Affiliations
Contributions
EA contributed to the investigation, data curation, establishing methodology, and formal analysis and was a major contributor to writing the manuscript. WS contributed to the investigation, establishing methodology, supervised the research, validated the resources, and was a major contributor in writing, reviewing, and editing the manuscript. The manuscript was read and approved by both authors.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisherâ€™s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
About this article
Cite this article
Rene, E.A., Fokui, W.S.T. A quantum particle swarm optimizationbased optimal LQRPID controller for load frequency control of an isolated power system. J. Eng. Appl. Sci. 70, 97 (2023). https://doi.org/10.1186/s4414702300271z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s4414702300271z