PID with Pulse Width Modulation

Dear Experts,

Can anyone share the experience of controlling Drive using PID with PWM?

Advanced Christmas wishes..

Thanks,

Manik

3 Replies

  • Hi Manik

    Do you mean a PID whose output drive discrete solenoid ?

    Do you have a look to the library and the "C_VLV_PULSE" ?

    You can also easily do it yourself using - That's only an idea :

    - 2 input parameters :

     -1- named IN_PERCENT (Float) that you will connect tou your PID:OUT

     -2- named OUT_MAX_TIME (Scaling) that you will use to set the max time duration

    - a Scaler block.

     Show OUT_SCALE as an input parameter

     Connections :

     -1- IN = IN_PERCENT parmeter

     -2- OUT_SCALE = OUT_MAX_TIME parameter

    - a first ON_DELAY_TIMER block. (modulated duration output)

     Show TIME_DURATION as an input parameter

     Connect the IN_D to OUT of the Scaler block

    - a CALC block in witch you will read the OUT_MAX_TIME.EU100 and write it to the OUT1

    - a second ON_DELAY_TIMER block. (complete cycle duration)

     Show TIME_DURATION as an input parameter

     Connect it to the CALC:OUT1

    - a NOT block connected to the first OND

     Because the OND is 0 during the count.

    - an output parameter named PULSE_OUT connected to the NOT:OUT_D

    Here you have an discrete output that stay ON during the time corresponding to the percent of your PID output, according to the global cycle duration you set.

  • In reply to Jack_France:

    Manik,

    I think what Jack is describing may be overkill for you.  The AO block in DeltaV can be configured to be a pulse width block and then linked to a Discrete Output channel configured for continuous pulse.  Reference the AO Function Block pages in Books Online (specifically Field Device Requiring Discrete Pulse Duration Input section).  You should also reference the DO Channel configuration options.

    Brian

  • In reply to Brian Atkinson:

    Manik,

    If you are trying to control a stepper motor controller i don't think you will be able to get a high frequency by using a continuous pulse output (Brian's method) I remember reading a max pulse width of 100mS. You might want to look at using an analog to frequency convertor. PID>AO>Freq Convertor>Stepper Controller..

    Giovanni