An innovative framework for real-time physics and robotics simulations.
Project details
The Pratyaksh Framework introduces a self-limiting TVD explicit Runge-Kutta family designed for real-time applications in physics, robotics, and scientific computing. By mitigating the pitfalls of stiff latent spaces in neural ODEs, it offers a robust, explicit, and matrix-free solution that enhances performance without sacrificing stability.
The Pratyaksh Framework
A Self-Limiting Total Variation Diminishing (TVD) Explicit Runge-Kutta Family tailored for real-time physics applications, robotics, and scientific computing. Designed to navigate complex, stiff latent spaces without succumbing to numerical instability, it operates entirely in an explicit and matrix-free manner, offering a robust solution to challenges typically faced in continuous-depth machine learning such as Neural Ordinary Differential Equations (ODEs).
The update of the state in the Pratyaksh Framework is defined by the following rational operator:
$$ \vec{y}_{n+1} = \vec{y}_n + \frac{\frac{1}{6}\left(\vec{K}_1 + 2\vec{K}_2 + 2\vec{K}_3 + \vec{K}_4\right)}{1 + \frac{1}{2}\mathcal{D}(\vec{C}, \vec{K}_1)} $$
where the stages (\vec{K}_{i}) are calculated using standard Runge-Kutta formulas.
Two core formulations are implemented within the framework to handle different types of physical constraints:
Here is a sample implementation in Python demonstrating how to utilize a core function of the framework:
def pratyaksh_step(h, dt, f):
k1 = dt * f(h)
k2 = dt * f(h + 0.5 * k1)
k3 = dt * f(h + 0.5 * k2)
k4 = dt * f(h + k3)
numerator = (k1 + 2*k2 + 2*k3 + k4) / 6.0
C = k4 - k3 - k2 + k1
denominator = 1.0 + 0.5 * np.sum(C**2) / (np.sum(k1**2) + 1e-14)
return h + (numerator / denominator)
For a simplified C++20 header file implementation, the entire solver is encapsulated within a single file, making it straightforward to integrate into existing projects:
#include "pratyaksh.hpp"
#include <iostream>
#include <vector>
// Define a simple harmonic oscillator ODE
void harmonic_oscillator(double t, const std::vector<double>& y, std::vector<double>& dy) {
dy[0] = y[1];
dy[1] = -y[0];
}
int main() {
std::vector<double> y = {1.0, 0.0};
auto result = pratyaksh::step_formula_b(0.0, 0.01, y, ...);
std::cout << "y(0.01) = " << y[0] << "\n";
return 0;
}
The framework includes a comprehensive suite of benchmarks to verify numerical results and validate performance compared to traditional solvers. A detailed set of scripts for running benchmarks on different PDEs is provided which demonstrates the framework's versatility and reliability.
For academic references or if utilizing the framework in research, citation is encouraged as follows:
@article{raj2026pratyaksh,
title={The Pratyaksh Framework: A Self-Limiting TVD Explicit Runge-Kutta Family for Real-Time Physics, Robotics, and Scientific Computing},
author={Raj, Pratyaksh},
journal={Zenodo Preprints},
year={2026},
doi={10.5281/zenodo.23012055},
url={https://doi.org/10.5281/zenodo.23012055}
}
This framework stands as an innovative tool in scientific computing, offering efficient solutions to problems that involve complex dynamical systems, and enhancing the capabilities of research and development in real-time physics and robotics.
Comments
0Start the conversation
Share the first comment.