OverviewThis zip provides a comprehensive tool for tuning PID controllers in LabVIEW using the PyGAD genetic algorithm library in Python. It allows users to optimize PID parameters automatically to achieve desired control performance. This project is intended for educational purposes and as a practical example of interfacing Python with LabVIEW to leverage the power of genetic algorithms for control system optimization.
Features
Python-LabVIEW Integration: Interface between Python and LabVIEW using the VI Server, allowing for seamless communication and data exchange.
Single PID Optimization: Optimize a single PID controller's parameters to minimize error and control energy, improving system performance.
Dual PID Control: Simultaneously optimize two PID controllers, each handling different error ranges, to achieve a balanced and efficient control system.
Fitness Evaluation: Custom fitness functions that consider both the error between setpoint and process variable and the energy used by the control variable, ensuring robust and efficient control.
Performance Metrics Calculation: Calculate classic PID performance metrics such as rise time, settling time, overshoot, steady-state error, and various error integrals (IAE, ISE, ITAE).
Dependencies
PyGAD by Ahmed Gad - Python library for implementing genetic algorithms.
LabVIEW by National Instruments - Platform for developing and running virtual instruments.
Install the PyGAD library in Python: pip install pygad.
Ensure LabVIEW is installed and configured to use the VI Server.
Download and Extract:
Download and extract the provided zip file.
Open in LabVIEW:
Open the LabVIEW project file in LabVIEW to access the example VIs.
Read the tutorial and execute Run Python Script.
Execute the Python script to start the genetic algorithm optimization process.
Disclaimer
Non-Product Disclaimer: This tool is provided "as is" without any warranties or guarantees. It is not a commercial product and is intended for educational and example purposes only. The author does not provide support, upgrades, or bug fixes. Use at your own risk.
Acknowledgements
Special thanks to the developers of PyGAD for their contributions to the Python community, and to the National Instruments team for providing a robust platform in LabVIEW that allows for seamless integration with external tools.