demod_process
Complete demodulation chain implementation (from a RF or IF signal to a binary sequence).
Calling sequence
[demod,b] = demod_process(demod,x);
[demod,b,y] = demod_process(demod,x);
[demod,b,y,dbg] = demod_process(demod,x);
[demod,b] = demod_process(demod,x); [demod,b,y] = demod_process(demod,x); [demod,b,y,dbg] = demod_process(demod,x);
Parameters
- demod:
Demodulation object (can be created with the function demod_init)
- x:
Input RF or IF signal
- b:
Decoded binary sequence (hard-decoding)
- y:
Decoded symbols, which can be used for soft-decoding (optionnal output parameter)
- dbg:
Debug structure, containing the intermediate results of the demodulation process (optionnal output parameter)
Demodulation object (can be created with the function demod_init)
Input RF or IF signal
Decoded binary sequence (hard-decoding)
Decoded symbols, which can be used for soft-decoding (optionnal output parameter)
Debug structure, containing the intermediate results of the demodulation process (optionnal output parameter)
Description
Proceed to demodulation of the input signal. The demodulation consists in the following steps:
Downconversion to baseband (if the configured intermediate frequency is not null), including image frequency filtering.
Carrier recovery: detection and removing of carrier offset and residual frequency shift (with phase detector automatically choosen according to the currently used modulation scheme, and a second order loop)
Matched filtering: filter matched to the pulse shaping filter (e.g. moving average for NRZ, or RC/SRRC filter for RC/SRRC pulses, etc.)
Clock recovery: using an interpolator and a timing error detector automatically choosen according to the modulation being used.
Symbol demapping: conversion of the symbol sequence to a binary sequence using hard decoding (this step may not be used in the case of soft-decoding after the demodulation stage).
In case of frequency modulation (FSK, MSK, ...),
Example
// QPSK demodulator (NRZ matched filter), // sampling frequency = 1 MHz, IF = 200 KHz, FSYMB = 20 KHz demod = demod_init('qpsk', 1e6, 200e3, 20e3); // // Create a modulator to simulate RF signal mod = mod_init('qpsk', 1e6, 200e3, 20e3); b1 = prbs(100); // Random bit vector [mod,x] = mod_process(mod,b1); // // Proceed to demodulation [demod,b2] = demod_process(demod, x); // // Alignment of the two bit vectors (and phase ambiguity resolution) [b1,b2,nerrs,ber] = cmp_bits(b1,b2,'p',demod.wf.k); // // Verification if(nerrs ~= 0) error("No noise case and error(s) are detected!"); end; |