UPS When there is no mains, the battery system supplies the demand, when mains returns, it supplies the load and charges the battery bank.
Rev 2. removed relay and transformer, added rectifier on top of PS (Battery bank) Now there is no power spikes when switching back to mains, it is automatic.
The dc supply is shown for simulation only, since there is no battery model in EC.
Work in progress.