Perhaps you should try running the modem and router from a fully charged car battery before spending any money on an UPS?
I did that for a while in order to eliminate any potentially mains borne interference from within my home, but using a motorised golf trolley battery rather than a car battery, in conjunction with a laptop running on its own battery power.
It did serve its purpose, in that it confirmed my mains power as 'clean'.