Auto Tune Pid Controller Source Code

This project has been created to support tuning a PID controller for a home brewing setup using CraftBeerPI.It consists of a brewing kettle simulation, a PID controller (based on Arduino PID Library) and a PID autotune algorithm (based on Arduino PID Autotune Library)

Project goals

Sep 06, 2011  With minimum information, the PLC controller is connected to the control loop and during the auto tune process the plant reaction to the proprietary stimulus algorithm, is measured and compared in controlled iterations. The PID Server utility enables the control engineer to auto-tune PID loops for both the Vision and M90/91 controller series. Autotune PID what it is and how to use it. Ixmerlinxi - 5th February 2016. PID tuning refers to a proportional-integral-derivative control algorithm used in most “reprap” style. So let’s look at that part of it in marlin here is a sample of the code from one of my machines // PID settings: // Comment the following line to.

  • allow users to find PID parameters which provide a sufficient basis for further manual tuning
  • allow users to compare different PID parameters
  • help users to understand how different PID parameters (Kp, Ki, Kd) influence a PID controller's behavior (not only limited to home brewing setups)
  • speed up auto tuning

PID comparison

Compare different PID parameters using the default kettle setup:
sim.py --pid 'reference' 98 0.66 230 --pid 'Kp too low' 30 0.66 230 --pid 'Ki too low' 98 0.01 230

PID autotune simulation

Simulate a PID autotune run on a 50l kettle with a 4 kW heater:
sim.py --atune --volume 50 --power 4

Generated PID parameters using different tuning rules:

Pid Controller Tuning Method

Options

Auto
  1. Install git and python3
  2. Clone this repository:
    git clone https://github.com/hirschmann/pid-autotune.git
  3. Install project dependencies:
    pip install matplotlib

Pid Controller Theory

After you have completed these steps, you should be able to run sim.py as shown above. If plots are not shown, you have to configure the matplotlib backend, see What is a backend?

Comments are closed.