The AM Forum

THE AM BULLETIN BOARD => Technical Forum => Topic started by: WA1GFZ on February 04, 2008, 04:06:32 PM



Title: PDM filters
Post by: WA1GFZ on February 04, 2008, 04:06:32 PM
I've been simulating some PDM filters and notice some interesting phase shifts through the audio frequency range then there is group delay.
how do the pro's handle this delay????


Title: Re: PDM filters
Post by: WA1QHQ on February 05, 2008, 11:21:21 AM
Frank,

I used to design video low pass filters when I worked at M/A-Com. low group delay was a critical spec in video systems but there was always the desire to get as sharp a roll off as possible, two conflicting specs. The way I dealt with it was to design in a group delay equalizer network. Design equations for this may be available on line, if not I have some info at home that I can dig up.


Title: Re: PDM filters
Post by: WA1GFZ on February 05, 2008, 11:33:10 AM
Mark,
I would like to see that because I also looked at group delay and again wonder how this effects modulation. This could be the source of shark fil waveform reported by users. The network would need to be flat for audio response so maybe need sto be a number of sections. fc


Title: Re: PDM filters
Post by: Tom WA3KLR on February 05, 2008, 12:29:23 PM
Frank,

Attached is a pdf of the simulation results of a 2-section low-pass LC filter I designed for my pulse-width modulator; driven and terminated with 7.5 Ohms, for my Class E PA.

The 3 dB cut-off frequency is 8.8 kHz.  The change in group delay peaks near that frequency.  As you can see the delay through the lower band of the filter is about 47 microseconds.  The group delay peak at 9 kHz is about 19 microseconds addditional.  Then it dives to zero delay beyond the cut-off.   Mother Nature.


Title: Re: PDM filters
Post by: WA1GFZ on February 05, 2008, 12:50:25 PM
That is pretty flat below 2 KHz but above that the phase takes off.
Yes it is mother nature but it is effecting your audio response.
I would like to know the values you used so I can run the simulation.
I wonder how it effects the modulation envelope.


Title: Re: PDM filters
Post by: Tom WA3KLR on February 05, 2008, 01:48:13 PM
Frank,

My 2-section L-C LPF as simulated has some real component modeling included:

Both series inductors are 176.3 uH.  Each inductor has 0.095 Ohms series resistance and a 66,000 Ohm resistor in parallel with coil.

Shunt capacitor to ground after first section is 4.7 uF. with 0.169 Ohm series resistance.

Last section shunt capacitor to ground is 1.57 uF. with 0.507 Ohm series resistance.

7.5 Ohms input and output impedance.


Title: Re: PDM filters
Post by: K3ZS on February 05, 2008, 02:04:03 PM
In the Doppler radar field we used Bessel Function low pass filters on the output of the video I and Q channels.   They have constant phase delay within their design  passband.   Higher order active Bessel filters would work good for audio applications.


Title: Re: PDM filters
Post by: AB2EZ on February 05, 2008, 02:25:50 PM
Frank, et. al.

Interesting thread....

I believe that the variation in the group delay vs frequency, i.e. 19 uS additional near the cutoff, would not be perceptible. I.e., 19 uS of delay corresponds to .02 feet (0.25 inches) of travel at the speed of sound in air (1090 feet per second). Even with both ears working, it would probably be undetectable. At 8kHz, a change in group delay (vs. low frequencies) of 19uS corresponds to 55 degrees of extra phase shift (vs a flat delay)... which seems significant.... but you would get a similar size effect for one ear vs the other ear if you turned your head just enough to move one ear 0.25 inches closer to the speaker.   

This reference contains the following discussion:

http://en.wikipedia.org/wiki/Group_delay_and_phase_delay

..............................................
Group delay has some importance also in the audio field and especially in the sound reproduction field. Many components of an audio reproduction chain, notably loudspeakers and multiway loudspeakers crossover networks, introduce group delay in the audio signal. It is therefore important to know the threshold of audibility of group delay with respect to frequency, especially if the audio chain is supposed to provide a high fidelity reproduction. At the time of writing no extensive data is available, and the concept is often treated by "rule of thumb" or based on hunches and received wisdom. The best thresholds of audibility table has been provided by Blauert and Laws:
 Frequency    Threshold
  500 Hz         3.2 ms
  1 kHz          2 ms
  2 kHz          1 ms
  4 kHz          1.5 ms
  8 kHz          2 ms
