AC Line Waveform Distortion - Page 1
Forum section: electronics / beginners

author: spiff72
author_rank: Regular Contributor
timestamp: April 28, 2019, 01:57:05 am
content: Hello all,I used my Rigol 1054Z to measure the AC waveform in my house and I get a sort of shark-fix shape. I attempted to use the FFT function on the waveform and ended up with the image shown. Can someone confirm whether my conclusions are correct? I used one of the other options under the FFT (Hanning?) when I took this image.The peak in the middle is the fundamental 60 Hz signal (I chose 60 Hz in the math menu)The following peaks are the 2nd harmonic (120Hz), 4th harmonic (240 Hz), and 6th harmonic (360 Hz - this peak is tiny)If the above is correct, then the graticules across are 100 Hz each RELATIVE to the fundamental, so the first graticle is at 100, not 100+60 (180 Hz)?The 2nd and 4th harmonic peaks are both about 27db down from the fundamental?What sorts of factors can distort the waveform like this?

author: IanB
author_rank: Super Contributor
timestamp: April 28, 2019, 02:07:54 am
content: Based on a similar question I asked in the past, I'd say that it is not unusual to see the mains wave form distorted like this.Probably the mains is a nice sine wave when it comes out of the generator, and it gets more and more distorted the closer it gets to the point of use (basically because many consumer loads are non-linear and they influence it more the closer you get to them).https://www.eevblog.com/forum/chat/when-is-a-sine-wave-not-a-sine-wave/

author: spiff72
author_rank: Regular Contributor
timestamp: April 28, 2019, 02:45:06 am
content: Thanks. I have a coworker with the same scope and he stated that when he does the same evaluation at home, he gets a very clean looking sine wave. Obviously everyone's homes will be different, though.Also, I think I need to repeat this test with the FFT again after seeing a few more tutorials.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 28, 2019, 03:57:09 am
content: How does your probe look on the test point? Have you compensated it? You can actually pick up the 60hz wave by probing your finger and pressing auto.

author: gf
author_rank: Super Contributor
timestamp: April 28, 2019, 06:54:32 am
content: Looks like the mains line is not loaded with ohmic load, but heaviliy loaded with rectifiers (e.g. SMPS without or with poor power factor correction). One factor is likely that more and more people replace tungsten with led (and the power factor is certainly not the primary buying criterion for lamps or bulbs, but rather the price, or design of the lamp).

author: soldar
author_rank: Super Contributor
timestamp: April 28, 2019, 08:00:21 am
content: All mains power I have ever seen are clipped at the top due to rectifier-capacitor loads. This is normal.

author: SG-1
author_rank: Regular Contributor
timestamp: April 28, 2019, 11:20:49 am
content: My mains waveform is also flat on the top.Here is an example from an experiment with a mercury vapor lamp.Voltage trace is red.

author: rstofer
author_rank: Super Contributor
timestamp: April 28, 2019, 01:45:26 pm
content: Quote from: spiff72 on April 28, 2019, 01:57:05 amI'm pretty sure the FFT horizontal scale is just what it says it is, 100 Hz/div. The fundamental is centered on a division (according to the menu item) and the 3rd harmonic is 120 Hz above 60 Hz or 180 Hz. I expect 3rd and 5th harmonics from loads that are essentially a square wave.You opted to have the fundamental positioned 40 dB down from the top of the graticule. I can't see the lines well enough to say anything about the two harmonics but just count them down from the top of the fundamental.

author: MrAl
author_rank: Super Contributor
timestamp: April 28, 2019, 02:07:59 pm
content: Quote from: spiff72 on April 28, 2019, 01:57:05 amHi,That's what mine looks like too.I can guess that the line is loaded more near the peaks that's why it seems so flat topped.Rectifiers do that and a lot of things we use today use bridge rectifiers.

author: rstofer
author_rank: Super Contributor
timestamp: April 28, 2019, 02:27:21 pm
content: Sure, rectifiers do that because of capacitors. In every linear supply, there is a rectifier feeding a capacitor. We like to use large capacitors so that the voltage doesn't change very much throughout the conduction cycle. In fact, the rectifier only conducts for a very brief period of time when its voltage is higher than the drooping capacitor voltage. The smaller this conduction period, the higher the current needs to be during conduction. Big capacitors, small conduction angle, high current.Attached plot of diode conduction shows that the diode is only conducting at the very top left edge of the sine wave. Before the diode can conduct, the diode voltage (blue trace) has to get higher than the capacitor voltage (black trace) which is drooping. The diode conducts until the capacitor is recharged (at the crest of the sine wave) and then it stops conducting. You can see that the conduction angle is quite small yet all of the load current for the entire cycle needs to pass through the diode in that small amount of time in order to charge the capacitor.

author: spiff72
author_rank: Regular Contributor
timestamp: April 28, 2019, 04:32:30 pm
content: Thanks for all the responses. I do have a lot of LED bulbs scattered around the house. I might have to repeat the experiment with all the lights in the house turned off and see if that makes a difference. I did actually try turning lights off in just my office (where the scope is located) and it didn't make a difference.Also, thanks to rstofer for the clarification of the FFT numbers. It does make more sense that the peaks are the 3rd and 5th and my logic was flawed on the counting of the divisions.Thanks!

author: joeqsmith
author_rank: Super Contributor
timestamp: April 28, 2019, 04:52:21 pm
content: If I want to run a test with a clean wave, I have to generate it. Link showing the incoming voltage at our house.https://youtu.be/04I7nHA_HxM?t=731

author: radiolistener
author_rank: Super Contributor
timestamp: April 28, 2019, 07:38:46 pm
content: The same waveform on my mainsI think this is because of switching power supplies in the computer and other home electronics.

author: bdunham7
author_rank: Super Contributor
timestamp: April 29, 2019, 12:31:43 am
content: How is the scope connected to the mains? Direct, voltage divider, transformer?3rd, 5th and 7th harmonics are common. 3rd would be mostly generated locally, typically an unloaded transformer will generate some 3rd due to hysteresis. However, even though industrial loads and distribution systems do generate a lot of 3rd, you don't see them much because in a 3-phase system, they cancel out.5th is generated by induction motors and certain generator configurations.What you have looks like an unloaded transformer to me, although rectifier/capacitor systems could be contributing as well. THD is supposed to be under 5% and it looks like you may be approaching that.B/T/W, that is a nice clean FFT, especially as a freebie add-on to an entry level scope. What exact settings (window type, etc) did you use?

author: radiolistener
author_rank: Super Contributor
timestamp: April 29, 2019, 02:19:47 am
content: In my case, I connected mains to oscilloscope through toroidal transformer. Secondary coil is unloaded.But when I load it with resistor, the waveform shape is the same, just a little smaller amplitude.

author: soldar
author_rank: Super Contributor
timestamp: April 29, 2019, 02:27:06 am
content: Quote from: spiff72 on April 28, 2019, 04:32:30 pmProbably not. You'd have to turn off a lot more than just lights and just your house. There are many electronic loads like that and they are all over the power grid. You might see a bit of difference but I doubt it. You would probably see the same shape even at the distribution transformer.

author: bdunham7
author_rank: Super Contributor
timestamp: April 29, 2019, 03:58:49 am
content: Quote from: radiolistener on April 29, 2019, 02:19:47 amI'm guessing your 3rd harmonic is mostly coming from the toroid. I know mains voltage freaks people out, but there's no reason you can't just poke your mains with the probes that are included with the Rigol as long as you set it for 10X and DON'T USE THE GROUND LEAD! They're 300V CATII. If you're nervous, just open up a device that has a polarized plug and uses a fairly small protection fuse, then probe downstream of the fuse.

author: soldar
author_rank: Super Contributor
timestamp: April 29, 2019, 04:57:38 am
content: Another really easy thing to do is to use a voltage divider. You can use 100K + 10K, connect the 10 K to neutral and the 100K to live and you divide the voltage but also have a current limiter so that even if you short the leads you are safe.

author: BravoV
author_rank: Super Contributor
timestamp: April 29, 2019, 07:37:20 am
content: Never seen a perfect Sine wave shape from mains, mine is similar to OP too, using Fluke DP-120 HV Diff.Probe straight at mains that powered the scope it self.

author: Gyro
author_rank: Super Contributor
timestamp: April 29, 2019, 07:45:08 am
content: Quote from: bdunham7 on April 29, 2019, 03:58:49 amQuote from: soldar on April 29, 2019, 04:57:38 amGuys, this is the Beginners section. Weneversuggest connecting scope probes to, or directly tapping the the mains, especially when the experience level of OP is unknown!Also, many Chinese scope probes are Cat I rated at 300V (even if they claim otherwise).

author: bdunham7
author_rank: Super Contributor
timestamp: April 29, 2019, 03:03:52 pm
content: Quote from: Gyro on April 29, 2019, 07:45:08 amIs there evidence of this? I seriously doubt Rigol has faked their CAT rating, and even if they have, then they aren't CAT rated at all, not CAT I.I'll respect the rules, if that's what they are, but I think you are doing even beginners a big dissservice in telling them to avoid a very simple, common measurement technique instead of telling them how to do it safely.

author: IanB
author_rank: Super Contributor
timestamp: April 29, 2019, 04:12:14 pm
content: Quote from: bdunham7 on April 29, 2019, 03:03:52 pmI think it's important to point out the risks of trying to measure mains with oscilloscopes. Bench scopes generally do not have isolated and floating inputs. I have created unfortunate sparks and overloads when working with low voltages when I was careless. Doing the same with the mains could have had much more severe consequences.

author: Gyro
author_rank: Super Contributor
timestamp: April 29, 2019, 05:35:23 pm
content: Quote from: bdunham7 on April 29, 2019, 03:03:52 pmOk, I'll concede that original Rigol probes do most likely meet their CAT rating, although as I indicated, low cost Chinese probes are not all created equal. If the probe is accidentally set to it's X1 position, the safety rating immediately reverts to the CAT I rating of the scope input. Stated CAT rating of scope probes is therefore 'suspect'.You do still need to find a way of connecting the probe to an outlet (without exposing the ground skirt*). Mains outlets don't naturally lend themselves to direct probing with scope probes, this inevitably leads to dodgy hookups of one sort or another, either objects inserted, or leads with a plug on one end. You also can't assume that the user has suitably tied back and insulated, or removed the dangling ground clip. There are simply too many variables to assure inexperienced user safety.In the Beginners section we do not assume a level of knowledge. There have certainly been cases of beginners (of all ages) receiving their shiny new scopes and having exhausted the Probe cal output and in the absence of other signal sources, go straight to probing the mains (not suggesting this is the case with the OP - in fact he was playing safe and using a transformer). This is the reason Dave produced his comprehensive and oft quoted 'How not to blow up your scope' video. It is too common an occurrence. As Ian says getting it wrong can have nasty consequences.Not criticizing, just explaining.*Edit: Image captured from an ebay listing () a few years back:https://www.ebay.co.uk/itm/Professional-BNC-60MHz-Oscilloscope-Probe-Clip-P6060-X1-X10-600V-/161805210779?hash=item25ac57949b:g:An8AAOSwgQ9V3JuV

author: The Electrician
author_rank: Frequent Contributor
timestamp: April 29, 2019, 08:17:46 pm
content: The OP did not say that he used a transformer; it was radiolistener that said he used a transformer.Tell us, spiff72, did you use a transformer, or did you probe the mains directly with a standard oscilloscope probe?

author: spiff72
author_rank: Regular Contributor
timestamp: June 03, 2019, 08:46:04 pm
content: Sorry for the lengthy delay in response. I didn't have notifications enabled until just now, and didn't think to come back and check this thread.My method to measure in my OP was to remove the ground lead from the probe (not the scope power cord) and then measured directly. I know that the outlets are wired correctly, and i have a plug and short wire length with the correct indicators for hot, neutral, and ground. The scope was set to use AC as the trigger.I am aware of the risks, and was comfortable with them.Quote from: bdunham7 on April 29, 2019, 12:31:43 amThanks for that feedback. I will have to redo the measurement re-check the settings I was using on the FFT - this was over a month ago so I don't remember them. I also remember doing a fair amount of fiddling with the settings trying to make sense of it.I might have to go on a search for unloaded supplies. Would this be only for linear supplies (both the AC/DC and AC stepdown), and would unloaded SMPS be included too? I am sure that there are a TON of scattered SMPS (wall warts, phone chargers, etc), but probably not as many linear supplies, and even fewer purely stepdown transformers. The only stepdown transformer I am aware of would be for the furnace/thermostat - and maybe the doorbell.There are probably enough options to just shut off breakers until it is eliminated (assuming the source is in the house).EDIT: I now realize that maybe the question about FFT settings was directed at Radiolistener (I would like to know how he got that plot as well, and what scope he used).

