필터 지우기
필터 지우기

How to unwrap the phase of a complex electrical impedance signal

조회 수: 43 (최근 30일)
Easa AliAbbasi
Easa AliAbbasi 2023년 10월 4일
답변: Sayan 2023년 12월 12일
Hi everyone,
I have a problem with unwrapping a phase. The real and imaginary parts of the phase are named as 'real_part' and 'imaginary_part, respectively, and attached to this question. When I plot the phase using atan2 function, I see a big jump in phase data. I tried to unwrap it using Matlab's unwrap function but it also did not work. The results are as shown:
Here is the code that I used:
phase = atan2(imaginary_part, real_part) * 180/pi;
phase_unwrapped = unwrap(atan2(imaginary_part, real_part)) * 180/pi;
fig_Phase = figure('Visible', true, 'Units', 'inches', 'Position', [0 0 20 20]);
subplot(1,2,1);semilogx(Frequency,phase,'b','LineWidth',2, 'DisplayName', 'Wrapped Phase');hold on
axis square; legend();
xlabel('Frequency (Hz)');
ylabel('Phase (degree)');
set(gca,'fontsize',28);box on;
xticks([1e0 1e1 1e2 1e3 1e4 1e5 1e6]);
subplot(1,2,2);semilogx(Frequency,phase_unwrapped,'r','LineWidth',2, 'DisplayName', 'Unwrapped Phase');
axis square; legend();
xlabel('Frequency (Hz)');
ylabel('Phase (degree)');
set(gca,'fontsize',28);box on;
xticks([1e0 1e1 1e2 1e3 1e4 1e5 1e6]);
hold off;
Could anyone help me fix this problem? The phase cannot be less than -90 degrees since this is a measuremental data. The phase jump occurs due to some simple operations.
  댓글 수: 5
Easa AliAbbasi
Easa AliAbbasi 2023년 10월 9일
Thank you for the response. This data is not a direct measurement. Three impedances are measured and after some mathematical operations, this impedance is calculated. All measurements are performed carefully and the measurement device was calibrated before every meaasurement. Moreover, the measurements are repeated 10 times and their mean values are used for the mathematical operations.
Mathieu NOE
Mathieu NOE 2023년 10월 10일
hello again
maybe the error is somewhere in the intermediate computations - have you somehow checked each individual measurement vs theory ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sayan
Sayan 2023년 12월 12일
Hi Easa AliAbbasi,
I understand from your issue that the "Phase" plot of your readings are not as expected.
I do not think there is any issue with the code.However,you mentioned in the comments that the "real_part" of the reading is of the resistance and the "imaginary_part" is of the capacitance reactance value, which implies that the "real_part" should always be positive and the "imaginary_part" should always be negative. I have these two observations about the data.
  • From the 29th row of "real_part.mat" the value becomes negetive, but the resistance value cannot be negetive.
  • From the 45th row of the "imaginary_part.mat" the value becomes positive, but the capacitive reactance value cannot be positive.
Those are the reasons that I think the issue is with the measured data. Whenever there is a change of sign in the data, the "atan2" and "unwrap" functions provide unexpected results.
You can find more information on "atan2" and "unwrap" in the following documentations.
Hope this helps in resolving the issue.

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by