.................................................................

Note: at 2kHz, a 1ms delay corresponds to 720 degrees of phase shift... and a 1ms delay also corresponds to 1 foot of distance at the speed of sound in air.

I agree that a non-linear phase vs frequency can increase (or decrease) the asymmetry of the time waveform... and that is usually considered desirable by AMers if the positive peaks are larger than the negative peaks.

I'm using a brick wall audio filter in my audio chain (usually set at either 7kHz or 4.5kHz) depending upon the band conditions.

Best regards
Stu   


Title: Re: PDM filters
Post by: WA1GFZ on February 05, 2008, 02:59:56 PM
TNX Stu,
now I can sleep tonight. fc


Title: Re: PDM filters
Post by: Steve - WB3HUZ on February 05, 2008, 04:16:56 PM
I'd be more worried about the group delay of the IF filters in your RX.


Title: Re: PDM filters
Post by: WA1GFZ on February 05, 2008, 04:28:40 PM
Steve,
Actually Racal has a line of phase controlled filters and another that is standard. These are crystal filters I have not looked at the mechanical filters but have that data.
I'm sure these same filters were used as an option in the Harris RF590A.


Title: Re: PDM filters
Post by: Rob K2CU on February 05, 2008, 08:00:24 PM
HI Frank,

I was discussing this issue with Max, and he reminded me that Group Delay is defined as the derivative (change) in phase relative to a change in angular frequency. Depending upon the bandpass characteristics of your microphonium preamp and, or graphic equalizer, you will probably have some group delay from that circuitry already.  A lot will depend upon the filter topology employed, Butterworth, Bessel, Chebychev, elliptic, etc. You would probably want to use a Butterworth filter for the PDM output as it has the most constant phase response in, the passband. Though it has a slower roll off than others, as long as your compromise between cutoff frequency and number of poles places PDM switching frequency components below the FCC emission requirements you will be fine. You would want the cut off to be perhaps twice the desired audio passband to minimize the effect, yet that from the microphone preamp filtering will probably dominate any group delay issues. 

Max also said that group delay is significant when differences in phase for different frequencies is an issue, such as multiple frequency digital modes.


Title: Re: PDM filters
Post by: steve_qix on February 06, 2008, 12:23:02 AM
Mark,
I would like to see that because I also looked at group delay and again wonder how this effects modulation. This could be the source of shark fil waveform reported by users. The network would need to be flat for audio response so maybe need sto be a number of sections. fc

Hi Frank,

The "shark fin" waveform shows up equally on class H, analog series, PWM and screen modulators *if* (and the critical word here is IF) these modulators are flat from some very low frequency,  to some reasonable high frequency.  The pattern is destroyed by any sort of low frequency rolloff/phase shift.  I see the identical pattern coming directly from the audio equipment, with no modulator at all.

I first noticed this pattern with my first series modulated tube transmitter back in the early '70s.  Before that, the modulation transformers would introduce enough low frequency rolloff, and possibly phase shift, as to irradicate the pattern.  Once I actually heard the series modulated rig in headphones, I went on a fairly strong quest to completely eliminate modulation transformers from my equipment.

Or, as one of my old colleg roomates described:  "Steve is writing a book - 101 ways to achieve amplitude modulation without a modulation transformer"   :D

Regards,

Steve




Title: Re: PDM filters
Post by: WA1GFZ on February 06, 2008, 09:14:00 AM
So Steve what do you strive for in phase in a filter design. I looked at a bessel and the roll off is gentle slope compared to other designs.
I never considered this and was just looking for switching frequency attenuation....power supply background disease.

Rob,
Hope old wise Max is doing ok and continues to work on the soil ground system around the vertical.


