Nonlinear Adaptive Controller Design to Stabilize Constant Power Loads connected-DC Microgrid using Disturbance Accommodation Technique

: The DC microgrid is comprised of a considerable number of electronically regulated power electronic loads that act as constant power loads (CPLs). These power electronic devices have a high bandwidth regulation capability as well as a high-power conversion efficiency. Specifically, the high bandwidth control for the output of the converter load, when paired with the system's filtering components, results in negatively damped oscillations. These features, even if needed, may cause system instability and, finally, system failure if not avoided. To achieve effective power flow control in a DC microgrid, it is crucial to eliminate the undesired behaviour of the CPLs. The control objective requires the assessment of the power for uncertain loads, which vary with time. This paper proposes an adaptive controller linked to a cubature Kalman filter(CKF) for a DC microgrid with time-varying non-ideal CPLs. The controller utilises the neuro-fuzzy inference system(ANFIS) to make the design adaptive. The CKF method is used to determine the instantaneous value of time-varying load power. The assessed power is afterward sent to an ANFIS-based controller, which aims to modify the energy storage systems (ESS) injected current adaptively. The suggested controller not only maintains overall stability when the CPLs vary significantly, but it has a rapid dynamic response and accurate tracking across a wide operating range as well. The simulation results demonstrate that the proposed adaptive controller can improve the DC microgrid's transient response while also increasing the stability margin

