In the context of modern sustainable transportation technology, the terms Vehicle-to-Grid (V2G) and Grid-to-Vehicle (G2V) holds significant value. During V2G and G2V modes, vehicle and grid exchange power using various power converters to modulate the power for a sustainable electrical energy ecosystem. With V2G, the EVs can also perform the role of a peak power contributor, reserve power source, and an efficient system to improve power quality issues by working as power factor corrector, reactive power compensator, and active power filter, to name a few during the V2G mode. The on-board power converter in the vehicle, working as the charger for the battery, is the component required to facilitate the intended bidirectional power exchange between the vehicle and grid and also modulates the power as and when required. The modality for operating the onboard charger as a power exchange tool depends on the type of control strategy adopted as well as on the battery and grid parameters. In this paper, a bidirectional power converter (on-board converter) is introduced, which is controlled by adopting a d-q axis-based control strategy. The MATLAB/SIMULINK-based system simulation model is created, and the Hardware-in-Loop (HIL) tool Opal-RT 4510 is used to validate the simulation results on the intended hardware and real-time scenario. The control strategy, when integrated with the adopted model, contributes to enhancing the power-transferring capability of the converter, which is assessed using the simulation and subsequent HIL-based implementation. The paper also focuses on narrating the steps to implement the vehicle-grid interface using HIL and forming a generic reference model for a bidirectional power flow converter, such that it can be used for other circuits and its implementation in real-time scenarios.