This research study suggests a novel hybrid optimization technique that regulates UPQC in order to address the Power Quality (PQ) problems in the HRES system. The load system serves as the primary link between the battery energy storage systems (BESS), wind turbine (WT), and solar photovoltaic (PV). . Electric Vehicle Charging Stations (EVCS) experience significant distortions in two scenarios: (1) when connected to the grid, and (2) when operating independently on battery energy storage devices (BESD) and solar energy. Addressing these distortions is crucial for improving the system's Power. . , D motor drive ind-solar system using a Unified Power Quality Conditioner (UPQC) in MATLAB/Simulink. The hybrid system combines renewable energy sou ces, specifically wind and solar, to provide a more stable and reliable power supply. India, with plans to enhance its solar and wind capacities to 20,000 MW and 38,500 MW by 2022, aims to integrate these variable RES outputs into its national grid. This work designs the Unified Power Quality. . Solar and wind power are viable alternatives due to their well-established technological advancements and the support they receive from the government via various initiatives.