author: spiff72
author_rank: Regular Contributor
timestamp: June 05, 2019, 12:58:15 am
content: I hope this thread hasn't died - I would really like to hear others' thoughts on the waveforms (and possible sources of the distortion).I tried to re-run this FFT on my AC waveform, and got the attached. I screen grabbed all the settings pages in the MATH menus to show how I had the FFT set up to run.I also ran a similar pass on a 60 Hz square wave from my function generator for reference. Unfortunately this scope doesn't seem to provide very granular access to the settings (Hz/div, etc because it seems dependent on the scopes settings for the horizontal timescale), and as a result, I don't have the same Hz/div setting on the AC wave vs the square wave.I think i successfully got the FFT plot to show DC/0Hz at the left edge of the screen, and it looks like the 3rd and 5th harmonics are obvious high points. The high peak at about 700Hz seems odd?The square wave looks reasonable to me with the gradual falloff of odd harmonics.

author: bdunham7
author_rank: Super Contributor
timestamp: June 06, 2019, 02:51:14 am
content: Looks like a pretty good FFT for what you have. I'll have to try your setup. Your THD from the 3rd and 5th is probably pushing the 5% limit, but that 700Hz spike is more interesting. It would be about 6Vp-p and that isn't a small amount for a non-harmonic that high up. And then you have all those smaller spikes at 40Hz intervals starting at 220Hz. If you can, start turning stuff off and see if you can find a source in your house.