loads (CPLs). These loads are now critical components in many applications, including shipboard, aerospace power systems, and electric vehicles [5], [6]. CPLs act as an incremental negative impedance and consume power regardless of the bus voltage. The negative impedance property of the CPLs adds nonlinearity and may trigger instability and degradation in the system. Thus, successful control of DC microgrids depends on the minimization of undesired effects initiated by CPLs. The nonlinearity added by the CPL requires a control approach accordingly. Several non-linear control approaches for mitigating the troublesome effects of CPLs are proposed [7]- [10]. A modified droop controller design was presented in [7], [8]. These designs provide stabilization via feedback linearization. They can achieve rapid dynamic response with minimal price implementation. However, they are vulnerable to input changes including the restricted choice of the CPLs. A robust controller design that utilizes semi-definite programming to ensure and expand the stability region is discussed in [9]. This approach will allow you to get significant signal stability for an unrestricted number of controllers. Yet, the dynamic response is sluggish compared to other non-linear design approaches. In [10], a composite controller is introduced with a non-linear backstepping algorithm that provides global stability. However, a derivative term appears in the control laws, which increases noise. In [11], a boost converter connected to CPL is controlled by a sliding mode controller forcing the controlled variable to slide on a cross-section according to the system's common behaviour. The proposed method is efficient for stabilizing the system over the complete operating limit even though there are significant changes in the input voltage and the load power. However, the approach needs the expensive capacitor current measurement and causes the deterioration of the ripple filtering, including increased output impedance [12], [13]. An adaptive controller using the backstepping method is proposed in [14]. The approach is systematic and easy to implement. This approach ensures global and local stability with proper tracking of uncertainties. Furthermore, the approach allows the retention of useful nonlinearities that boost the functioning of the controller. The major downside of the backstepping controller is that its control laws make use of derivative terms, which makes it noise-sensitive. Thus, in the presence of noise, this approach is unable to cancel the CPL dynamics properly [15]. In [16], a method for transforming analytical findings from the frequency domain into the more observable unpredictable parameter domain is presented. The approach establishes system stability by calculating the maximum upper bound using µ -synthesis for system uncertainties. The common idea in the approaches mentioned above is that they are all assuming ideal CPLs. Nevertheless, the microgrids supply power to unpredictable CPLs referred to as non-ideal time-varying CPLs in practical applications. A couple of research studies have explored the consequence of non-ideal CPLs on DC microgrid stability [17]- [19]. In [17], a sliding mode controller has been suggested to establish stability for the DC microgrid connected to uncertain CPLs by using an ESS. In [18] and [19] it is assumed that the CPLs' powers are constrained by certain predefined limits as the instantaneous value of the power is unknown. The necessary stability conditions are obtained by using linear matrix inequalities (LMIs). Although the methods proposed in [18] and [19] provide robust design in terms of stability, the load uncertainty is considered to be bound by a predefined limit. To settle the constraint on unpredictable power, an instantaneous value of power for time-varying CPL is required. The value of power at any given time can be determined by using current and voltage sensors also. The current sensor interconnected with CPLs worsens the ripple filtering effect while increasing the output impedance [20], [21]. Furthermore, adding extra sensors decreases the reliability and increases the system complexity which in turn increases the overall cost. Hence, the estimation method for the evaluation of power is preferred over the installation of the voltage and current sensors. There are primarily two types of estimation methods proposed for calculating unknown parameters :(i)Deterministic Observers and (ii)Stochastic Estimators. A matrix equalities and inequalities combination is employed in the deterministic observer method while ensuring asymptotic estimation error. The solutions thus observed are in matrix form and are used by an observer for the estimation of dynamic quantities and desired states [22]. The occurrence of noisy measurements may, however, weaken the performance of the deterministic observer, making it improper for practical purposes. Kalman filter and its several alternatives are suggested in the stochastic estimator to determine the Kalman gain for the measurements and estimation of the current state [23], [24]. Kalman filters are designed to deal with the effects of noise and have proven to be optimal against it [25]. Although the Extended Kalman Filter (EKF) can be used for non-linear systems, it performs poorly because it linearizes the system model [26]. Bayesian sampling procedures, on the other hand, are alternatives to the EKF. The sampling methods are computationally intensive, rendering them unsuitable for practical applications requiring speedy estimation. Cubature Kalman Filter (CKF) has drawn a lot of attention among deterministic sampling methods in recent times because of their appealing features like precision, low computational burden, and reliable stability properties [27]- [29]. The CKF approach is used to compute the uncertain power of CPL. After that, an ANFIS-based controller is used to control the ESS current by the estimated power that compensates for the CPL's unwanted effect [30]. ANFIS is an adaptive network framework that utilises a fuzzy inference system (FIS). An ANFIS has the ability to learn and process data in parallel, combining the benefits of fuzzy logic and the artificial neural network (ANN). As a result, the ANFIS for non-linear systems has a higher capacity for addressing uncertainty than previous methods [31]- [33]. Since the DC microgrid is connected to non-linear dynamic loads, this ability of ANFIS is advantageous for controlling such loads. In [34], [35], an ANFIS-based controller to control the current injection from ESS is suggested. The suggested controller can manage the dynamics of the extremely non-linear system. Even though the conventional controllers function well, the ANFIS-based adaptive controller outperforms them because it can effectively minimise oscillations under varying dynamic loads [36]. This work presents an ANFIS-based adaptive controller for stabilising a DC microgrid connected to a timevarying CPL that is considered to be unpredictable. In this paper, a CKF in conjunction with the ANFIS method is used to solve a combined estimation issue to assess the DC microgrid's states along with the load power of timevarying CPL. The estimated power is then employed in an ANFIS-based controller to modify the ESS injection current as efficiently as possible. The proposed approach can efficiently stabilize the DC microgrid for a diverse range of power variations. The proposed method employs an adaptive scheme that results in improved transient performance and low ESS power consumption. Simulations in MATLAB/SIMULINK show that the proposed ANFIS controller connected to the suggested CKF for estimating the uncertain power of the CPL is effective for system stabilisation compared to the conventional method. The following is a summary of the paper's outline: The dynamics of the non-linear DC microgrid under consideration are stated in Section II. Section III depicts the CKF algorithm for assessing the unpredictable CPL power. The ANFIS-based non-linear controller architecture is introduced in Section IV, which is linked to the calculated load power in Section III. Section V describes the stability analysis for the scheme. The simulation outcomes are then demonstrated in Section VI to establish the practical usefulness of the suggested approach. At last, in Section VII conclusions of the presented approach are compiled.

