# RF demodulation for dummies

Given a signal that's been FM encoded on a carrier wave, what are the individual steps I need to take to demodulate it, and recover the original signal?

I don't have a background in signal processing, I have a background in programming. I'm trying to solve a real-world problem:
I'm trying to demodulate a raw analog RF signal captured from a Laserdisc at 40 MHz. This RF signal contains a composite video signal centered at 8.1 MHz, two analog audio channels at 2.81 MHz and 2.3 MHz, and one digital data channel encoded at 1.75 MHz and below.
For a handy reference image, here's a visual representation: More specifics on the frequency ranges and other related info can be found in a concise summary here, and in the official documentation describing the final encoding format here.

Now, I've captured a signal like this straight from a Laserdisc. Under a spectral view, it looks like the following: Here I can clearly see the composite video signal encoded, in this case showing the end of a field, the vblank period, and the start of a new field. I can see the two analog audio channels encoded below, and at the bottom, a band of low-frequency noise which contains the digital channel data. I can also see the harmonic sidebands coming through, giving lower intensity "echoes" of the data at lower and higher frequencies than the encoded frequency.

When the composite video is decoded to a waveform, I expect to see a signal like this: The problem I'm having right now is, I don't really understand the math involved in demodulating the FM signals from the combined RF signal here.

I understand I can use some basic band-pass filtering to eliminate frequencies outside the bands I'm interested in, which would allow me to separate the audio, video, and digital signals from each other, but after that it's the actual process of de-modulating the FM-encoded data back into their data streams (i.e., turning FM encoded data back to a basic waveform), that I'm not getting right now.

For an answer here, I'm after something that explains this in layman's terms, so that if I was a green student walking into a classroom on signals processing for the first time (which I pretty much am here) I can understand what you're talking about. I still need it to be specific though, because ultimately, I need to understand this well enough so that I can write real code that performs these operations. I'm after a pure digital solution to this problem.

## 1 Answer

A good answer might constitute a few chapters in a good DSP text, making this question overly broad. So I'll sketch an over-simplified skeleton, where you will need to seek a decent rationale elsewhere.

Pretend your captured signal is just a vector (array of samples).

Move your signal of interest "down" to "baseband" (resulting in either 2 vectors (X,Y) or 1 complex vector (if you know complex arithmetic). Do this by multiplying by a vector of cosines, oscillating at -8.1 MHz, to get vector X, and by a vector of sines, oscillating at the same (negative!) frequency, to get vector Y. Low pass filter (to remove audio etc.) these 2 vectors with a cut-off somewhere around 2 or 3 MHz (see specs for your video).

The angle of a 2D vector of X,Y pairs (use atan2() to compute) will rotate with a speed proportional to the modulating signal (e.g. the video signal you want). The speed of rotation is the first derivative of the angle with respect to time. Or roughly, subtract successive angles, to get a time vector proportional to dA/dt. Unwrap/rewrap phase discontinuities as needed. Low pass filter (maybe somewhere around 2 or 3 MHz) to remove noise. Scale as needed. Result should be a vector containing your raw video signal (perhaps at the wrong scale, perhaps noisy, perhaps inverted, perhaps with/without gamma: fix if possible).

• I think I'm starting to get it. I've been thinking in 2D with X=time and Y=samples. Instead I need to think of a Y axis projected into the screen and time as Z, with my waveform being a spiral rotating around the Z axis in the XY plane. Since I know my carrier is a sine wave, I can estimate Y values from the original signal. There's no way to phase lock with the original carrier, but if I'm understanding correctly that wouldn't matter, as it would just alter the initial angle of the calculated XY vector, but I don't care about the angle itself, just the rate of change of the angle, correct? – Roger Sanders Jan 3 '19 at 0:59
• In reading from other sources, I came across references to a so-called "Hilbert transform" being involved in demodulation. Does that fit in somewhere here, or is that an alternate method of decoding? – Roger Sanders Jan 3 '19 at 0:59
{"ft_lang_label":"__label__en","ft_lang_prob":0.9404943,"math_prob":0.6960636,"size":2446,"snap":"2021-04-2021-17","text_gpt3_token_len":522,"char_repetition_ratio":0.114250615,"word_repetition_ratio":0.0,"special_character_ratio":0.20973018,"punctuation_ratio":0.10493827,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97164816,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-23T08:38:11Z\",\"WARC-Record-ID\":\"<urn:uuid:4a9d2c27-3507-4f6a-b34b-b97d366081c7>\",\"Content-Length\":\"171318\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:82128113-6ef3-4236-a9ce-3d49fbdabc0b>\",\"WARC-Concurrent-To\":\"<urn:uuid:fdb3b78c-b4a8-4c04-8e30-61ac7f5e304c>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://dsp.stackexchange.com/questions/54556/rf-demodulation-for-dummies\",\"WARC-Payload-Digest\":\"sha1:OQZLC3DAVAOYV7SF2UNHRAZHGO5OGAE4\",\"WARC-Block-Digest\":\"sha1:EASRO3XLBHRBPYKHQW6EP2TEULAVCRAF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618039568689.89_warc_CC-MAIN-20210423070953-20210423100953-00611.warc.gz\"}"}