Advanced control of bidirectional three-phase BEV charger with V2X technology