Coder Social home page Coder Social logo

yap-controller's Introduction

yap-controller

Yet Another Process Controller - PID like conroller

Overview

For all graphs:

  • The "Duty Cycle Plot" shows duty cycle based on measured process value
  • The "Control Range" is the lower/upper process value range where the duty cycle is actively managed. For process values below the lower range the duty cycle will be set to 100%. For rocess values above the upper range the duty cycle will be set to 0%.
  • The "Duty Cycle Set Point" is initially an estimate.
  • The "Target Temp" is the stable temperature goal.

YAPover1

This is the initial configuration. As the temperature rises above 200 the duty cycle drops.

YAPover2

At some point the temperature stablizes, in this example 210 degrees. Because this is not the target temperature, the duty cycle set point is changed to the value at the intersection of the stable temperature (42.57564)

YAPover3

Changing the duty cycle set point redraws the plot line. This yeilds a new duty cycle (52.89203) for the current temperature (210). The cycle repeats itself until the measured temperature stablizes at the target temperature.

The following code was used to generate these graphs:

if __name__ == "__main__" :
    yap = YAPController (None ,
                      225.0 ,       # target process value (temperature)
                      30.0 ,        # initial set point (duty cycle)
                      PV_low = 200.0 ,  # lower control range temperature
                      PV_high = 235.0)  # upper control range temperature
    with open ("YAPover1.gnuplot", "w") as fil :
        print (yap.gnuplot (out_file = fil))
    with open ("YAPover2.gnuplot", "w") as fil :
        new_duty_cycle = yap.gnuplot (process_value=210, out_file = fil)
    print (new_duty_cycle)
    yap.set_duty_cycle (new_duty_cycle)
    with open ("YAPover3.gnuplot", "w") as fil :
        new_duty_cycle = yap.gnuplot (process_value=210, out_file = fil)
    print (new_duty_cycle)

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.