A bidirectional DC-DC converter is the part that lets an electric vehicle both draw a fast charge and push power back during vehicle-to-grid (V2G) operation, so its control decides how well the DC link holds up when the load jumps or the power reverses. This paper sets out a full switching-level model of a synchronous half-bridge converter that sits between a 400 V battery pack and a 750 V DC link at 50 kW, and it controls that converter with a two-loop sliding-mode scheme: an inner sliding-mode current loop with a boundary layer to limit chatter, and an outer loop that holds the link voltage. The controller is written out term by term and compared against a conventional PI cascade on the same plant. Under a 40 to 100 percent load step the sliding-mode controller settles the link in 0.72 ms with a 2.66 percent dip, against 1.75 ms and 4.20 percent for the PI cascade, and its response barely changes when the inductor is 40 percent larger and its resistance 50 percent higher than the controller assumes, which is the invariance property sliding-mode control is meant to give. Power reverses from full discharge to full charge in 0.255 ms. A converter loss model puts peak efficiency at 98.44 percent near 19 kW and 97.79 percent at the rated 50 kW. The converter is then driven by a real-world charging-demand profile taken from 41,213 charging sessions recorded at the Newcastle Helix site, and it holds the DC link within 9.53 V across the day. Every figure comes from the accompanying code and can be regenerated.