There are three main types of uninterruptible power supplies (UPS): offline UPS, online UPS, and line interactive UPS. Offline UPS has the fastest changeover time between battery and mains power, around 3-8 milliseconds. It uses an automatic voltage regulator to regulate output voltage. Line interactive UPS always has its inverter connected to the output and charges the battery when mains power is normal. Online UPS always runs on battery power whether mains power is present or not, using mains power to charge the battery when available.