GNU Radio Radar Toolbox
static_target_simulator_cc.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 Communications Engineering Lab, KIT.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_H
22#define INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_H
23
24#include <gnuradio/tagged_stream_block.h>
25#include <radar/api.h>
26
27namespace gr {
28namespace radar {
29
30/*! Simulates the backscattering of a given signal on point targets.
31 *
32 * Implements the point scatter model. The input signal is the transmitted
33 * signal. The output signal is the received, backscattered signal, and
34 * contains one output signal per receive antenna.
35 *
36 * \section radar_target_modeling Target modeling
37 *
38 * The targets are modeled by the vectors \p range, \p velocity, \p rcs,
39 * and \p azimuth. All these vectors need to be of length H, where H
40 * describes the number of reflecting targets. The backscattered signal
41 * can either have a zero phase, or a random phase (controlled by
42 * \p rndm_phaseshift). The received signal will be the linear
43 * superposition of H signals, each of which are derived from the input
44 * signal by the following equation:
45 *
46 * \f[
47 * r_h(t) = b_h s(t - \tau_h) e^{j2\pi f_{D,h}}
48 * \f]
49 *
50 * The attenuation depends on the center frequency \f$f_C\f$, the radar
51 * cross section \f$\sigma_{\text{RCS},h}\f$, the distance of the target
52 * \f$d_h\f$ and the speed of light \f$c_0\f$:
53 * \f[
54 * b_h = \sqrt{\frac{c_0^2 \sigma_{\text{RCS},h}}{(4\pi)^3 d_h^4 f_C^2}}
55 * \f]
56 *
57 * The delay \f$\tau_h\f$ depends on the distance of the target:
58 * \f[
59 * \tau_h = 2\frac{d_h}{c_0}
60 * \f]
61 *
62 * The Doppler shift \f$f_{D,h}\f$ depends on the relative velocity and
63 * the center frequency:
64 * \f[
65 * f_{D,h} = 2\frac{v_{\text{rel},h}{c_0} f_C
66 * \f]
67 *
68 * The signals are added up to produce the total sum signal:
69 * \f[
70 * r(t) = \sum_{h=0}^{H-1} r_h(t)
71 * \f]
72 *
73 * \section radar_mimo_processing MIMO processing simulation
74 *
75 * This block has a limited capability of simulating multi-antenna
76 * reception. The \p position_rx vector determines the distance of every
77 * RX antenna from the origin (Note: The TX antenna is always in the
78 * origin). The length of the \p position_rx vector is thus also the number
79 * of output signals this block produces. For a simple, mono-static SISO
80 * radar, simply set position_rx to [0].
81 * The RX antennas are always laid out in a straight line. When multiple
82 * antennas are given, the target azimuth plays a role; an azimuth of zero
83 * is perpendicular to the line in which the RX antennas are placed.
84 *
85 * \section radar_hw_impairments Self-coupling
86 *
87 * Self-coupling describes the amount of the TX signal that is directly
88 * coupled into the RX path. When \p self_coupling is set to true,
89 * effectively, a target with zero velocity and range is added. The
90 * parameter \p self_coupling_db describes the attenuation of the
91 * self-coupling, a value of -10 means that the transmit signal is
92 * attenuated by 10 dB on the receive signal.
93 *
94 * \ingroup radar
95 */
96class RADAR_API static_target_simulator_cc : virtual public gr::tagged_stream_block
97{
98public:
99 typedef std::shared_ptr<static_target_simulator_cc> sptr;
100
101 /*!
102 * \param range Target ranges as vector (length H)
103 * \param velocity Target velocities as vector (length H)
104 * \param rcs Target RCS as vector (length H)
105 * \param azimuth Target azimuth as vector (length H)
106 * \param position_rx Position RX antennas. A value of [0] means
107 * there is one antenna, located in the origin
108 * (simple monostatic case).
109 * \param samp_rate Sample rate (samples per second)
110 * \param center_freq Center frequency (Hz)
111 * \param self_coupling_db Self coupling attenuation (dB)
112 * \param rndm_phaseshift Toggle random phaseshift on targets
113 * \param self_coupling Toggle self coupling
114 * \param packet_len Packet length key for tagged stream
115 */
116 static sptr make(std::vector<float> range,
117 std::vector<float> velocity,
118 std::vector<float> rcs,
119 std::vector<float> azimuth,
120 std::vector<float> position_rx,
121 int samp_rate,
122 float center_freq,
123 float self_coupling_db,
124 bool rndm_phaseshift = true,
125 bool self_coupling = true,
126 const std::string& len_key = "packet_len");
127
128 virtual void setup_targets(std::vector<float> range,
129 std::vector<float> velocity,
130 std::vector<float> rcs,
131 std::vector<float> azimuth,
132 std::vector<float> position_rx,
133 int samp_rate,
134 float center_freq,
135 float self_coupling_db,
136 bool rndm_phaseshift,
137 bool self_coupling) = 0;
138};
139
140} // namespace radar
141} // namespace gr
142
143#endif /* INCLUDED_RADAR_STATIC_TARGET_SIMULATOR_CC_H */
#define RADAR_API
Definition api.h:31
Definition static_target_simulator_cc.h:97
std::shared_ptr< static_target_simulator_cc > sptr
Definition static_target_simulator_cc.h:99
static sptr make(std::vector< float > range, std::vector< float > velocity, std::vector< float > rcs, std::vector< float > azimuth, std::vector< float > position_rx, int samp_rate, float center_freq, float self_coupling_db, bool rndm_phaseshift=true, bool self_coupling=true, const std::string &len_key="packet_len")
virtual void setup_targets(std::vector< float > range, std::vector< float > velocity, std::vector< float > rcs, std::vector< float > azimuth, std::vector< float > position_rx, int samp_rate, float center_freq, float self_coupling_db, bool rndm_phaseshift, bool self_coupling)=0
Definition crop_matrix_vcvc.h:28