I have simultaneously recorded data coming from three pre-amplifiers with same input applied to these pre-amps. After post analysis, i found that there are phase and gain differences among these outputs ( which should be zero in ideal case). I set one preamplifer output as reference and measure the phase and gain difference values of other two preamps with respect to this reference using "fft technique" for a typical frequency value.
Now question is how can i use these phase/gain difference values to align all three signals in software?
Note: Idea is to save these phase/gain coefficients permanently and multiply them with each corresponding preamplifier's outputs (excluding reference ) sample by sample for each acquisition so that inherent phase/gain difference b/w preamplifiers can be adjusted without modifying the electronics.
You seem to be describing an equalizer. If you can use one of the amps output as the reference, then just generate the error signal between the reference and the amp being equalized and use that error to train the equalizer.
If you just want to do it once, train the equalizer with an appropriate test signal until the coefficients stabilize, then freeze the coefficients and just use that as the equalizing filter.
Thanks for reply. I am trying to calibrate electronics of linear array having three sensors. Only if calibrated properly, i will be able to find correct DOA of signals impinging on this array. Also, phase/gain difference is frequency dependent.
I suggest you calibrate by applying frequency sweep covering your signal range then do fft on input and each of three outputs. Each of three fft ratios of output to input is the system response.
Alternatively assume output1 is your reference then do fft ratio of output2 relative to 1 and 3 relative to 1.
then do ifft of ratios and get your coeffs at suitable resolution. Apply them on actual signals when system is running.
Just calibrating the amplifiers won't be enough. The sensors will need to be calibrated also. I used to work with DOA of acoustic signals.
We calibrated the mics (and amplifiers) with a tube with a speaker at one end and absorbing foam on the sides. The idea was to have the signal act like a plane wave. We fed the speaker with pseudorandom noise, but a frequency sweep would also work.
Thanks for reply. Your work seems quite close to what i want to do (calibration including sensors+preamps was next step for me). Can you kindly explain did you do this calibration (i.e. phase and gain adjustment as i understood) in hardware part or software part? My requirement is to do this in software but how to do this is a question.
We were interested in tracking vehicles. The signals had frequency peaks that varied with the type of vehicle, speed. and so on. In general the peaks were well above the ambient background noise.
We compensated the gain and phase errors in software. The procedure was to feed a white noise signal through a speaker that was the same distance to all the sensors, capture data from the sensors, then window and take an FFT. We would then take the freqency-by-frequency differences of the other sensors from the reference. When we were working with real signals we would use the relative errors in level and phase to cancel out the sensor and amplifier errors.
This is an example where DSP can really shine... using software to overcome limitations of hardware. Unfortunately, the solution to this particular problem is not as easy as you would hope. This is a classic deconvolution problem... each of the three channels have undergone an undesired convolution, i.e., a different frequency response because of the slightly different resistors, capacitors and inductors. The general solution is to convolve (filter) each of the three channels in such a way to undo the undesired convolution, thereby making the three the same. (I know you phrased this as making two of the channels match a third, but this isn't any easier). So you would need to (1) generate data from each of the channels to characterize its response, (2) calculate a separate filter kernel for each of the three channels, and (3) carry out the filters during actual operation. So it's going to be a bit of work. Here's a reference on the details of how it's done. Especially look at the example of the radiation detector pulse shortening, that's going to be closest to what you need. Feel free to e-mail me if you think I can help. Steve.Smith at DSPguide.com