
Home  Forums  Rules  Articles  diyAudio Store  Gallery  Wiki  Blogs  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Equipment & Tools From test equipment to hand tools 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
3rd July 2008, 02:31 PM  #1 
diyAudio Member
Join Date: Sep 2006

Comb spectrum generation
Hi,
I would like to generate a digital signal having a combshaped spectrum. The most obvious technique is to use a Diraclike pulse, but I need some refinements: I would like the spectrum to be flat for the first 10 to 20 spectral lines, and I want the fundamental to be suppressed. For example, for 1KHz, I want 2, 3, 4, ..., 20KHz but not 1KHz. With a narrow pulse having a repetition rate of 1KHz, I'd get the unwanted 1KHz, and with 2KHz, I'd miss all the oddnumbered lines. I would also like to have more useful energy than with a simple narrow pulse. All this requires the construction of a particular sequence, with additional, wellplaced transitions, and I would like to know that sequence, and also the process to compute it. In fact, I need just the opposite of the "magic sinewaves". They contain the fundamental and no harmonics up to an arbitrary number, and I want no fundamental and all the harmonics. http://www.tinaja.com/glib/msintro1.pdf Thanks LV 
4th July 2008, 03:52 AM  #2 
diyAudio Member
Join Date: Feb 2003
Location: ..

my reading is that you want a binary sequence?
if so, create the spectrum with summed sines and then convert to PWM or even DSD style deltasigma 
4th July 2008, 08:03 AM  #3  
diyAudio Member
Join Date: Sep 2006

Quote:
Quote:
But if I know the sequence, I can generate it much more simply, with purely digital means. 

4th July 2008, 06:36 PM  #4 
diyAudio Member
Join Date: Feb 2003
Location: ..

i r a engineer, I could do this in LtSpice in < 1 Hr I could have a .wav for some reasonable sampling rate and test time
I couldn't tell you what an analytic or "simple" algorithmic solution would look like or if any such even exists in twice the time 
6th July 2008, 05:12 PM  #5 
diyAudio Member
Join Date: Sep 2006

I've tried some simulations. The problem is, that for a given spectrum, there are an infinity of possible waveforms, depending on the initial phase of each harmonic. This means I can easily find a waveform fitting my spectral needs, but it's in no way optimum for hardware generation: i want the least possible transitions.

6th July 2008, 10:47 PM  #6 
diyAudio Member

You can use the Praxis software program (will run as freeware. download it from Liberty Instruments website) to generate any set of sinewaves you want at any amplitudes and starting phases, andmake a WAV file from them. Choose the "Fixed Tones (asynch)" type stimulus, go to the "waveform editor" and you'll get to the form to set up the tones and write it all out to the wav file. Pretty easy and often enlightening. (full disclosure note: Liberty Instruments and its web site is mine; but you can get and use the software free).
If you also need it to meet some other time domain requirements (such as minimum peak power, or something like that), you need more than generation software, you'll need something to optimize with. One way people have developed waves with certain spectra within limited peak levels is to first generate the spectral shape in the frequency domain, do an Inverse Fourier Transform back to time domain, cut off the peaks, then FFT back to frequency domain. Then fix the spectrum magnitude again (just set the magnitude values, but leave the phases intact), IFFT back to time again and clip the peaks, FFT back to frequenecy again and fix the spectra.....over and over till it (hopefully) converges toward what you want. I doubt you'll find existing software to do anything even remotely like that, you'll have to write it yourself, I think. 
6th July 2008, 11:54 PM  #7  
Banned

Re: Comb spectrum generation
Quote:
i.e. for 1kHz, a 1kHz square wave minus a 1kHz sine wave. Now all you have to do is take the numbers for a max amplitude square wave ( +32767, 32767) and generate the appropriate number of samples for your chosen sampling rate by subtracting the maximum amplitude sine at each sampling instant from 32767 or 32767 as appropriate. You only have to calculate a quarter cycle. @48kHz you require 48 samples for 1kHz. Once you have your values you can just repeat them endlessly... you only have to calculate 12 samples because of the symmetry. w 

7th July 2008, 12:55 AM  #8  
diyAudio Member

Quote:


7th July 2008, 01:01 AM  #10 
diyAudio Member

I think if you do an FFT of that you'll find there is still significant energy there at the fundamental frequency.
See at http://wiki.4hv.org/index.php/Fourier_Analysis for the harmonic breakdown of a square wave 
Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Flat comb spectrum  Elvee  Digital Source  0  1st July 2008 02:18 PM 
Spectrum Analysis Spectrum of JX92s  keladrin  Full Range  2  26th May 2006 03:10 PM 
FR125 / Comb effect  CoryLee  Full Range  17  12th June 2005 10:24 PM 
Comb problem?  eStatic  MultiWay  1  7th February 2004 02:25 PM 
Hornloading, fatigue, comb filtering...  walker  MultiWay  1  20th November 2001 09:55 AM 
New To Site?  Need Help? 