AC Backup Power Using A Simulated Sine Wave

Quote of the Day

Whenever you want to marry someone, go have lunch with his ex-wife.

- Shelly Winter


Figure 1: Typical AC Signal At Wall Outlet.

Figure 1: Typical AC Signal At Wall Outlet (Source). The flat-top distortion is common – especially when many loads are switching power supplies.

A customer today requested an AC-output Uninterruptible Power Source (UPS) for our indoor Optical Network Termination (ONT) products. Product Management asked us to consider this unit from CyberPower. This unit, like most other AC-output UPS hardware, does not generate an actual sine wave output like the local power utility (Figure 1 – sine waves are what comes out of an AC outlet). Instead, it generates an output that is often referred to as a simulated sine wave (also known as a pseudo-sine wave, quasi-sine wave, modified sine wave, or Pulse-Width Modulated [PWM]). I thought it would be useful to look at the mathematics behind this type of output.

This backup power unit converts the DC voltage from the battery into a simulated sine wave that will imitate the behavior of a real sine wave for most loads. A pure sine wave inverter can be used in a lot of different ways so are worth looking into. A device that performs this operation is called an inverter. You might wonder why the backup power folks chose to put out a simulated sine wave rather than a true sine wave. Like most things in the engineering, the issue is one of cost. Another option one could look into is the Switch Mode Power Supply (SMPS). This is more cost-effective compared to a pure sine-wave inverter. You could find clear instructions that will assist you in troubleshooting switch mode power supplies at a faster rate on many websites.

Generating a pure sine wave is relatively expensive when compared to generating an approximation. For an example of a circuit for generating a bipolar (i.e. both positive and negative voltage levels) PWM output, see the Wikipedia. In my experience, the simulated sine wave works almost as well as a real sine wave for most applications. I have had a couple of instances that involve radio receivers where the simulated sine wave did not work well. In each case, the audio output was contaminated with noise that would not have existed with a real sine wave. I discuss the inverter that caused these issues in Appendix A. Other than those two cases, I have been able to successfully power everything from lights to computers using a simulated sine wave.


Calling the output of this UPS a "simulated sine wave" is a bit of a stretch. The power waveform from an outlet is a sine wave (purple waveform in Figure 2). Observe that the "simulated sine wave" (reddish-brown waveform in Figure 2) does not look like a sine wave at all -- it is a form of pulse-width modulation. As is shown in Figure 2, the power supply output has only three output levels: +VA, 0 V, and -VA, where VA is amplitude of pulse-width modulation. Notice also that three time values are shown in Figure 2:

  • TH: the time during each period that the voltage output stays at VA
  • TL: the time during each period that the voltage output stays at -VA
  • T: the period of the signal

For the simulated sine wave to have zero DC level like that of the utilities' AC waveform, TH= TL. We will define the duty cycle to be \displaystyle D\triangleq {}^{\left( {{T}_{H}}+{{T}_{L}} \right)}\!\!\diagup\!\!{}_{T}\;.

Figure 1: Sine Wave Versus Simulated sine Wave.

Figure 2: Sine Wave Versus Simulated Sine Wave.

These backup units work by creating a pulse-width modulated output that has:

  • an amplitude comparable to the amplitude of a standard AC sine wave VA
  • an RMS value (VRMS) that is comparable to a standard AC sine wave
  • the same period as the standard AC sine wave (60 Hz in North America)

We will use a bit of mathematics to derive the relationship between VA, D, and VRMS.



Most AC-input powered equipment will work if they are presented with a simulated sine wave voltage waveform that has the same:

  • VA as the utility power sine wave
  • VRMS as the utility power sine wave
  • T as the utility power sine wave

We will derive expressions that will allow us to determine the required VA and VRMS values in terms of the nominal power line voltage and the duty cycle.


Voltage Amplitude

Determining the required voltage amplitude is the easy. In the US, the nominal AC voltage at the power meter is set by ANSI C84.1-2011 at 120 V (RMS). The amplitude of a sinusoid is related to its RMS value by Equation 1.

Eq. 1 \displaystyle {{V}_{A}}=\sqrt{2}\cdot {{V}_{RMS}}=\sqrt{2}\cdot 120\text{ V=170 V}

So we should see our inverter putting out a voltage with an amplitude around 170 V.

RMS Voltage

Equation 2 shows how we can derive the relationship between VA, D, and VRMS.

Eq. 2 \displaystyle {{V}_{RMS}}=\sqrt{\frac{1}{T}\cdot \int\limits_{0}^{T}{V{{(t)}^{2}}\cdot dt}} Definition of RMS voltage
\displaystyle {{V}_{RMS}}=\sqrt{\frac{1}{\frac{T}{2}}\cdot \int\limits_{0}^{T/2}{V{{(t)}^{2}}\cdot dt}} Positive and negative pulses are symmetrical, so I will just integrate over half a period
\displaystyle {{V}_{RMS}}=\sqrt{\frac{1}{\frac{T}{2}}\cdot \int\limits_{T/4-D\cdot T/4}^{T/4+D\cdot T/4}{V_{A}^{2}\cdot dt}} The function is a constant during the on-portion of the duty cycle, zero otherwise
\displaystyle {{V}_{RMS}}=\sqrt{\frac{2}{T}\cdot V_{A}^{2}\cdot D\cdot \frac{T}{2}}=\sqrt{D}\cdot {{V}_{A}} Evaluate the integral
\displaystyle D={{\left( \frac{{{V}_{RMS}}}{{{V}_{A}}} \right)}^{2}}={{\left( \frac{1}{\sqrt{2}} \right)}^{2}}=\frac{1}{2} Compute D for a North American power system

This means that an inverter that generates a simulated sine wave with 170 V amplitude and a duty cycle of 50% will provide the same peak voltage amplitude and RMS voltage as is delivered from a North American wall outlet. For many applications, that is good enough.

Real UPS Output Example

Lab Note: My oscilloscope did not want to display the whole waveform on the screen, so I ended up running the output through a resistor divider that reduced its level by a factor of 33.8. This division factor allowed me to display everything with a minimum of fuss. So all voltages you see going forward will need to be multiplied by 33.8 to get their actual value.

Let's take a detailed look at the output voltage from a CyberPower CP550HG, which is a commonly used backup unit for PCs. Figure 3 shows an oscilloscope screenshot of the unloaded output from the CP550HG. I was lazy today and did not do any analysis of my own on the signal -- I just let the oscilloscope compute things like RMS voltage and period.

Figure 2: Oscilloscope Screenshot of Unloaded CP550HG Output.

Figure 3: Oscilloscope Screenshot of Unloaded CP550HG Output.

The key characteristics from this plot are:

  • Duty cycle of 49% (50% target)
  • Frequency of 60.770 Hz (60 Hz target)
  • Peak amplitude of 181 V = 33.8·10.7V/2 (170V target)
  • RMS output voltage of 125.2 V = 33.8·3.704 V (120 V target)

The numbers measured are all within the range I would have expected for this unit. Since these are numbers were measured with zero load, I would expect them to be a bit high and they are.

See Appendix A for the data I measured from an inverter I use to run my computer when I am in my car. This is a very cheap unit and its numbers are a bit different because their design goals were different.


I was able to derive the amplitude and duty cycle required for a simulated sine wave inverter to behave similarly to a North American 120 V power waveform and I verified this derivation with an actual test case from the lab. The values I measured were all as I would have expected.

Appendix A

Here is the Black and Decker inverter I use in my car (Figure 4). Overall, it has worked well for me over the past few years. However, it did corrupt the audio output from a couple of radios that I was trying out.

Figure 3: Black and Decker 400 W Inverter.

Figure 4: Black and Decker 400 W Inverter.

Here is a plot of its output (Figure 5).

Figure 4: Output From Black and Decker Inverter.

Figure 5: Output From Black and Decker Inverter.

It has a lower peak voltage than the CyberPower. They compensate for this by making the duty cycle longer, which increases the RMS voltage. This is the unit that has caused me trouble powering some radio gear.

I would summarize its characteristics as follows.

  • Duty cycle of 80%
  • Frequency of 59.6 Hz
  • Peak amplitude of 136.9 V
  • RMS voltage of 117.6 V

Since this unit does not have the same peak voltage as a utility sine wave, I would expect it may have some issues driving some types of loads and I have seen issues (mentioned above). They probably made the decision to reduce the output voltage because generating higher voltages costs more than generating lower voltages -- and cost drives everything in consumer products.

This entry was posted in Electronics. Bookmark the permalink.

5 Responses to AC Backup Power Using A Simulated Sine Wave

  1. Rick Rose says:

    Excellent explanation. I'm learning about solar power at the moment, and in that community modified sine wave inverters are much disparaged, to the point I'm afraid to use them for anything but running basic motors. According to many online sources, I run the risk of ruining other electronics if I run them for prolonged periods using MSW. That made me think of UPS systems--Surely they must utilize pure sine wave technology if MSW is so detrimental. As you've so well explained, they do not. I'm still not entirely sure I want to trust them, but you've provided some good data points. Thank you!

  2. Osama says:

    Good work thanks

  3. Sadek says:

    Why computers with active filter SMPS won't work properly with Simulated sine wave?

    • mathscinotes says:

      There certainly can be issues. For example, Dell warns people about potential issues with inverters that use step-sine wave approximations. Here are some things I have personally seen or have been told about:

      • humming noise. I have heard a buzzing sound that appears to come from the rectification/filter section of the input. My guess is that it is caused by harmonic-induced mechanical oscillation.
      • many cheap inverters have over-voltage spikes in their output that stress the front-end components. This can be devastating, particularly to the surge protection components in the SMPS. These components are designed to turn on during rare over-voltage events. With an inverter that puts out spikes, they are active all the time and are not capable of handling that duty cycle.
      • the step-sine wave input can increase the ripple current into the front-end filter capacitors. These lifetime of these capacitors is a strong function of ripple current (link).
      • the step-sine wave input may throw any power factor correction (PFC) present in the SMPS. The PFC tries to modify the input waveform to reduce the harmonic content of the input current. Depending on how the PFC is designed, this may not work with your inverter.

      For these reasons, you can buy true-sine wave inverters, but they are expensive.


  4. Pingback: What would happen if you filtered brushless motor PWM into a DC voltage? - HeliFreak

Comments are closed.