Optimizing Phase and Gain Alignment for DF Systems at 200KHz

In summary, you've recorded data coming from three pre-amplifiers, and found that there is a phase and gain difference among the outputs. You've set one preamplifier output as the reference and used "fft technique" to measure the phase and gain difference values for the other two preamps with respect to the reference. Now you want to use these phase/gain difference values to align all three signals in software.
  • #1
nauman
86
4
Hi all

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.

Thanks
 
Engineering news on Phys.org
  • #2
nauman said:
to align all three signals in software?
What do you mean by that? Do you want to normalise your data in some way or do you want to line up the actual amplifiers?
 
  • #3
sophiecentaur said:
What do you mean by that? Do you want to normalise your data in some way or do you want to line up the actual amplifiers?

I want to compensate the inherent phase and gain difference of two preamplifiers (with respect to third reference preamplifier) in software by some means for a typical frequency. In other words, i know that the output of say 1 preamplifier has an inherent phase shift of X deg/rad and gain diff of Y dB/linear at some frequncy Z (w.r.t 3rd preamplifier output) due to some electronic component's tolerance differences. My question is how to compensate these known X and Y shifts at frequency Z in the output of 1 preamplifier in "time domain" in real time?

Thanks
 
  • #4
nauman said:
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.
Sounds like you want to "calibrate" your acquisition setup to normalize the gain and phase shift for the 3 channels. So as you say, just put the same signal into all 3 inputs at once, and record the Vpp for each of the 3 channels. That gives you an amplitude scale factor for each that you can multiply each voltage sample point by (with appropriate scaling) in your acquisition software front end.

For the phase shift, you will calculate that based on the zero-crossing datapoints for the calibration waveform, and just time shift your input waveforms by the appropriate amount in your software front end to get their phases to line up after the shifting. The output data streams will be delayed by the channel with the maximum phase shift (there will be a little "pipelining" going on to align the 3 data streams). Your ability to align the phases will depend on your maximum sample rate, of course.

Does that help? Or am I just stating the obvious that you have already tried?
 
  • #5
berkeman said:
For the phase shift, you will calculate that based on the zero-crossing datapoints for the calibration waveform, and just time shift your input waveforms by the appropriate amount in your software front end to get their phases to line up after the shifting.

Thanks for help. Can i convert these calculated phase shifts in form of some complex number (corresponding to desired phase shift) so that when i multiply it with each sample of corresponding preamplifier output (in time domain), it automatically align its phase with reference preamplifier output phase?
 
  • #6
It would help if you could tell us more about the setup:
Frequency range?
Are frequencies being digitally synthesized?
Why do you need them phase aligned?
Are you trying to pre-process the signals so that they emerge from the pre-amps phase aligned, or post-process after the amps to obtain alignment?

One way to shift phase & magnitude is to use a vector modulator such as the LTC5599. The I&Q values that you input to the device are the rectangular coordinate representation (complex number) of the phase and amplitude shift (polar coordinates). Different devices have different frequency ranges.
 
  • #7
the_emi_guy said:
It would help if you could tell us more about the setup:
Frequency range?
Are frequencies being digitally synthesized?
Why do you need them phase aligned?
Are you trying to pre-process the signals so that they emerge from the pre-amps phase aligned, or post-process after the amps to obtain alignment?

One way to shift phase & magnitude is to use a vector modulator such as the LTC5599. The I&Q values that you input to the device are the rectangular coordinate representation (complex number) of the phase and amplitude shift (polar coordinates). Different devices have different frequency ranges.

Desired Frequency is centered about 200 KHz with 10 KHz bandwidth.
For calibration, i am using function generator for sinusoidal frequency signal geenration
These preamplifiers will eventually connect with sensors of linear array to find DOA and to find correct DOA, sensor preamplifier own phases must be aligned (i.e. no inherent phase shifts among them) .
I need to do post processing after amps (after digitization) in software for alignment as i do not want to change/modify electronics.
 
  • #8
What does DOA stand for here? I know Dead On Arrival and also a range of amplifiers that you can buy/
nauman said:
I need to do post processing after amps (after digitization) in software for alignment as i do not want to change/modify electronics
Your suggestion for an FFT method would be 'conceptually' ok, I think using an impulse or square wave test signal. You could compare the frequency domain versions for two amplifiers and use the recorded amplitude and phase differences for each frequency sample to correct the values (X amplitude ratio and + phase shift) from your working data and then return to the time domain.
Is there not some way of characterising a correcting digital filter characteristic, based on this amplitude / phase error results? This could involve less processor effort (than FFT twice) according to the accuracy you want because the phase errors would only be significant at hf and a FIR filter could be quite short.
 
  • #9
sophiecentaur said:
What does DOA stand for here? I know Dead On Arrival and also a range of amplifiers that you can buy/

Your suggestion for an FFT method would be 'conceptually' ok, I think using an impulse or square wave test signal. You could compare the frequency domain versions for two amplifiers and use the recorded amplitude and phase differences for each frequency sample to correct the values (X amplitude ratio and + phase shift) from your working data and then return to the time domain.
Is there not some way of characterising a correcting digital filter characteristic, based on this amplitude / phase error results? This could involve less processor effort (than FFT twice) according to the accuracy you want because the phase errors would only be significant at hf and a FIR filter could be quite short.

here DOA means Direction of Arrival. I think if i correct only for center frequency sample, it will work probably (as phase difference does not vary much in desired band of 10 KHz) but i have to test it. Is there any shorter way (other than FFT or FIR filter) like multiplying with some complex coefficient in time domain if i only do phase adjustment for center frequency only?
 
  • #10
