[Thread Prev][Thread Next][Index]

[ferret_users] Complex demodulation in Ferret



Hi Ferreters -

Here's a set of scripts to do complex demodulation. Complex demodulation is a type of bandpass filter that gives the (slow) time variation of amplitude and phase of the signal of interest in a specified frequency band. That is, if you have a time series X(t) that contains a signal of interest near a frequency omega, you can represent that signal as a bandpassed time series Y(t)=Amp(t)cos (omega*t+Phi(t)). Amp(t) and Phi(t) are the outputs of the script, which show how the amplitude and phase of the bandpassed signal vary with time. The reconstruction Y(t) can be checked to be the same as an ordinary triangle bandpass filter with the specified half-power limits, and can be used as an ordinary bandpass. For example, try plotting the reconstruction Y(t) over the original data.

The attached pdf file gives the math that is implemented in the scripts. Except for step 5 it is simple to understand and to implement in Ferret.

Four Ferret scripts are attached:

cdmod_1.go Simple script to produce the amplitude, phase and reconstruction (steps 1-4 of the attached writeup). Inputs are the variable to demodulate and the central frequency of interest.

cdmod_2.go Script to also do step 5 of the writeup: fit a line to the phase to make an estimate of the time-varying period of the bandpassed signal. This is much more involved because it requires dealing with phase jumps that occur at Phi=+-pi. (A real pain in the butt to implement, and my solution is highly inelegant, but seems to work, I think. See the ugly repeat loops in this script.)

cdmod_2.go requires 2 additional short scripts: advancephase.go and retardphase.go, also attached.

Complex demodulation is not used as much as it could be in oceanography/meteorology, but for one example of its use, see Fig.10 of Kessler et al (1995, JGR 100, 10,613-10,631. "Forcing of intraseasonal Kelvin waves ...."). Available on my website under publications.

If anyone has a better way to deal with 2pi phase jumps I'd like to hear about it.

Billy K
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@xxxxxxxx
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/people/kessler/


Attachment: Complex_Demodulation2.pdf
Description: Adobe PDF document


Attachment: cdmod_1.go
Description: Binary data

Attachment: cdmod_2.go
Description: Binary data

Attachment: retardphase.go
Description: Binary data

Attachment: advancephase.go
Description: Binary data


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement