libpower is a Rust library containing algorithms commonly used in power electronics systems, targeted for use in embedded systems
src/
├── battery/ # Battery management systems
│ └── soc # State of Charge (SoC) estimation using EKF
│
├── control/ # Control algorithms
│ ├── cntl_2p2z.rs # 2-pole 2-zero controller
│ ├── cntl_3p3z.rs # 3-pole 3-zero controller
│ ├── cntl_pi.rs # Proportional-Integral (PI) controller
│ └── cntl_pid.rs # Proportional-Integral-Derivative (PID) controller
│
├── filter/ # Digital filters
│ ├── butterworth_hpf.rs # Butterworth high-pass filter
│ ├── butterworth_lpf.rs # Butterworth low-pass filter
│ ├── chebyshev_hpf.rs # Chebyshev high-pass filter
│ └── chebyshev_lpf.rs # Chebyshev low-pass filter
│
├── lib.rs # Crate root and public API
│
├── modulation/ # Modulation techniques
│ └── svpwm.rs # Space Vector PWM implementation
│
├── motor_control/ # Motor control algorithms
│ └── foc.rs # Field-Oriented Control (FOC)
│
├── mppt/ # Maximum Power Point Tracking (MPPT)
│ ├── incremental_conductance.rs # Incremental Conductance algorithm
│ └── perturb_and_observe.rs # Perturb & Observe algorithm
│
├── pll/ # Phase-Locked Loops (PLL)
│ └── spll_1ph_sogi.rs # Single-phase SOGI-based PLL
│
├── signal/ # Signal processing utilities
│ └── signal.rs # Signal utility functions
│
├── system/ # System-level implementations
│ ├── bms/ # Battery Management System
│ ├── ess/ # Energy Storage System
│ └── ups/ # Uninterruptible Power Supply
│ ├── off_grid/
│ └── on_grid/
│
└── transform/ # Power system transforms
├── abc_dq0.rs # ABC to DQ0 transformation
├── clarke.rs # Clarke transform
├── dq0_abc.rs # DQ0 to ABC transformation
├── iclarke.rs # Inverse Clarke transform
├── ipark.rs # Inverse Park transform
└── park.rs # Park transform