Demo - High-Performance Computing - Problem - Online Estimation

Infinite Parallel Stochastic Differential Equation (SDE) Simulation

Overview

This demo simulates parallel Stochastic Differential Equations (SDEs) using multiple processes, each representing a different SDE. These processes are simulated in parallel using Web Workers for improved performance, and the results are visualized on separate canvases. The SDEs use a gamma, sigma, and mu parameterization, creating unique behaviors for each process.

Key Concepts

  1. Stochastic Differential Equations (SDEs): SDEs describe systems influenced by random processes, often used in physics, finance, biology, and engineering. The equation used in this demo is of the form:

    dx=γ(μ−x)dt+σdW

    Where:

    • γ\gammaγ: Damping coefficient.

    • μ\muμ: Mean or drift.

    • σ\sigmaσ: Noise intensity.

    • dWdWdW: Random walk increment (Brownian motion).

    • dtdtdt: Time step.

  2. Parallel Processing: The simulation runs multiple SDEs in parallel, each with different parameters, using Web Workers to offload the heavy computation to separate threads, ensuring smooth rendering.

  3. Visualization: Each SDE process is plotted on its own canvas with different colors for clarity:

    • Blue for Process 1

    • Red for Process 2

    • Green for Process 3

    • Orange for Process 4

How It Works

  1. Web Workers: Each worker handles an independent SDE simulation. The workers update their state and send trajectory data back to the main thread to be drawn on the canvases.

  2. Canvas Display: Each process's trajectory is visualized in real-time, showing how the solution evolves over time under the influence of the random process.

  3. Trajectory Updates: The state of each process is updated periodically (every 50ms), and the trajectory is plotted on the corresponding canvas.

Features

  • Multiple Processes: The simulation runs 4 parallel SDE processes with different parameters (gamma, sigma, initial state).

  • Real-time Updates: Each process updates and visualizes its trajectory in real-time.

  • Independent Parameters: Each process has its own set of parameters, allowing for diverse behaviors.

Applications

Financial Modeling: Used to simulate stock prices, interest rates, or option pricing.
Physics: For modeling random processes like Brownian motion.
Biology: SDEs are often used to model population dynamics with random fluctuations.
Engineering: Applied in modeling system noise and uncertainty in control systems.