The presence of regulated power converter in the three-phase microgrid system makes it vulnerable to interactions with the grid and causes instability. Because, the regulated converters exhibits negative impedance characteristics and acts like constant power loads (CPLs). To ensure the system stability, adaptive controller can be used in the system controller design. However, to design these adaptive controllers real-time grid impedance information is required and this is a challenging task. In this paper a Hall Binary Sequence (HBS) which is a class of pseudo random binary sequence (PRBS) is proposed for real-time impedance measurement. The HBS perturbation is computationally very effective compared to conventional multi-sine perturbation methods. Perturbation signals for impedance measurement should have low crest factor and less measurement time. The proposed HBS has low crest factor and the impedance can be measured within 3-5 perturbation cycles. To extract the impedance of the grid, the HBS is added to the inner loop currents (d-axis and q-axis) components of the energy storage system (ESS). Next, the Generalized Nyquist Stability Criteria (GNC) is applied to the return ratio matrix to check the system stability. The effectiveness of proposed impedance measurement algorithm using the HBS has been tested on three-phase microgrid system in MATLAB/Simulink environment. Simulations results are validated by conducting experiment on a 2kW laboratory test bed and results proved the robustness of the proposed impedance measurement algorithm. © 2020 IEEE.