EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ePID deadband on output
From: [email protected]
To: "Bruce Hill" <[email protected]>
Cc: Core-Talk <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 25 Aug 2014 15:38:21 -0700 (PDT)
But the "I" in the PID is already an IIR filter.

Putting additional filter inside a feedback loop is tricky.  Too short a
time constant make the filter ineffective, too long a time constant makes
the loop unstable.

The motor itself could be another integrator. Having 2 integrators and
addition phase lag from an IIR filter in a feedback loop is not a good
idea.

Dead band with hysteresis is much simpler.

Ken

> We have a similar PID controlling a stepper motor.
>
> Since we don't have a amplifier for the stepper motor I actually
> think we probably could allow the motor deadband to handle this,
> but the "owner" of the stepper motor is more comfortable with
> us shutting it off while we're close to the target position.
>
> Instead of using time within the deadband to turn ours on and
> off, we use an IIR filter similar to the smoothing algorithm in
> the AI record with an OFF threshold which can be quite small
> so we don't shut off till we're centered, and an ON threshold
> which turns the PID back on when it drifts too far.
>
> Time still enters into this calculation via the time constant of
> the IIR filter factor, but you can ensure your PID gets closer
> to the target position.
>
> Regards,
> - Bruce
>
> On 08/25/2014 10:24 AM, Pearson, Matthew R. wrote:
>> Hi Folks,
>>
>> I initially tried setting MDEL on the ai record that provides the
>> pressure readback (which is the input to the ePID). I found that the
>> ePID only controlled the output (the stepper motor) so that the pressure
>> sat at the low or high limit of the MDEL, depending on which side it was
>> approached from. So I needed some time factor to take the settling time
>> into account (to reach the center of the deadband).
>>
>> The motor record has deadbands for the monitors (MDEL and ADEL), but not
>> on the input (except for the NTM logic to deal with backlash
>> compensation).
>>
>> On Aug 25, 2014, at 11:14 AM, "Dalesio, Leo" <[email protected]> wrote:
>>
>>> Time can be captured in the integral term of the ePID. If that term
>>> continues to push the change up, it will exceed the position.
>>> Is that the argument for putting it in the ePID? We don't integrate the
>>> error if it is inside the deadband? Is this the only term that does not
>>> care inside a given deadband?
>> The output would be completely off (FBON=Off) if we have been within the
>> deadband for N seconds. It would only turn on again (and reset the
>> timer) if it drifts outside the deadband.
>>
>> The idea is that the controlled variable may sit within the deadband for
>> minutes or even hours without any further control needed (which in my
>> case means switching a stepper motor amplifier on and off).
>>
>> Cheers,
>> Matt
>>
>>
>>
>>> This looks like a good discussion for either the code-a-thon or a side
>>> meeting at the EPICS meeting.
>>> ________________________________________
>>> From: Mark Rivers [[email protected]]
>>> Sent: Monday, August 25, 2014 11:03 AM
>>> To: Dalesio, Leo; 'Benjamin Franksen'; [email protected];
>>> 'Core-Talk'
>>> Subject: RE: ePID deadband on output
>>>
>>> That's an interesting point.
>>>
>>> The motor record already has a deadband.  Matt, did you try just using
>>> the deadband on the motor record?
>>>
>>> I don't think it has the concept of the time inside the deadband
>>> though.
>>>
>>> Mark
>>>
>>>
>>> -----Original Message-----
>>> From: Dalesio, Leo [mailto:[email protected]]
>>> Sent: Monday, August 25, 2014 9:51 AM
>>> To: Mark Rivers; 'Benjamin Franksen'; [email protected];
>>> 'Core-Talk'
>>> Subject: RE: ePID deadband on output
>>>
>>> Does the deadband belong on the ePID or the motor record?
>>> It seems like more of an output issue - not an algorithm issue.
>>> Bob
>>> ________________________________________
>>> From: [email protected] [[email protected]] on
>>> behalf of Mark Rivers [[email protected]]
>>> Sent: Monday, August 25, 2014 10:39 AM
>>> To: 'Benjamin Franksen'; [email protected]; 'Core-Talk'
>>> Subject: RE: ePID deadband on output
>>>
>>> Sorry for the delay in replying, this seems good to me as well.
>>>
>>> Mark
>>>
>>>
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Benjamin Franksen
>>> Sent: Monday, August 25, 2014 5:14 AM
>>> To: [email protected]; 'Core-Talk'
>>> Subject: Re: ePID deadband on output
>>>
>>> [cross-posting to core-talk]
>>>
>>> On Thursday 14 August 2014 18:13:15 Pearson, Matthew R. wrote:
>>>> I'm using the ePID record to control a needle valve filling a cryostat
>>>> with helium. The needle valve is controlled by a stepper motor. The
>>>> ePID is giving good results, but I found the need for a deadband on
>>>> the PID output. This is to avoid continually driving the motor to and
>>>> fro by just a few steps. I implemented it via set of database
>>>> records, and included a timer to tell me how long the helium pressure
>>>> has been within a deadband, and then I disable the PID output (by
>>>> setting FBON).
>>>>
>>>> However, I'm wondering if's a common enough use-case to be implemented
>>>> in the ePID record. It would mean adding some additional fields,
>>>> something like:
>>>>
>>>> DBS - the deadband size
>>>> DBTS - settling time in the deadband (to avoid sitting on the edge of
>>>> the deadband) DBT - time in seconds since we entered the deadband
>>>> window
>>>> DBIN - binary flag to indicate we are in the deadband
>>>>
>>>> If ABS(CVAL-VAL)<=DBS, and DBT>=DBTS seconds, then disable FBON.
>>>>
>>>> If ABS(CVAL-VAL)>DBS then reset DBTS and enable FBON.
>>>>
>>>> And to maintain current behavior, keep DBS=0 (the default).
>>>>
>>>> The database version is working fine, but it's quite a few records and
>>>> I suspect it would be much simpler in the soft device support.
>>> Sounds like a pretty good idea to me.
>>>
>>> Cheers
>>> Ben
>>> --
>>> "Make it so they have to reboot after every typo." ― Scott Adams
>>>
>>>
>>> ________________________________
>>>
>>> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>>>
>>> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
>>> Forschungszentren e.V.
>>>
>>> Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch,
>>> stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
>>> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas
>>> Frederking
>>>
>>> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>>>
>>> Postadresse:
>>> Hahn-Meitner-Platz 1
>>> D-14109 Berlin
>>>
>>> http://www.helmholtz-berlin.de
>>>
>>>
>>>
>>
>
> --
> Bruce Hill
> Member Technical Staff
> SLAC National Accelerator Lab
> 2575 Sand Hill Road M/S 10
> Menlo Park, CA  94025
>
>


"The beaver told the rabbit as they stared at Hoover Dam. 'No, I didn't
build it myself. But it's based on an idea of mine.'"
Charles Townes


Replies:
Re: ePID deadband on output Bruce Hill
References:
Re: ePID deadband on output Benjamin Franksen
RE: ePID deadband on output Mark Rivers
RE: ePID deadband on output Dalesio, Leo
RE: ePID deadband on output Mark Rivers
RE: ePID deadband on output Dalesio, Leo
Re: ePID deadband on output Pearson, Matthew R.
Re: ePID deadband on output Bruce Hill

Navigate by Date:
Prev: Re: ePID deadband on output Bruce Hill
Next: Re: ePID deadband on output Bruce Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ePID deadband on output Bruce Hill
Next: Re: ePID deadband on output Bruce Hill
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 25 Aug 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·