This repository provides Python implementations of various missile proportional navigation guidance laws. These simulations model missile intercepts in both 2D and 3D space using different proportional navigation techniques.
Proportional navigation is a guidance method used by missiles to intercept moving targets. The basic principle is that the missile applies acceleration proportional to the rate of rotation of the line-of-sight (LOS) to the target.
The repository includes implementations of four different proportional navigation methods in both 2D and 3D:
- Pure Proportional Navigation (PPN) / 3D PPN
- True Proportional Navigation (TPN) / 3D TPN
- Augmented Proportional Navigation / 3D Augmented PN
- Generalized Proportional Navigation / 3D Generalized PN
In Pure Proportional Navigation, the missile's acceleration is applied perpendicular to its velocity vector, with a magnitude proportional to the line-of-sight (LOS) rate and the missile's speed. This method adjusts the missile's heading to nullify the LOS rate.
In True Proportional Navigation, the acceleration is applied perpendicular to the LOS vector, with a magnitude proportional to the LOS rate and the closing velocity. This method is commonly used in missile guidance systems.
Augmented Proportional Navigation extends TPN by adding a term to compensate for target maneuvers. Here, the acceleration includes an additional component proportional to the target's acceleration, assumed to be known (e.g., through sensor data).
Generalized Proportional Navigation is a broader framework where the acceleration direction can differ from being strictly perpendicular to the LOS or missile velocity. For this simulation, the acceleration is applied perpendicular to the relative velocity vector (target velocity minus missile velocity), with a magnitude proportional to the LOS rate and the relative speed.
-
Libraries:
numpy
for vector operations andmatplotlib.pyplot
for plotting. 3D versions usempl_toolkits.mplot3d
. -
Parameters: Navigation constant
$N = 4$ , time step$dt = 0.01$ s, max time 100 s, intercept distance 1 m. -
Missile G-Limit:
- Standard gravity
$g = 9.81$ m/s². - Maximum missile G-load
$\text{max_g} = 12$ . - Maximum missile acceleration
$\text{max_accel} = \text{max_g} \times g$ .
- Standard gravity
-
Initial Conditions:
- 2D: Target starts at (0, 0) moving right at 100 m/s; missile starts at (0, 10000) moving right at 200 m/s.
- 3D: Target starts at (0, 0, 0) moving right at 100 m/s; missile starts at (0, 10000, 0) moving right at 200 m/s.
- For Augmented PN, the target accelerates upward at 10 m/s².
- Simulation: Updates positions and velocities using Euler integration, stops when the missile is within 1 m of the target or time exceeds 100 s.
-
Acceleration Limit: The calculated missile acceleration command
$\mathbf{a}_m$ is checked against the maximum allowable acceleration$\text{max_accel}$ . If$|\mathbf{a}_m| > \text{max_accel}$ , the acceleration vector is scaled down to match the limit: $$ \mathbf{a}_m = \mathbf{a}_m \times \frac{\text{max_accel}}{|\mathbf{a}_m|} $$ - Output: Plots the missile and target trajectories with labels and a grid. 3D versions include z-axis visualization.
-
PPN:
- Acceleration: $$ \mathbf{a}_m = N \cdot V_m \cdot \dot{\sigma} \cdot \mathbf{m} $$
-
$V_m = |\mathbf{v}_m|$ ,$\mathbf{m}$ is perpendicular to$\mathbf{v}_m$ - Adjusts missile heading based on its own velocity.
-
TPN:
- Acceleration: $$ \mathbf{a}_m = N \cdot V_c \cdot \dot{\sigma} \cdot \mathbf{n} $$
-
$V_c$ is the closing velocity,$\mathbf{n}$ is perpendicular to the LOS. - Widely used due to its effectiveness against non-maneuvering targets.
-
Augmented PN:
- Acceleration: $$ \mathbf{a}_m = N \cdot V_c \cdot \dot{\sigma} \cdot \mathbf{n} + \frac{N}{2} \cdot \mathbf{a}_t $$
- Adds a term for target acceleration
$\mathbf{a}_t$ , improving performance against maneuvering targets.
-
Generalized PN:
- Acceleration: $$ \mathbf{a}_m = N \cdot V_r \cdot \dot{\sigma} \cdot \mathbf{n} $$
-
$V_r = |\mathbf{v}_t - \mathbf{v}_m|$ ,$\mathbf{n}$ is perpendicular to the relative velocity. - Interpreted as a variant where acceleration direction is more flexible, here chosen as perpendicular to relative velocity.
-
LOS Rate (
$\dot{\sigma}$ ):- 2D: $$ \dot{\sigma} = \frac{r_x v_y - r_y v_x}{r_x^2 + r_y^2} $$
- 3D: $$ \dot{\sigma} = \frac{\mathbf{r} \times \mathbf{v}}{|\mathbf{r}|^2} $$
-
Closing Velocity (
$V_c$ ): $$ V_c = -\frac{\mathbf{r} \cdot \mathbf{v}}{|\mathbf{r}|} $$ negative rate of range change. -
Direction Vectors:
- 2D: Computed by rotating the reference vector 90° counterclockwise
- 3D: Computed using cross products
- The target has constant velocity in PPN, TPN, and Generalized PN, but constant acceleration in Augmented PN to demonstrate its capability.
- The missile's speed may change since acceleration isn't constrained to be purely lateral, though in practice, speed might be constant with only direction changing.
- Initial conditions ensure the missile can intercept within the simulation time, but adjustments might be needed for different scenarios.
- Generalized PN's implementation is one interpretation; the Wikipedia article notes it allows varied acceleration directions, so alternatives (e.g., biased PN) could also be valid.
These programs provide a practical demonstration of proportional navigation principles in both 2D and 3D space, suitable for educational purposes or as a starting point for more complex simulations.
For further reading and visual explanations, check out these YouTube videos:
- Proportional Navigation Intro Solution Set - Section 2 Module 1 - Guidance Fundamentals
- Proportional Navigation Intro Solution Set - Section 2 Module 2 - Guidance Fundamentals
- The Homing Loop for Proportional Navigation Sim - Section 3 Module 1 - Missile Guidance Fundamentals
- Proportional Navigation in Three Dimensions with Zero Effort Miss - Section 5 Module 1
- Example of 3D Proportional Navigation with Zero Effort Miss - Section 5 Module 2
- How to Code Proportional Navigation in Matlab or Octave - Guidance Fundamentals - Appendix A