The need for a greater supply of energy from sustainable sources is growing because of increasing energy prices, concerns about nuclear power, climate change, and power grid disruptions. This research offers a method for the balance of power management of a combination of multi-source DC and AC supplier systems that enables sources of clean energy based on an independent grid to function economically and with the highest levels of system predictability and stability possible. The DC microgrid's hybrid generation source consists of a diesel power source, wind, photovoltaic (PV) power, and a battery bank. The energy system can fulfill the load demand for electricity at any moment by connecting various renewable sources. It can function both off and on the grid. The microgrid may occasionally not be able to provide sufficient electricity, while every green energy source's electricity contribution is based on how its supply varies and how much power is needed to meet demand. As a result, a diesel generator is required as additional backup power, particularly while operating off-grid. This paper designs and implements an MPPT technique for a PV system based on the GWO algorithm. By creating PWM pulses in response to variations in the PV panel voltage, this method modifies the converter's duty cycle, while wind turbines using MPPT based on P&O, to get the most out of hybrid energy sources that are renewable while simultaneously enhancing the quality of power. The priority sources of electricity for the grid are photovoltaics and wind power. Based on the results of simulations and experiments, the proposed control method for DC, which uses the MPPT approach, can dynamically switch between all of the system's various modes of operation, independent of the battery's condition or environment, ensuring safe operation and constant bus voltage. An analysis was conducted on the suggested system's performance. It has been noted that compared to the conventional approaches, the suggested GWO-based MPPT methodology is quicker and produces fewer MPP oscillations. It offers a more effective reaction to quickly shifting atmospheric conditions. Results of simulation for the recommended control scheme with MATLAB/Simulink.