Title: Re: PDM filters
Post by: nu2b on February 06, 2008, 01:22:47 PM
Both Steve-HUZ and Rob nailed it when they defined it as a total system problem. The total amplitude and phase distortion is a function of all the cascaded filters involved.

The receiver probably is the worst culprit due to its multipole sharp cut-off characteristic. Also generally a non-controlable part of the problem.

The PDM filter will usually cutoff at 15-20KC with principle function to attenuate the switching freq at 100-150KHZ.The PDM group delay will be fairly constant over approx the first 60% of of the cutoff, maybe 9-12KHZ, and will be the least of the phase problem.
The PDM filter should not be used to limit your audio bandwith.

If the audio filter preceding the PDM was implemented with typical opamp or passive analog filtering, the group-delay destortion would reappear and peak at the audio filter cutoff frequency where del(phi)/del(omega) is maximum.

If the audio filter preceding the PDM could be implemented via DSP, with say a 15Khz anti-aliasing filter followed by 44khz sampling. Then a linear-phase FIR filter could also be implemented which would solve the phase problem. Selectable bandwiths from 4-10Khz would be available just by recalculating the FIR filter coeffs. (Maybe put that old computer and sound-card to work here?)

Frank, one solution might be to use your "Softrock" SDR receiver with FIR filtering to solve the receiver problem, then hack the software for your audio/PDM side. The overall chain might then sound as good as I'm told the QIX-Mod monitor output sounds.

I can calculate some FIR coeffs for you to try if interested.

But all of this may be just Turd-Polishing, since it should be mentioned that a lot of folks use what they call Brick-Wall filters with probably very high delay destortion and still sound great on the air.

Also, a note on PDM filters can be found here
http://www.qsl.net/nu2b/txt/Harmonic2.txt


Regards,
BobbyT


Title: Re: PDM filters
Post by: WA1GFZ on February 06, 2008, 01:34:23 PM
Bobby T.,
I have my filter set at 8 KHz to get the highest possible attenuation at the sample frequency and see the phase is pretty tame at the low end. I suppose I shouldn't get excited about it because every filter I look at suffers from some form of phase shift because that is how filters work. I just wondered if this distortion matters and what is the best way to go. I think even your suggestion moves the phase shift further up stream so nothing really changes.
Flash back of tapped LC delay lines and pulse forming circuits, sorry guys


Title: Re: PDM filters
Post by: nu2b on February 06, 2008, 03:31:16 PM
Folks,
Here is 12Khz 0.5db Tcheby PDM modulator/filter modified to add notches.
The notches are offset slightly around 100Khz to reject modulation sidbands.
Part of the PDM Cout is incorporated into the RF deck as local RF bypass.
Is this thread fun, or what!
Regards,
BobbyT


Title: Re: PDM filters
Post by: Steve - WB3HUZ on February 06, 2008, 07:37:15 PM
Quote
I first noticed this pattern with my first series modulated tube transmitter back in the early '70s.  Before that, the modulation transformers would introduce enough low frequency rolloff, and possibly phase shift, as to irradicate the pattern.


I'd guess phase shift, since voice frequencies wouldn't be exceeding the frequency response of broadcast iron.


Title: Re: PDM filters
Post by: W1DAN on February 06, 2008, 11:00:54 PM
Hi Frank, BobbyT and all:

While I have not done a phase test of my PDM filter, I know mine needs work in better filtering. It starts attenuating at about 6kc and is almost (and should be) gone at my switching frequency of 100khz. I am using a simple 3 section butteworth LC filter. I also tried adding a series resonant LC to ground at 100khz, but it attenuated HF audio more. I'll study your Tchebychef filter more...it may be a great solution.

I know I have lotsa phase shift through my audio processing system. I recently built a 16 pole elliptical LPF/clipper that feeds the PDM modulator chip. It is set to 6.5kc at this point. And it has loads of delay near the cutoff frequency. No biggie for me right now as I wanna limit my occupied bandwidth and my peaks are well controlled. And yes, an average rx will have it's own phase problems.

Sometime I will also try to increase my PDM frequency to 150 or 200khz. This should give me more space before the PDM filter attenuation.

If I had loads of time, I'd like to try an FIR filter on my Analog Devices DSP card. I'd love a brick wall filter with no phase shift before the PDM chip if that is ever possible.

Thanks for the thread and ideas...yes it's fun!

73,
Dan
W1DAN


Title: Re: PDM filters
Post by: Tom WA3KLR on February 07, 2008, 09:11:25 AM
Here is my Bobby T (hi Bobby!) filter simulation along with the group delay.  Similar group delay as my LPF but shifted out a half octave higher .  Of course there is the extreme phase shifts at the 100 kHz region.

Frank,

When you compare filters, also do a transient simulation with a step voltage and look at the transient response out of the various filters.  You may then want to do a FFT on the transient results and look at that.

Also, with LPF's with series and parallel resonant traps, drive the LPF with a switch at the switching frequency (application simulation) and measure the circulating currents you get in the trap capacitors.

As I recall, I liked the transient response of my LPF better than the 2 section Butterworth LPF (believe it or not).


Title: Re: PDM filters
Post by: Steve - WB3HUZ on February 07, 2008, 10:16:55 AM
Quote
When you compare filters, also do a transient simulation with a step voltage and look at the transient response out of the various filters.
]

Good point! Lots of them will have some overshoot. This will either cause overmodulation or will require the average audio level to be reduced - to avoide the overmodulation.


Title: Re: PDM filters
Post by: WA1GFZ on February 07, 2008, 10:52:57 AM
Well the input is some duty cycle of a square wave so at every duty cycle a DC component should come out down to the point where it goes discontinuous. This the best test. Attenuation curve just gets you close.


Title: Re: PDM filters
Post by: steve_qix on February 08, 2008, 02:02:26 AM
Hi !

Good discussion.

I haven't had any problem with overshoot in PWM filters so far.  This may be due to the fact that I keep the cutoff frequency well above the cutoff frequency of the low pass filter which preceeds the PWM generator (anti-aliasing).

In my current transmitter, the filter cutoff is 30kHz (for the PWM filter - 6 pole butterworth), with an effective switching rate of 240kHz.

Talk later and Regards,

Steve


Title: Re: PDM filters
Post by: WA1GFZ on February 08, 2008, 09:37:13 AM
Steve I think that is the better way to go but takes a couple more poles to get good ultimate rejection. My rig is at about 8 KHz and should be set higher. fc


Title: Re: PDM filters
Post by: steve_qix on February 09, 2008, 07:48:17 AM
Steve I think that is the better way to go but takes a couple more poles to get good ultimate rejection. My rig is at about 8 KHz and should be set higher. fc

Well, the only reason it works so well with such a high corner is due to the multi-phase nature of the modulator.  There are two 0% to 100% duty cycle PWM generators, synchronized to be 180 degrees out of phase, driving independent high level pulse amplifiers (modulators).  The outputs of these modulators each look into an inductor, which is the first element of the filter.  The outputs of these inductors are combined at the first capacitor of the filter, and the filter is single channel thereafter.  This doubles the "ripple" frequency.

In theory, I suppose it would be possible to carry the process forward to 4 modulators or more.  Each time, the effective ripple frequency is doubled, so 4 modulators would yield a 480kHz ripple.  This assumes absolute voltage balance between the modulators, and tracking of the pulse width changes across the modulators.  Any imbalance will result in the original switching frequency appearing at the combining element (the first capacitor), and the effectiveness of the system in reducing switching components will be compromised.  However, I find the system works very well in my current transmitter, and it is used in broadcast transmitters as well.

The implementation is definitely more complex than a single channel modulator  ;)

Regards,

Steve


Title: Re: PDM filters
Post by: WA1GFZ on February 09, 2008, 08:29:30 AM
Steve,
The TI samples I just received will do 1, 2 or 4 channels. More than two sounds like a lot of hardware. The only  advantage I see of multiple channels is running at a lower frequency for maybe better control near 100 % negative modulation. fc


