shargy Posted September 14, 2011 Report Posted September 14, 2011 Hi everyone, I have problem and I need suggestion. I have to control room temperature with one motorized valve and I have only two digital outputs and room temperature sensor. I don't have analog position of the valve or digital inputs for opened or closed position.I want to use PID with or without PWM but I don't know how to do it. How to convert analog output of PID to impulses for open or close comand? Is it possible at all or I have to use simple comparison logic with dead band and open/close/pause times? Thank you!
Damian Posted September 14, 2011 Report Posted September 14, 2011 Hi everyone, I have problem and I need suggestion. I have to control room temperature with one motorized valve and I have only two digital outputs and room temperature sensor. I don't have analog position of the valve or digital inputs for opened or closed position.I want to use PID with or without PWM but I don't know how to do it. How to convert analog output of PID to impulses for open or close comand? Is it possible at all or I have to use simple comparison logic with dead band and open/close/pause times? Thank you! Hi Shargy, I had a little bit of difficulty understanding your question, but based on what you have said I don't think PID is a good option for this. Your probably better off using good old fashioned limit control. I think you are implying that you have no means of feedback on your motorized valve. Does it at least cut itself off if you move it all the way in one direction? If so, in the crudest method possible, I see you as setting up an ON and OFF thrshold. If the temp falls below the min threshold, you turn on and output and run the valve all the way open (I assume you are controlling Heating and not Cooling). Once the temp gets above the Upper threshold then turn the other output on and run the valve all the way in the other direction. Have the two outputs interlocked so that they do not stay on simulataneously. You should "time" both motions for the max travel time. (ie. If you know that the valve can go from open to close in less than 6 seconds, then put a timer in such that output will only stay on for at max 8 seconds. Without positional feedback or a definitive signal to valve position relationship, I don't see how you can do this any other way. I also don't even think this example I have given you is a very good method either. Hopefully maybe someone here can offer better advise.
shargy Posted September 15, 2011 Author Report Posted September 15, 2011 Hi, you are right, valve stops when come to ending position (has internal switches for that) and I dont have cooling. My description was incoplete, sorry because of that. After I post this topic I was looking in some books and I think that your first idea (limit control) is the right way for my solution. I will put two deadbends, for roughly and for fine regulation (with different times for open or close and for pause) for each diapason. Thank you, once again!
Emil Posted September 15, 2011 Report Posted September 15, 2011 Hi Shargy, I made such application long time ago. PID is a quite good option. You need ot set the full open time of the valve in resoluion of 0.1 sec as CV max (CV min = 0). Then, you will define register Virtual Valve Position (VVP). There you will store curent valve position. During PID operation, you will compare CV with VVP and will give pulse to digital outputs to open/close valve. The length of the pulse will be the difference between CV and VVP. In U90Ladder > Help menu > Examples > PID you can find a working example with this logic. Many peopel in the world already used this example and obtain quite good results. In case you use Vision - the logic is exactly the same!
shargy Posted September 15, 2011 Author Report Posted September 15, 2011 Hi Emil! That example is just what I need. I totally forgot to look at U90 examples. I will translate that project to VisiLogic in the morrning. Good night and thank you!
savohane Posted January 20, 2012 Report Posted January 20, 2012 I have a suggestion; It might be advisable to make a brand new PID2 block. There should be a feedback input in manual mode. There must be manual contron value input., why..? Manual mode is on, when PID is not on, so then PID don't control. When it is in manual mode, i can change output directly by chaning this manual input and it go straight to output. This output must be in internal memory. So, when i switch PID again to the AUTO- mode, it continues from that last output value smoothly. Also must have a feature that prevents bumpless setpoint. In this current version, this is not possible. In "Auto"- mode it always start from 0%! This PID live it's own life. In addition, windup should be prevented maybe by one bit, we don't need that kind of windup in real life. At present, this PID we can not be used for commercial activities. Now we are forced to buy smarter devices, and use Unitronics as a simple I/O- device.
Emil Posted January 21, 2012 Report Posted January 21, 2012 At present, this PID we can not be used for commercial activities. I strongly disageree with such statesment! PID, as it is, is used already with great success on thousends projects all over the world. This includes military and missle defend systems, development and production of advanced microchips, mixing lubricants (Cascade PID) and many other non standard projects! All you "suggests" below already exists and can be done easilly! About "bumpless" - take a look in PID examples - there is already such! About manual contgrol - don't forget you have PLC - PROGRAMMABLE device! You can program your manual control in Ladder, which I prefer, or you can set temporary requested PID parameters - both ways are legal and easy to perform! I'll recommend you to take a deeper look at relevant Help topics (!) and examples. Then, if you have some questions, contact me in the Forum or - much better - via Unitronics Support - on support@unitronics.com. I'm sure we can fix more than 99% of your needs before comming to suggestions! Now, I want to point very clear - we are fully open for ideas. Many interesting and useful functions were developed following ideas from the field! But I think it worth first to learn the product and to be sure you know it well, before making statesments like the one quoted above!
MVP 2023 Joe Tauser Posted January 21, 2012 MVP 2023 Report Posted January 21, 2012 Well said, Emil. RTFM. Joe T.
Dave Posted January 27, 2012 Report Posted January 27, 2012 Hello. I have a question that does not exactly apply to this topic, but is PID related......Could someone please tell me what is the maximum number of independant PID FB loops that can be active. I am planning to use V1040 with 3 IO-AI4-A02, to control 3 PID loops, but may have a future application for up to 20 PID loops. I'm not sure if software or hardware is the limiting factor. Dave
Emil Posted January 28, 2012 Report Posted January 28, 2012 Hi Dave, Good question! Please take a look on FAQ (Frequency Asked Questions) - on www.unitronics.com > Support page > FAQ. I'll be glad to know if the answer there really answers...
Dave Posted January 30, 2012 Report Posted January 30, 2012 Hi Dave, Good question! Please take a look on FAQ (Frequency Asked Questions) - on www.unitronics.com > Support page > FAQ. I'll be glad to know if the answer there really answers... Thanks Emil. I don't know how I missed that before. It answered not only my initial question, but also questions I didn't even know I would need to ask! dave
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now