Open righthalfplane opened 2 years ago
Thanks for reaching out. So I think part of the confusion is with what the firhilbf
object is doing when you call interp_execute()
and decim_execute()
. The output you show above is about what I would expect given the input. Here's what's going on:
firhilbf_interp_execute_block()
is taking a complex-valued input with n
samples and interpolating it into a real-valued output with 2n
samples. It's really semantics here as each complex sample is really a pair (real and imaginary), but the important thing to note is that the effective output sample rate is doubled.decim
operation reverses this process.Below is the output of the unmodified example of firhilb_example.c with three signals:
interp
(complex -> real) on the inputdecim
(real -> complex) on interp
to provide nearly the same as the original inputIf you look at the corresponding spectral responses, you'll notice that I've shifted the plots of the complex signals to show how they align with the real-valued signals. But the time-domain series of the real-valued signal is similar to what you're seeing.
I have been trying to use the firhilbf routines, but I have not been getting what I expected. I modified the firhilb_example.c to start with a complex sine wave and added plotting output for my plotting program. When I look at the output for x and z, I see what I expected. For the y plot I expected to see twice the frequency and a constant amplitude, but I got like 5 times the frequency and a changing amplitude - were my expectations wrong ? Here are the plots and the modified program.
firhilb_example01.txt