design and construction of a smart inverter battery charger