II. DC Microgrid model and problem formulation:
The DC microgrid is used for numerous applications, including ships, electric vehicles, marine systems, and electric aircraft. A DC microgrid connected to a number of CPLs is displayed in Fig.1 vectors. is the power of the ℎ CPL, while represents the n-dimensional measurement of the dynamic system. The system matrices are formulated as: The source subsystem is presented as : The CPLs linked to the DC bus via RLC filters are displayed in Fig.1. A CPL is exhibited as a current sink [36]. The state-space equations for ℎ CPL can be stated as [37]: The general state-space equation of the DC microgrid is obtained as [7]: After employing the coordinate adjustment around the operating point, the overall dynamic model of a DC microgrid can be modified as [37]: The aim is to design a controller by estimating the unknown CPL power using the CKF algorithm to ensure the closed-loop performance which increases the stability of the DC microgrid.

III. CKF Approach for estimating the CPL Power
This section describes the design technique for the CKF approach used to estimate the CPL's unknown power. The CKF is exceptionally robust to unmodeled dynamics, system uncertainties, and noisy sensors [38]. Furthermore, this algorithm has a low computational cost, making it suitable for online estimation for DC microgrid states with a sizable number of CPLs. To achieve this, the unknown vector of load power, , is augmented in the device states. As a result, the augmented state vector is identified as follows: Where, = [ ] and = . Since is unknown, it is considered zero.
The DC microgrid state-space equation can be described as : The system measurements are defined as : Considering the system and measurement noise as and , respectively, and by combining (10) and (11), the equations are stated as : ̇= ( , ) + = + (12) In this paper, the non-linear dynamic system including additive noise is considered. The model in state-space form can be obtained as : ∈ describes the state of the dynamic system, ∈ presents the input for control, ∈ presents the output, and −1 are the measurement and process of Gaussian noise with covariances and zero means and −1 , respectively. ℎ: and : are the measurement and state non-linear functions of the system, respectively. The CKF is computed by performing time and measurement updates recursively. The estimated CPL power is the final component of the estimated state. The CKF algorithm is broken down into the following steps [38]: • Initialization The filter is started with the initial state and the covariance matrix: 5. Calculate the expected error covariance Compute the cubature points as : 8. The computed cubature points are propagated through the estimated function: 9. The predicted measurement is computed as: ̂| −1 = 12 ∑ | −1 (23) 10. Estimate the auto-covariance matrix : 11. Compute the cross-covariance matrix : 12. The Kalman gain is calculated as: = , | −1 −1 , | −1 (26) 13. The state vector is updated using the following law : Calculate the corresponding Error Covariance as : The CKF algorithm, like other Kalman filters, is recursive by nature and has to run at each iteration. The proposed CKF takes less time to compute compared to other Kalman filters including particle Kalman filters and unscented Kalman filters [27]. Furthermore, the CKF significantly surpasses the performance and convergence achieved by UKF and EKF algorithms, as the rules in CKF are very specific compared to the unscented transformation and various other linearized approaches [28] [29]. Consequently, in this paper, the CKF is applied to assess load power state of a DC microgrid. The estimated is derived from the estimated state vector ̂ using the CKF and having , values.

IV.
ANFIS -based non-linear controller : The system control has been developed using an ANFIS-based control method. An ANFIS combines the property of artificial neural networks and fuzzy logic which can learn and process data in parallel. The ANFIS element offers an adaptive modelling arrangement for learning the information from data sets. The structure comprises membership functions as shown in Fig.3, as well as a suitable dataset for input and output. The input and output data are generated using fuzzy if-then rules that have the learning ability to estimate non-linear functions. ANFIS should be designed in three simple steps:(1) Learning Concept-the term refers to a learning process that is based upon information given by the system. (2) Learning Algorithm -This describes a rule employed for adjusting the connections and constraints. (3) finally, the network's capability and the samples required for network training are assessed. Fig.3 shows a basic ANFIS structure with five layers having an input layer, three hidden layers, and one output layer. The layers are attached through directional links.

Fig.3: Structure of ANFIS layers
The ANFIS is based on a set of rules, which include the following: Rule1: if is 1 and is 1 then 1 = 1 + 1 + 1 Rule2: if is 2 and = 2 then 2 = 2 + 2 + 2 In this paper, the ANFIS design is made up of five layers, with and representing network inputs and 1, 1, 1, 2, 2, 2 representing linear coefficients. Layer1:The first layer is the fuzzification layer, which takes an input value and determines which member functions are appropriate for it. In the first layer, each node in the graph is represented as a square node, where the node outputs are as follows: Here, 1 is the membership function, is the node number, and represents the linguistic level. define the centre and define the width for the membership function, respectively, and are identified as presumed parameters. Layer2: The signals which comes out from layer 1 are multiplied by the second layer nodes. Layer2 nodes are represented as circular nodes. Layer 2 output is as follows: Here, denotes to the firing strength of each node. Layer3: The nodes in layer 3 are circular, and the layer numbers and fuzzy rules numbers are equal. The output is as follows : Layer4: This layer has circular nodes, and the node function of output is presented as: Now, using ANFIS-based non-linear adaptive control, the controller will be implemented.
The proposed controller design approach is divided into two parts: (1) Development of a cubature Kalman filter to estimate the load power's instantaneous value for uncertain CPLs (2) Design an adaptive controller to improve the closed-loop system response.
The fuzzy rules derived for the DC microgrid connected to a CPL will be of the following form: Where, The general ANFIS model will then be realised as follows: Here is the membership function. The mathematical derivation is done separately because the proposed approach is divided into two parts. To implement the proposed controller, the design must run concurrently. The required algorithm for the proposed controller design : 1. The preliminary value of power is taken as P(0) 2. Measure the DC microgrid state values (currents and voltages) 3. Update the CPL power using the CKF algorithm (15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26)(27)(28) 4. Compute the predicted current using ANFIS based algorithm(29-33)

The predicted current is applied to the DC microgrid
The total load power, , is first estimated using the CKF algorithm. The assessed is then fed into the ANFIS controller. The architecture for the suggested control approach is portrayed in Fig.4. The CKF algorithm is used to predict . The suggested controller then uses this estimation, along with the measurements, , , to compute the switch's optimal duty cycle, . a. Stability analysis for the proposed method: The dynamics and control of the converters have a substantial impact on the microgrid stability because of the increased number of penetration of renewable energy sources, which increases with the number of converters linked to them. Therefore, it is crucial to carry out a steady-state and transient stability analysis on the DC microgrid to guarantee a reliable and constant power supply.
The carried-out stability analysis is done using Lyapunov-based stability criteria. This approach algorithmically computes a Lyapunov function utilising the Takagi-Sugeno (TS) multi-modeling method to maximise an equilibrium's region of attraction (ROA). The dynamic modelling of the sources is done using state-space equations.
The following formula is used to determine the stability requirements using a Lyapunov function ( ), which must satisfy the Lyapunov conditions in a domain Ω around the equilibrium (at = 0, where represents a state variable): Consider the non-linear system ̇ = ( ). If there occurs a Lyapunov function ( ) such that and it satisfies the conditions The system will be asymptotically stable (lim →∞ ( ) = 0, ∀ 0 ≠ 0).To verify the system stability, the computation of ̇( ) is essential and calculated as: To justify stability of a system, ̇( ) is supposed to be less than zero. This take place if the condition Thus, the conditions to prove stability using Lyapunov function can be expressed as linear matrix inequality (LMI): The feasibility of LMI (41) can ensure the asymptotic stability of the system.
The systems considered in this work have nonlinearities and can be well described using the TS model. Suppose the non-linear model has nonlinearities, 1 ( ) to ( ). The equivalent non-linear TS model can be presented with a adequate number of local linear models, where each nonlinearity ( ( ), = 1, 2, . . . , ) has at least two values: and corresponding to a and a .
To demonstrate the stability (min or max value) only state matrices , which can be calculated from the nonlinear model, are needed. The region defined by the abovementioned boundary values serves as the basis for the assessment of the operating point's domain of attraction(DA).
The obtained domain of attraction for the suggested method and conventional PI control is plotted in Fig. 5.

