An Electric Vehicle Onboard Microgrid with Solar Panel for Battery Module Balancing and Vehicle-to-Grid Applications