DSPRelated.com
Forums

Controllable cut-off freq for DF2 SOS

Started by ombz June 20, 2011
ombz <andreas.weiskopf@n_o_s_p_a_m.gmail.com> wrote:
> Vladimir, Tim, Michael,
> Thank you for your helpful answers. As Tim pointed out correctly, > the aim has been a "hard switch", from one to the next sample.
It seems to me that a hard switch is dangerous if the goal is a low-pass filter. Even if you remove all the filter artifacts, there is still a discontinuity with high frequency components that, I would think, shouldn't be there.
> I think I'll have to evaluate options 1 to 3 in detail. I've already > implemented the 2nd option with a cross fade on 1 sample, but > the artifacts are still visible. Some more samples to cross-fade > might do the thing. Option 1 might do it as well. I think option > 3 would be too much computation*. Same holds for zero-cross check : > I think it involves too much computation.
It seems useful to consider the way an analog filter might work. You could switch between the outputs of two analog filters, or you could switch different resistors and/or capacitors into a filter circuit. If you switch capacitors, you should consider the effect of the charge on the capacitor at switch time. If you switch capacitors such that the voltage on the capacitor is the same, it seems that might minimize the transient. In both an IIR digital filter and an active analog filter, (expecially one with negative feedback) there are artifacts due to the value in the feedback at the time of the switch. -- glen
On 06/22/2011 09:50 AM, glen herrmannsfeldt wrote:
> ombz<andreas.weiskopf@n_o_s_p_a_m.gmail.com> wrote: >> Vladimir, Tim, Michael, > >> Thank you for your helpful answers. As Tim pointed out correctly, >> the aim has been a "hard switch", from one to the next sample. > > It seems to me that a hard switch is dangerous if the goal > is a low-pass filter. Even if you remove all the filter > artifacts, there is still a discontinuity with high frequency > components that, I would think, shouldn't be there.
That's what I would expect. In audio-land, you'd switch and you'd hear a pop or a click. OTOH, if such a discontinuity is acceptable it certainly makes the system design easy.
>> I think I'll have to evaluate options 1 to 3 in detail. I've already >> implemented the 2nd option with a cross fade on 1 sample, but >> the artifacts are still visible. Some more samples to cross-fade >> might do the thing. Option 1 might do it as well. I think option >> 3 would be too much computation*. Same holds for zero-cross check : >> I think it involves too much computation. > > It seems useful to consider the way an analog filter might work. > > You could switch between the outputs of two analog filters, > or you could switch different resistors and/or capacitors > into a filter circuit. If you switch capacitors, you should > consider the effect of the charge on the capacitor at switch time. > > If you switch capacitors such that the voltage on the capacitor is > the same, it seems that might minimize the transient. > > In both an IIR digital filter and an active analog filter, > (expecially one with negative feedback) there are artifacts > due to the value in the feedback at the time of the switch. > > -- glen
-- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html