Multiplies x by exp(-j 2 pi fc t), low-passes via Butterworth
(requires signal), and returns envelope and unwrapped phase.
Examples
set.seed(1)
t <- seq(0, 2, by = 1 / 200)
x <- sin(2 * pi * 10 * t) * (1 + 0.5 * sin(2 * pi * 0.5 * t))
str(morie_dsp_complex_demodulation(x, fc = 10, fs = 200), max.level = 1)
#> List of 2
#> $ envelope: num [1:401] 0.0135 0.0685 0.1253 0.1832 0.2415 ...
#> $ phase : num [1:401] 0 -0.314 -0.628 -0.942 -1.257 ...
