¿ªÔÆÌåÓý

Re: Some questions on digital filter design


Daniel Marks
 

If you want something simple to implement you can use what I did in the fldigi version of SCAMP:


look at the?

int scamp::rx_process(const double *buf, int len)

method.? It implements a simple circular buffer filter, which has a sinc-like response but its frequency may be moved around dynamically.? I use a different approach in my guitar pedal code:


for example look at the "DSP_TYPE_WAH" filter effect.? This uses a dynamically changed bandpass filter based on the position of a foot pedal, and does some simple interpolation to move the center frequency around by changing the coefficients of a digital biquad filter.?

All digital filters are implemented with a delay, and so none are "noncausal."? There is a compromise between group delay, which is the amount of lag that the filter applies to the signal and the sharpness of the filter.? A "minimum phase" filter minimizes this delay and has the property that the real and imaginary parts are related by the Hilbert transform.? A filter can be expressed as a cascade of a minimum phase filter and an all-pass filter.

Dan


On Sat, Jul 6, 2024 at 8:54?AM Reginald Beardsley via <pulaskite=[email protected]> wrote:
I?am?working?on?numerical?modeling?of?CCW?and?am?at?the?point?that?I?need?to?write?the?code?to?implement?twin?pass?band?tuning.??As?this?is?NOT?seismic?processing?I?pulled?a?small?stack?of?my?EE?DSP?classics?and?started?reading?them.

I?have?always?found?the?descriptions?of?digital?filter?design?in?the?EE?literature?baffling?complex.??As?seismic?is?done?in?recorded?time?it?has?a?great?deal?of?latitude?in?implementation?that?a?real?time?DSP?implementation??lacks.??So?I?presumed?that?the?reason?lay?in?the?real?time?constraint.

Yesterday?I?realized?that?the?design??of?a?static?filter?is?completely?trivial.??Specify?the?frequency?domain?characteristics?and?back?transform?to?the?time?domain.??The?impulse?response?is?the?taps?for?any?arbitrary?filter.??I?also?noticed?that?the?filters?in?the?examples?were?zero?phase?filters.

In?seismic?we?always?use?zero?phase?(aka?"linear?phase"?in?EE?jargon)??filters?as?interpreting?a?symmetric?waveform?is?much?easier.

The?first?step?in?seismic?processing?is?called?"designature".??This?consists?of?using?a?recording?of?the??system?impulse?response?to?create?an?all?pass?filter?which?removes?the?phase?imposed?by?causality.??Typically?the?recording?system?impulse?response?is?measured?and??then?the?phase?of?the?source?is?recorded?for?marine?work?using?arrays?of?air?guns.

Analog?filters?are?minimum?phase?as?are?all?physical?processes.??But?the?digital?design?examples?I?saw?were?zero?phase?with?a?symmetric?impulse?response.??This?leads?to?a?non-physical?result.??The?filter?output?begins?*before*?the?input?arrives.??I?find?that?rather?hard?to?justify?in?a?communication?system.??A?quick?check?of?the?indices?revealed?that?except?for?a?very?brief?mention?of?minimum?phase?and?causality?the?issue?is?completely?ignored.??Oppenheim?and?Schafer?devote?a?few?page?and?Rabiner??and?Gold?a?paragraph?before?dismissing?the?matter.? Another text made no mention of it at all.

Would?a?DSO?which?responded?to?an?impulse?showing?the?trace?varying?*before*?the?peak?of?the?impulse?be?acceptable???I?can't?imagine?why?anyone?would?accept?that.

So?why?should?it?be?acceptable?in?a?communication?system???Can?anyone?elucidate?the?matter?

Have?Fun!
Reg





Join [email protected] to automatically receive all group messages.