## 4 Results and Discussion
### Grid-Connected Mode  
In grid-connected mode, performance is checked on the basis of a specified framework to ensure DC and AC bus voltage regulation. Reference generated in the Equation (73) shows the flow of the active power between the DC and AC sides as per the load requirements throughout the grid-connected mode. If the generated power by PV and wind is less than the demand then, power flows towards the DC side from the utility grid and, if the generated power is greater than the demand, then excessive power is delivered to the utility grid. Figure 11 shows the power injected by the WES and PV system to the microgrid. The operation of the hybrid RESs is in maximum power point tracking mode during the entire grid operation. Due to the availability of the grid power in the system, ESS is kept in the idle mode under the grid-connected operation. The generation of the wind and PV is depending on the weather conditions. Figure 8a shows the wind speed profile. It can be observed that wind speed varies due to weather conditions. The rotor speed of the wind turbine is controlled by the optimal torque control (OTC) method to extract the MPPT from the WES. Figure 11 shows the MPPT power generation of the RESs during the grid-connected mode.  
Figure 11: Power generated by wind and PV system.  
During the grid-connected mode, AC voltage at the voltage source inverter (VSI) side will be automatically balanced due to the connection with the main grid. The objective will be to stabilize the DC bus voltage. PV and WES are operated in MPPT and the load profile is given in Figure 9. At \(t\) = 6-8 s, the load current changes from 7 kW to 14 kW, and hybrid RESs cannot provide all the power due to generation constraint, therefore, active power will flow from the AC side to the DC side to ensure the power balance at DC bus. During \(t\) = 12-14 s, load power is 3 kW, and it can be noticed that WES and PV are generating more power than the required load power; therefore, power from the DC side to the AC side will flow to ensure the stable voltage at the DC bus.  
The voltage regulation at the DC link bus during the grid-connected mode can be seen in Figure 12. Comparison of proposed BFASMC during the grid-connected mode is done with PID, Lyapunov, and sliding mode controller techniques. It can be clearly identified from Figure 13 that BFASMC, as compared to other controller techniques, tracks the reference 1000 V accurately with 0.001 s settling time, 0.1% overshoot, and zero steady-state response. Spikes can be seen at the load changing periods, but they are under acceptable range and during BFASMC the recovery time is very minimal, which validates the effectiveness of the proposed technique. The sliding mode controller tracks the reference voltages with 0.003 s settling time, 0.05% steady-state error, and high chattering throughout the considered period, which is not acceptable for the smooth and uninterruptable operation of the microgrid. The Lyapunov controller has minimum chattering but it has high 0.2 s settling time and 0.29% overshoot during the varying load conditions.  
The stabilized frequency during the grid-connected mode can be seen in Figure 14. Grid current and voltages during the grid-connected mode are shown in Figures 15 and 16, respectively. In addition, the comparison of the designed VSI controllers is performed to validate the performance of BFASMC for VSI side. Lyapunov and SMC controller are compared with the proposed BFASMC and simulation results can be seen in Figures 17 and 18. Table 5 shows the difference between the PID, SMC. Lyapunov and BFASMC in terms of settling time, rise time, percent overshoot, and steady-state error percentage.  
Figure 12: DC bus during grid connection.  
Figure 14: Frequency regulation at the VSI side.  
Figure 13: DC bus comparison during grid connection.  
Figure 15: Grid current during grid-connected mode.