People, who have square wave UPS, commonly have a problem of malfunctioning of fan dimmers, some time fans also and other electronics items such as mobile chargers. Reason of that malfunction is “High voltage Spikes” produced by fans.
When an inductor switches on or switches off in a DC circuit, it produces high voltage for a very short time which is technically called “inductive kick-back” as you can see in below wave form. Remember that few years back, a toy like a book was very famous that when someone opened it, he got a powerful shock. Actually that book consisted of a coil, and a 1.5V cell. When coil switched on or off, high voltage generated and the guy who opened the book got a shock while there was just a 1.5V cell in the book to supply the current to coil.
Same theory is applied at fans which run at square wave UPS. The voltage in that UPS suddenly rises and falls and during that rising and falling, high voltage produces by the coils of fan which damaged the dimmers etc. I did an experiment to overcome on high voltage spikes by connecting a simple capacitor and succeeded.
So if one can not replace the square wave UPS (due to that problem and also a very low efficiency) with a good one, for the time being, I would suggest, connect capacitor with those fans which run with UPS. I hope the problem would be removed.
For ceiling fan 75-90W = Capacitor 1.5uf.
For pedestal fan 125-150W = Capacitor 2.5uf.