Radar Model

radarsimpy.Transmitter

class radarsimpy.Transmitter(f, t, tx_power=0, pulses=1, prp=None, f_offset=None, pn_f=None, pn_power=None, channels=None)[source]

Bases: object

A class defines basic parameters of a radar transmitter

Parameters:
  • f (float or numpy.1darray) –

    Waveform frequency (Hz). If f is a single number, radar transmits a single-tone waveform.

    For linear modulation, specify f with [f_start, f_stop].

    f can alse be a 1-D array of an arbitrary waveform, specify the time with t.

  • t (float or numpy.1darray) – Timing of each pulse (s).

  • tx_power (float) – Transmitter power (dBm)

  • pulses (int) – Total number of pulses

  • prp (float) –

    Pulse repetition period (s). prp >= pulse_length. If it is None, prp = pulse_length.

    prp can alse be a 1-D array to specify different repetition period for each pulse. In this case, the length of the 1-D array should equals to the length of pulses

  • f_offset (numpy.1darray) – Frequency offset for each pulse (Hz). The length must be the same as pulses.

  • pn_f (numpy.1darray) – Frequency of the phase noise (Hz)

  • pn_power (numpy.1darray) – Power of the phase noise (dB/Hz)

  • channels (list[dict]) –

    Properties of transmitter channels

    [{

    • location (numpy.1darray) –

      3D location of the channel [x, y, z] (m)

    • polarization (numpy.1darray) –

      Antenna polarization [x, y, z]. default = [0, 0, 1] (vertical polarization)

    • delay (float) –

      Transmit delay (s). default 0

    • azimuth_angle (numpy.1darray) –

      Angles for azimuth pattern (deg). default [-90, 90]

    • azimuth_pattern (numpy.1darray) –

      Azimuth pattern (dB). default [0, 0]

    • elevation_angle (numpy.1darray) –

      Angles for elevation pattern (deg). default [-90, 90]

    • elevation_pattern (numpy.1darray) –

      Elevation pattern (dB). default [0, 0]

    • pulse_amp (numpy.1darray) –

      Relative amplitude sequence for pulse’s amplitude modulation. The array length should be the same as pulses. default 1

    • pulse_phs (numpy.1darray) –

      Phase code sequence for pulse’s phase modulation (deg). The array length should be the same as pulses. default 0

    • mod_t (numpy.1darray) –

      Time stamps for waveform modulation (s). default None

    • phs (numpy.1darray) –

      Phase scheme for waveform modulation (deg). default None

    • amp (numpy.1darray) –

      Relative amplitude scheme for waveform modulation. default None

    }]

Variables:
  • rf_prop (dict) –

    RF properties

    • tx_power: Transmitter power (dBm)

    • pn_f: Frequency of the phase noise (Hz)

    • pn_power: Power of the phase noise (dB/Hz)

  • waveform_prop (dict) –

    Waveform properties

    • f: Waveform frequency (Hz)

    • t: Timing of each pulse (s)

    • bandwidth: Transmitting bandwidth (Hz)

    • pulse_length: Transmitting length (s)

    • pulses: Number of pulses

    • f_offset: Frequency offset for each pulse

    • prp: Pulse repetition time (s)

    • pulse_start_time: Start time of each pulse

  • txchannel_prop (dict) –

    Transmitter channels

    • size: Number of transmitter channels

    • delay: Tx start delay (s)

    • grid: Ray tracing grid size (deg)

    • locations: Location of the Tx channel [x, y, z] m

    • polarization: Polarization of the Tx channel

    • waveform_mod: Waveform modulation parameters

    • pulse_mod: Pulse modulation parameters

    • az_angles: Azimuth angles (deg)

    • az_patterns: Azimuth pattern (dB)

    • el_angles: Elevation angles (deg)

    • el_patterns: Elevation pattern (dB)

    • antenna_gains: Tx antenna gain (dB)

Waveform

█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
█                        prp                                            █
█                   +-----------+                                       █
█       +---f[1]--------->  /            /            /                 █
█                          /            /            /                  █
█                         /            /            /                   █
█                        /            /            /                    █
█                       /            /            /     ...             █
█                      /            /            /                      █
█                     /            /            /                       █
█                    /            /            /                        █
█       +---f[0]--->/            /            /                         █
█                   +-------+                                           █
█                  t[0]    t[1]                                         █
█                                                                       █
█     Pulse         +--------------------------------------+            █
█     modulation    |pulse_amp[0]|pulse_amp[1]|pulse_amp[2]|  ...       █
█                   |pulse_phs[0]|pulse_phs[1]|pulse_phs[2]|  ...       █
█                   +--------------------------------------+            █
█                                                                       █
█     Waveform      +--------------------------------------+            █
█     modulation    |           amp / phs / mod_t          |  ...       █
█                   +--------------------------------------+            █
█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █

radarsimpy.Receiver

class radarsimpy.Receiver(fs, noise_figure=10, rf_gain=0, load_resistor=500, baseband_gain=0, bb_type='complex', channels=None)[source]

Bases: object

A class defines basic parameters of a radar receiver

Parameters:
  • fs (float) – Sampling rate (sps)

  • noise_figure (float) – Noise figure (dB)

  • rf_gain (float) – Total RF gain (dB)

  • load_resistor (float) – Load resistor to convert power to voltage (Ohm)

  • baseband_gain (float) – Total baseband gain (dB)

  • bb_type (string) – Baseband data type, complex or real. Deafult is complex

  • channels (list[dict]) –

    Properties of transmitter channels

    [{

    • location (numpy.1darray) –

      3D location of the channel [x, y, z] (m)

    • polarization (numpy.1darray) –

      Antenna polarization [x, y, z]. default = [0, 0, 1] (vertical polarization)

    • azimuth_angle (numpy.1darray) –

      Angles for azimuth pattern (deg). default [-90, 90]

    • azimuth_pattern (numpy.1darray) –

      Azimuth pattern (dB). default [0, 0]

    • elevation_angle (numpy.1darray) –

      Angles for elevation pattern (deg). default [-90, 90]

    • elevation_pattern (numpy.1darray) –

      Elevation pattern (dB). default [0, 0]

    }]

Variables:
  • rf_prop (dict) –

    RF properties

    • rf_gain: RF gain of the receiver (dB)

    • noise_figure: Receiver noise figure (dB)

  • bb_prop (dict) –

    Baseband properties

    • fs: Sampling rate

    • load_resistor: Load resistor (ohm)

    • baseband_gain: Baseband gain (dB)

    • bb_type: Baseband type, real or complex

  • rxchannel_prop (dict) –

    Receiver channels

    • size: Number of receiver channels

    • locations: Location of the Rx channel [x, y, z] m

    • polarization: Polarization of the Rx channel

    • az_angles: Azimuth angles (deg)

    • az_patterns: Azimuth pattern (dB)

    • el_angles: Elevation angles (deg)

    • el_patterns: Elevation pattern (dB)

    • antenna_gains: Rx antenna gain (dB)

Receiver noise

█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
█  +-------------+                                              █
█  | Rx Antenna  |                                              █
█  +------+------+                                              █
█         | n1 = 10*log10(boltzmann_const * noise_temp * 1000)  █
█         ↓      + 10*log10(noise_bandwidth)  (dBm)             █
█  +------+------+                                              █
█  |    RF Amp   |                                              █
█  +------+------+                                              █
█         | n2 = n1 + noise_figure + rf_gain (dBm)              █
█         ↓ n3 = 1e-3 * 10^(n2/10) (Watts)                      █
█  +------+------+                                              █
█  |    Mixer    |                                              █
█  +------+------+                                              █
█         | n4 = sqrt(n3 * load_resistor) (V)                   █
█         ↓                                                     █
█  +------+------+                                              █
█  |Baseband Amp |                                              █
█  +------+------+                                              █
█         | noise amplitude (peak to peak)                      █
█         ↓ n5 = n4 * 10^(baseband_gain / 20) * sqrt(2) (V)     █
█  +------+------+                                              █
█  |     ADC     |                                              █
█  +-------------+                                              █
█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █

radarsimpy.Radar

class radarsimpy.Radar(transmitter, receiver, location=(0, 0, 0), speed=(0, 0, 0), rotation=(0, 0, 0), rotation_rate=(0, 0, 0), time=0, interf=None, seed=None, **kwargs)[source]

Bases: object

A class defines basic parameters of a radar system

Parameters:
  • transmitter (Transmitter) – Radar transmiter

  • receiver (Receiver) – Radar Receiver

  • location (list) – 3D location of the radar [x, y, z] (m). default [0, 0, 0]

  • speed (list) – Speed of the radar (m/s), [vx, vy, vz]. default [0, 0, 0]

  • rotation (list) – Radar’s angle (deg), [yaw, pitch, roll]. default [0, 0, 0]

  • rotation_rate (list) – Radar’s rotation rate (deg/s), [yaw rate, pitch rate, roll rate] default [0, 0, 0]

  • time – Radar firing time instances / frames :type time: float or list

  • interf (Radar) – Interference radar. default None

  • seed (int) – Seed for noise generator

Variables:
  • time_prop (dict) –

    Time properties

    • frame_size: Number of frames

    • frame_start_time: Frame start time

    • timestamp_shape: Shape of timestamp

    • timestamp: Timestamp for each samples

      [channes/frames, pulses, samples]

      Channel/frame order in timestamp

      [0] Frame[0] -- Tx[0] -- Rx[0]

      [1] Frame[0] -- Tx[0] -- Rx[1]

      [N] Frame[0] -- Tx[1] -- Rx[0]

      [N+1] Frame[0] -- Tx[1] -- Rx[1]

      [M] Frame[1] -- Tx[0] -- Rx[0]

      [M+1] Frame[1] -- Tx[0] -- Rx[1]

  • sample_prop (dict) –

    Sample properties

    • samples_per_pulse: Number of samples in one pulse

    • noise: Noise amplitude

    • phase_noise: Phase noise matrix

  • array_prop (dict) –

    Array properties

    • size: Number of virtual array elements

    • virtual_array: Locations of virtual array elements. [channel_size, 3 <x, y, z>]

  • radar_prop (dict) –

    Radar properties

    • transmitter: Radar transmitter

    • receiver: Radar receiver

    • interf: Interference radar

    • location: Radar location (m)

    • speed: Radar speed (m/s)

    • rotation: Radar rotation (rad)

    • rotation_rate: Radar rotation rate (rad/s)