I have a system which its impedance, z = |z|∠θ, is variable and unknown and I want to estimate the impedance in this case I inject a sine current with a known amplitude and frequency to the system, I = sine(2*pi*f*t) and measured the output voltage.
So in this case we will have this equation:
Vout = I*|z|∠θ
I used a DAQ to sample the data and process it in PC. I wanted to know how can I measure the phase shift between "Vout" and "I" which is equal to the phase of the impedance using matlab?
It's a classical impedance meter setup. The usual method is quadrature detector, multiplying the measured signal with sin and cos reference, integrating the product over full cycles. Noise and harmonics are supressed, complex impedance respectively magnitude and angle can be calculated by basic trigonometric relations.