need to reduce audio feedback in amplifier circuit

Where we discuss new analog design ideas for Pro Audio and modern spins on vintage ones.
k2panman
Posts: 11
Joined: Sat Oct 15, 2011 11:20 am

need to reduce audio feedback in amplifier circuit

Post by k2panman »

I have a system that is similar to a megaphone - a microphone with a preamp, a power amp to boost the signal to about 30W RMS and a speaker, battery powered (24-28V) all packaged together within a few inches of each other. I am fighting with feedback, which I thought I could prevent with mechanical design (isolating the microphone). This is not working well, so I need an electrical solution. My electronics at this point are pretty simple - the preamp is a single stage op amp, the power amp is class D using a TI TPA-3130 chip. What options do I have - what circuitry can I add - to reduce the possibility of audio feedback?
User avatar
mediatechnology
Posts: 5444
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: need to reduce audio feedback in amplifier circuit

Post by mediatechnology »

Is it resonant at one particular frequency?
I'm thinking this is some sort of amplified metal drum.

Maybe you should insert a graphic or notch EQ into the signal path, find the dominate resonance, filter it out, and then see if you can get enough output before feedback at another frequency.

If the curve is simple, build a fixed EQ into it, probably a broad notch.
If the curve is complex, talk JR into doing some PIC-based DSP code for hire.
k2panman
Posts: 11
Joined: Sat Oct 15, 2011 11:20 am

Re: need to reduce audio feedback in amplifier circuit

Post by k2panman »

It occurred at several frequencies - I had it out in actual field conditions, which is vastly different than in the shop where I can measure easily. I can record during field conditions and then analyze the recording - just thought of that. My field conditions are unusual, and I don't want to discuss them as it is a new product. What I know of electronic notch filtering for feedback control is that the feedback can occur at different frequencies depending on many variables, one being the room acoustics. My room acoustics are going to change, therefore the feedback frequency will change. I'd rather find some kind of circuit that would not be a notch filter, as I need this to work at different frequencies (in different room environments).
User avatar
JR.
Posts: 3700
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: need to reduce audio feedback in amplifier circuit

Post by JR. »

How serious are you about this? To automatically suppress feedback will take some cybernetic control.

I gather from your secretive description that the feedback is not occurring at a single set of frequency nodes but at different frequencies for different acoustic environments (no doubt due to different acoustic path length for the re-entrant sound)..

A relatively simple mechanical approach might be to use a noise canceling mic arrangement, so direct sound has high gain, and off axis sound is reduced.

A relatively hard approach is to detect in real time the path length/delay time, model that, and subtract out a replica of that unwanted repeat. This will be even more difficult if the sound device is hand held and moving around since the path delay could be changing as fast as the electronic brain learns it.

Less desirable approaches are adding some pitch bend to the audio path. That way as the reflected sound gets repeated, it gets shifted up or down slightly in pitch every pass through so doesn't reinforce itself.

Dynamically notching out feedback build ups can improve GBF (gain before feedback) but again if hand held those notch frequencies will change with path length of the feedback.

For speech quality they make some pretty cheap DSP chips that have 12 bit A/D built in... This would mainly affect your noise floor.

There may be a mic designer lurking around here (calling Ricardo) who might be able to offer practical advice about the noise canceling mic strategy.

JR

PS JR is not looking for work.. happily writing FFT code this week.
Cancel the "cancel culture", do not support mob hatred.
k2panman
Posts: 11
Joined: Sat Oct 15, 2011 11:20 am

Re: need to reduce audio feedback in amplifier circuit

Post by k2panman »

Thanks JR. You're on target with my issues here. I will have a constantly changing environment. I am interested in getting intelligible voice here - not necessarily hi fidelity, just easily intelligible. You mentioned pitch bend - I've read some about feedback eliminators used in stage sound systems - some seem to work on this principle - but I can't figure out how to design a circuit. Any tips are appreciated, but I could use a good audio design engineer's help here, if anyone out there is available for hire.
User avatar
JR.
Posts: 3700
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: need to reduce audio feedback in amplifier circuit

Post by JR. »

The pitch shift approach to feedback suppression was played with decades ago and generally dismissed as too low fidelity. In my judgement this probably depends on how much pitch shift you must apply for stability (it shouldn't need much). A small fixed amount will not be very objectionable or hurt intelligibility. The early pitch shifters used Analog delay devices and would alternately sweep up/down to avoid having to splice samples together.

When you shift the pitch of an audio sample, you generally clock in an audio sample into memory at one clock rate, and then clock it back out of memory at a different rate. Because the X seconds long audio sample is now playing back in more or less time, there will be overlap or gaps in the output. The shifting up/down alternately can cause the average output to take up the same average time as the input, but sounds subjectively worse (unnatural).

You can fill the gaps from shifting pitch higher, by repeating a small segment of audio, when shifting the pitch down you can just discard the extra data.

While I am often accused of suggesting an embedded microprocessor as the answer for EVERY design problem, I will live up to that stereotype and suggest a micro for this too... :lol: Back in the '70s a digital delay might cost thousands of dollars, and my early work on pitch shifting was exclusively using analog BBD or CCD memory chips, today a few dollars of digital chips can make a clean delay, with the smarts to make a pitch shift and even splice the samples together.

For example a cheap codec feeding digital samples to a circular addressed memory buffer ( modulo addressing capability is common in DSP chips). So write samples into memory at one rate, then read it out at a slightly slower rate to shift pitch down. When you get close to running out of data and need to jump to the next sample you want to stop the former sample at a zero crossing (to reduce clicks). Then start the next sample at another zero crossing, preferably with the same direction of slope as where last sample ended.

I would suggest first doing a proof of concept with a commercial pitch shifter. While I am not familiar with what is out there. Something as simple as a guitar chorus effect involves a varying pitch shift. I would suggest a fixed shift (down), but have not personally done this myself, and like I said this fell out of favor for professional sound reinforcement because it did not sound natural.

====

My other idea of modeling the delayed image, and subtracting out a replica of that, is a purely theoretical hypothetical... I have no idea if it works, while I think it should. I also have no idea how hard it would be to identify the path delay and null it out on the fly? I suspect it would be too hard for a hand held application...

So a fixed pitch shift (down) seems pretty practical, if the result sounds OK for your application.

JR
Cancel the "cancel culture", do not support mob hatred.
k2panman
Posts: 11
Joined: Sat Oct 15, 2011 11:20 am

Re: need to reduce audio feedback in amplifier circuit

Post by k2panman »

Thanks JR. I think that may work. I've been searching around the internet for circuits that would change pitch - found nothing that I can use - but there are a lot of guitar pedals out there that I may be able to experiment with. I'm not against a microprocessor (amazing, small, inexpensive devices!) and that is looking like it may be my best solution. I appreciate your suggestions. I'm going to try to find something in the guitar world that I can play with on the bench.

If there were some off the shelf designs that would work for my application, I would try to lay up a board and build it, but I'd rather hire a good audio design engineer for help with this project. I don't do well writing code either!

Are you free next week? :D
User avatar
JR.
Posts: 3700
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: need to reduce audio feedback in amplifier circuit

Post by JR. »

No I am not only not free but not even cheap... but my (good I hope?) advice is free. 8-)

BTW, they also make feedback killers products that use digitally controlled notch filters that they set automatically. While I am not optimistic you should at least try one to see if an off the shelf feedback killer product works well enough.

Dedicated pitch shift products are probably set up to deliver musically significant pitch shifts but may be able to make a small enough shift for your needs.

I am really not looking for work but would point you toward how I would do it. I am currently woking with a DSP chip with 2x16B DAC built inside (maybe around $5). Only 12 bit input A/D but you could oversample several times and probably pick up a couple more bits of resolution. You could also hang an external 16b A/D on it for about another $1. There may be enough on board RAM inside the DSP to make a pitch shift. A reasonable sample period for small pitch shift is around 100 mSec. So you need at most a couple hundred mSec of sample memory.

Delay design is pretty straight forward using modulo addressing. The only tricky part to code up is managing the zero crossing and sample splicing. One of my early technician jobs in the '1970s was working at a company that made pitch shifters (for speeding up talking book cassette tapes and shifting the pitch back down, so blind people could speed listen.)

I will be glad to keep answering questions, but I am not really looking for work.

JR
Cancel the "cancel culture", do not support mob hatred.
k2panman
Posts: 11
Joined: Sat Oct 15, 2011 11:20 am

Re: need to reduce audio feedback in amplifier circuit

Post by k2panman »

JR, I really appreciate your advice. Thanks for the tips on the DAC. I'm not too confident in my digital design, so before I try to build anything, I'll need a good audio design engineer. I would like to try an off the shelf pitch shift product as soon as possible to see if this will work and be acceptable voice quality.

I've looked at the guitar pedals and vocal processors - I haven't found anything that I can buy right now that does what I need. Roland is coming out with the VT-3 vocal processor - it has a slide control to alter pitch, and has an output that is just the altered audio, not mixed back with the original sound as most of the processors do. The VT-3 alters pitch one octave up or down by moving the sliding pot - not sure where how it picks the reference pitch in a changing voice. I'm going to preorder this unit ($200) but it won't be available until the end of March. I'm going to keep looking for other devices that would do the same thing.

With this unit, I can manually change pitch gradually up or down. So I could just "wiggle sinusoidally" the pitch control back and forth - either always below pitch or always above pitch, or cross zero. Would there be any reason one of these would work better than the others, or would I want to vary the pitch in a sawtooth pattern?
User avatar
JR.
Posts: 3700
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: need to reduce audio feedback in amplifier circuit

Post by JR. »

k2panman wrote:JR, I really appreciate your advice. Thanks for the tips on the DAC. I'm not too confident in my digital design, so before I try to build anything, I'll need a good audio design engineer. I would like to try an off the shelf pitch shift product as soon as possible to see if this will work and be acceptable voice quality.
Yes first step...
I've looked at the guitar pedals and vocal processors - I haven't found anything that I can buy right now that does what I need. Roland is coming out with the VT-3 vocal processor - it has a slide control to alter pitch, and has an output that is just the altered audio, not mixed back with the original sound as most of the processors do. The VT-3 alters pitch one octave up or down by moving the sliding pot - not sure where how it picks the reference pitch in a changing voice. I'm going to preorder this unit ($200) but it won't be available until the end of March. I'm going to keep looking for other devices that would do the same thing.
Pitch shift is relative, so it just shifts the input pitch up/down X amount.
With this unit, I can manually change pitch gradually up or down. So I could just "wiggle sinusoidally" the pitch control back and forth - either always below pitch or always above pitch, or cross zero. Would there be any reason one of these would work better than the others, or would I want to vary the pitch in a sawtooth pattern?
I suspect a fixed fairly slight pitch shift would be the least objectionable sounding.

The shifting above and below in the very old feedback killer, was to avoid the difficulty of splicing samples together when using analog delay technology.

FWIW the chorus effect is in fact a slight variable pitch shift up and down, to make a single voice sound like two or more.

There is probably some old pitch shift EFX unit you can buy off ebay to test this out.

JR
Cancel the "cancel culture", do not support mob hatred.
Post Reply