| Electronics > Projects, Designs, and Technical Stuff |
| Square wave harmonic content |
| << < (3/6) > >> |
| RoGeorge:
Exactly how you imagine a square wave is coming, but instead of thinking about a square shape, you can think about it as a sum of sinusoidal voltages. As a side note, FFT is an algorithm, a method to roughly calculate the Fourier Transform (FT) as fast as you can. - FFT is a computer algorithm that takes a limited number of samples and produces some "buckets" of spectrum, buckets that may, or may not, correspond exactly to the analog signal's spectrum. - FT is an infinite series of sinusoidal functions, a fundamental concept in both the mathematical and the physical world, and a perfect representation Many, many moons later (2021 edit): Changed my mind. Now I think those sinusoids are not physically there. |
| SiliconWizard:
This is kinda basic maths. Learn about Fourier analysis to understand this. FFT is an algorithm for fast discrete Fourier transforms. You need to understand what Fourier transforms do and what they are used for. Knowing how to use an FFT will not teach you what it's useful for. |
| T3sl4co1l:
You're perhaps confused about what a transform is: --- Quote from: taydin on September 28, 2019, 01:17:20 pm ---But let's say we are switching current through a resistor on and off using a MOSFET. In this case, we obtain a squrewave, but there is nothing that ACTUALLY produces sinewaves. So where does the harmonic content of this squarewave that we see in the FFT come from? --- End quote --- "Produces" implies a causal relationship, which in turn implies some sequence of events through time. This is inapplicable -- the Fourier transform applies to all time. It is better to say, if we suppose this signal is repeating for all time, then we can equivalently represent it as a sum of sinusoids that repeat for all time. That's the Fourier series. Or if it's a nonperiodic signal, we can take the transform of its energy -- because a signal that's zero for almost all time has zero average power, so it has no Fourier series, but it can still have a transform. That's probably confusing, too -- let me address that. You get a series -- harmonics -- from transforming a repetitive (periodic) signal. A signal you can describe with a single finite window, that repeats endlessly backwards and forwards in time. A non-periodic signal, like a one-time ringdown waveform for example, is zero for all negative time and practically zero for practically all positive time; it's not periodic so it has no harmonics and it has no power averaged over infinite time. When we transform such a signal, we look at its energy as a function of frequency. Power is the rate of energy over time; we only get average power if there's energy being delivered constantly. If not, we are looking at its energy instead. There are other transforms that take both time and frequency into account -- they use a kernel* that has finite time and frequency extents, and so it becomes meaningful to speak of them in causal terms. These are much more complicated than a beginner needs to work with, though -- understandable as you're working with two variables at once! *A kernel is a function which represents the simplest form of a transform; for the Fourier transform, it's the sine and cosine functions. For a wavelet transform, it might be a Gaussian (exp(-x^2) function), or that times sine and cosine (which makes a tone-burst waveform). The transform is usually calculated by a sum or integral of the given signal times the kernel, i.e., a convolution of them. Convolution is perhaps not so hard to understand, as it's the time-domain equivalent to multiplying frequency responses together -- that is, applying a filter to a signal. The response you see on the oscilloscope, for a given signal and filter, is the convolution of the signal with the filter's response. The Fourier transform is essentially the waveform you get by filtering the signal through infinite channels of infinitesimally narrow filters (note that a sine wave has zero bandwidth!). If you think in terms of a finite number of filters with finite bandwidths, then you get a wavelet transform. Waterfall spectrograms, in audio and radio, are a common application of this. :) Tim |
| taydin:
The question isn't "what is Fourier transform and its mathematical foundation". The question is, if I switch a resistor with a MOSFET, how do the sinusoidals form? At the electron level, at the level of the magnetic fields or electric fields. If I have three signal generators that generate 1 MHz, 2 MHz, and 3 MHz, and then I add these signals together, and then feed the results into a spectrum analyzer, I fully expect to see the three peaks in the spectrum, because those sinusoidals are there. But if I switch a resistor using a MOSFET, there are NO SINUSOIDALS anywhere. So my points is, they aren't really there. What you are looking at is the effect of the square wave rise time. If the rise time is high, you will see much more harmonics spanning to higher frequencies. If the rise time is low, you will only see a limited number of harmonics. |
| taydin:
Or if I put it in another way, the rising edge, or the falling edge (or in fact, any dV/dt change that occurs in a signal) has energy change at a rate that can only be caused by a specific sine wave frequency. The fourier transform lets you know what those frequencies are. It's a mathematical tool. The fact that you can represent a square wave by an infinite number of sine waves isn't proof that those sine waves are there. If they are there, there must be a physical mechanism (or quantum mechanism) causing them. |
| Navigation |
| Message Index |
| Next page |
| Previous page |