I looked around online but I found nothing relevant. It is very difficult for an electronic device to decompose a signal in different frequencies.
How this is done at the bare metal level?
Any suggested source or comment will be very helpful
I looked around online but I found nothing relevant. It is very difficult for an electronic device to decompose a signal in different frequencies.
How this is done at the bare metal level?
Any suggested source or comment will be very helpful
It is very difficult for an electronic device to decompose a signal in different frequencies.
It's not.
There's actually quite a few devices that do that, explicitly.
First of all, you'll have to make a difference between the continuous Fourier transform (which you probably know as \$\mathcal F\left\{x(t)\right\}(f)=\int_{-\infty}^{\infty} x(t)e^{j2\pi f t}\,\mathrm dt\$) and the Discrete Fourier Transform (DFT), which is what you can do with a sampled signal.
For both, there's devices that implement these.
There's little in the ways of actual need for this in digital electronics – digital signals are sampled, so you'd use the DFT.
In optics and photonics you'll notice that there's an actual chance to get perfectly periodic things for a "large" (read as: nearly as infinite as the integral above) length. Effectively, an acousto-optic element can be excited with one or multiple tones, and it will have the same correlating effects as the integral above. You don't have to look at 2018's Physics Nobel Prize winners to find an example of Fourier Optics.
This is really all over the place; it's such a standard processing step that as a communication engineer, we often even forget where it is.
So, this list is far less than complete; just examples:
Note that the above list only contains things that do DFTs during operation. You can be 100% sure that during design of anything remotely related to RF, especially antenas, mixers, amplifiers, (de)modulators, a lot of Fourier Transforms / Spectral analysis was involved. Same goes for audio device design, any high-speed data link design, image analysis…
I'll just address the DFT here.
Usually, that's implemented as an FFT, Fast Fourier Transform. That's one of the most important algorithmic discoveries of the 20th century, so I will spare but few words on it, because there's literally thousands of articles out there that explain the FFT.
You go in and look at the \$e^{j2\pi \frac nN k}\$ multipliers of a DFT. You'll notice that these can basically be understood as \${e^{j2\pi \frac 1N k}}^n=W^n\$; and there you have your twiddle factor. Now you avoid calculating coefficients that you've already calculated, and just swap a sign where necessary.
That way, you can reduce the complexity of a DFT from the $N^2$ (which would be the complexity if you implemented the DFT as the naive sum) to something in the order of \$N\log N\$ – a huge win, even for relatively small \$N\$.
It's relatively straightforward to implement that in hardware, if you can get your whole input vector at once – you get \$\log N\$ as a combinatorial depth and fixed coefficients at every step. The trick is knowing how (whether) to pipeline the individual layers, and how to use the specific hardware type you have (ASIC? FPGA? FPGA with hardware multipliers?). You can basically piece together \$N=2^l\$-length transform only from what we call Butterflies, which you'll recognize once you read about the FFT.
In software, the principle is the same, but you need to know how to multi-thread very large transforms, and how to access memory as fast as possible by utilizing your CPU caches optimally.
However, for both hardware and software, there's libraries that you'd just use to calculate the DFT (FFT). For Hardware, that usually comes from your FPGA vendor (e.g. Altera/Intel, Xilinx, Lattice…) , or a large ASIC design tool company (Cadence) or your ASIC house.
You can't get much more "bare metal" and "hardware" than a set of vibrating reeds.
https://www.stichtco.com/search?q=reed
So what hardware does a fourier transform? a bunch of resonant systems can do that.
Surface Acoustic Wave Devices were used as analog electro-mechanical devices to perform several signal processing tasks. Most papers are paywalled.
Chapter 16 of Colin Campbell's 1989 book Surface Acoustic Wave Devices and their Signal Processing Applications
Publisher Summary
This chapter presents fast real-time Fourier transform techniques using SAW linear frequency modulated (FM) chirp filters with processing times of only a few microseconds. SAW based techniques have applications to sonar, radar, spread spectrum, and other communications technologies requiring the fast analysis or filtering of complex signals. With SAW-based Fourier transform systems, this is carried out in the receiver intermediate-frequency (IF) stages. SAW linear FM chirp filters can be configured to affect a number of Fourier transform manipulations. Three of these are (1) single-stage Fourier transformers for spectrum or network analysis, (2) two-stage Fourier transform processors for cepstrum analysis, and (3) two-stage Fourier transform processors for real-time filtering. SAW-based Fourier transform processors for the spectral analysis of signals, known as compressive receivers, are available in a wide range of configurations to provide spectral resolutions over analytic bandwidths up to 1 GHz. The chapter also discusses the use of bilinear mixers in a SAW Fourier transform processor.
This can be done on the - literally - bare metal level using the Harmonic Analyzer:
https://www.youtube.com/watch?v=NAsM30MAHLg
And sorry to give a link-only answer, but this one you really have to see by yourself.
A Fourier transform on a discrete sampled function is a change of basis functions from a series of (typically) times-of-sample values to an equivalent series of frequency-component values. It is a linear transformation (the Fourier transform of a sum of two series is the sum of the Fourier transforms of the two series), so is identical to a matrix operating on a vector (the time-of-sample series).
A matrix of rank N operating on a vector with N components generates a second vector with N components by doing N^2 multiplies, and (N^2 - N) additions.
Okay, so now how the metal does this:
There's a gizmo called a 'harmonic analyzer' which multiplies and accumulates one frequency (basically one row of the matrix), which is a kind of analog computer. It involves plotting the function input on a graph paper, connecting a polar planimeter (mechanical integrator) and linkage (mechanical multiplier) and tracing the curve gives you... one element of the output. Using it isn't too bad, but for a 1024-element transform, you have to do the operation... 1024 times. This is how tide tables were calculated, though, a century ago. see Mathematical Instruments article here, page 71
Then there's the manual method, using slide rule and adding machine, which requires looking up the matrix elements in a table of sines/cosines, and that means you operate your slide rule, for a 1024-element sampling, over 2 million times.
A general-purpose computer can do the operation, too.
Some (digital signal processor, DSP) specialized CPU designs are made with accelerated multiply-accumulate hardware, which speeds things up. And, there's a very clever algorithm, the FFT, that gets around the problem of N samples requiring N^2 operations, by noting that a 4x4 matrix is a 2x2 matrix of 2x2 matrices; there's a way to take any composite number (a power of two, like '1024' is convenient) and use only on-the-order-of N* Log(N) operations instead of N^2. That means the 1024 inputs only requires 61,440 operations instead of 1,048,576.
The FFT doesn't simplify a general discrete Fourier transform, because it requires that the N value be nonprime (and almost always a power of two is used), but it can be hardware-supported in a variety of ways, so that the operations (multiply-accumulate) are the time-limiting step. One modern (2019) chip (ADBSP-561 from Analog DevicesMMAC column) can do 2400 such operations per microsecond.
That's basically what a spectrum analyzer does: