• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    PID-Controller implementation

    Scheduled Pinned Locked Moved Developers Zone
    4 Posts 2 Posters 2.4k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      ragflyer
      last edited by

      Hi,
      I built actuators for the radiators in my room and connected it to mycontroller via MQTT successfully.
      Now instead of creating a set of rules with some kind of hysteresis I was wondering if it would make sense to implement something like a PID-Controller to keep the desired room temperature.
      How would you go about it?

      jkandasaJ 1 Reply Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @ragflyer
        last edited by

        @ragflyer we may write a script and execute every x second(s) once via a timer. We can implement PID-controller logic on a script.

        I never worked with PID-Controller, Kindly let me know is it possible to create a generic PID-Controller? If Yes, I can add this feature to MyController.

        1 Reply Last reply Reply Quote 0
        • R Offline
          ragflyer
          last edited by

          Do you have a sample script where there is an input from one sensor and an output to an actuator for me to study?

          A PID-Controller is actually quite universal. All adjustment to the process you want to control is set through the 3 constants kp, ki, kd.
          I imagine a new condition type "PID-Controller" in the Rules tab with settings of source sensor, kp, ki, kd, and destination actuator or operation.
          Is it possible to give the result value to an operation as argument, so it can send it to a sensor variable as payload?
          There are lots of ready implementations for the simple math, e.g. https://github.com/rudin-io/pid/blob/master/controller/src/main/java/li/rudin/pid/controller/PIDController.java

          jkandasaJ 1 Reply Last reply Reply Quote 1
          • jkandasaJ Offline
            jkandasa @ragflyer
            last edited by

            @ragflyer Let me check this

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            0

            Online

            587

            Users

            529

            Topics

            3.4k

            Posts
            Copyright © 2015-2025 MyController.org | Contributors | Localization