BrainSignal Simulator is a modular, web-based computational platform for modeling, simulating, and analyzing dynamical systems and neural computation models. It brings differential-equation systems and discrete neural network computation — under one unified simulation engine.
What problem does it solve? Studying computational neuroscience and dynamical systems usually means juggling different tools for different model types: one library for chaotic systems like Lorenz, another for spiking neurons, another for numerical ODE solvers, another for basic neural networks. BrainSignal Simulator instead provides a single, pluggable architecture where any model (chaotic system, biological neuron, or neural network) can be dropped into the same simulation loop, and any numerical integration method can be attached to it independently.
How it works, conceptually:
- A model (e.g. Lorenz system, LIF neuron, Izhikevich neuron, or ANN) defines its own state and its own differential equation (or, for ANN, its own forward-computation rule).
- A solver (Euler, RK4, Adaptive RK, Leapfrog, Verlet, Improved Euler) is attached independently — the same model can be simulated with different solvers to compare accuracy, stability, and performance.
- A central
SimulationEngine, paired with aSchedulerthat advances simulation time, drives the step-by-step evolution: at every tick, ODE-based models are advanced through the chosen solver, while ANN models bypass the solver entirely and perform a direct forward pass. - Every state is recorded into a
SimulationResult, which the API serializes back to the client as time series data ready for plotting. - On top of this core loop, the project also implements a small symbolic math engine (variables, constants, binary/unary expressions, and an evaluator) used to represent and evaluate model equations programmatically rather than hard-coding them, and a working Spiking Neural Network (SNN) built from multiple LIF neurons running in parallel, which additionally emits discrete spike events once each neuron's membrane potential crosses its threshold.
The project currently supports:
- Chaotic dynamical systems (Lorenz system)
- Biophysical neuron models (LIF, Izhikevich)
- Artificial neural networks (ANN, feedforward)
- Spiking neural networks (SNN, built from LIF neurons)
- Multiple numerical integration methods (Euler, Improved Euler/Heun, RK4, Adaptive RK, Leapfrog, Verlet)
| Module | Description |
|---|---|
| Simulation Engine | Central engine that drives time evolution, solver dispatching, and state recording |
| Numerical Solvers | 6 solvers: Euler, Improved Euler, RK4, Adaptive RK, Leapfrog, Verlet |
| Neural Models | LIF (Leaky Integrate-and-Fire), Izhikevich, ANN, SNN |
| Symbolic Math Engine | Custom expression system (Variable, Constant, Binary/Unary Expression, Evaluator) for defining equations |
| REST API | FastAPI backend with endpoints for simulation, ANN training/inference, and SNN execution |
| Web Frontend | Lightweight HTML/CSS/JS interface for visualization, no build tool required |
dx/dt = σ(y - x)
dy/dt = x(ρ - z) - y
dz/dt = xy - βz
dV/dt = ( -(V - V_rest) + R·I ) / τ
if V ≥ threshold → spike, V ← V_reset
dV/dt = 0.04V² + 5V + 140 - u + I
du/dt = a(bV - u)
| Solver | Used for |
|---|---|
| Euler | Fast approximation, LIF/Izhikevich in low-precision mode |
| Improved Euler (Heun) | More accurate alternative to Euler |
| RK4 | High precision — Lorenz, neuron models |
| Adaptive RK | Stiff systems, dynamic step-size control |
| Leapfrog | Energy-preserving systems |
| Verlet | Physics-based integration |