#59: Basics of a Square Wave signal's harmonic content

Поділитися
Вставка
  • Опубліковано 19 сер 2024
  • This video (by request) explains the harmonic content of a squarewave signal. It shows that a square wave is composed of a sinewave at the fundamental frequency of the square wave, plus additional sinewaves at the odd harmonic frequencies. The magnitude of the harmonic components is inversely proportional to the harmonic order. The more odd harmonics added, the faster the rising/falling edges are. These concepts are shown graphically as well as practically on an oscilloscope and spectrum analyzer.

КОМЕНТАРІ • 114

  • @MrBrightlight66
    @MrBrightlight66 10 років тому +5

    Brilliant depiction. Graphics and presentation greatly assist to render a non intuitive concept easy to understand. I have never come across anything so clearly depicted on the subject on the web. Full thumbs up.

  • @guilhermebgirardi
    @guilhermebgirardi Місяць тому +1

    This is the crazies shit I watched in all my life. Your grasping and exposition are pure talent

  • @sraiken
    @sraiken Рік тому +2

    Thanks. I sort of knew this but that was an excellent refresher, I needed that. Thanks

  • @daniellebrown6515
    @daniellebrown6515 4 роки тому

    An excellent explanation. I knew that a square wave was a summation of multiple sine waves, but your presentation shows how that comes to be. Fantastic!

  • @miburo7
    @miburo7 11 років тому +2

    Great video, man!! Explained in an easy-to-understand manner, even for laymen, and your comments are helpful too. Keep up the great work :)

  • @ohmedarick1
    @ohmedarick1 7 років тому

    Very clear your explanation. Never ever imagined about the content of Square Waveform.

  • @Pwaak
    @Pwaak 12 років тому +1

    A lesson about the Square Wave! Very Interesting and Very Informative, as all your videos are! Thank You!

  • @plasticornflake
    @plasticornflake 11 років тому

    THANK YOU!!! Nice explanation. I happened across this concept in an attempt to understand how square-wave based neurostimulation devices actually contain a multitude of frequencies.

  • @earlevans3851
    @earlevans3851 10 років тому

    Presented in a clear and practical way. I now understand this phenomenon. Thank you very much for the video!

  • @mdzacharias
    @mdzacharias 12 років тому

    Thanks, and by the way I enjoy your videos. I'm a repair tech for 30+ years, and was still fuzzy on scope triggering; just would fiddle with the controls until I got what I wanted. Your vid on 'scope triggering was very helpful.

  • @ggattsr
    @ggattsr 12 років тому

    Thanks for explaining complex topics in ways that make them easy to understand. Great, informative video.

  • @TheCrazyInventor
    @TheCrazyInventor 12 років тому

    Ah yes, that was helphul. :)
    I now "get" the stuff they taught me at school about square wave harmonics, rather then just remembering and repeating it. Thank you!

  • @omgffsification
    @omgffsification 12 років тому

    Great video.
    I hope you keep this up, Ive watched a few of your videos now and they have all been excellent.
    You dont only know your stuff, you prepare well beforehand and produce quality teaching vids.

  • @1903A3shooter
    @1903A3shooter 12 років тому

    Thanks, being able to see it in this format finely got it across to me. A good lesson. Dave.

  • @DAVET38
    @DAVET38 12 років тому

    Another well illustrated and thought out video, w2aew - well done!

  • @miguelmouta
    @miguelmouta 11 років тому

    Thanks fo sharing. In depth , clear syntethic class. Congratulations...

  • @ComposerChristopherJ
    @ComposerChristopherJ 4 роки тому

    So useful, thanks for the explanation. Very, very clear.

  • @zach_stow
    @zach_stow 9 років тому

    Very well done! Made tons of sense!

  • @rickybevi
    @rickybevi 10 років тому +2

    Thank you! excelent explanation!

  • @mopar3502001
    @mopar3502001 10 років тому

    That was a very good video on harmonics! Thanks!

  • @kcmichaelm
    @kcmichaelm 6 років тому

    This was very helpful, thank you kindly for making this video.

  • @kemalayyldz1485
    @kemalayyldz1485 3 роки тому

    Thank you so much. Excellent video!

  • @ohmedarick1
    @ohmedarick1 6 років тому +1

    Thank you as always great video!!!

  • @Bassotronics
    @Bassotronics 3 роки тому

    A pure square wave is clean with no harmonics.
    Harmonics occur when there is extra noise or some type of sound added to the square wave.

    • @w2aew
      @w2aew  3 роки тому +1

      NOT true. A pure square wave consists of the fundamental and it's odd harmonics. The number of harmonics present is determined by the rise/fall time of the square wave. The faster the edges, the more (higher frequency) harmonics are present.
      A pure SINE wave is clean, with no harmonics...

    • @Bassotronics
      @Bassotronics 3 роки тому

      @ *w2aew*
      That happens with digital sources where the square wave is broken up in samples as the “sample rate” is determined.
      A pure Square wave is as clean as a sine wave can be but even sine waves are “dirty” in the digital domain.

    • @w2aew
      @w2aew  3 роки тому +1

      @@Bassotronics I disagree regarding the squarewave - and so does the math and the Fourier theory - a pure squarewave, even one generated as a clean analog waveform, DOES have spectral content that is composed of the fundamental and decreasing levels of odd harmonics. If you eliminate the harmonics, you are left with a sine wave. en.wikipedia.org/wiki/Square_wave#Fourier_analysis

  • @qwerty_____146
    @qwerty_____146 3 роки тому

    Thank you, dear man.

  • @SuEnRoD
    @SuEnRoD 5 років тому

    Very nice demo. Thank you

  • @jhillix8954
    @jhillix8954 4 роки тому

    Helpful explanation - thank you!

  • @wenfields5109
    @wenfields5109 6 років тому

    Excellent job!! Thank You very much!

  • @anishjoshi8302
    @anishjoshi8302 10 років тому +2

    Very illustrative and explanatory video!..I had one question-How does the frequency content change with changes in duty cycle of the square wave and why?

  • @SteadyStateFate
    @SteadyStateFate 11 років тому

    Really nicely done, thanks!

  • @bernat_albet
    @bernat_albet 8 років тому +7

    Great job! I'm an electronic engineer and I enjoy a lot your videos! :) Just a question. If the square wave is 1MHz, why the FFT markers are showing the harmonics at 2MHz/4MHz/[...] instead of 3MHz/5MHz/[...]? Is it a settings issue of the scope? Thank you!

    • @w2aew
      @w2aew  8 років тому +9

      Because the markers are set to 'delta' mode rather than absolute value. So, it's showing the offset from the fundamental. I did this to show the relative magnitude of the odd harmonics.

    • @paridhigupta1770
      @paridhigupta1770 7 років тому

      Had the same query as Bernat. Was really confused after seeing the 2, 4 and 6MHz.
      That's a good video.
      But why do we not consider the even harmonics... i read somewhere a logical explanation for that. Although neither can i recall it nor find the right data online now. Could you please answer this.
      Thanks.

    • @kcmichaelm
      @kcmichaelm 6 років тому

      I believe the issue with using even harmonics here is that the square pulses are, in essence, symmetrically created. The second harmonic's sinewave would be lopsided within the square pulse. Your question does make me wonder whether we would use the even harmonics to create an asymmetric singal - like a triangle or a ramp.

  • @ladams00
    @ladams00 5 років тому

    I've been spending effort at suppressing harmonics. I'm glad I haven't attempted to round out a square wave signal 😊

  • @ornithopterindia
    @ornithopterindia 2 місяці тому

    👍Thank you sir.

  • @jdecker9834
    @jdecker9834 5 місяців тому +1

    Sorry for the dumb question but is this explanation important for HOW we create square waves FROM sine waves? I thought always thought square waves were typically generated simply by switching DC on and off at the desired rate (frequency) and at a duty cycle of 50% for a true square wave. Please explain what I'm missing and again, sorry for not understanding.

  • @tamanrasset3903
    @tamanrasset3903 10 років тому

    cheers buddy, great description!

  • @Matthias051
    @Matthias051 6 років тому

    Thank you so much for this Video.

  • @markobrelak7913
    @markobrelak7913 3 роки тому

    Thank you for this demonstration! Here you have presented what happens with the 1MHz square wave. Can you make another video where you have a 100KHz square wave with the 10% duty cycle. That way, 1MHz@50% square wave will be exactly the same as the 100KHz@10%. I am curious about what the spectrum analyzer will detect, and why. Thank you!

  • @Smmmile
    @Smmmile 12 років тому

    I wonder if you could show the basics of actually making one of those fancy sine waves, i've heard it can be done with the kind of parallel LC circuit you were explaining in your previous videos which were also very great but I'd have no clue on how to understand how a circuit would make a wave rather than filter it. Great videos again!

  • @rfmonkey4942
    @rfmonkey4942 2 роки тому

    very nice

  • @MrApolloTom
    @MrApolloTom 10 місяців тому

    Great demonstration. I can follow the process in this direction and it makes perfect sense.
    What I still don't quite get is the reverse process: if I have a light that flashes every second as a square wave pattern, in what sense is it also flashing 3 times a second? Is there a physical manifestation of the 3 flashes per second? How is it picked up by a bandpass filter that's looking for frequencies of 3 Hz?

    • @w2aew
      @w2aew  10 місяців тому

      The key to remember is that these are the sinusoidal components that are adding up in a coherent fashion. The higher order harmonics are lower in amplitude, and the coherent addition of them is what turns the signal into a square wave. If you had a narrow bandpass filter at 3Hz or 5Hz, you would see blips of energy in these bin during the switching edges.

  • @alcraig1
    @alcraig1 4 роки тому

    If you had started with 100 Hz rather than 1MHz, we could have heard what happens to the fundamental as harmonics are added.

  • @yoramstein
    @yoramstein 4 роки тому

    Thanks.

  • @tunicana
    @tunicana 12 років тому

    outstanding video...thx

  • @dylanm36
    @dylanm36 10 років тому

    Great video by the way, just subscribed.

  • @dylanm36
    @dylanm36 10 років тому

    Oh wow, so even if a 'true' square wave with perfectly flat edges and right angles was analysed, it could still be broken down into sine waves? Fascinating.

  • @frankgrudge8823
    @frankgrudge8823 5 років тому

    Mind blown!! thankyou :)

  • @RetroComputerist
    @RetroComputerist 9 років тому +2

    What are the peaks between the harmonics? Are they "real" or a result of the FFT???

    • @edtix
      @edtix 7 років тому

      Peaks? This grass on the bottom is just noise. Everything around us generate noise. Cosmic rays, radars, radios, wi-fi and stupidly huge amount of other stuff constantly generates it continuously, but it is a lot weaker and we actually consider only strong ones :) FFT is also non-ideal because of hardware limitation etc. and take part in this noise.

  • @dylanm36
    @dylanm36 10 років тому

    This makes sense, but why aren't square waves produced by simply switching a voltage between different levels? For example have a MOSFET switch it's output between 0 and 1 volt, so that the signal would be 1V-0V-1V-0V etc.

  • @T-She-Go
    @T-She-Go 5 років тому

    Thank you

  • @EmbSysDev
    @EmbSysDev 6 років тому

    Does adding a dead band between the positive and negative square wave pulses , result in lesser harmonics? There is something called a "modified sine wave" inverter,which seems to do that,and it is claimed to have lesser harmonics than an ordinary square wave inverter.
    By inverter,I meant power inverters for AC outtages.
    Thanks for your hi quality content and presentation !

    • @w2aew
      @w2aew  6 років тому

      It changes the amplitude distribution of the harmonics - some will go down, but there will still be harmonic energy present.

  • @Muslimgaza
    @Muslimgaza 8 років тому

    thank you so much!

  • @nickdrivinby
    @nickdrivinby 10 років тому

    Brilliant!

  • @edtix
    @edtix 7 років тому

    How about harmonics of true sine wave? I know that sine is sine but there are harmonics in sine wave signal too. Is it simply distortion? Maybe thats deflections in transmission line? I have true sine wave generator and there is a few harmonics in spectrum too. When I study this topic on university first time I was so excited. Absolutely any shape is made from bunch of sine waves!

    • @w2aew
      @w2aew  7 років тому +3

      A true or pure sinewave has no harmonics - just the fundamental. Any harmonic content would be considered harmonic distortion. If the harmonic components are -30dBc or lower, then the time-domain waveform will visually look perfect. If you look at the specs of your "true sine wave generator", it will have specs for harmonic distortion or SFDR (spur free dynamic range). Nothing is perfect...

  • @jacka55penguin
    @jacka55penguin 12 років тому

    Very cool!

  • @J4e8a16n
    @J4e8a16n 12 років тому

    You are so clear :o)

  • @mdzacharias
    @mdzacharias 12 років тому

    I am assuming that when adding the 3rd, 5th etc harmonics on the computer you did so at the levels specified at the beginning of the video, so as to make a little more "perfect" square?

  • @uiticus
    @uiticus 2 роки тому

    At timeline 7:49, shouldn't the 3rd odd harmonic of the 1 Mhz fundamental frequency be 3 Mhz instead of the 2 Mhz shown on the spectrum analyzer?

    • @w2aew
      @w2aew  2 роки тому

      The marker is showing the delta from the reference marker, not the absolute frequency.

  • @NourMuhammad
    @NourMuhammad 8 років тому

    Software package name ??
    thanks
    EDIT
    got the name: ArbExpress, it is Tek waveform gen. related
    I just wanted to play around with the concept that you were illustrating
    thanks

  • @xyloeye
    @xyloeye 4 роки тому

    Alan, thanks so much for all the great videos. I think I've watched all of them multiple times and learned a lot. I do have question. What could cause a scope to display distorted square waves, yet perfectly display sine waves? The vertical trace is fine but the horizontal is severely scooped on a known good signal. Looks like really bad probe compensation.Thanks

    • @w2aew
      @w2aew  4 роки тому

      You mentioned one possibility - improper probe compensation. Another common problem is signal reflections from improperly terminated coaxial transmission lines. A third common problem (when using a probe) is excessive ground lead length leading to ringing/distortion.

    • @xyloeye
      @xyloeye 4 роки тому

      @@w2aew Well, I'm using a good quality coax with a 50 ohm terminator and the waveform is good on my other scopes. I was inspired by your 5 transistor curve tracer video to use this old Hitachi scope for that. I was wondering if the problem could be in the vertical amp. Can't find a schematic. Thanks, KJ7CZH.

    • @w2aew
      @w2aew  4 роки тому

      @@xyloeye It could be that the front end of that scope needs to be calibrated. See my video on analog scope calibration, it shows an example of the compensation adjustments for the front end.

    • @xyloeye
      @xyloeye 4 роки тому

      @@w2aew OK, thanks. I'll give that a try.

  • @hongzeng6081
    @hongzeng6081 11 років тому

    Really great one! BTW, what's that signal software?

  • @fredsalter1915
    @fredsalter1915 4 роки тому

    I have a cheap USB scope and a cheap sig gen. Square waves look fine until I start getting above 200kHz. Above that (like up to 1MHz), the square wave no longer looks so square. The rising edge begins looking like a shark fin. Any thoughts would help me! Thanks!

    • @w2aew
      @w2aew  4 роки тому +2

      This is most certainly due to bandwidth limitations of either the scope or the signal generator - or both. Limited bandwidth slows the edges. It is likely that the rising/falling edges have the same "shape" as the shark fin when operating at lower frequencies, but since the width/duration of the pulses are so much longer, the effect isn't noticeable.

  • @michaelcostello6991
    @michaelcostello6991 4 роки тому

    Are all square waves made from sine waves ? If you just turned on/off the DC power supply would you not get a square wave. Can you explain for me please. Thanks Michael

    • @w2aew
      @w2aew  4 роки тому +2

      The frequency content of square waves is always made up of a series of harmonically related sinewaves - but the generation of a squarewave is never really done that way. Just as it takes about two dozen muscles to smile, you don't consciously contract each of these muscles...

  • @RobinsonWith
    @RobinsonWith 12 років тому

    awesome

  • @miomatteo
    @miomatteo 4 роки тому

    @w2aew if you still have a look at the comments of your older (but amazing!) videos...
    QUESTION: why do even armonix (2, 4, 6...) also appear in the spectrum analyzer (even if several db down they are clearly visible and above the noise floor) and not just the odd harmonics?

    • @w2aew
      @w2aew  4 роки тому

      Mainly because it is a non-ideal square wave (finite rise/fall, rounded edges, etc.), all which mean that there will be other harmonic content in the signal.

  • @weezyana07
    @weezyana07 10 років тому

    i am working on a DFT on the square wave. having plotted the values in c++ i went ahead to display the output on excel, i notice that the values are about the same but not exact. just in the case of 9.7 and 9.5. all my values from the three harmonics have a slide difference. my question is why are they not accurate on my output, as propose by Fourier that it should be 1/3 the first bin frequency. can u explain this plss

  • @anishjoshi8302
    @anishjoshi8302 10 років тому

    Ok I see. But can you give an intuition to imagine why even harmonics are added to vary the duty cycle?

    • @w2aew
      @w2aew  10 років тому +1

      There really isn't an intuitive way to think about this. But it is easy to visualize this practically. Either on paper, or in MATLAB or Excel, create some vectors of a sine wave and it's harmonics. Then add various combinations. I find it instructive to do it by hand graphically. Draw a sine and it's 2nd harmonic. Add them up and you'll see that the duty cycle changes.

  • @hongzeng6081
    @hongzeng6081 11 років тому

    why the 1MHz wave have about 4dB gain?

  • @HighRollersCorp1
    @HighRollersCorp1 11 років тому

    If you cancle out all the harmonics in the ghz range will the amplitude stay up?

  • @braveheart9275
    @braveheart9275 3 роки тому

    Hi sir, and thanks alot for your videos. I have a question : when I analyses a sinus signal with FFT function in LTSpice it show me a lot of harmonics , and also when I analyse square signal it show me a pair harmonics .... any explanation ?

    • @w2aew
      @w2aew  3 роки тому +1

      A sinewave should show energy just at one frequency. If you're seeing more, then you're likely seeing artifacts from improper windowing, etc.

  • @wa4aos
    @wa4aos 11 років тому

    I concur, too much humping causes harmonics, some odd.. Hi
    73

  • @4abrownafrica939
    @4abrownafrica939 8 років тому

    When measuring rise time on tsb 1032b scope how do I know where to set my time base?

    • @w2aew
      @w2aew  8 років тому

      +mark watson Given the short, fixed memory length on the TBS1000 series, you have to set the timebase to something fast enough to put a few samples on the edge. A good rule of thumb is have the timebase fast enough that the rising edge is taking up a few sub-divisions on the display.

  • @gearstil
    @gearstil 4 роки тому

    Why the even harmonics appear on the spectrum analyzer if the square wave is formed only by odd harmonics?

    • @w2aew
      @w2aew  4 роки тому

      You'll note that the even harmonics are very far down (more than 30dB down) from the others. The reason they're there is because the square wave isn't perfect (they rarely are), so there are other harmonic component present.

    • @gearstil
      @gearstil 4 роки тому

      @@w2aew Thanks, I got it. Can this be a way to measure the quality of a function generator? The lower the unwanted harmonics, the better?

    • @w2aew
      @w2aew  4 роки тому

      @@gearstil That is certainly one measure of quality.

  • @TheSOB88
    @TheSOB88 8 років тому

    Clicking through the different parts, didn't actually hear any samples. Did I miss them?

    • @w2aew
      @w2aew  8 років тому

      +TheSOB88 Samples of what? What were you expecting to hear? This was not an audio demonstration.

  • @DeeegerD
    @DeeegerD 8 років тому

    Are there any instances where a square wave is purely DC? For instance - if I mechanically throw a switch on and off?

    • @w2aew
      @w2aew  8 років тому

      +Digger D When you operate the switch, the voltage rises or falls very quickly, which generates energy at higher frequencies.

    • @DeeegerD
      @DeeegerD 8 років тому

      ***** Thanks, I was thinking along that line but wasn't sure.

  • @vineethmoganti3523
    @vineethmoganti3523 7 років тому

    yeh good

  • @weezyana07
    @weezyana07 10 років тому

    why is the values on the spectrum not exact? you had 9.7 but should be 9.5. any explanation for this?

  • @vladimirsvirid7705
    @vladimirsvirid7705 10 років тому

    coll

  • @riccardoanzil5998
    @riccardoanzil5998 4 роки тому

    what is the name of that PC software? Thank you

    • @w2aew
      @w2aew  4 роки тому +1

      The software is called ARBExpress by Tektronix. It is free, and can be downloaded here:
      www.tek.com/signal-generator/afg31000-arbitrary-function-generator/afg31021-software/arbexpress-waveform

  • @Luigi90900
    @Luigi90900 12 років тому

    O_o

  • @paul.alarner6410
    @paul.alarner6410 11 місяців тому

    what is the waveform generator package you are using?,looks handy.73 m3vuv

    • @w2aew
      @w2aew  11 місяців тому +1

      It is called ArbExpress, a free download from tek.com

  • @jdecker9834
    @jdecker9834 5 місяців тому +1

    Sorry for the dumb question but is this explanation important for HOW we create square waves FROM sine waves? I thought always thought square waves were typically generated simply by switching DC on and off at the desired rate (frequency) and at a duty cycle of 50% for a true square wave. Please explain what I'm missing and again, sorry for not understanding.

    • @w2aew
      @w2aew  5 місяців тому +1

      I was just to show that all squarewaves, even those generated by switching DC on and off, can be thought of as being composed of harmonically related sinewaves - where the rise/fall times dictate how high the frequency content is for that square wave. No one would ever really MAKE sinewaves by adding sinewaves together - it is just an illustration of the frequency and spectral content of squarewaves.