GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
lock_detectors.h
Go to the documentation of this file.
1/*!
2 * \file lock_detectors.h
3 * \brief Interface of a library with a set of code and carrier phase lock detectors.
4 *
5 * SNV_CN0 is a Carrier-to-Noise (CN0) estimator
6 * based on the Signal-to-Noise Variance (SNV) estimator [1].
7 * Carrier lock detector using normalised estimate of the cosine
8 * of twice the carrier phase error [2].
9 *
10 * [1] Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance
11 * Evaluation of C/N0 Estimators using a Real Time GNSS Software Receiver,"
12 * IEEE 10th International Symposium on Spread Spectrum Techniques and
13 * Applications, pp.28-30, August 2008.
14 *
15 * [2] Van Dierendonck, A.J. (1996), Global Positioning System: Theory and
16 * Applications,
17 * Volume I, Chapter 8: GPS Receivers, AJ Systems, Los Altos, CA 94024.
18 * Inc.: 329-407.
19 * \authors <ul>
20 * <li> Javier Arribas, 2011. jarribas(at)cttc.es
21 * <li> Luis Esteve, 2012. luis(at)epsilon-formacion.com
22 * </ul>
23 *
24 * -----------------------------------------------------------------------------
25 *
26 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
27 * This file is part of GNSS-SDR.
28 *
29 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
30 * SPDX-License-Identifier: GPL-3.0-or-later
31 *
32 * -----------------------------------------------------------------------------
33 */
34
35#ifndef GNSS_SDR_LOCK_DETECTORS_H
36#define GNSS_SDR_LOCK_DETECTORS_H
37
38#include <gnuradio/gr_complex.h>
39
40/** \addtogroup Tracking
41 * \{ */
42/** \addtogroup Tracking_libs
43 * \{ */
44
45
46/*! \brief cn0_svn_estimator is a Carrier-to-Noise (CN0) estimator
47 * based on the Signal-to-Noise Variance (SNV) estimator
48 *
49 * Signal-to-Noise (SNR) (\f$ \rho \f$) estimator using the Signal-to-Noise Variance (SNV) estimator:
50 * \f{equation}
51 * \hat{\rho}=\frac{\hat{P}_s}{\hat{P}_n}=\frac{\hat{P}_s}{\hat{P}_{tot}-\hat{P}_s},
52 * \f}
53 * where \f$ \hat{P}_s=\left(\frac{1}{N}\sum^{N-1}_{i=0}|Re(Pc(i))|\right)^2 \f$ is the estimation of the signal power,
54 * \f$ \hat{P}_{tot}=\frac{1}{N}\sum^{N-1}_{i=0}|Pc(i)|^2 \f$ is the estimator of the total power, \f$ |\cdot| \f$ is the absolute value,
55 * \f$ Re(\cdot) \f$ stands for the real part of the value, and \f$ Pc(i) \f$ is the prompt correlator output for the sample index i.
56 *
57 * The SNR value is converted to CN0 [dB-Hz], taking into account the coherent integration time, using the following formula:
58 * \f{equation}
59 * CN0_{dB}=10*log(\hat{\rho})-10*log(T_{int}),
60 * \f}
61 * where \f$ T_{int} \f$ is the coherent integration time, in seconds.
62 *
63 * Ref: Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance
64 * Evaluation of C/N0 Estimators using a Real Time GNSS Software Receiver,"
65 * IEEE 10th International Symposium on Spread Spectrum Techniques and
66 * Applications, pp.28-30, August 2008.
67 */
68float cn0_svn_estimator(const gr_complex* Prompt_buffer, int length, float coh_integration_time_s);
69
70
71/*! \brief cn0_m2m4_estimator is a Carrier-to-Noise (CN0) estimator
72 * based on the Second- and Fourth-Order Moments Method (M2M4)
73 *
74 * Signal-to-Noise (SNR) (\f$ \rho \f$) estimator using the Moments Method:
75 * \f{equation}
76 * \hat{\rho}=\frac{\sqrt{2 \hat{M}_2^2 - \hat{M}_4 }}{\hat{M}_2-\sqrt{2 \hat{M}_2^2 - \hat{M}_4 }},
77 * \f}
78 * where
79 * \f$ \hat{M}_2=\frac{1}{N}\sum^{K-1}_{k=0}|P[k]|^2 \f$, \f$ \hat{M}_4 = \frac{1}{K}\sum^{K-1}_{k=0}|P[k]|^4 \f$, \f$ |\cdot| \f$ is the absolute value,
80 * and \f$ P[k] \f$ is the prompt correlator output for the sample index k.
81 *
82 * The SNR value is converted to CN0 [dB-Hz] taking into account the coherent integration time, using the following formula:
83 * \f{equation}
84 * CN0_{dB}=10*log(\hat{\rho})-10*log(T_{int}),
85 * \f}
86 * where \f$ T_{int} \f$ is the coherent integration time, in seconds.
87 *
88 * Ref: D. R. Pauluzzi, N. C. Beaulieu, "A comparison of SNR estimation
89 * techniques for the AWGN channel," IEEE Trans. on Comm., vol. 48,
90 * no. 10, pp. 1681–1691, Oct. 2000.
91 */
92float cn0_m2m4_estimator(const gr_complex* Prompt_buffer, int length, float coh_integration_time_s);
93
94
95/*! \brief A carrier lock detector
96 *
97 * The Carrier Phase Lock Detector block uses the estimate of the cosine of twice the carrier phase error is given by
98 * \f{equation}
99 * C2\phi=\frac{NBD}{NBP},
100 * \f}
101 * where \f$ NBD=(\sum^{N-1}_{i=0}|Im(Pc(i))|)^2+(\sum^{N-1}_{i=0}|Re(Pc(i))|)^2 \f$,
102 * \f$ NBP=\sum^{N-1}_{i=0}Im(Pc(i))^2-\sum^{N-1}_{i=0}Re(Pc(i))^2 \f$, and
103 * \f$ Pc(i) \f$ is the prompt correlator output for the sample index i.
104 * Ref: Van Dierendonck, A.J. (1996), Global Positioning System: Theory and
105 * Applications,
106 * Volume I, Chapter 8: GPS Receivers, AJ Systems, Los Altos, CA 94024.
107 * Inc.: 329-407.
108 */
109float carrier_lock_detector(const gr_complex* Prompt_buffer, int length);
110
111
112/** \} */
113/** \} */
114#endif // GNSS_SDR_LOCK_DETECTORS_H
float cn0_svn_estimator(const gr_complex *Prompt_buffer, int length, float coh_integration_time_s)
cn0_svn_estimator is a Carrier-to-Noise (CN0) estimator based on the Signal-to-Noise Variance (SNV) e...
float carrier_lock_detector(const gr_complex *Prompt_buffer, int length)
A carrier lock detector.
float cn0_m2m4_estimator(const gr_complex *Prompt_buffer, int length, float coh_integration_time_s)
cn0_m2m4_estimator is a Carrier-to-Noise (CN0) estimator based on the Second- and Fourth-Order Moment...