Get a 2kva ferro resonant transformer for your application, plug a UPS into that and your problems disappear
The bad news:
Do not use the ferro with a generator
If the ferro noise drives you nuts, put it somewhere far enough away and run with extension cords
Check your wiring, 170 to 230 volts means some some of neutral and ground crap may be going on, loose connections,
clueless DIY wiring, suss electricity provider, a random combo of these, whatever...
and that's a major reason to use an old school ferro, a decent sine wave producing one,
because it doesn't care what crap goes in, it gets hot, buzzes, hums and b!tches away to supply a respectable 220 to 240 volts depending on load and input,
and takes out a lot of line garbage as a bonus
Get a good sine wave ferro like a Sola or similar good rep brands.
I have one for those occassions I need constant voltage, so one thing less to think about on a tricky job
The true full on-line UPS is a great way to go, assuming you get a model that can cope with such input abuse
and not shut down with an '
ERR' or
'Sorry-dude-budget-models-not-designed-for-this... 
' diagnostic message
Servo motor variable trasnsformer may not be able to keep up with fast or abrupt voltage changes, and may put chunks of 290 volts or more into your system if the incoming voltage dives from 230 to 170 and back to 230
These units are only good for long term voltage dips and rises, and perhaps generator use.
Relay tap changing transformers are a coin toss and may just do what your UPS is doing now
or find out which neighbor is running a fan heater, vacuum cleaner, kettle, electric grill, and hair dryer all at once

and if they don't slow up...threaten to do the same and cause the power to drop to 66 volts