nauman said:
Is there any shorter way (other than FFT or FIR filter) like multiplying with some complex coefficient in time domain if i only do phase adjustment for center frequency only?
To modify a signal, the time over which an FIR must act must be a function of the re-timing of the signal that's required (from measured phase). That could, at its simplest, just be a delay. For an amp with 10kHz bandwidth on a 200kHz carrier, the delay wouldn't be many samples (the amps will be pretty well matched, for sure. I could be very few samples if the only correction needed were for high frequencies. Are you planning to sample at 400kHz or will you sub-sample at something more commensurate with the 10kHz bandwidth? (suitable Nyquist filtering would be straightforward).
You really ought to do some actual measurements before you look into suitable methods and actually define the spec you need on the basis of that and the accuracy you need for the final result. You could waste a lot of time and worry if you over do this. Is there a spec sheet for these amps? That would tell you the spread and save even more effort.
 
  • Like
Likes berkeman
  • #11
nauman said:
Is there any shorter way (other than FFT or FIR filter)
Instead of correcting the Phase delay, think of it in the Time domain as differing time delays. In the digital domain, that would only require shifting the the signals by a few sample points. Seems the simplest.
 
  • #12
nauman said:
here DOA means Direction of Arrival.
Tom.G said:
Instead of correcting the Phase delay, think of it in the Time domain as differing time delays. In the digital domain, that would only require shifting the the signals by a few sample points. Seems the simplest.
Especially since you seem to be wanting to find the DOA from the time waveforms. Why are you even considering correcting the amplitudes? Just use zero-crossing delays (calibrated for frequency) to calculate the DOA. You should sweep your calibration waveform from the lowest to highest possible receive frequency (is this frequency variation due to Doppler shifts?), and calculate the delay to apply to each channel based on the frequency for each channel (the zero-crossing spacing).

Doesn't that seem like what you should be doing? Or is my idea DOA? :wink:
 
  • #13
A phase shift is equivalent to a time slope. You could possibly benefit from getting familiar with equivalents in the two domains. Do as I say, not as I do now. Lol.
There are some very simple FIR algorithms I believe.
 
  • #14
berkeman said:
You should sweep your calibration waveform from the lowest to highest possible receive frequency (is this frequency variation due to Doppler shifts?), and calculate the delay to apply to each channel based on the frequency for each channel (the zero-crossing spacing).
I'm assuming this is part of a bigger project and it would be useful to know the actual signal and system that's used for this 'D Effing' (AKA DOA).
 
  • Like
Likes berkeman
  • #15
sophiecentaur said:
used for this 'D Effing'
Please watch your language on the PF. Thank you. :wink:
 
  • Like
Likes sophiecentaur
  • #16
berkeman said:
Please watch your language on the PF. Thank you. :wink:
It's all in the mind, dear boy. Direction Finding was used when you were in short pants. ":wink:"
[Edit: when your Dad / Grandad was in short pants]
 
  • Like
Likes berkeman
  • #17
berkeman said:
Especially since you seem to be wanting to find the DOA from the time waveforms. Why are you even considering correcting the amplitudes? Just use zero-crossing delays (calibrated for frequency) to calculate the DOA. You should sweep your calibration waveform from the lowest to highest possible receive frequency (is this frequency variation due to Doppler shifts?), and calculate the delay to apply to each channel based on the frequency for each channel (the zero-crossing spacing).

Doesn't that seem like what you should be doing? Or is my idea DOA? :wink:

My sampling rate is not high enough to accurately delay the signal in terms of samples.
 
  • #18
nauman said:
My sampling rate is not high enough to accurately delay the signal in terms of samples.
Well that's awkward...
 
  • #19
So your sampling rate is not high enough to support the position detection specs that you'd like to achieve with your DOA algorithm?
 
  • #20
DFing at 200KHz? How many degrees of resolution do you need? Is this for acoustic application?
 
  • #21
berkeman said:
So your sampling rate is not high enough to support the position detection specs that you'd like to achieve with your DOA algorithm?

I have to work in frequency domain to find DOA by estimating the phase shifts introduced only by incoming signals direction
 
  • #22
nauman said:
My sampling rate is not high enough to accurately delay the signal in terms of samples.
Actually, the phase of a signal carried on samples is not quantised in sample intervals. Nyquist tells us that any signal that's sampled at (within) the sample rate can be reconstructed perfectly. That also means that phase can be shifted by any amount.
All that assumes that you are fulfilling the Nyquist criterion of course. But sampling can be at less than 200kHz, if that's your worry; sub sampling with a bit over 40kHz would work for you (with a bandpass Nyquist filter, rather than a low pass).
[Edit: the above assumes that the quantisation is sufficiently fine. There are limits to everything digital.]
 
Last edited:
  • #23
the_emi_guy said:
DFing at 200KHz? How many degrees of resolution do you need? Is this for acoustic application?
DF systems can use low frequencies (you have to DF the signal that you're given). A rotatable loop antenna can give a pretty good null on a good receiving site.
But, as usual, it would be nice to know more about the whole system and its planned method of operation. It's an Engineering Project and needs to be approached properly for any hope of success. Matching three amplifiers may well not be an issue at all as the final processing should be well capable of calibrating out any small variations in the amplifiers.
 
  • Like
Likes berkeman

What is Phase alignment?

Phase alignment is the process of adjusting the relative timing or phase of two or more signals to achieve a desired outcome. In the context of audio engineering, it involves aligning the phase of multiple audio signals to prevent phase cancellation and improve the overall sound quality.

What is Gain alignment?

Gain alignment is the process of adjusting the relative loudness or gain of two or more signals to achieve a balanced and consistent sound. This is important in audio engineering to ensure that all signals are at a similar volume level and to prevent clipping or distortion.

What is the difference between Phase and Gain alignment?

The main difference between phase and gain alignment is the aspect of the signal that is being adjusted. Phase alignment focuses on the timing or phase of the signal, while gain alignment focuses on the loudness or gain of the signal. Both processes are important in audio engineering to achieve a clear and balanced sound.

Why is Phase and Gain alignment important?

Phase and gain alignment are important in audio engineering because they can greatly improve the overall sound quality of a recording or live performance. Proper alignment helps to prevent phase cancellation, which can result in a thin or muddy sound, and ensures that all signals are at a consistent volume level, resulting in a more balanced and professional sound.

What are some techniques for achieving Phase and Gain alignment?

Some common techniques for achieving phase and gain alignment include using a phase meter or analyzer to visually identify any phase issues, using delay or time adjustment to align the phase of multiple signals, and using a compressor or limiter to adjust the gain of signals to achieve a balanced mix. It is also important to use quality equipment and to regularly check and adjust levels throughout the recording or performance process.

Similar threads

  • Electrical Engineering
Replies
4
Views
2K
  • Electrical Engineering
Replies
1
Views
5K
  • Electrical Engineering
Replies
16
Views
4K
  • DIY Projects
Replies
27
Views
5K
Replies
10
Views
2K
  • Quantum Physics
Replies
1
Views
2K
  • STEM Academic Advising
Replies
13
Views
2K
  • Mechanical Engineering
Replies
1
Views
3K
Back
Top