# Amplitude ratio and phase shift of two signals

Status
Not open for further replies.

#### Eugen_E

##### Full Member level 6
Hello,

I need to measure the phase difference and amplitude ratio of 2 signals of equal frequency (~1kHz), afected by noise and harmonics. The signals are sampled by soundcard on channels L and R, then filtered by a few bandpass biquad cells at 1 kHz.
I imagined 2 methods for measuring this:

1. Shifting a signal by 90°, multiplying with the other signal and obtaining the I and Q components, then filtering and computing the phase difference. The amplitude ratio can be estimated?

2. Doing a sine fit on both filtered signals, then obtaining the amplitude ratio and phase shift.
I never did this before but I found references on sine fitting for ADC characterization (only papers, no sample code ), and the joint fitting of the signals seems difficult.

What is your oppinion about these methods regarding speed and precision, low SNR performance... ? 2. has a big advantge?

Thanks

#### FvM

##### Super Moderator
Staff member
The answer depends on the nature of the input signal, I think. If it has exactly stationary frequency and phase, the "sine fit" promises better SNR due to a lower noise bandwidth. The joint fitting is estimating one frequency and two phase values and shouldn't involve problems.

Eugen_E

### Eugen_E

Points: 2

#### Eugen_E

##### Full Member level 6

This is for impedance measurement, first I will test at 1 kHz, so the signal is quite stable and has low phase noise.
If it works I plan to use 2 VCOs (1-10MHz), one feeding the impedance tested through a current probe. The second VCO - feeding a mixer, will downconvert the voltage and current proportional signals to 1 kHz. Those VCOs will have higher phase noise, but will be controlled by PLL to be at 1kHz difference in frequency. A fast response is preferred.

For sine fitting do you know of a C code freely available, or some examples? I could try to do a gradient least squares optimization, but I don't know if it's good enough and efficient.
Also I couldn't find some theory regarding the number of samples to be processed.

#### FvM

##### Super Moderator
Staff member
I don't understand the two oscillators concept. Usually impedance measurement is performed using synchronous demodulation with a reference from the generator signal. This avoids any need for a "sine fitting" or other kinds of frequency measurement or estimation methods. Sounds like you are complicating a simple thing.

For a digital implementation of a vectrial impedance measurement it's interesting to review the ADI AD5933 concept.

Status
Not open for further replies.

Replies
0
Views
1K
Replies
2
Views
2K
Replies
0
Views
3K
Replies
5
Views
1K
Replies
2
Views
2K