Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Latest commit

 

History

History
220 lines (106 loc) · 4.66 KB

README.md

File metadata and controls

220 lines (106 loc) · 4.66 KB

Note: Project Archived

For a new and improved version, see https://github.com/PIDTuningIreland/pyPIDTune


pytuneOPC

Python PID Tuner using OPC-UA

PyPI PyPI - Downloads PyPI - Python Version GitHub repo size PyPI - License

Windows Exe (no install required) -> https://github.com/Destination2Unknown/pytuneOPC/releases

To install use:

pip install pytuneOPC

PID tuning in 4 Steps:

A-> Record PRC using Logger
B-> Tune using PID Tuner
C-> Refine tune using PID Simulator
D-> Test tune with FOPDT Simulator for PLC using OPC-UA

Create a launch file:

examplelaunch.pyw #use pyw for no console  

PID Logger

OPCuaLog

To launch use:

from pytuneOPC.pidlogger import plclogger

plclogger.main()
    

Stage 1 - PID Tuner based on a CSV file of a Process Reaction Curve (PRC)

Notes and Limitations:

  • Assumes CV and PV data stored at 1 second intervals.

  • Assumes there is a single step in CV.

  • Ambient is calculated as an average of the PV prior to the step change.

  • Doesn't work correctly with a ramp in CV or with multiple CV steps.

N.B.
The PID tuning values are calculated for a PV with a standard range span of 100 in engineering units (e.g. 0-100 deg C or 50-150 deg F).
If the range of the PV has a different span the PID tuning values may need to be rescaled, depending on manufacturer:

  Example 1: PV range of 200-400 deg C -> PID Gains x2

  Example 2: PV range of 75-100 deg C -> PID Gains x0.25

To launch use:

from pytuneOPC.stage1 import csvtuner

csvtuner.main()

Direct Acting:

U_Tune

Reverse Acting:

U_TuneR


Stage 2 - Open loop tune

A.mp4

Premium Feature - https://github.com/sponsors/Destination2Unknown


Stage 3 - Closed loop tune

cl.mp4

Premium Feature - https://github.com/sponsors/Destination2Unknown


Stage 4 - Adaptive tuner

ad.mp4

Premium Feature - https://github.com/sponsors/Destination2Unknown


PID Simulator

Direct Acting:

SimA

SimB

To launch use:

from pytuneOPC.simulate import simulator

simulator.main()
    

FOPDT Process Simulator (PID Simulator) for PLC using OPC-UA

Simulates a Process:

OPCuaSim

To launch use:

from pytuneOPC.plcpidsim import plcsim

plcsim.main()
    

Windows Exe:

image