Looking for someone with PID node experience

Aw geez, I got my scale confused

I'll get the nodes stuck in the flow and give it a shot, Thanks again!!

Show us the charts of what you get.

Will do, Will take a couple of days, they have already started running today, so won't be able to try it till tomorrow.

I've been messing with the flow you made, great work. I just thought I needed to add how we do startup, we start with the puller running at 40fpm, then adjust the speed to get it pretty close to spec (this value is usually between 42 and 44fpm) then turn on the PID. The tubing will never be below 40 and I don't think I've seen it above 48. I've talked to production and I'm going to give it a shot tomorrow morning.

If you add these nodes and feed them into the PID node then it will let you switch auto/manual from the dashboard, and in manual you can adjust the speed.

image

Unfortunately, at the moment, the node does not do a 'bumpless transfer' when you switch into auto, so you will get a kick when you switch into auto. There is a way of avoiding that, but I will have to remind myself how to do it. Can you try the rest first and make sure it works ok. There is no point me doing that work unless the rest of it is going to be used.

[{"id":"60bae40b.6d0e2c","type":"ui_switch","z":"b1e1b45f.b3fbd8","name":"","label":"Auto","tooltip":"","group":"c45a83a3.d00908","order":6,"width":5,"height":1,"passthru":true,"decouple":"false","topic":"enable","topicType":"str","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":70,"y":540,"wires":[["697a4eb0.e2a0e"]]},{"id":"265259bb.03f0ae","type":"ui_numeric","z":"b1e1b45f.b3fbd8","name":"Manual speed","label":"Manual speed","tooltip":"","group":"c45a83a3.d00908","order":8,"width":5,"height":1,"wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{msg.payload | number: 2}}","min":"30","max":"50","step":"0.1","x":100,"y":600,"wires":[["5f4629f0.1532d"]]},{"id":"5f4629f0.1532d","type":"range","z":"b1e1b45f.b3fbd8","minin":"30","maxin":"50","minout":"1","maxout":"0","action":"scale","round":false,"property":"payload","name":"Scale speed ","x":270,"y":600,"wires":[["873dc04f.474e98"]]},{"id":"873dc04f.474e98","type":"change","z":"b1e1b45f.b3fbd8","name":"disabled_op","rules":[{"t":"set","p":"topic","pt":"msg","to":"disabled_op","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":600,"wires":[["697a4eb0.e2a0e"]]},{"id":"c45a83a3.d00908","type":"ui_group","name":"PID","tab":"80cd4062.93a5","order":1,"disp":false,"width":"12","collapse":false},{"id":"80cd4062.93a5","type":"ui_tab","name":"PID","icon":"dashboard","disabled":false,"hidden":false}]
1 Like

The way I do it now, the value that I set during manual mode is modified with the output from the PID. I guess the thinking was that things were as good as possible before switching on the PID. I just ran the simulation, seems a little less stable, I think I'll just run the code as it was and just let it go, have them switch on auto straight away, that is the way the boss wants it to work anyway.

Do put it into manual mode when it is not controlling. That will stop it winding the integral up trying to get it under control. If you don't put it into manual it will start up with the speed way off.

First, I wonder whether we should take this off forum as we are getting further and further from node-red related issues. Is anyone else here watching this with interest?

Your mention of pressure and wall thickness made me think a bit more about the physics and maths. With two variables to adjust (speed and pressure) the ideal situation is to find aspects of the system to control that vary principally with only one of the variables, so that there is less cross coupling between the control loops.

I realised that in fact the puller speed does not directly control the diameter, what it controls is the cross sectional area of the plastic in the pipe. This is clear (I think), since the extruder is feeding out a fixed volume of plastic per second, so that amount of plastic must be passing through the puller each second. So if the volume of plastic/sec (after cooling) is k cu"/sec and the speed is v "/sec then the cross sectional area of plastic is k/v square inches. So there is a very simple relationship between speed and area. If my deduction is correct then it is the pressure in the pipe that controls the diameter (and the wall thickness for a particular cross sectional area).

Ideally therefore one could control the area using speed and control the diameter using the pressure, and the two should be, at least to a first order, independent. This does rely on being able to measure the inside diameter (or wall thickness) in real time. Is that possible? How do you measure the thickness?

Another thing that concerns me is that pipes have been extruded like this for 50 years, so I would have thought that control techniques would have been optimised decades ago, so I am not sure why we are having to work this out.

I for one find this thread fascinating ! please continue.
(or at least report back with the results...)

2 Likes

I am following to, it's very interesting.

OK, we will carry on here. I remember there have occasionally been mild admonishments when threads get too far off topic, as someone has to pay for the forum.

The wall thickness is measured ultrasonically in real time. Won't be able to test till Thursday or Friday unfortunately, I'll make sure to have results.

Can you put the thickness on the chart too? I would like to see how it varies and see whether my suggestion that the area is inversely proportional to speed is correct.

Do you use Influx and Grafana for data capture and display? The great thing about that is that you can easily go back and look at the data at any time.

I'd love to, but I have no idea how to do the data capture, we did run today with your PID and it worked flawlessly. They are going to run again tomorrow. I already had it set up to dump wall, diameter and feet into a file, I've added speed to it and I'm assuming you want to see the op value as well?

Love to do what? Add the thickness to the chart or using Influx/grafana.

If the former then I don't know what you mean. If the latter then, if you need to do it, then you have some googling and docs to read :slight_smile:

No idea how to use Influx/grafana. Would a .csv file be good enough?

Yes, csv will let me check the numbers look right.
Also show us what you see on the chart in the dashboard.

image
image

You haven't told us which column is which.