Forums

Help Please -- very strange oscillator problem

Started by Unknown September 15, 2017
>There are some FIR filter implementations, done in an FPGA, that >assume years of high-clock rate (trillions) of absolutely correct adds >and subtracts. Any errors or glitches make permanent offset or >end-around errors.
Fixed-point adds and subtracts are error-free. Floating-point multiplication introduces quantization error, and of course floating-point adds and subtracts lose the LSBs of the smaller operand. Cheers Phil Hobbs
On Mon, 18 Sep 2017 19:02:47 -0700 (PDT), pcdhobbs@gmail.com wrote:

>>There are some FIR filter implementations, done in an FPGA, that >>assume years of high-clock rate (trillions) of absolutely correct adds >>and subtracts. Any errors or glitches make permanent offset or >>end-around errors. > >Fixed-point adds and subtracts are error-free. Floating-point multiplication introduces quantization error, and of course floating-point adds and subtracts lose the LSBs of the smaller operand. > >Cheers > >Phil Hobbs
A fir boxcar (sinc filter) has a FIFO and a subtractor and an accumulator. You initialize everything to zero and start clocking. Nothing can go wrong, someone said. That one bothers me, but it seems to always work. Emotionally, I prefer an IIR filter with some feedback. -- John Larkin Highland Technology, Inc lunatic fringe electronics
"John Larkin" <jjlarkin@highlandtechnology.com> wrote in message 
news:ch61sc5tf34rochsoe07trsd9p8i22ee1u@4ax.com...
> A fir boxcar (sinc filter) has a FIFO and a subtractor and an > accumulator. You initialize everything to zero and start clocking. > Nothing can go wrong, someone said. > > That one bothers me, but it seems to always work. Emotionally, I > prefer an IIR filter with some feedback.
Well, if you want it normalized to another gain, you're likely to lose LSBs in that conversion. (Hopefully you perform the multiplication after the accumulator, so the error does not also accumulate.) If you want a better filter profile than sinc, you'll lose bits. A 1-3-3-1 is about as good as you can get with integer coefficients. Beyond that, you need arbitrary multiplications, and either a double width accumulator or acceptance of rounding. IIR must lose bits because of the repeated multiplications. But I suppose DSP theory isn't "worth reading". Tim -- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: http://seventransistorlabs.com
On 09/19/2017 12:21 AM, John Larkin wrote:
> On Mon, 18 Sep 2017 19:02:47 -0700 (PDT), pcdhobbs@gmail.com wrote: > >>> There are some FIR filter implementations, done in an FPGA, that >>> assume years of high-clock rate (trillions) of absolutely correct adds >>> and subtracts. Any errors or glitches make permanent offset or >>> end-around errors. >> >> Fixed-point adds and subtracts are error-free. Floating-point multiplication introduces quantization error, and of course floating-point adds and subtracts lose the LSBs of the smaller operand. >> >> Cheers >> >> Phil Hobbs > > A fir boxcar (sinc filter) has a FIFO and a subtractor and an > accumulator. You initialize everything to zero and start clocking. > Nothing can go wrong, someone said.
Integer adds and subtracts are exact modulo 2**N. Multiplication and division produce results with more bits than they start with, so even with extended precision FP registers, you have to round at some point. It's the rounding that produces the LSB/sqrt(12) RMS additive noise, and that's why accurate long-term numerical simulations of chaotic systems (exponential noise amplifiers) are impossible even in principle.
> That one bothers me, but it seems to always work. Emotionally, I > prefer an IIR filter with some feedback.
Symmetric FIR filters are pretty useful. IIRs can have limit cycles and stuff, so you have to be careful with them. Sometimes you can usefully factor a filter into an IIR part and a FIR part. The Footprints sensor's actual measured quantity was the first finite difference of the temperature of each pyroelectric pixel with 5 Hz sampling. There was a thermal rolloff caused by the thermal mass of the suspended film and the very low thermal conductance, so it had a weird peak with rolloffs on both sides. I was using a MCU with 902 bytes of RAM (PIC17C756A), and the inverse filter for that transfer function needed to be over 20 samples long, for each of 96 pixels, so it wouldn't fit. I worked out how to factor it into a 4-sample FIR followed by a one-pole IIR lowpass, so it all fit, though not by much. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On Monday, September 18, 2017 at 9:24:46 PM UTC+5:30, mako...@yahoo.com wrote:
> Please also note that a > > copy implemetation of the misbehaving circuit works fine. > > start swapping parts and report back when you have identified > the swapped part that "follows" the problem. > > m
The problem was with a bad 4 cm long wire. As the most popular variety of 2n#055 comes in a 1 mm thick metal case, a thicker heat shield must be used, and it is difficult to mount the two pairs of this combination on the PCB. in my case, the two transistor-heat shield pairs are mounted on a small strip of phenolic. There are short wires connecting the capacitor-diode-resistor network with the two 2N3055s. The wire to the base of one 2N3055s was bad. No bad transistors or incorrectly connected diodes.