Title: Re: PDM filters
Post by: steve_qix on February 09, 2008, 09:02:50 AM
Steve,
The TI samples I just received will do 1, 2 or 4 channels. More than two sounds like a lot of hardware. The only  advantage I see of multiple channels is running at a lower frequency for maybe better control near 100 % negative modulation. fc

Will the TI samples to 4 channels, each to a 100% duty cycle?  If so, that's a good part!  What is the part number?

So far, the multi-channel PWM chips I've seen don't go to 100% duty cycle.  These may be better!


Title: Re: PDM filters
Post by: WA1GFZ on February 09, 2008, 07:58:34 PM
Steve the part number is TPS40090 but the maximum duty cycle is 87.5%.
Look at the whole system. Your power supply will have a good amount of ripple on it so going to 100% just puts you into the ripple. 87.5% doesn't give you enough  peak output voltage then just raise the unregulated voltage a bit to compensate voltage you need.
I would do current transformers on each phase to provide feedback to the controller since it is a low voltage part. This would also allow the use of slope compensation if necessary.
The error amp is faster than the 25701 so suspect the comparator is up to the job. The internal op amp would make a nice balanced audio interface ahead of the error amp.
I found some app notes on the TI web site


Title: Re: PDM filters
Post by: W1DAN on February 10, 2008, 12:27:54 AM
Steve:

I am interested in your bi-phase PDM modulator more...

Why do you need two PDM generator chips to create the bi-phase switching pulses? I would think you could take a single PDM generator chip's output and then create an out of phase pulse by using an RC network and a comparator.

I do not have much time these days, but would like to do this someday.

Thanks,
Dan
W1DAN



Title: Re: PDM filters
Post by: WA1GFZ on February 10, 2008, 07:42:13 AM
Dan,
Both outputs can overlap to 100% duty cycle or not and they begin 180 degrees out of phase. Look up interleaved buck regulators to see some theory and app notes. This method is commonly used in low voltage high current power supplies to reduce ripple. The chip I posted will do up to 4 phase.
BTW, In current mode feedback you need time for the current transformer or inductor to reset so I wouldn't want it to go to full 100% because the feedback would go unstable.
100% would only work in an open loop system.


Title: Re: PDM filters
Post by: steve_qix on February 11, 2008, 07:40:20 PM
Steve:

I am interested in your bi-phase PDM modulator more...

Why do you need two PDM generator chips to create the bi-phase switching pulses? I would think you could take a single PDM generator chip's output and then create an out of phase pulse by using an RC network and a comparator.

I do not have much time these days, but would like to do this someday.

Thanks,
Dan
W1DAN



hi Dan,

I don't know if an R-C network and a comparator will quite do it, although it might.  With this two-phase system, the pulse trains have to be IDENTICAL, or you will end up with the original switching frequency showing up in the filter.  And of course, any nonlinearity in triangle (or input to any comparator) will cause major distortion.

You don't actually need THAT many more components to do this.  You need an additional driver and associated components.  I'm using the floating charge pump system I came up with for the driver.

By using two PWM generators, you get, essentially, double the resolution that you would otherwise get at the ripple frequency.  If you ran a PWM generator at 240kHz,  the operational bandwidth of the entire PWM generator has to be very high (probably above 10mHz to resolve a 2% duty cycle pulse, without integration).  On the other hand, if you run two PWM generators at 120kHz, the whole system's bandwidth requirement is 1/2 that of the 240kHz system (or the resolution is significantly improved), and you still have the advantage of a 240kHz ripple frequency becuase you are combining the outputs (180 degrees out of phase with each other).

Interesting system, for sure!  I wouldn't bother with a small-ish transmitter.  The added complexity is not worth it.

Regards,

Steve


Title: Re: PDM filters
Post by: W1DAN on February 13, 2008, 12:55:42 PM
Hi Steve, Frank and all:

I did look at some of the info online and see they use two PDM generators locked together. The results seem to be similar to a three phase power supply rectifier and filter. So I guess there is some reason not to just delay the output of one generator to create a second out of phase pulse train.

Thanks for the info....

73,
Dan
W1DAN
AMfone - Dedicated to Amplitude Modulation on the Amateur Radio Bands