Voltage sags and swells are an example of a power quality issue that deviates too far from the acceptable norm. Any voltage dip between 10% and 90% of rated voltage is a sag. Any overvoltage of 110% or more is a swell.
So, what is normally delivered to you by your power company? The national standard in the U.S. is ANSI C84.1, which requires voltage regulation of plus or minus 5%.
But, what voltage variation is acceptable? It depends entirely on the magnitude and duration of the voltage variation, as illustrated in the Information Technology Industry Council Voltage Tolerance Curve. Any combination in the orange region, and the equipment should operate normally.
There are several solutions to protect against sags and swells. For sags, uninterruptible power supplies (UPS) or voltage regulators store some energy, either in solid-state circuitry or in batteries to supplement the supply during the sag.
Once you know the severity of the voltage variations and how long they last, you can pick the appropriate solution. What you are effectively doing is adding to the natural power of your electronic equipment.
A better understanding of sags and swells will help you prevent power quality problems from interrupting your operations.