You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have found two potential issues while working with esp-dsp. These issues are unrelated to each other.
In the dsps_fft4real example. When the result of cplx2real() is converted from complex to real power values, a division of N is used (aka binsize*2) However I would argue that a division of (binsize)^2 should be used instead when converting to power.
Pow = ampl^2 --> Pow = (sqrt(Real^2+Img^2)/binsize)^2 --> Pow = (Real^2+Img^2) / binsize^2
So the scaling in the dsps_fft4real example should be (N/2)^2 instead correct?
In the documentation for dsps_cplx2real_sc16_ansi() it is stated that "Convert FFT result of complex FFT for real input to real array". However, as far as I understand, the result of cplx2real() is not real but complex. In the dsps_fft4real example the output of cplx2real() is also used as if it was complex. I understand that cplx2real has to be used when 1 real sequence is used as input, but is it not misleading to state that the output of cplx2real() is real?
The text was updated successfully, but these errors were encountered:
tom-borcin
changed the title
Two potential issues regarding dsps_fft4real example as well as documentation for cplx2real().
Two potential issues regarding dsps_fft4real example as well as documentation for cplx2real().
Apr 3, 2023
github-actionsbot
changed the title
Two potential issues regarding dsps_fft4real example as well as documentation for cplx2real().
Two potential issues regarding dsps_fft4real example as well as documentation for cplx2real(). (DSP-91)
Apr 3, 2023
We not use any divider because they could be different for direct and inverse FFTs. It’s up to user to apply any number.
To save processing time we take two real input arrays with length N and make one complex array length N, where first array is real part, and second is imag part. Then we process this complex array with FFT and we will have one complex spectrum. Then we take this complex spectrum and by simple operation split this complex array of length N to two complex arrays with length N/2 (cplx2real function). Each of these arrays will be complex spectrum or input real signal. The result of cplx2real is two complex spectrum arrays with length of N/2.
Hello. I have found two potential issues while working with esp-dsp. These issues are unrelated to each other.
In the dsps_fft4real example. When the result of cplx2real() is converted from complex to real power values, a division of N is used (aka binsize*2) However I would argue that a division of (binsize)^2 should be used instead when converting to power.
Pow = ampl^2 --> Pow = (sqrt(Real^2+Img^2)/binsize)^2 --> Pow = (Real^2+Img^2) / binsize^2
So the scaling in the dsps_fft4real example should be (N/2)^2 instead correct?
In the documentation for dsps_cplx2real_sc16_ansi() it is stated that "Convert FFT result of complex FFT for real input to real array". However, as far as I understand, the result of cplx2real() is not real but complex. In the dsps_fft4real example the output of cplx2real() is also used as if it was complex. I understand that cplx2real has to be used when 1 real sequence is used as input, but is it not misleading to state that the output of cplx2real() is real?
The text was updated successfully, but these errors were encountered: