Connect with us

how to tell if source is pink noise, no spectrum or fft

Discussion in 'Electronic Design' started by [email protected], Mar 23, 2006.

Scroll to continue with content
  1. Guest

    I built a pink noise circuit using a shift register and the winfield
    hill pink noise filter from 1997 but I need some way to verify the
    output is pink. I have a digital storage scope (no FFT though), and I
    do not have a spectrum analyzer. Is there some clever way I can test
    the circuit to verify the output is pink? I have function generators
  2. GregS

    GregS Guest

  3. Tim Wescott

    Tim Wescott Guest

  4. Tom Bruhns

    Tom Bruhns Guest

    Same suggestion as others: hose it into your 'puter's sound card and
    record some of it. There's freeware and trialware that will analyze it
    for you with a nice GUI, and you can import it into the free Scilab
    program to do an FFT on it. Suggest you first check the white to make
    sure it's flat. By ratioing the pink filter output to its input you
    can get the shape of the pink filter independent of the non-flatness of
    your source+sound card, if the sound card channels are matched...and
    you can check their match by looking at the same signal on both.

  5. wrote...
    What, you don't trust me??? OK, there is a simple thing you
    can do with your scope and function generator: measure the
    plain old frequency response of the filter and plot it!
  6. Guest

    Its not that I dont trust the filter, its the white noise generator
    really, I mean, for all I know the whole circuit could be messed up, a
    million things could have gone wrong and I would never have known the
    output wasnt pink, you know how things can go.. I need some way to
    check the whole thing. For all I know my PRBS isnt so pseudo and its
    outputting black noise! Oh the humanity!
  7. Ken Smith

    Ken Smith Guest

    Actually, it is more likely that it is outputting blue or green noise. If
    the odds of the bit toggling are much greater than 50%, there won't be
    enough low frequency component to the noise.

    You really want to bring in a few complete cycles of the psudo-random
    sequence for your FFT process. You want to do FFTs of various lengths of
    time. If you are using a digital scope, run it at different sample rates.
    If you get desparate for a method to FFT, let me know.

    I'm also suggest that you listen to the noise. There are many things that
    are hard to find in processing that really jump out at you if you listen
    to it.
  8. Rich Grise

    Rich Grise Guest

    Run it through a speaker and see if it _sounds_ pink. ;-)

  9. GregS

    GregS Guest

    Right. If one has another generator, do an ABX.
    By simple listening, the amount of difference should be easily
    noticed, allthough comming up with a spec would be difficult.
    O course you could use the computer as the ear.

  10. Tim Shoppa

    Tim Shoppa Guest

    Since you built the pseudorandom shift/XOR chain, so you know the
    period. Verify that it has that period and no shorter period. (Details
    will vary as to whether you did it in software or hardware or ....)

    Now if you built a generator with a chain so long that the sun will
    turn into a cold ball of lead before it repeats, then you've got some
    testability issues!

  11. Rich Grise

    Rich Grise Guest

    I'd argue with this a little - one time I built a little active filter
    thingie - 8 active filters spaced "geometrically" from about 300 Hz up to
    about 3 KHz, to pick up the timbre of voice sounds - it's amazing to see
    the spectrum of, for example, the long 'A' sound, like fate, or late; the
    'ah' sound, like in father; the 'O' sound, like in boat - and it was as I
    suspected, the pattern is the same - the instantaneous spectrum, when you
    filter out the fundamental, is identical from person to person, but
    different from phoneme to phoneme. Even people who have very small nasal
    cavities and sinuses and pharynxes show the same pattern in the spectral
    content of the harmonics. I had not, and still haven't, learned enough
    about pattern recognition to go any further with it - the intent was a
    real-time speech input device. FWIW, I lifted the 8 filters directly from
    Don's Active Filter Cookbook. :)

    The point was, a newborn baby can tell the difference between "Ah" and
    "Ooh" - but getting a computer to do it is a different order of problem. :)


  12. John Fields

    John Fields Guest

  13. Rich Grise

    Rich Grise Guest

    Well, you asked.

    I saw a thing on Edjamacational TeeVee where they trained newborns, much
    like Pavlov's dog, to respond to certain vowel sounds. They had this baby
    strapped in some kind of chair, with the camera recording its responses,
    and they'd play recordings of various people making various sounds, like
    "Ah" or "Ee" or "Oh" or "OOh", and on certain sounds, they'd light up a
    toy - actually, one of those animated drumming monkey things - which would
    catch the infant's interest. So, it got trained, such that when it heard
    certain phonemes, it would anticipate the entertaining toy, just like
    Pavlov's dogs would salivate. (this was also a verrrrrry interesting demo
    of how easy it is to train humans), and for a certain phoneme, or vowel,
    it didn't matter who spoke the sound. Man, Woman, Child, Bass, Baritone,
    Tenor, Contralto, Alto, Mezzo-Soprano, Soprano - it didn't matter. They
    responded to the vowel (or phoneme) itself.

    Of course, this was merely on edjamacational teevee, so it could have been
    as real as the Roswell Alien Autopsies, for all I know.
    By trying it - how do _you_ learn stuff? ;-)

  14. Rich Grise

    Rich Grise Guest

    Speaking of pseudorandom sequences - sorry for the thread drift - I've
    used some of Don's designs, and wonder how they come up with "which bits
    to XOR and shift in" for "maximal length". Trial and error? Is there
    any kind of "formula?" Does anybody know? (in Don's book, he had "maximal
    length" circuits up to, I think, 17 bits, but I can't help but wonder,
    is there some kind of algorithm for, say, 32 bits, or 64, or, well, N?)

    I did a 16- or 24-bit one, and played it through a speaker, and I actually
    heard its periodicity. And even slapping a DAC on any given 8 bits, and
    playing the resulting analog, I still heard repeating patterns. Maybe I
    just have really sensitive ears. ;-)

    Oh, and by the way - it was nowheres near pink noise - it was more
    like somebody playing the grinder. ;-)

  15. The Phantom

    The Phantom Guest

    Go get the book out of the library, "Shift Register Sequences", Solomon
    W. Golomb, and read chapter V, "On the Factorization of Trinomials Over
    GF(2)", and you will understand all.
  16. Keith

    Keith Guest

    Try searching the Xilinx application notes for xapp052.pdf. The app note
    lists the taps needed for maximal length LFSRs up to 168bits.
    Note that the bits are not (pseudo) random WRT each other. They're simply
    An LFSR should be more white over its spectrum (it's supposed to be
    pseudo-random), not pink.
    Perhaps the frequency was too low?
  17. Ken Smith

    Ken Smith Guest

    I don't think that that proves that the chain is making white noise does
    it. Think about a real bad 3 bit "psudo random" sequence like this:

    A B C
    0 0 0
    1 0 0
    0 1 0
    0 0 1
    1 0 1
    0 1 1
    1 1 1

    If you took the A as the output, it would be sort of white. B would be
    less so and C would be very bad.
  18. Tim Shoppa

    Tim Shoppa Guest

    True, but I wasn't suggesting that he do a seat-of-the-pants
    pseudorandom sequence. I thought he had already chosen one with known
    good properties and that he wanted to verify that he had implemented it

    For the traditional shift/XOR chain (feedback into one end, not back
    into the middle), isn't it true that it doesn't matter which bit in the
    chain you look at, as they are all the same sequence just delayed in
    phase slightly?

  19. Rich Grise

    Rich Grise Guest

    I once did a 16-bit one in TTL (or probably LSTTL - I'm not _THAT_ old!),
    with 16 LEDs, clocked at a human-perceptible rate [ ;-) ], and it was like
    watching a shift register, with new bits, yes, but watching them march
    down that line of LEDs made me think, "There's something not very random
    about this...."

    In another post I had mentioned that I had hung a speaker on one of the
    bits, and I could hear the periodicity. But it _was_ only 16 bits. :)

  20. Ken Smith

    Ken Smith Guest

    Yes all the ones in the body of the shift register have exactly the same
    pattern on them. There may be one extra flip-flop in the circuit that
    jumps it out of the "lock up" state.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day