Motorized PID with two Discrete Signals (Open & Close)

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

15 Replies

  • Can you post what you've tried so far? Most of the community is very eager to help, however, most of that is based on trying to teach and not to do other peoples work.

    If you have PCSD, there is a PWM (Pulse Width Modulation) composite that will do exactly what you are looking to do.
  • In reply to Tyler Anderson:

     This is the requirement.

  • Hi denciltvarghese,

    You need feedback signal from the motorized valve (position of the valve) translated into an analog input signal (4-20 mA I suppose). This signal have to be compared with the AO from your PID module. The scale of these two analog variables must be at least 0 - 400 to minimize the hysteresis of the valve (for 400 steps you obtain +- 0.25 hysteresis). After comparing these parameters you are capable to generate Open DO and Close DO signals. Is not necessary to modify the duration of the pulse, only to generate the pulse train (1 s period) on these two discrete ouputs. For the marshalling side you have to use low power 24VDC relays, with your necessary contact AC current .
  • In reply to Tyler Anderson:

    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:

    Hi,

    I agree with you, the number of switching cycles is limited for a relay (from hundreds of thousands to millions). Fast pulsing it will destroy in months. I'm using such kind of control in two places, one is with a special Jumo dedicated controller. But the request is not with pulses, only continuous DO: when the( AO value - Feedback value)<1 the Open DO is active (the relay is activated), when the(AO value - Feedback value) >1 the Close DO is active. All the motorized valves are slow valves for burners temperature control .
  • In reply to dvarghese:

    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 Tyler Anderson:

    Hi,

    How it's working this module ? I don't understand. If the operator tries to open the valve( I suppose it's a NC valve) the PID AO will increase. From 0 to 50 % only the CLOSE_DO parameter will be active. In my opinion the input of the splitter must be the difference between the AO value and the feedback signal (see pulsed.pptx file posted by Hector).
  • In reply to leirbag:

    Hi,
    Well Tyler, I only know 2 types of motorized valves, one only full open and full close, and other open and close by pulses, but... in my plant, the valves motorized with pulses are manually from the DCS and the others is a simple DC with a comparator; but, I have a CVP, in the CVP we have a valves on/off controlling a continuos analog PV, the idea is:

    1. Craete a PID , the output (range 0-100%)
    2. Create a DC, in the module DC, put a SCALLER, where change the range in % to seconds, for example: scaller in: 0-100%, scaller out: 20 sec
    3. The DC has a TIMER, this timer is the period of the DC, I mean, i.ex.: timer generate a pulses each 25 Seconds, so when the pulses is generated, in this moment I see the out of the PID, and change to seconds, then with a OFF DELAY put the out of PID in seconds, and delay the out the time generate by the PID.
    I hope I explained well, if not, ask me again if you think you it can serve this information
  • In reply to leirbag:

    Hi ing.magovi

    Can you please explain the method you explained above in detail. Also please try to attach a screen shot.

    Thankyou
    Dencil
  • 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…

  • In reply to dvarghese:

    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.

  • In reply to Tyler Anderson:

    Hi Tyler,

    The denciltvarghese problem is he need a special PID function block there is not provided by DeltaV library (PID block with 2 DO output control). I'm working with such a device, but is a Jumo Dtron 308 hardware controller with two relays output(one for opening valve, the other for closing the valve). The Hector suggestion is to change the solution to not use the error between PV and SP, to compare instead the PID output with the AI feedbak position like a positioner . It's a simple but efficient trick, and it's the same thing with the PID error (I'm using too this type of control) . Other important problem for the ouputs is to transform the 24VDC output in 230VAC ouput (pulses type) without using a special DO card. A relay is a limited solution for fast pulsing (10 million mechanical cycles in average).
  • Hi,

    I've succesfully addressed that on one project. Solution was based on PID configured with PD structure (no integral) and Bias set to 50 (over a PID Output range of 0-100%). In this way Gain value defines a band around 50% PID output value where boundaries are "Maximum Effort Demand" on actuator device. Then PID output is used in two ways:
    1- Value to determine if actuator must be activated and how (close or open if it's a valve, start/stop if it's a drive, etc...). A LIMITER Function block it's fine for this so PID OUT was conected to LIMITER INPUT, with limits set to 2% and 98%. HI_LIM and LO_LIM detected outputs were used as input of two Timed Pulse blocks having output conedted to DO blocks CAS_IN_D.
    2- Value to calculate how many time actuator will be activated. A CALC to convert PID out put (0-100%) to seconds was used; this conversion was based on customer provided info and, lately, some empirical testing (basically we determined travel time for both, full closed->full closed and full open->full closed). This was an interesting test because result shown that open->close direction was faster. Theese time values were used as TIME_DURATION of Timed pulse mentioned above.

    Althoug we added, at first, some logic to create a "OFF" cycle on Timed Pulse blocks it's was proven during commision that it was not required.