Skip to content

Research-focused implementation of nonlinear control systems featuring backstepping, sliding mode control, and feedback linearization methods.

Notifications You must be signed in to change notification settings

kryptologyst/Nonlinear-Control-Systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nonlinear Control Systems

Research-focused implementation of nonlinear control systems featuring backstepping, sliding mode control, and feedback linearization methods.

DISCLAIMER

WARNING: This software is for research and educational purposes only. Do not use on real hardware without expert review and proper safety measures. This implementation lacks safety-critical features required for real-world deployment.

Features

  • Multiple Control Methods: Backstepping, Sliding Mode Control, Feedback Linearization
  • Comprehensive Evaluation: RMSE, settling time, control effort, stability analysis
  • Interactive Demos: Streamlit-based visualization and parameter tuning
  • Modern Architecture: Type hints, comprehensive testing, CI/CD pipeline
  • Research Ready: Deterministic seeding, reproducible results, detailed metrics

Quick Start

Installation

# Clone the repository
git clone https://github.com/kryptologyst/Nonlinear-Control-Systems.git
cd Nonlinear-Control-Systems

# Install dependencies
pip install -e .

# For development
pip install -e ".[dev]"

Basic Usage

from src.controllers import BacksteppingController
from src.simulation import NonlinearSystemSimulator
from src.evaluation import ControlEvaluator

# Create controller
controller = BacksteppingController(
    desired_position=1.0,
    desired_velocity=0.0,
    alpha=2.0,
    beta=1.5
)

# Run simulation
simulator = NonlinearSystemSimulator()
results = simulator.run(controller, duration=10.0, dt=0.01)

# Evaluate performance
evaluator = ControlEvaluator()
metrics = evaluator.evaluate(results)
print(f"RMSE: {metrics.rmse:.4f}")
print(f"Settling Time: {metrics.settling_time:.2f}s")

Interactive Demo

streamlit run demo/app.py

Project Structure

src/
├── controllers/          # Control algorithms
│   ├── backstepping.py   # Backstepping control
│   ├── sliding_mode.py   # Sliding mode control
│   └── feedback_linearization.py
├── systems/              # System dynamics
│   ├── nonlinear.py      # Nonlinear system models
│   └── benchmarks.py     # Benchmark systems
├── simulation/           # Simulation framework
│   ├── simulator.py      # Main simulator
│   └── integrators.py    # Numerical integration
├── evaluation/           # Performance evaluation
│   ├── metrics.py        # Control metrics
│   └── evaluator.py      # Evaluation framework
└── utils/                # Utilities
    ├── seeding.py        # Deterministic seeding
    └── visualization.py  # Plotting utilities

config/                   # Configuration files
├── controllers.yaml      # Controller parameters
└── systems.yaml         # System parameters

tests/                    # Unit tests
demo/                     # Interactive demos
assets/                   # Generated plots and videos

Control Methods

Backstepping Control

Recursive design method for nonlinear systems with strict feedback form.

Sliding Mode Control

Robust control method using discontinuous control laws.

Feedback Linearization

Transforms nonlinear systems to linear systems through coordinate transformations.

Evaluation Metrics

  • Tracking Performance: RMSE, MAE, maximum error
  • Transient Response: Settling time, overshoot, rise time
  • Control Effort: Total control energy, control smoothness
  • Stability: Lyapunov analysis, stability margins

Configuration

The project uses Hydra for configuration management. Key parameters can be adjusted in config/:

# config/controllers.yaml
backstepping:
  alpha: 2.0
  beta: 1.5
  
sliding_mode:
  lambda: 1.0
  eta: 0.5

Development

Running Tests

pytest tests/

Code Formatting

black src/ tests/
ruff check src/ tests/

Type Checking

mypy src/

Safety Considerations

  • All simulations run in software only
  • No real-time constraints or hardware interfaces
  • Control gains are tuned for simulation stability
  • Emergency stop mechanisms are not implemented

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Citation

If you use this code in your research, please cite:

@software{nonlinear_control_systems,
  title={Nonlinear Control Systems: A Modern Implementation},
  author={Kryptologyst},
  year={2026},
  url={https://github.com/kryptologyst/Nonlinear-Control-Systems}
}

Nonlinear-Control-Systems

About

Research-focused implementation of nonlinear control systems featuring backstepping, sliding mode control, and feedback linearization methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages