EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPID Record
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Ben Franksen <benjamin.franksen at helmholtz-berlin.de>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sat, 13 Feb 2021 12:32:26 +0000
Hi Ben,

> Suppose we have been at the target position for some time, i.e.
> VAL=OVAL, so that E(n)=0 for all n. Then all terms become 0 and the
> output is OVAL=0 as well. But shouldn't it be OVAL=VAL instead?


I think your statement that "all terms become 0" is incorrect.  The integral term (I) does not become zero even when sitting at the desired setpoint for infinite time, because it is the integral from time=T0, where T0 is the time that the feedback was turned on.  The integral term is what prevents "droop", e.g. it is what supplies the constant power required to keep a furnace at 500 C even when the error is 0.


Your statement that "we have been at the target position for some time, i.e. VAL=OVAL" is also incorrect.  When it is at the target position VAL=CVAL, not OVAL.


I use the EPID record for lots of tasks and it seems to work fine.  Have you observed an issue which led you to post this message?


Mark



________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ben Franksen via Tech-talk <tech-talk at aps.anl.gov>
Sent: Saturday, February 13, 2021 3:53 AM
To: EPICS tech-talk
Subject: Re: EPID Record

Oops, sorry for the botched subject.

Am 13.02.21 um 10:50 schrieb Ben Franksen via Tech-talk:
> I have a question regarding the epid record type, which is part of
> https://github.com/epics-modules/std.
>
> According to the docs, the formula to calculate the output is
>
>   OVAL = P + I + D
>   P = KP * E(n)
>   I = KP * KI * SUMi ( E(i) * dT(n) )
>   D = KP * KD * ( (E(n) - (E(n-1) ) / dT(n) )
>
> I checked that the code (in the soft device support) really does that. I
> am ignoring the extra functionality that limits the output to be between
> DRVL and DRVH as this is irrelevant here.
>
> Suppose we have been at the target position for some time, i.e.
> VAL=OVAL, so that E(n)=0 for all n. Then all terms become 0 and the
> output is OVAL=0 as well. But shouldn't it be OVAL=VAL instead?
>
> Either I am mising something here or this is a bug and line 171 of
> stdApp/src/devEpidSoft.c should not be
>
>             oval = p + i + d;
>
> but rather
>
>             oval += p + i + d;
>
> and the formula above start with
>
>   OVAL += P + I + D
>
> Cheers
> Ben
>


--
I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman



Replies:
Re: EPID Record Ben Franksen via Tech-talk
References:
EPICS Record Ben Franksen via Tech-talk
Re: EPID Record Ben Franksen via Tech-talk

Navigate by Date:
Prev: Re: EPID Record Ben Franksen via Tech-talk
Next: Re: EPID Record Ben Franksen via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: EPID Record Ben Franksen via Tech-talk
Next: Re: EPID Record Ben Franksen via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 13 Feb 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·