The ballast is used to step up the current for the bulb.
Halogen produces more heat compared to HID as the bulb is charged with Xenon gas(some secondary chem stuff).
A HID bulb acctually needs about 23 000volts, thats where the ballast come in to aid.
There is many kind of sizes for HID, frm H1,H3,H4,H7,H8,H9,H11,
H13,9004,9005,9007,880,881 to D2c.
For s4 we use H4 size.
Correct me if I'm wrong. Done some research way back b4 i fitted mine.