Lead Acid battery switching regulator to keep constant output
That is a horrible UPS design.  

4.7V?  What kind of battery is that?

UPS is best done with sealed lead acid which is least affected by over charging. 

A constant voltage source does not make a charger.
It's much more complicated than that.
You use a smart charger chip and a micro-controller to monitor the process and make adjustments when things go wrong.

Charging is a 3 stage process.  Stage 3 is extremely important for a UPS.  A hysteresis charge can be used in place of the float charge.







The you have maintenance events like adding a topping charge to reduce sulfation and replenishing energy lost to self discharge.  You need to always know the state of charge. You need to monitor the battery temperature. 

It is not simple to prolong battery life for 5+ years.
A UPS charger design is not trivial.  

You are in way over your head.

Need a UPS?  Buy one from APC.  Why APC?  Because they have been doing it so many years they know all the tricks and they are not telling anyone else their trade secrets.