43
jonjo
7y

Regulation of a heating circuit

Project Type
Existing project
Summary

Regulation of a heating circuit

Description
Aim is to regulate a heating circuit using a variable temperature valve and temperature sensor. I am trying to work out a method of controlling a variable temperature valve using 2 relays 1 to close the valve and the other to open it.
Tech Stack
C
Current Team Size
1
Comments
  • 1
    Aim is to regulate a heating circuit using a variable temperature valve and temperature sensor.
    I am trying to work out a method of controlling a variable temperature valve using 2 relays 1 to close the valve and the other to open it.
    Things I know:
    * The boiler flow temperature can be anything up to 80*C but my change dependent on the load so not fixed.
    * The temperature of the load I am trying to maintain.
    * How many seconds I have opened for.
    * The gradient of the flow.
    * The gradient of the load temperature.
    * A given temperature set-point that I need to achieve.
    * Using the delta of the set-point and temperature I know if I am falling or rising and if I am above or below set-point.

    Problems I face:
    * The less open the valve is the more lag I get thus causing a mass temperature rise making it near impossible to manage temperatures as low as 30*C.
    * All systems being controlled may be different causing the need to learn.
  • 1
    This is where I want to be at 30*C (test done controlling manually):
    http://prntscr.com/ehg4dx

    This is where I am (done with code):
    http://prntscr.com/ehg4zh

    Problem is you get don't know how much it is going to react by and all of a sudden you can get a massive in rush of hot water so need to let minor amounts through (but still get it up to temperature fast).
  • 0
    Here you can see the lag in the pipe using another sensor closer to the control valve:
    http://prntscr.com/ehg5wq

    The middle temperature is 1 meter from the valve before the control load.
  • 0
    http://prntscr.com/ehg7ld

    On this graph I am showing:
    * The set-point (bold flat line)
    * Flow temperature (highest temperature)
    * Temperature 1 meter from valve (middle temperature)
    * Load temperature (bottom temerature)
    * The top bar in red (opening the valve)
    * The top bar in blue (closing the valve)
  • 0
    Sorry I would of made this collab a lot tidier if I was able to create and modify it from PC not phone.
  • 10
    Look up pid controllers, sounds like what you're describing.
  • 1
    @alwaysmpe great shout!
  • 3
    @alwaysmpe thank you for bringing this to my attention! If I could give you more +1's I would!
  • 0
    PID controllers were very useful for this when you have the magic 3 numbers.. I made a javascript graph to simulate this which works perfect an ideal system however..... the heating load and flow temperature could change on me at any time making the results vary. I also have the problem that adjusting a valve takes time.
  • 0
    I have a question: Once this works properly, what do you plan to do with it? Make a product out of it?
  • 0
    @darksideplease already in the process of
  • 0
    @jonjo did you look of other people already did something similar?
  • 1
    @darksideplease is still very tricky getting the values of kp, ki and kd right for the system. Coding PID was the easy part..
  • 3
    I think you are overlooking some inputs in the PID controller design. Maybe you should model your system taking into account the valve position, flow speed, etc. This means more sensors, so more inputs in your transfer function for your system. If you choose to only measure your temperature and then take some action based on that, the system will be way more unstable, even reaching the point of complete oscillation. These overlooked variables might be your problem.

    To choose the right gains (kp, kd, ki), you need to model the system, define the parameters that the system must observe and then you can have a pretty solid controller.
  • 0
    @brunohcastro I have modeled the system in javascript and am now getting very close results on the actual system.
  • 0
    @jonjo Glad to hear that you are getting close to your goals. I'm a Electrical Engineering student, so I'm very excited in that kind of project (control systems are a huge part of my current classes). If you need more suggestions, please let me know, I'll be glad to help.
  • 1
    @brunohcastro I studied electrical electronic before becomming a dev 😊
  • 0
    @jonjo I've not read this post in detail but have you tried simulating the physics problem computationally? To get your k values? Edit : oops i see you're doing in js
  • 0
    I have pulled another resource in now someone who is trying to simulate in matlab
  • 0
    I would try a self tuning aka auto tuning pid algorithm.
  • 0
    I worked in power plants and I remember a good booklet from Landis&Gyr how to model your system. I will look around and see if I can find it. Also you can use a Laplace transform to model it.
  • 0
    A lazy but efficient approach could be a 4 layer percetron (machine learning).
  • 1
    Actually it would be much easier to use an arduino to control this. Or you could even make it work with an esp8266 cause then you have a network access via a webdashboard.
Add Comment