Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
jonjo9448yAim 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. -
jonjo9448yThis 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). -
jonjo9448yHere 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. -
jonjo9448yhttp://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) -
jonjo9448ySorry I would of made this collab a lot tidier if I was able to create and modify it from PC not phone.
-
jonjo9448y@alwaysmpe thank you for bringing this to my attention! If I could give you more +1's I would!
-
jonjo9448yPID 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.
-
I have a question: Once this works properly, what do you plan to do with it? Make a product out of it?
-
jonjo9448y@darksideplease is still very tricky getting the values of kp, ki and kd right for the system. Coding PID was the easy part..
-
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. -
jonjo9448y@brunohcastro I have modeled the system in javascript and am now getting very close results on the actual system.
-
@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.
-
plumbus11948y@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
-
jstodberg238yI 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.
-
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.
Regulation of a heating circuit
Regulation of a heating circuit