# Switched Auto-Regressive Neural Control (S-ANC) for Energy Management of Hybrid Microgrids
## 1 Introduction  
Model predictive control (MPC) is a control approach that is widely utilized in many industries, including chemical, electrical, and mechanical engineering. It is well-suited to microgrids (MGs) because it deals with restrictions and optimizes performance over time [1; 2; 3; 4; 5]. MPC entails formulating and solving an optimization problem at each time step, to determine the optimal control inputs for the next step. A MPC was described in [6; 7; 8; 9] for effective MG optimization, and mixed integer linear programming (MILP) was employed to solve the problem posed. An MPC-inspired energy management (EM) system employing a neuro-fuzzy method, which accounted for renewable energy sources (RES's) intermittent nature in grid-connected MG with loads and photovoltaic (PV) sources, was reported in [10]. Ref. [11] presented scenario-based stochastic programming with a rolling horizonstrategy for minimizing the operating expenses of MGs when the wind speed is unknown. Rolling horizon or MPC techniques are reactive-based methodologies that modify or update data using deterministic approaches. A scenario-based MPC was developed in [12] to reduce operating expenses and overall emissions. To achieve inexpensive and flexible operation, Ref. [13] provided an MPC-based optimum management for renewable energy MGs with hybrid energy storage systems (ESSs), such as hydrogen, batteries, and capacitors. A hierarchical MPC-based technique for islanded AC MGs addressed power-quality and unbalanced power-sharing difficulties [14]. Despite this, the traditional MPC cannot control a MG in various operational modes. In contrast, switched model predictive control (S-MPC) is a variant of MPC that employs multiple models, each representing a unique mode of operation or scenario of the system. S-MPC selects the optimal model and associated control strategy based on the current system state and the desired performance goals. This makes it possible for S-MPC to handle systems with mode-dependent dynamics. MPC is distinguished from S-MPC in using a single model to predict the system's future behavior [15]. S-MPC employs multiple models and switches between them, based on the system's current state. S-MPC can provide better performance and robustness than MPC, especially for complex systems with multiple modes or operating conditions [16; 17]. Another novel study presented a hybrid MG model that incorporated two switched receding horizon control laws. This strategy reduces the overall energy expenses and maximizes the efficient utilization of RESs for expansive business establishments, while accommodating fluctuations in grid connectivity [18]. Moreover, Ref. [19] outlined the process of designing and applying a S-MPC to wind turbine systems, intending to manage the intricate nature and nonlinearity inherent in wind turbine systems. The system employs qpOASES as an integrated solver for optimum online control. It incorporates a cyber-physical real-time emulator for utility-scale wind turbines, with variable-speed and variable-pitch capabilities. The study showcased the viability and efficacy of S-MPC in attaining control objectives for wind turbine systems in real-time, utilizing brief control periods. In addition, the study in [20] presented a novel technique for enhancing wind turbine control by introducing a S-MPC framework. The proposed approach aimed to solve the limitations of the conventional continuous control-based MPC algorithm. The results of the comparative analysis indicated that the proposed algorithm exhibited superior performance compared to the existing MPC in various aspects, including computational efficiency, load mitigation, and dynamic response. [PERSON]. [21] presented a novel S-MPC method specifically tailored to discrete-time nonlinear systems. The simulation outcomes emphasized its superiority over a conventional MPC technique regarding computational efficacy and control effectiveness. Another study presented a novel S-MPC methodology for power converters.