Analysis and Design of Multiport Converters for Photovoltaic and Electrical Vehicle Applications