Fig.5: Estimated Domain of Attraction for the proposed controller(red) and traditional PI controller (green)
As can be observed from Fig.5, the proposed technique has a larger stability region compared to a traditional PI controller.

b. Convergence Analysis for CKF:
The reliability of the CKF has a direct influence on the DC microgrid's overall stability. Consequently, the stability analysis proving the convergence is essential so that the estimation error approaches zero. The stability analysis of non-linear dynamical systems(13) with the CKF algorithm was earlier proposed in [29], [30]. This section presents a method for investigating the convergence analysis of the CKF which is based on the Lyapunov function. The errors for estimation and prediction are defined as : (43) Expanding by a Taylor series about ̂+ 1 gives, = (̂− 1 )(+∇ (̂− 1 )̃− 1 + ⋯ + (44) The error expressions are simplified as : is a state vector, ∈ is the control input, and represents the process noise with covariance .
The model errors and the noise sequence are converted to equality equations by choosing an unknown diagonal matrix as : The asymptotic convergence of the estimation error calculated using CKF for a non-linear system given by (1) can be proved using the Lyapunov function. The CKF is asymptotically convergent locally if the conditions listed below are fulfilled. Condition I: The resulting equality must be valid for the system represented by (13) to be equally observable: Condition II: The matrix +1 = | =̂| is consistently bounded, also matrix +1 −1 exists.

Condition III:
The instrumental matrix +1 and process noise covariance must be selected so that Where , are the singular values providing minimum and maximum estimate respectively and 0 < < 1. The next section validates the abovementioned assumptions for the proposed CKF, hence theoretically confirming the non-linear CKF's convergence.

VI. Simulation Validation :
The proposed adaptive ANFIS-based controller's findings are demonstrated in this section. To confirm the performance of the suggested approach, the system framework in Fig.4 is simulated using Matlab/Simulink. The CKF algorithm is linked to the ANFIS controller and calculates the load's unknown power over time. Table I contains the system parameters. Two scenarios are presented with the help of simulations done in MATLAB/SIMULINK. In scenario 1, the outputs of a DC microgrid are compared using the direct estimation method and the CKF algorithm for the proposed controller architecture. The error estimated in both cases is displayed in Fig.6. The suggested controller design and the CKF algorithm are integrated with scenario 2 to provide both quick transient performance and robustness for the DC microgrid, and the efficacy of the suggested design is justified.  Table I) are chosen to ensure the system's stability, and it can achieve its equilibrium point by taking the initial energy storage current as zero. The preliminary condition of the DC microgrid is chosen as 0 = [7.5 200 7.5 200] . The system and measurement noise variances are w = 0.001 and v = 0.01 , respectively. The value of can often be selected as a diagonal member of the diagonal matrix initially which is associated with the predicted variance of the subsequent state. As are measurable and is unknown, covariance matrix is initialised as 0 = (1,1,1, 10 3 ). The covariance matrix is preferred to be big enough to allow for rapid convergence. The estimation errors using CKF, and direct estimation are compared in Fig.5 and the figure leads to the conclusion that using CKF provides better performance. When the CKF is used, the estimated errors settle close to zero after a very short time (approximately 0.15 s), whereas when the direct estimation is done, the estimation errors have oscillations throughout the test time. Furthermore, the errors estimated without CKF do not converge to zero.

Scenario 2:
High-power transients are a major concern for DC microgrid stability connected to renewables. During transients, the non-linearity added by the CPL pushes the system into an unstable region. The controller design should ensure reliable operation during transients while also maintaining system stability. When transients occur, the system states are changed since the currents and voltages of the CPLs deviate from the equilibrium point. The simulation result is brought through two situations in this scenario: when transients occur and when a quick load change occurs. To investigate the efficacy of the suggested method, the simulation is done in MATLAB/SIMULINK, and the responses are compared to the design of fuzzy and PI controllers.
The simulation is accomplished by applying the parameters listed in Table-. Fig.7 (a-f) presents the simulation result showing the comparison of the performance achieved by the DC microgrid for the suggested approach, fuzzy control, and PI control. Case 1: Fig. 7(a) and 7(b) show the capacitor voltages at CPL1 and CPL2 during transients. The outputs are compared for PI, fuzzy, and proposed ANFIS controller design. The injecting current through ESS is also compared during transients for all three methods and shown in Fig. 7 (e).

Case 2:
Following that, the output voltage variations are taken into account, and the system responses are provided through comparison simulations. CPL is set to 900 W in this example. The load demand abruptly changes at 0.5 sec as an additional load of 600 W is connected to the system. The variation in output for the period of load change is shown in Fig.7 (c) and 7(d) for both CPLs and compared to the responses of the fuzzy and PI controllers. The ESS currents during load change are also compared for all three methods and presented in Fig. 7(f). The comparison shows that the CKF-based proposed ANFIS control method outperforms the conventional output feedback controller and the fuzzy-based controller both. The suggested controller improves the transient and steady-state response and uses a smaller amount of injecting current compared to existing techniques for stabilising the DC microgrid, as illustrated in Fig. 7(e -f).  Table -2 has been added to compare the settling time for voltages, percentage overshoots, and norm of control signals for all the three controller designs mentioned above based on simulation done in Matlab/Simulink. It is seen that to optimise the closed-loop system's transient response, the norm calculated for the feedback matrix should be kept as minimal as possible [39]. The norm of a control signal is calculated using Matlab and compared for ANFIS, PI, and Fuzzy-based controller design in Table-2. It is observed that the norm of the control signal is minimum for ANFIS-based design compared to PI and fuzzy-based controller design. Hence, the ANFIS-based design has less percentage overshoot as compared to a fuzzy controller and PI controller. Also, the ANFIS-based design provides the fastest settling time after the transient response compared to PI and fuzzy controller design as shown in Table-2.

VII.
Conclusions: An ANFIS-based controller with a CKF algorithm is proposed in this paper for controlling the ESS current which is connected to a DC microgrid with multiple CPLs. This research aims to control and stabilise a DC microgrid that comprises unpredictable time-varying loads. The CKF estimates the spontaneous value of augmented states of the DC microgrid's uncertain load power. The power thus estimated is subsequently fed into the proposed controller. The proposed approach is suitable against uncertainty and also has a low computation time. The exponential stability criterion, along with the CKF's quick estimation convergence, results in a feedback controller with better transient results. Two scenarios are considered to justify the efficacy of the suggested controller. The efficacy of the CKF algorithm is assessed and compared in scenario 1. The error signal is generated both with and without the use of the CKF algorithm. The comparison shows that the convergence of the error signal is faster when the CKF algorithm is used than when it is not used. In addition, the CKF algorithm's stability criteria are also analysed. In scenario 2, the efficacy of the designed controller with the CKF algorithm is verified during transients and loadchanging conditions. The transient response of the suggested controller is compared with the fuzzy-based and PI controller response. The norms of control signal along with settling times and percentage overshoots are also compared. The proposed control method shows the minimum overshoot with the fastest settling time compared to the other mentioned methods. The control method is checked and verified for sudden load change also. The load is suddenly increased after 0.5 secs and the output is verified and compared with the fuzzy-based and PI controller output. The proposed controller combined with the CKF algorithm not only estimates the system's state (capacitor voltage and inductor current) but also minimises the overshoots during transients. The proposed controller also adjusts the settling time after transients to its minimum. The comparison ensures the efficacy of the proposed method compared to PI and fuzzy-based control approach. The design criteria for the ANFIS-based controller with the CKF algorithm ensure the closed-loop DC microgrid system's stability. The stability criteria are verified and proof for convergence analysis for CKF is given in the appendix. Analysing the stability of DC microgrids connected to an AC microgrid and a rectifier unit could be a good research topic in the future. Applying the proposed method to various MG configurations with various loads, grid topologies, and various renewable sources are also suggested.