is there a complete analog circuit that gives you an indication of the signaltyp - Page 1
Forum section: electronics / projects

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 03:53:40 pm
content: Is there a complete (i.e. no Arduino/microprocessor etc or visual inspection) circuit that, given a signal in 10Hz-1MHz, minimal 2Vpp) gives you an indication of the signal type (sine, square, triangle/ramp, other)?

author: shapirus
author_rank: Super Contributor
timestamp: March 10, 2023, 04:03:32 pm
content: Quote from: RAPo on March 10, 2023, 03:53:40 pmPeak detection, RMS calculation, then C = Peak / RMS, and then find C in a table of known crest factor values for different waveforms. Sounds like it should be doable, but not too easy.

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 04:13:35 pm
content: Thanks for your swift&nice reply. One and the same crest factor can indicate different signal types (https://en.wikipedia.org/wiki/Crest_factor). Do you have a reference to such a crest factor table?Quote from: shapirus on March 10, 2023, 04:03:32 pm

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2023, 04:18:10 pm
content: I suspect that crest factor fingerprinting will confuse too many distinct waveforms. However, if you want to pursue this, its not difficult to generate your own table of crest factors using any programming language you can generate the waveforms in and implement peak detection and RMS calculation algorithms. If you are familiar with Matlab or GNU Octave, I'd start there, though my personal preferences for manipulating and creating engineering data tables tend towards writing console apps in 'C' or scripting Excel.In theory, yes it can be done, as its possible to characterise a signal by spectrum analysis, comparing the relative power and phase of the fundamental and its harmonics, (which for a fixed frequency periodic signal is sufficient information to reconstruct the original signal subject to a bandwidth limitation of the highest harmonic used) and pure analog swept spectrum analysers can be built, as can analog circuits to sample the various harmonics phase and quadrature components and window compare their levels, but its impractical to do it that way, (and has been impractical for over 30 years) due to the physical complexity (I estimate a 19" rack mount cabinet full of eurocard size PCBs) vs sampling the fundamental and harmonic levels with a MCU (which became viable approx. 40 years ago), or even sampling the signal and using DSP techniques which has been viable for over 25 years.

author: shapirus
author_rank: Super Contributor
timestamp: March 10, 2023, 04:25:08 pm
content: Quote from: RAPo on March 10, 2023, 04:13:35 pmWell, then my idea won't work. At least, without checking additional conditions, or beyond a few basic waveforms. What other formal parameters can we use to identify a given waveform? Probably integration and differentiation could be useful. At this point it gets more interesting theoretically, at the same time becoming less feasible practically.

author: reboots
author_rank: Regular Contributor
timestamp: March 10, 2023, 04:46:18 pm
content: Run the signal through a cathode-ray oscilloscope. Detect peak amplitude and period to automatically adjust gain and sweep for a consistent single-cycle display. Shroud the display along with a phototransistor, photomultiplier or other sensitive device. Characterize typical overall brightness for each waveform; e.g. square excites more screen area than sine, then triangle, etc. Use those signature levels to trigger indicators for each type.My friends have a saying that in the early age of electronics, when they wanted something done really badly, they did it, really badly. I believe I have honored that spirit of invention here. Perhaps there is a better way to characterize the information density of a cycle in the analog domain.

author: shapirus
author_rank: Super Contributor
timestamp: March 10, 2023, 04:49:58 pm
content: Quote from: reboots on March 10, 2023, 04:46:18 pmit's basically the same characteristic as crest factor, I guess. It works as long as you don't need to discern more than one different waveforms that have the same crest factor. If you do, you need to analyze something else in addition to that.

author: TimFox
author_rank: Super Contributor
timestamp: March 10, 2023, 05:10:54 pm
content: Of the "elementary" waveforms listed in the Wikipedia article, the pairs that have identical crest factors have different DC (mean) values, which could differentiate between the two candidates with that crest factor.Of course, one can generate lots of "non-standard" waveforms to add to the textbook examples in that list.Specifically: DC and zero-mean square wave have crest factor = 1.0, and sine wave (zero mean) and full-wave rectified sine wave have crest factor = 21/2.

author: jonpaul
author_rank: Super Contributor
timestamp: March 10, 2023, 05:25:14 pm
content: scope and eyes, brain

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2023, 05:30:18 pm
content: Even if there was a simple(ish) circuit to characterise waveforms in the analog domain, the complexities of switching time constants to handle a five decade fundamental frequency range would make a MCU/DSP based solution far far more attractive!

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 05:42:43 pm
content: Thanks, I can program in the languages/applications you mentioned, but before doing, I would check the knowledge of this forum if there wasn't an existing solution

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 05:43:33 pm
content: Yea the main gist is: this will require a lot of tinkering.

author: TimFox
author_rank: Super Contributor
timestamp: March 10, 2023, 05:45:34 pm
content: Quote from: Ian.M on March 10, 2023, 05:30:18 pmAnalog circuits for measuring crest factor (peak over RMS) and mean value (DC level) have been made to cover a wide frequency range, and have been used in successful analog voltmeters since the -hp- 400 series.edit: clarification--"since the time of the -hp- 400 series"

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 05:46:16 pm
content: That goes beyond the question. Just like we have testers for if a transistor is npn or pnp, I would like to have a small (think the seize of a DMMcheck) all-contained box with less indicating the most probable type.

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 05:47:20 pm
content: And what if I lower the specs to two decades?

author: shapirus
author_rank: Super Contributor
timestamp: March 10, 2023, 05:49:34 pm
content: Quote from: RAPo on March 10, 2023, 05:46:16 pmIf you retract the requirement for it to be analog, you can rather easily implement it with an ADC and a microcontroller or a single-board computer to perform the analysis. It will easily fit in a small box.

author: TimFox
author_rank: Super Contributor
timestamp: March 10, 2023, 06:19:10 pm
content: Quote from: RAPo on March 10, 2023, 05:46:16 pmYou asked for a "complete" circuit, not a miniature circuit.

author: RAPo
author_rank: Super Contributor
timestamp: March 10, 2023, 06:20:26 pm
content: true

author: TimFox
author_rank: Super Contributor
timestamp: March 10, 2023, 06:34:37 pm
content: Anyway, there are analog ICs that can measure RMS, peak, and mean values of a continuous waveform that could build such a complete circuit in a reasonable size box, as well as ratios.(Not necessarily in a single package.)

author: 2N3055
author_rank: Super Contributor
timestamp: March 10, 2023, 06:52:48 pm
content: No.

author: artag
author_rank: Super Contributor
timestamp: March 10, 2023, 09:39:20 pm
content: sine, square and triangle all have different harmonics. An analogue circuit to do this for the general case might be difficult, but it wouldn't be too bad for a specific frequency.