Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
easy-pi-tuner
Advanced tools
A Proportional-Integral (PI) controller that self-tunes its gains based on the system's response to minimize the error over time.
Traditional PI controllers rely on fixed gains that are manually tuned based on empirical testing or system analysis. While these controllers are effective in many scenarios, they may not adapt well to systems with changing dynamics or external disturbances.
The easy-pi-tuner
is designed to address this limitation. By dynamically adjusting its gains based on the system's response, it can adapt to varying conditions, potentially offering more robust control in diverse scenarios.
The SelfTuningPIController
class calculates the control output based on the difference between the setpoint (desired value) and the measured value. The control output is a combination of:
The unique feature of this controller is its ability to adjust the proportional (Kp) and integral (Ki) gains dynamically. If the error increases, the gains are adjusted to try to reduce the error, and vice versa.
The easy-pi-tuner
can be beneficial in:
npm install easy-pi-tuner
To use the SelfTuningPIController
, first import the module:
const SelfTuningPIController = require('easy-pi-tuner');
Then, create a new instance of the controller:
const controller = new SelfTuningPIController();
You can set desired values and update the controller based on measured values:
const desiredValue = 100; // Example setpoint
const measuredValue = 90; // Example current value
const controlOutput = controller.update(desiredValue, measuredValue);
The controlOutput
can then be used to control your system, and the controller will automatically adjust its gains based on the system's response.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Check example.js included with this module
Harshad Joshi @ Bufferstack.IO Analytics Technology LLP, Pune
FAQs
Self Tuning PI Controller at work
We found that easy-pi-tuner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.