psrb shifter in AoE, how are the resistors weighted?

On page 662 and 663 of the 2nd edition of AoE, figure 9.90, there is a circuit which generates noise. I am wondering exactly how the (sin x)/x weighting described on the preceding pages translates into the specific resistor values used in the circuit, and why some of the bits of the circuit are not connected to a weighting resistor or not connected at all, and how I would modify the circuit for pink noise generation, or possible an arbitrarily shaped spectra of noise?

Reply to
acannell
Loading thread data ...

In the intervening nearly 30 years, I've forgotten nearly as much about that circuit as I remember! I'd say either we calculated the resistor values or we cribbed them from the HP instrument which was our inspiration. As for the missing connections (note the symmetry), they implement a weight of zero for that delay tap.

With respect to modifying the circuit to make pink noise, etc., you'll have to do that with a post-generator filter.

BTW, you mention a 1979 article in Electronic Design by Michael Workman. I don't remember that article, but I think it would have appeared after we drafted figure 9.90 (fig 9.73 in the 1st edition), and wrote the discussion. If you find the article I'd love to see a copy.

For many years I thought of building a copy of our design for myself, but in recent times an alternate approach, such as using a microprocessor and a DAC, would be better done. That's sad, because our circuit always had a special appeal for me, as did the original HP instrument. Last year one came up on eBay and lingered for a while at an attractive low price, but I resisted buying it, because it was just too big and old and cumbersome. Sigh. The good old days.

--
 Thanks,
    - Win
Reply to
Winfield Hill

If the weighting resistors were selected to perform low pass filtering, as the text describes: page 660 "for a low pass filter the weights should be proportional to (sin x)/x", page 661 "in this case we have used a (sin x)/x weighted sum"... how come they cant be selected for a low pass with a -3db per octave rolloff? If this circuit can be used to perform a compact, low cost FIR, its far more amazing than a dac and microcontroller, which is probably ten times more expensive. My project needs to generate continuous pink noise, or ideally, a custom shaped spectra of noise, real time. I have yet to find a way to perform an FIR in the microcontroller budget that I have, which is about $0.75. This circuit looks _perfect_!

Reply to
acannell

So I assume that the circuit is a linear feedback shift register to generate noise, and resistors from places along the register to implement an FIR filter? Good way to do things "back then" and could be made reasonably small today--the "good new days" I guess.

-- For acann (what the heck is your name??), yes, you should be able to implement "any" FIR that way. Just make the shift register long enough, so it has enough taps, and use flipflops that have accurate enough output voltages and resistors that are accurate enough. But it gets to be a lot of parts: what does it cost in YOUR manufacturing to place a part? I have quit a bit of incentive to avoid using a bunch of

1 cent resistors if I can do the job with a single 1 dollar part, because the placement cost of the resistors and (perhaps the cost of the board area as well) will easily outweigh the cost of the 1 dollar part plus its placement cost. -- do you have FIR filter design software that would let you emulate a "pink" filter?

BTW, Win, could you drop me an email? I have a request for a copy of an article you probably have...I guess the email address in the header of this msg will work.

Cheers, Tom

Reply to
Tom Bruhns

Hi Tom,

I am trying to understand exactly how one picks the resistor values. For instance, if I wanted to implement that three pole, three zero filter I mentioned in the other post, using the shift register FIR method:

how do I determine how many bits long the shift register needs to be?

how do I translate an FIR filters specs into the resistor values? do the coefficients of that three pole three zero filter somehow translate into resistor values?

are the "taps" literally each output of the shift register? so if I use say... ten weighting resistors (each connected to a different bit of the shift register) is that a "ten tap" FIR filter?

wait a second. isn't this circuit recursive? so its an IIR filter right? or is it an FIR because the white noise generator is recursive (bit shifter with output tied to input), not the part that does the filtering (the resistors)?

To Win: this sure does seem like something that someone in the 70's or

80's would have made into an IC. A long shift register, with accurate output voltage gates, and a datasheet that tells you how to configure the weighting resistors to generate an arbitrary spectrum of noise. Ever see anything like that? "FIR-on-a-chip" which is low cost and easy sounds pretty awesome to me.

The fir mentioned in the other post is:

Wait a second again. Isnt this filter an IIR? It uses its output as its input doesnt it?

My name is Asa.

Reply to
acannell

Hi Asa,

Yes, the filter with memory (where b0(k+1) depends on b0(k)) is an IIR filter. With perfect math and a zero input, a non-zero b0 (or b1, or b2) will never decay all the way to zero--therefore it's an infinitely long response to an impulse: IIR.

Yes, the FIR tap values are just the _conductances_ of each of the resistors. I'm assuming here that they feed all into the virtual ground summing node at the (-) input of an op amp with feedback--I don't know the exact circuit, since I don't have that book. Consider that a digitally-implemented FIR filter is just the sum of the products of time-delayed ("shifted") versions of the input signal and the set of coefficients. In the case of the white noise generated by the shift register, the value at each tap is either 0 or +3.3 volts (assuming perfect CMOS output levels). There are only two possible values. Of course, that has a DC component, so you may wish to set the op amp summing node to midway between the two CMOS output levels. To implement a negative coefficient, you need the complement output of that stage; this is easy if your register is built of f/f's with Q and /Q outputs. Otherwise you can use inverters, assuming the propagation delay is short enough.

The difficulty is that you will need quite a lot of taps to make a good "pink" FIR filter, I believe. It all depends on the level of accuracy you want. The problem is compounded by the need to go to low frequency--a frequency which is less than 1/2000th of the sampling frequency. Another way to look at it: if you put an impulse into the IIR filter you described in the equations, it will take a long time (many samples) for the response to die down to a low enough level that you can ignore it. The filter taps are exactly the response of the filter to an impulse. I've sometimes been surprised at how few taps it takes to make an acceptable filter, so you may get lucky--you'll just have to run a filter design to see what you need.

Cheers, Tom

Reply to
Tom Bruhns

Oh, and yes, the white noise generator is recursive (and in fact has a non-decaying impulse response), but using taps on the shift register that happens also to be used to generate the noise does not make that filter recursive. You could just as well have implemented it by running the white noise bit stream into another shift register which does not have feedback.

Cheers, Tom

Reply to
Tom Bruhns

Hi Tom,

Wow thanks for the very interesting discussion. I'm going to try and get the shift register FIR/IIR circuit to work somehow and I will let you know how it goes!

Thanks,

Asa

Reply to
acannell

Hi Asa,

I trust you have seen the very nice posting by James Waldby in the other thread, where he describes a very reasonable algorithm using only some fairly simple shifts and additions to accomplish nearly the IIR filter you proposed, with plenty of time in the AVR to do it, and in fact to do it with double-byte precision.

As for the FIR implementation, as I expected, and as you can see easily by inspection of the b0 relationship, the impulse response of the IIR filter you posted tails out at a high level for a very long time. In general, you should expect any filter that has significant "shape" at very low frequencies will require a lot of taps if implemented as an FIR filter. Obviously some won't: if you can describe the filter as a complex conjugate pair of zeros, or a single zero, then it will be very simple. But that's not the case here. I think this filter is much better done as an IIR.

Cheers, Tom

Reply to
Tom Bruhns

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.