Identifying common periodic waveforms (square, sine, sawtooth, …)?

You definitely want to start by taking an autocorrelation to find the fundamental With that, take one period (approximately) of the waveform Now take a DFT of that signal, and immediately compensate for the phase shift of the first bin (the first bin being the fundamental, your task will be simpler if all phases are relative). Now normalise all the bins so that the fundamental has unity gain Now compare and contrast the rest of the bins (representing the harmonics) against a set of pre-stored waveshapes that you're interested in testing for. Accept the closest, and reject overall if it fails to meet some threshold for accuracy determined by measurements of the noisefloor.

You definitely want to start by taking an autocorrelation to find the fundamental. With that, take one period (approximately) of the waveform. Now take a DFT of that signal, and immediately compensate for the phase shift of the first bin (the first bin being the fundamental, your task will be simpler if all phases are relative).

Now normalise all the bins so that the fundamental has unity gain. Now compare and contrast the rest of the bins (representing the harmonics) against a set of pre-stored waveshapes that you're interested in testing for. Accept the closest, and reject overall if it fails to meet some threshold for accuracy determined by measurements of the noisefloor.

– endolith Jul 17 '09 at 16:29 Indeed. That'll be a lot easier too if you've compensated for the phase of the fundamental. – Dave Gamble Jul 17 '09 at 23:53 It would be better to take the FFT of several periods of the wave, as far as noise rejection.

– endolith Jul 23 '09 at 18:59 1 Alternatively, if you can align them, you would do better to sum several periods of the wave (and average) and then FFT. – Dave Gamble Aug 5 '09 at 4:36.

Do an FFT, find the odd and even harmonic peaks, and compare the rate at which they decrease to a library of common waveform.. peak... ratios.

This method seems more robust than working in the time domain, since you could still identify waves that had been through phase shift and filtering. – endolith Jul 17 '09 at 16:30.

Perform an autocorrelation to find the fundamental frequency, measure the RMS level, find the first zero-crossing, and then try subtracting common waveforms at that frequency, phase, and level. Whichever cancels out the best (and more than some threshold) wins.

I think this is the most practical approach, assuming you also vary the phase of the comparison waveforms. – MusiGenesis Jul 31 '09 at 15:57 You could figure out the phase by finding a zero crossing first so you aren't wasting time shifting the waves to every possible phase. – endolith Aug 1 '09 at 20:33.

This answer presumes no noise and that this is a simple academic exercise. In the time domain, take the sample by sample difference of the waveform. If the distribution has a sharply defined peak (mode) at zero, it is a square wave.

If the distribution has a sharply defined peak at a positive value, it is a sawtooth. If the distribution has two sharply defined peaks, one negative and one positive,it is a triangle. If the distribution is broad and is peaked at either side, it is a sine wave.

Arm yourself with more information... I am assuming that you already know that a theoretically perfect sine wave has no harmonic partials (ie only a fundamental)... but since you are going through an ADC you can throw the idea of a theoretically perfect sine wave out the window... you have to fight against aliasing and determining what are "real" partials and what are artifacts... good luck. The following information comes from this link about csound. (*) A sawtooth wave contains (theoretically) an infinite number of harmonic partials, each in the ratio of the reciprocal of the partial number.

Thus, the fundamental (1) has an amplitude of 1, the second partial 1/2, the third 1/3, and the nth 1/n. (**) A square wave contains (theoretically) an infinite number of harmonic partials, but only odd-numbered harmonics (1,3,5,7,...) The amplitudes are in the ratio of the reciprocal of the partial number, just as sawtooth waves. Thus, the fundamental (1) has an amplitude of 1, the third partial 1/3, the fifth 1/5, and the nth 1/n.

I think that all of these answers so far are quite bad (including my own previous...) after having thought the problem through a bit more I would suggest the following: 1) take a 1 second sample of the input signal (doesn't need to be so big, but it simplifies a few things) 2) over the entire second, count the zero-crossings. At this point you have the cps (cycles per second) and know the frequency of the oscillator. (in case that's something you wanted to know) 3) now take a smaller segment of the sample to work with: take precisely 7 zero-crossings worth.(so your work buffer should now, if visualized, look like one of the graphical representations you posted with the original question.) use this small work buffer to perform the following tests.

(normalizing the work buffer at this point could make life easier) 4) test for square-wave: zero crossings for a square wave are always very large differences, look for a large signal delta followed by little to no movement until the next zero crossing.5) test for saw-wave: similar to square-wave, but a large signal delta will be followed by a linear constant signal delta. 6) test for triangle-wave: linear constant (small) signal deltas. Find the peaks, divide by the distance between them and calculate what the triangle wave should look like (ideally) now test the actual signal for deviance.

Set a deviance tolerance threshold and you can determine whether you are looking at a triangle or a sine (or something parabolic).

1 Assuming this is anything like real audio data, counting zero-crossings won't work very well. As Dave Gamble pointed out, autocorrelation is the best way to determine an audio signal's fundamental frequency. – MusiGenesis Jul 31 '09 at 15:55 1 Unless the signal is really noisy, counting zero crossings should work.It would be better to measure the distance between zero crossings, throw out any outliers, and average, though.

– endolith Aug 1 '09 at 20:39.

Epidemiological studies: It is recommended that epidemiological studies be considered only if pilot studies demonstrate the feasibility of gathering high quality exposure data in appropriate highly exposed populations, thereby achieving adequate statistical power and identifying relevant health outcomes. Exposure evaluation: The degree and type of EMF exposure currently encountered in occupational and domestic settings need to be better characterized. Periodic checks must be made and documented in industrial and other occupational settings where IF fields are used, to ensure that the equipment is operating properly and that exposure guidelines are not exceeded.

Animal studies: Future animal studies should attempt to use exposure conditions that are similar to human exposures from industrial and other sources, and also should explore higher exposure levels. If specific suspect pathways are identified, these studies could be supplemented by cell or tissue studies to clarify how IF fields affect organisms. Biological interaction:More comprehensive understanding of the biological interaction and hazard thresholds is required to refine exposure guidelines, particularly for pulsed fields or fields with complex waveforms.

Dosimetry: Computer modelling techniques exist that enable the calculation of fields induced inside the bodies of people exposed to IF fields. The most advanced of these techniques employ anatomically realistic computational phantoms.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions