An Extendable Quadratic Bidirectional DC–DC Converter for V2G and G2V Applications