Hot answers tagged

25 votes
Accepted

Why use the fast Fourier transform for noise reduction instead of a classical electronic filter?

I'd like to know how to remove environmental noise from a speech recording. Well it's stored digitally now, right? so are you planning on putting your microphone next to the speaker after an analog ...
user avatar
16 votes

Audio spectrum analysis: PC Software vs Hardware Spectrum Analyzer

The deciding factor between stand-alone analyzer or soundcard would be the frequencies you're interested in. I will record the sound it makes with a microphone (it sounds differently if it is ...
user avatar
  • 59.1k
14 votes

Why should I use digital filters rather than simply manipulate signals in the frequency domain and then recover them into the time domain?

The main reason that frequency-domain processing isn't done directly is the latency involved. In order to do, say, an FFT on a signal, you have to first record the entire time-domain signal, beginning ...
user avatar
  • 165k
14 votes
Accepted

Help me understand FFT and harmonic distortions

They say a picture is worth a thousand words. And a handful of animated pictures... All of these from Wikipedia. You can see these in context in the articles for Fourier transform, square wave, ...
user avatar
  • 55.4k
14 votes

What's the junk at the end of my FFT in LTSPICE?

There are several parts to this answer. I base this answer on the characteristics of the FFT algorithm. I am not familiar with the specific LTSpice implementation, but the behavior you report is ...
user avatar
  • 427
13 votes

Performing FFT at low frequencies but high resolution?

I assume for "high speed" you mean a small delay from data collection to the resultant FFT. With a low sample rate, your computational ability isn't the limiting factor, given modern computers. The ...
user avatar
  • 2,798
12 votes

Strange extra frequency in crystal oscillator

This really looks like a sampling artifact on your end, not something the crystal is doing. Expand the scope time scale (lower time/division) until you only have a cycle or two per division at most. ...
user avatar
11 votes
Accepted

Performing FFT at low frequencies but high resolution?

One usually needs to acquire multiple samples per waveform period to get good results from an FFT. The Nyquist limit of 2 samples per period is a lower bound but usually 10 samples per period or more ...
user avatar
  • 9,735
9 votes
Accepted

Strange extra frequency in crystal oscillator

Two observations: 12.28 and 12.72 are exactly symmetrical about 12.50 MHz. The displayed wave form seems to have "beats" in it Beats are either real (you would see beats if you had a mixture of two ...
user avatar
  • 1,050
8 votes

Relationship of FFT Size, Sampling Rate and Buffer Size

There is a direct, and actually quite simple, relationship between all the figures. Let's start with the sample size. The numbers of bins (or "buckets") is equal with half of the samples in ...
user avatar
  • 55.5k
8 votes
Accepted

Uniform Linear Array (ULA) beamwidth and angular resolution using FFT

Theoretical Derivation The antenna electric field pattern of array antenna consists of isotropic radiator can be given by where N is the number of antenna elements d is the spacing between antenna ...
user avatar
  • 273
7 votes
Accepted

Confusions on FFT of a square-wave in theory and in scope and simulation

Welcome to the real world! The "mathematically perfect" transform you show at the top, with the "discrete" harmonics is generated assuming that the rise and fall times of the waveform are zero, and ...
user avatar
  • 165k
7 votes

Why use the fast Fourier transform for noise reduction instead of a classical electronic filter?

But why can't you use a classical electronic filter to remove the noise frequencies? Who says you can't? It is how this was done in the days before digital signal processing. The problem is that ...
user avatar
  • 78.8k
7 votes

Audio spectrum analysis: PC Software vs Hardware Spectrum Analyzer

I would personally recommend using a PC for several reasons. From a monetary stand point, if there is sufficient information currently to identify issues using a trained ear, there is no need for an ...
user avatar
  • 1,786
7 votes
Accepted

Getting different FFT results in LTspice comparing to MATLAB and Python

Despite the fixed timings provided by the PWL file, LTspice is a SPICE engine, analog simulator, which means the simulation will not have even steps. In Matlab and Python, you can correctly account ...
user avatar
6 votes

Calculating FFT for only part of full frequency range?

I was under the impression that the FFT was inherently calculated at every frequency 0->(Sampling Frequency)/2 distributed in bins of width Fs/(2*N). This is roughly correct. A discrete fourier ...
user avatar
  • 121k
6 votes
Accepted

How to calculate total power from spectrum?

For a band limited power spectral density \$S(f)\$ to obtain the total power all you need to do is integrate over the spectrum. In measured data the power is measured in discrete frequency steps, so ...
user avatar
6 votes

Why use the fast Fourier transform for noise reduction instead of a classical electronic filter?

Well, the first step to understanding why we need FFT is to understand how digital filtering works. So basically, you have a structure, like a shift register, with a number of memory elements, an ...
user avatar
  • 22.7k
6 votes
Accepted

Help interpreting strange spectrum

The multitude of spurious frequencies in your FF transform are reflections of undersampled higher harmonics of your signal. These are aliases, as you rightfully noted. See this EDN article for better ...
user avatar
  • 37.4k
6 votes

Guitar to MIDI conversion

There isn’t enough information in 10 mS of sampled audio to reliably tell the difference in frequency between a low E and a low F or D# notes. 10 mS is barely more than 1 full pitch cycle at those ...
user avatar
  • 4,471
5 votes

What is the meaning of my fourier transform results?

The first entry [1] in the FFT is your fundamental, but the zeroth entry [0] is DC! A standard FFT will have the same number of output samples as input samples, and they will all be complex. The ...
user avatar
  • 141k
5 votes
Accepted

What's the junk at the end of my FFT in LTSPICE?

@D.Brown's answer is already a very good one, so I'll only add a few minor things. LTspice's algorithm is custom and accepts a non-power-of-two number of points. This doesn't mean that the resolution ...
user avatar
5 votes

Guitar to MIDI conversion

Since your guitar string can only produce a handful of pitches, a full FFT is wasteful. Take the lower E string. The tones are approximately 5Hz apart. Assume a sampling rate of 11025 Hz. To get ...
user avatar
  • 58.2k
5 votes

FFT of a square wave

I'd make this a comment, but I don't have enough points to do that yet. You should plot your FFT data starting at 0 Hz and go up to, say, 500 Hz. That will give you 10 or so harmonics. You are ...
user avatar
5 votes
Accepted

FFT of a square wave

Your signal is a square wave with its base at 0V and its peak at 2.7V or so. So it has an average voltage of 1.35V. In the frequency domain, the overall average of a signal is its content at DC or ...
user avatar
  • 36.3k
5 votes
Accepted

FFT of time-compressed signal not outputting correct amplitude spectrum

You have 4 times as many cycles in the time -5:ts:5. If your y and g signals had the same ...
user avatar
  • 3,646
4 votes
Accepted

FFT Beat Detection Circuit

I think the youtube guy might have been on the right track, but the confusion is that "ground" is typically centered between two supplies for most analog circuits, and coexistent with the lower supply ...
user avatar
  • 5,356
4 votes
Accepted

MATLAB - FFT aliases occur sooner than expected

If you do a FFT in MATLAB, you get one complex valued output (bin) for every input sample. If you then take the magnitude of this complex vector, assuming your original input was real valued, you will ...
user avatar
  • 4,138
4 votes

How to model Phase noise?

Does this example prove to you that the spectrum spreads ? The spectral plot uses dB (I find that more convenient) on the Y-axis, so consider it a logarithmic scale. You can see that I need to add A ...
user avatar
  • 78.8k
4 votes

How to detect a number of frequencies with minimal circuitry?

If you know what frequencies you're looking for, run a Goertzel for each of those frequencies. https://en.wikipedia.org/wiki/Goertzel_algorithm This is much more efficient than an FFT. This algorithm ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible