Code Monkey home page Code Monkey logo

ivpid's Introduction

PID study

Credit

The original work is at here. I borrow this existing implementation and test it with some tuning procedure I have read.

Background

There are many propose method to tune a PID controller, and here I write down my finding in following these procedure to tune a PID controller

  1. Online trial and error method

Adopt from link

Here is the procedure

  • Find KP: Set τI=∞, and τD=0. Find KC such that the system is critically stable. Denote this value at KP, max

  • Find τI: Set KP=0.5KP, max, and τD=0. Find τI such that the system is critically stable. Denote this value at τI, min

  • Find τD: Set KP=0.5KP, max, and τI=2τI, min. Find τD such that the system is critically stable. Denote this value at τD, max

  • The tuning result is KP=0.5KP, max; τI=2τI, min; τD=0.5τD, max

Here are tuning steps

Step Result
1 (KP=2; τI=∞;τD=0) alt text
2 (KP=1; τI=0.012;τD=0) alt text
3 (KP=1; τI=0.006;τD=0.006) alt text
4 (KP=1; τI=0.006;τD=0.003) alt text
  1. Ziegler-Nicholas method

Detail please refer to link

  • Setting KI=0, and KD=0, and find ultimate gain Ku and oscillation periodTu

  • Setting KP, τI and τD according to this table

Control type KP τI τD
P 0.5Ku - -
PI 0.45Ku Tu/1.2 -
PD 0.8Ku - Tu/8
classic PID 0.6Ku Tu/2 Tu/8
Pessen Integral Rule 0.7Ku Tu/2.5 3Tu/20
some overshoot 0.33Ku Tu/2 Tu/3
no overshoot 0.2Ku Tu/2 Tu/3

Ziegler-Nicholas in action

Step Result
Set KP st. system oscillate. Ku=2/1 and Tu=0.02*2 alt text
P controller (KP=1; KI=0; KD=0) alt text
PI controller (KP=0.9; KI=27; KD=0) alt text
PD controller (KP=1.6; KI=0; KD=0.008) alt text
classic PID (KP=1.2; KI=60; KD=0.006) alt text
Pessen Integral Rule (KP=1.4; KI=87.5; KD=0.0084) alt text
some overshoot (KP=0.66; KI=33; KD=0.0088) alt text
no overshoot (KP=0.4; KI=20; KD=0.00533333) alt text

Result

  1. I run it in both windows and Linux and find that the tuning value is quite difference. It may because of the different implementation of 3rd parties packages.

ivpid's People

Contributors

ivmech avatar katefayra avatar

Watchers

James Cloos avatar Tom Lai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.