author: spiff72
author_rank: Regular Contributor
timestamp: June 06, 2019, 02:55:41 am
content: I might have to make a weekend project of turning off breakers in the house while monitoring the waveform and the FFT plot until it either goes away or at the very least rule out anything within the house (if I can't get rid of it with only one circuit running).Just need to get everyone out of the house so dad can get some more "mad scientist" time without driving everyone crazy.

author: bdunham7
author_rank: Super Contributor
timestamp: June 06, 2019, 03:44:48 am
content: Here is my power with as close to your setup as I could get. I have 10K samples and a full screen, you have 2K and not a full screen. I was unable to easily figure out what setting changes that. You can see my 3rd is way down and 5, 7 and 9 are all much lower than yours as well and reflect less than 1% THD. The second picture is with the probe disconnected so you can see what the background is--and why the FFT on this scope is more interesting than useful.

author: spiff72
author_rank: Regular Contributor
timestamp: June 06, 2019, 04:26:54 am
content: Bedtime here, but a few question about your settings:are u using the same 1054z scope on the latest firmware?Is it modded to get 100MHz bandwidth? Mine isn't, and not sure if that makes any difference in this case since frequencies are very lowIs the timescale on the horizontal what determines the different sample rates (or at least the limits that can be chosen)? I couldn't get the same center and Hz/div when I tried to retest the square wave.I will try again with your settings tomorrow.Thanks again for the reply!

author: capt bullshot
author_rank: Super Contributor
timestamp: June 06, 2019, 06:12:26 am
content: Quote from: spiff72 on April 28, 2019, 01:57:05 amThis particular waveform (picture from your original post) does look quite flattened.The usual reason for this is:- your line has a relative high impedance, either a literally long line or a weak transformer can cause that.and- your load consists for large parts of rectifier-input devicesEdit:power line distortion isn't measured in dB but rather in % of the rms or fundamental voltage, and only the harmonic bins are shown on linear axes.If you want to do this measurement right, you'll probably end up using a rectangular window over an exact multiple of power line cycles (typically a 200ms window - 10 periods @50Hz / 12 periods @60Hz - is used).Components at non-harmonic frequencies can be caused by ripple control systems or loads with fluctuating power consumption (e.g. some kind of modulation of a resistive heater, or an arc furnace at large scale).

author: spiff72
author_rank: Regular Contributor
timestamp: June 06, 2019, 12:40:48 pm
content: Thanks.I think I am going to retry the measurement again later with the same number of cycles on the waveform displayed on screen as were shown by bdunham7 and see if my plot looks more like his. I suspect that this is the way that he got 10k sam/sec instead of the 2k/sec that I was getting.Most of the info i have been seeing only suggest using the "Memory" option for the FFT operation rather than "Trace" to increase the number of datapoints, but in practice i wasn't getting very good results this way. I think that I just need to fiddle with the settings a bit more to see what changes.As per capt bullshot's suggestion - I will try to do what he suggested as well using a 200ms window for the trace and see what that shows.

author: bdunham7
author_rank: Super Contributor
timestamp: June 06, 2019, 07:06:54 pm
content: I don't think you can do 200ms. There are 12 divisions and your window seems to be 12X your timebase setting, unless there is some other way to change it. Still, 120ms works for 50 or 60Hz.I only got decent results at these low frequencies using "Trace" and either the Blackman or Hanning windows. For those of you following along but without a DS1054Z, the noise at -60-70db is high, but not as obscuring as you might think. In real time, the noise is flickering while the harmonic humps hold pretty steady. You can easily see them and pick them out, even on "clean" power like mine. I think we can conclude that for all its faults, the FFT can readily distinguish between clean power (mine) and marginal or not clean power (spiff72).This capture is my last, best attempt to illustrate and what we can see and measure. This is using a 4kHz LPF, although there wasn't much difference between that and the scopes own 20MHz LPF.

author: spiff72
author_rank: Regular Contributor
timestamp: June 06, 2019, 08:10:31 pm
content: I think I misspoke there - my intent was to try to replicate your full-width FFT by experimenting with the timebase by getting the number of cycles visible in the trace to be around 12 periods (20ms/div or 25 would get me close - whichever the scope will let me do).I am still trying to understand the sample rate shown for the FFT, as well. You showed 10k/sec in your plot, while I only had 2k/sec. I am thinking this is a function of me having about 30 periods visible when I did it, and you had fewer. I have to play around with this some more, too.

author: bdunham7
author_rank: Super Contributor
timestamp: June 06, 2019, 10:33:11 pm
content: Quote from: spiff72 on June 06, 2019, 04:26:54 am1054z, but not latest firmware (I'm one behind)100MHz and 500uV options installedI'm not sure about the FFT sample rates or even if the terminology is correct here. The display in the FFT window says "KSa/S". I would think it would just be "KSa", or the number samples in each window. Thus 2 KSa would limit the bandwidth to 800Hz, thus the point where your graph cut off. My 10 KSa would allow 4KHz and thus my display went to the end of the window, or 1.2KHz.I struggled to get back to 600Hz center and 100Hz/div as it wasn't giving me a 100Hz option at 20ms/div. I had to use the 10ms timebase. I used 1.2M memory points as well, but I'm not sure it was necessary.

author: spiff72
author_rank: Regular Contributor
timestamp: June 07, 2019, 02:36:37 am
content: I took another stab at this tonight. This is the cleanest looking FFT I could get and fill the screen with a reasonable Hz/div value (100). In order to get this, I actually used "Memory" instead of "Trace" for the FFT, but to get a reasonable horizontal scale, I had to drop the memory depth to 12K points. Timescale is 50ms/div.I noticed that this one did NOT have the odd non-harmonic 700Hz peak.I then reloaded the settings from yesterday (via a saved settings file), and this is the second image.

author: spiff72
author_rank: Regular Contributor
timestamp: June 12, 2019, 01:54:02 pm
content: Well, I did a test over the weekend and plugged the scope into an outlet near my panel and set up my probe to test the line voltage.I then shut off every breaker in the house except for one that feeds the circuit I was plugged into. The result was that there was no difference in the signal. so I have concluded that one of the following two statements is true:- The source of the distortion is outside the house (already present on the incoming feed)- The source of the distortion is on the same circuit that I had powered up to checkI didn't get a chance, but I might re-run this test one more time to rule out a couple of additional doubts that came to mind after the test.- I was using the "averaging" method of the scope during the test (under the acquire menu). This could have possibly slowed the response time of the scope, but I doubt it. I might repeat in high-res or normal mode.- Plug scope into a different circuit to rule out that last circuit as the source of the distortion.- I also want to re-capture the waveform and FFT plot for the "before" and "after" shutting off all breakers. I did this, but lost track of which was which because the scope doesn't have a RTC to put a proper timestamp on the captured files.At the end of the day, if the source is not in the house, do i have any leverage with the power company to request they clean up the power coming into my house? Is it even anything to be concerned about?Thanks again!

author: Ragnarok
author_rank: Newbie
timestamp: July 14, 2019, 08:27:14 am
content: 3rd harmonics is generally from unbalanced 3 phase load. The transformer in the street is usually 3 phase (with households tapping different Phase + Neutral)5th/7th/11th/13th harmonics are generally from rectifiers. Rectifiers will generally have harmonics generated on the (6n +/- 1) fundamental, where N is based on the topology of the rectifier design. Usually these harmonics are probably stray and seeps through the network, possibly from industrial customers connected on the local grid.

author: soldar
author_rank: Super Contributor
timestamp: July 14, 2019, 10:49:49 am
content: This is what mine looks like: