Simulator
A Python module for radar simulation
—
Copyright (C) 2018 - PRESENT radarsimx.com
E-mail: info@radarsimx.com
Website: https://radarsimx.com
██████╗ █████╗ ██████╗ █████╗ ██████╗ ███████╗██╗███╗ ███╗██╗ ██╗
██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██║████╗ ████║╚██╗██╔╝
██████╔╝███████║██║ ██║███████║██████╔╝███████╗██║██╔████╔██║ ╚███╔╝
██╔══██╗██╔══██║██║ ██║██╔══██║██╔══██╗╚════██║██║██║╚██╔╝██║ ██╔██╗
██║ ██║██║ ██║██████╔╝██║ ██║██║ ██║███████║██║██║ ╚═╝ ██║██╔╝ ██╗
╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
- radarsimpy.simulator.sim_radar(radar, targets, density=1, level=None, log_path=None, debug=False, interf=None)
This function generates radar’s baseband response of a scene using the given radar and targets.
- Parameters:
radar (Radar) – The radar object used for the scene.
targets (list) –
The targets in the scene. It could be either an ideal point target or a 3D mesh object.
3D mesh target:
[{
- model (str) –
Path to the target model
- origin (numpy.1darray) –
Origin position of the target model (m), [x, y, z].
default [0, 0, 0]
- location (numpy.1darray) –
Location of the target (m), [x, y, z].
default [0, 0, 0]
- speed (numpy.1darray) –
Speed of the target (m/s), [vx, vy, vz].
default [0, 0, 0]
- rotation (numpy.1darray) –
Target’s angle (deg), [yaw, pitch, roll].
default [0, 0, 0]
- rotation_rate (numpy.1darray) –
Target’s rotation rate (deg/s), [yaw rate, pitch rate, roll rate]
default [0, 0, 0]
- permittivity (complex) –
Target’s permittivity. Perfect electric conductor (PEC) if not specified.
- unit (str) –
Unit of target model. Supports mm, cm, and m. Default is m.
}]
Ideal point target:
[{
- location (numpy.1darray) –
Location of the target (m), [x, y, z]
- rcs (float) –
Target RCS (dBsm)
- speed (numpy.1darray) –
Speed of the target (m/s), [vx, vy, vz].
default [0, 0, 0]
- phase (float) –
Target phase (deg).
default 0
}]
Note: Target’s parameters can be specified with
Radar.timestamp
to customize the time varying property. Example:location=(1e-3*np.sin(2*np.pi*1*radar.timestamp), 0, 0)
frame_time – Radar firing time instances / frames
density (float) – Ray density. Number of rays per wavelength (default=1).
level (str or None) –
Fidelity level of the simulation (default=None).
None
: Perform one ray tracing simulation for the whole framepulse
: Perform ray tracing for each pulsesample
: Perform ray tracing for each sample
log_path (str) – Provide the path to save ray data (default=None, no data will be saved).
debug (bool) – Whether to enable debug mode (default=False).
interf (Radar) – Interference radar (default=None).
- Returns:
A dictionary containing the baseband data, noise, timestamp, and interference (if available). {
- baseband (numpy.3darray) –
Time domain baseband data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- noise (numpy.3darray) –
Time domain noise data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- interference (numpy.3darray) –
Time domain interference data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- timestamp (numpy.3darray) –
Refer to Radar.timestamp
}
- Return type:
dict
- radarsimpy.simulator.simc(radar, targets, interf=None)
deprecated Please use simulator.sim_radar(radar, targets, interf=None)
Radar simulator with C++ engine
- Parameters:
radar (Radar) – Radar model
targets (list[dict]) –
Ideal point target list
[{
- location (numpy.1darray) –
Location of the target (m), [x, y, z]
- rcs (float) –
Target RCS (dBsm)
- speed (numpy.1darray) –
Speed of the target (m/s), [vx, vy, vz].
default [0, 0, 0]
- phase (float) –
Target phase (deg).
default 0
}]
Note: Target’s parameters can be specified with
Radar.timestamp
to customize the time varying property. Example:location=(1e-3*np.sin(2*np.pi*1*radar.timestamp), 0, 0)
- Returns:
{
- baseband (numpy.3darray) –
Time domain baseband data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- noise (numpy.3darray) –
Time domain noise data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- interference (numpy.3darray) –
Time domain interference data.
[channes/frames, pulses, samples]
Channel/frame order in baseband
[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]
- timestamp (numpy.3darray) –
Refer to Radar.timestamp
}
- Return type:
dict