Hi members
Good Day!
Recently I have got a work related to a PID with two discrete output signals which controls a motor. Client requirement is: PID block will generate two discrete outputs based on error calculated from Process variable and Set point, ie If Set point greater than Process Variable then Open DO (only a pulse) will generate and duration of the pulse will be based on magnitude of error. If Set point is less than Process Variable Close DO (only a pulse) will be generated, if Set point is equal to Process Variable no DO will be there. In short all features of PID should be present and function as per above logic. We have provided 32 channel DO card (client is not ready to purchase DO card with 8 Channel, 120/230VAC High side/ Isolated).
In reply to Tyler Anderson:
This is the requirement.
PWM also we tried. Since there are two do it is not working properly.
In reply to dvarghese:
What you are trying to accomplish is called "Increase - Decrease Control" and it is covered by Blevins and Nixon in their book "Control Loop Foundation - Batch and Continuous Processes". Please refer to Chapter 11.4 "Pulsed Outputs". They show the following arrangement:
pulsed.pptx
In reply to HECTOR H. TORRES:
HI,
just use a splitter block after the PID first -100%-0 and the second 0-100% If you want dead zone change low area to -5 - 5%.. and feed the value to the PWM or output.
Dont use fast pulsing with relays..[*-)][li]
If it´s a slow valve you don´t need PWM..
Niklas Flykt
Klinkmann Oy
Key Account Manager safety products
nikfly@gmail.com
In reply to Niklas Flykt:
You were pretty close, you just need to add a splitter. The splitter configuration should look like (In Array of 0-50, 50-100 and Out Array of 100-0, 0-100) This means that a PID output of 50% will be your "passive" state. (Neither DO will be on...) If you are using a standard DO (not a charm or HD channel) you can setup the DO channel as "Continuous Pulse Output Channel" and use an AO block instead of the PWM composite. (As Hector referenced in his attachment...) I assumed you were using a charm, which is why I recommended the PWM composite. In this case, per what you've posted, the requirement is to use a PWM type control. Without knowing the process application, it's hard to know if this is the "right" application for PWM but I'll just also assume that you have to meet the requirements to provide this. (We can spend a whole post on, when/what and why and also using software to fix a process/hardware issue, but I'll save that for another day...) I did a mock up below of what I was thinking. The only thing it's missing is the calc block that Hector shows in his. I'm assuming that the code in that calc block will prevent any more pulses in the same direction if the limit is already met. (i.e. if the valve is closed, don't allow anymore closed pulses...) Good luck and hopefully this gets you a little closer!
In reply to leirbag:
Unfortunately the big difference between what hector posted and what's being asked here is that there is an AI providing feedback. In the book Hector referenced, the second paragraph talks about this (and the control you suggested.) "The implementation of increase-decrease control is simplified when a measurement of the actuator position, such as valve stem position, is available for use in the discrete output interface" Since it appears that’s not available, the solution I posted will work, just not as well as if you had feedback, and it’ll be a little more difficult to implement. As I mentioned in my last post, I have no idea what type of process this control is going in, so some of the details will have to be customized to what is appropriate. I was only trying to provide a path to the solution, not a completely 100% engineered solution.
To work through the example you presented:
When the operator sets the output to 0% this will set the duty cycle to 100% output to the close DO. (In my example, the PID is set to Direct Acting, which I’m assuming is where the confusion came about.)
Hope that helps a little…
Look at this.
First, you have a normal PID, but in the output I have a CALC, this has a one calc where 30 is a time of the period of pulses.