Search the Community
Showing results for tags 'pid'.
Found 1 result
Introduction This program and its library make setting up PID controllers in Minecraft easy. Controllers are used whenever you want to maintain a certain speed, temperature etc. An example system in Minecraft would be a Big Reactors turbine: It takes an adjustable steam flow rate and has a speed that should be maintained at an optimal value of 1800 rpm. A turbine controller would therefore have the following inputs: 1. the current turbine speed 2. the target turbine speed (1800 rpm) and the following output: 1. steam flow rate (a value that would let the turbine reach and stay at 1800 rpm) This software uses a PID controller. It got its name after the three parts its output is calculated from. The output is the sum of: 1. P(proportional): This part is proportional to the error. (difference between target value and currently measured value) While it is directly minimizing the error, it alone often can't zero it completely. Too much of it can also lead to instability. (oscillations) 2. I(ntegral): This part is proportional to the sum of all errors accumulated over time. That makes it perfect to slowly remove the residual error left over by the proportional part, but it increases the tendency for overshooting. (or even oscillations) 3. D(erivative): This part is proportional to the change in error per time. It is therefore good to limit the speed of error changes. (preventing too fast error increases and slowing down decreases to avoid overshooting -> damping / increasing stability) But it is vulnerable to noisy measurements. (large changes divided by short durations -> big influence -> output becomes very noisy) The tricky part is determining the correct factors to have a responsive controller but no instabilities. (There is a small Tutorial in the next section.) If you are interested to learn more, here is a good introduction to controllers: Screenshots Example / Tutorial (Big Reactors Turbine) Man Pages API You can use the library via require("pid"). Functions Properties Dependencies Software only OpenOS Hardware RAM: almost nothing on top of what OpenOS is already using Installation Simply download the tar archive and extract it into the root directory. All files should then be there where they should be. Download (last update: 07.11.15) github: program and library github: sample controllers Ingame: #program + library: wget 'https://github.com/mpmxyz/ocprograms/raw/master/tars/pid.tar' tar -xf pid.tar #sample controllers: wget 'https://github.com/mpmxyz/ocprograms/raw/master/tars/pids.tar' tar -xf pids.tar OR oppm install mpmpid Known Issues currently none Feel free to ask, if anything is unclear. Control Engineering has never been part of my curriculum; so if you know more and would like to share something - like an automatic tuning algorithm, feel free to do so.