Jump to content
Sign in to follow this  
shargy

PID suggestion

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...