The intermittent nature of photovoltaic (PV) based distributed generation can cause voltage control issues. This research aims to investigate the impact of using the reactive power capability of PV smart inverters, which can function as distributed static compensators (DSTATCOMs) during non-feed-in hours, to address this problem. In other words, the suggested PV-DSTATCOM can be used to provide voltage control whenever there is a high demand placed on the system around the clock. This study presents a coordinated multi-stage voltage control (CMSVC) strategy that utilizes both PV-DSTATCOMs and traditional voltage control devices through a hybrid of local and centralized control algorithms. The goal is to minimize energy waste while maintaining a voltage that is within acceptable limits. To achieve the best results, an improved whale optimization algorithm has been proposed for optimal optimization. To test the proposed method, the IEEE 33 bus radial distribution system and IEEE 69 bus radial distribution system were evaluated. According to the findings, the solution offered in this research significantly reduces energy losses and voltage variations, demonstrating the effectiveness of the proposed method