How to determine phase shift
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kabit Kishore
am 27 Okt. 2021
Beantwortet: Star Strider
am 27 Okt. 2021
I have obtained phases (In degrees) for two different material at different frequences. How do i calculate the phase shift between the two. I have attached the data. Initially i just subtracted the two values but i think that approach is wrong. Any help will be appreciated.
Kind regards
0 Kommentare
Akzeptierte Antwort
Star Strider
am 27 Okt. 2021
Subtracting them is likely appropriate, however unwrapping them first will likely produce the correct result.
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/780738/DATA.xlsx', 'VariableNamingRule','preserve')
Fv = T1.('Freq(Hz)');
MAT1 = T1.('MAT1(DEG)');
MAT2 = T1.('MAT2(DEG)');
figure
plot(Fv, MAT1, Fv, MAT2)
grid
MAT1r = deg2rad(MAT1);
MAT1ru = unwrap(MAT1r);
MAT2r = deg2rad(MAT2);
MAT2ru = unwrap(MAT2r);
figure
yyaxis left
plot(Fv, MAT1ru, Fv, MAT2ru)
ylabel('Unwrapped Phase (rad)')
yyaxis right
plot(Fv, MAT1ru-MAT2ru)
ylabel('Phase Difference (rad)')
grid
legend('MAT_1','MAT_2','Difference', 'Location','best')
xlabel('Frequency (Hz)')
It is necessary to convert them to radians before unwrapping them. I kept them as radians here, so use the rad2deg fucntion to convert them back to degrees if desired.
.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surrogate Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

