STM32F4- FFT - phase shift between the two signals in degrees
Bonjour / Hello
A ce jour j’utilise le code ci-dessous pour calculer les FFT et les harmoniques de deux signaux sinusoïdaux.
Je souhaiterais calcul le déphasage entre les deux signaux en degré.
Pour cela je souhaiterai avoir les parties imaginaires des FFT.
Est-ce possible ?
Quelles fonctions utilisées ?
Merci d’avance.
To date I am using the code below to calculate the FFT and harmonics of two sine wave signals.
I would like to calculate the phase shift between the two signals in degrees.
For that I would like to have the imaginary parts of the FFTs.
Is it possible ?
What functions are used?
Thak you
arm_rfft_fast_f32 (&s_arm_rfft_fast, p_in_Signal_1, MES_fft_temp, 0);
arm_cmplx_mag_f32(MES_fft_temp, p_mag_fft_out_Signal_1, FFT_SIZE);
float h2 = (p_mag_fft_out_Signal_1[2] / p_mag_fft_out_Signal_1[1]) * 100 ;
float h3 = (p_mag_fft_out_Signal_1[3] / p_mag_fft_out_Signal_1[1]) * 100 ;
arm_rfft_fast_f32 (&s_arm_rfft_fast, p_in_Signal_2, MES_fft_temp, 0);
arm_cmplx_mag_f32(MES_fft_temp, p_mag_fft_out_Signal_2, FFT_SIZE);
float h2 = (p_mag_fft_out_Signal_2[2] / p_mag_fft_out_Signal_2[1]) * 100 ;
float h3 = (p_mag_fft_out_Signal_2[3] / p_mag_fft_out_Signal_2[1]) * 100 ;
