Triangle wave and low-pass filter (help needed with experiment!!) - Page 1
Forum section: electronics / beginners

author: 13hm13
author_rank: Frequent Contributor
timestamp: October 30, 2018, 01:47:22 pm
content: I currently don't have a lab or equipment to conduct an experiment, so if any of you EEVbloggers can help, muchos gracias in advance!!What's needed:21khz (fundamental freq.) triangle wave-->filter (LPF brickwall, that begins steep rolloff at 22khz)-->spectrum analyzer (screen capture spectrum, post in this thread)Put the spectrum analyzer probe on the output of the filter, and post the screen capture.(And if you have an o'scope convenient, please screen capture that as well. I want to see what's left of that triangle wave!)Highly recommend (but not required):The triangle wave and filter be in the analog domain (old school).What's this experiment for:Determining behavior of digital audio signals. If I get some help, I'll post more detail.Thanks again!

author: ogden
author_rank: Super Contributor
timestamp: October 30, 2018, 02:13:45 pm
content: Do your "experiment" yourself at 1KHz - using PC audio output/input and Audacity or similar software (with triangle wave generation and FFT functions).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 30, 2018, 03:49:39 pm
content: Are you expecting something other than a sine wave?Keep in mind that a "brick wall" filter is nonphysical, or equivalently, takes ~the age of the universe to start up. Practical filters have nonzero transmission in the cutoff band*, but can be made sharp enough that the first nonzero harmonic of the triangle wave (the 3rd harmonic, as it happens... as if that wording wasn't confusing) is below detection thresholds.*(except at finitely many points)If this is in response to an observation --Keep in mind that, say, sound cards aren't brick wall filtered, partly for the above reason but partly also because of cost. It's cheaper to, say, oversample the audio from 44.1kHz, up to say 192kHz or more, interpolating between samples according to a digitally synthesized filter profile. The subsequent analog filter then can be quite modest. All the harmonics and aliasing in the 22.05 to 96kHz range can be reduced arbitrarily in digital, so that the analog filter only needs to go from passing at 22.05kHz to stopping at (192 - 22.05)kHz -- a far easier problem to solve.Or maybe they don't filter exactly like that, because of various practical and laziness reasons. In short, the waveform may look goofy as hell, but it doesn't matter to them because no one can hear much over 20kHz and there is no requirement for phase correctness. Typically you'll see a lot of ringing on sharp edges/corners, more exaggerated on square waves (of course) but still apparent on triangle waves, too. Strictly speaking, this is not distortion, but still a linear process; the catch is, "linear" applies to the amplitudes, not the wave shape, so what you see on the oscilloscope may be quite odd.Tim

author: RoGeorge
author_rank: Super Contributor
timestamp: October 30, 2018, 04:03:23 pm
content: https://www.google.com/search?q=triangle+wave+spectrum

author: ogden
author_rank: Super Contributor
timestamp: October 30, 2018, 07:44:10 pm
content: Quote from: RoGeorge on October 30, 2018, 04:03:23 pmSpectrum of 21KHz triangle wave filtered with 22KHz lowpass filter will not look like "triangle+wave+spectrum".Actually LTSpice software is very good free(!) tool to do said experiment

author: RoGeorge
author_rank: Super Contributor
timestamp: October 30, 2018, 08:29:21 pm
content: Common waveforms have a well known spectrum. Some waveforms have a continuous spectral distribution, some have discrete spectral lines. The link was to show that a triangle waveform have a discrete spectral distribution.Once we know the spectrum of a triangle waveform, there is no need to simulate or to experiment. If, from that specific spectrum, we remove all the harmonics bigger than the fundamental (21KHz), the only thing that remains is a perfect sinusoidal waveform of 21KHz.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: October 30, 2018, 09:43:24 pm
content: Well, I think the above posts cover the theory pretty well. Just for grins I tried to see how much of the job the Rigol DS1054Z could do. I provided the triangle at ~21kHz from the old analog Interstate (racal-dana) F43 FG and used the scope's built in lowpass filter (digital of course) in the Math. The cutoff frequency of the filter has rather coarse selections and the granularity depends on the number of cycles shown in the screen display. So a 25 kHz rolloff was as close as I could get without overly bunching up the waveform display.The scope can't do another math operation on the Filter output so I can't get an FFT of the filter output, but FFT of the input triangle is easy to get.An interesting use of the scope here is to increase the cutoff frequency of the filter in stages and watch how the filter output goes from fully sinusoidal at reduced amplitude (cutoff below fundamental frequency) all the way up to nearly reproducing the original triangle at original amplitude when filter cutoff is over 5x fundamental freq.

author: 13hm13
author_rank: Frequent Contributor
timestamp: November 03, 2018, 08:30:33 pm
content: Quote from: alsetalokin4017 on October 30, 2018, 09:43:24 pmThx for the legwork.I chose sawtooth because of its "rich" harmonic content. I figured it would be a close 'nough proxy to "music."Tradit. Red Book 16/44.1 PCM audio filters at 22.05k (both anti-aliasing and reconstr.). This is fine for CDs, but what if a 16/44.1 digital recording was a source for vinyl (quite common in 1980s)? What would the spectrogram of the played record look like?A vlogger on YT explores this issue:https://youtu.be/9MxJtMcRidwThe vlogger insists the above-22k content to be cartridge mistracking. But he does not realign the cart. to prove otherwise. He could even change the cart. for another and see of the spectrum energy changes.In the "mechanical domain", the stylus/cart. could resonate those overtones (harmonics). But what the vlogger shows is a lot of "noise".Anyway, an easy experiment to confirm that would be to record the CD release of the same album (or any digitally-recorded album of that vintage (e.g. Telarc)) onto a good cassette or open-reel deck. Digitize that at 24/96, and repeat the spectral analysis.Note another vlogger compares spectrums of an all-analog recording (vinyl rip) to that of a CD player...

author: RoGeorge
author_rank: Super Contributor
timestamp: November 04, 2018, 05:39:00 am
content: Those two videos are a waste of time. They are not proving anything.A good example of how not to jump to conclusions.