• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    PID-Controller implementation

    scheduled pinned locked moved Developers Zone
    4 posts 2 posters 2.6k views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • R offline
      ragflyer
      global: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 one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @ragflyer
        global: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.

        one-reply-to-this-post last-reply-time reply quote 0
        • R offline
          ragflyer
          global: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 one-reply-to-this-post last-reply-time reply quote 1
          • jkandasaJ offline
            jkandasa @ragflyer
            global:last-edited-by,

            @ragflyer Let me check this

            one-reply-to-this-post last-reply-time reply quote 0
            • first-post
              last-post

            0

            online

            644

            users

            532

            topics

            3.4k

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