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 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
<== Date ==> <== Thread ==>

Subject: Re: EPID bumpless restart
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "Crisp, Daniel" <CrispD@nscl.msu.edu>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Fri, 1 Dec 2017 14:12:29 +0000
Hi Dan,


Have you had a chance to test this?


I had an idea what could be causing your problem with the Integral term not being set correctly.  Can you send the output of dbpr of all fields for the epid record, i.e.


dbpr "myEpidRecord",4


Is the link to the power-supply PV a CA link?


Mark



________________________________
From: Crisp, Daniel <CrispD@nscl.msu.edu>
Sent: Wednesday, November 29, 2017 6:07 PM
To: Mark Rivers; tech-talk@aps.anl.gov
Subject: RE: EPID bumpless restart


Hello Mark,



Ah, great! For what it's worth, that looks good to me. I'll try this tomorrow and let you know how it works. I'll also double check how the bumpless restart is/isn't acting so I can answer Matthew.



Thank you for the quick responses!

-Dan





From: Mark Rivers [mailto:rivers@cars.uchicago.edu]
Sent: Wednesday, November 29, 2017 6:57 PM
To: Crisp, Daniel <CrispD@nscl.msu.edu>; tech-talk@aps.anl.gov
Subject: RE: EPID bumpless restart



Hi Daniel,



I think this patch to devEpidSoft.c should implement ODEL.  Let me know if this works and I will commit it.



diff --git a/stdApp/src/devEpidSoft.c b/stdApp/src/devEpidSoft.c

index 62c753f..118fb0c 100755

--- a/stdApp/src/devEpidSoft.c

+++ b/stdApp/src/devEpidSoft.c

@@ -41,6 +41,8 @@

  *  dT(n)   Time difference between n-1 and n

  */



+#include    <math.h>

+

#include    <alarm.h>

#include    <dbDefs.h>

#include    <dbAccess.h>

@@ -207,7 +209,9 @@ static long do_pid(epidRecord *pepid)

     pepid->dt   = dt;

     pepid->err  = e;

     pepid->cval  = cval;

-    pepid->oval  = oval;

+    if ((pepid->odel != 0) && (fabs(pepid->oval - oval) > pepid->odel)) {

+        pepid->oval  = oval;

+    }

     pepid->p  = p;

     pepid->i  = i;

     pepid->d  = d;



Mark





From: tech-talk-bounces@aps.anl.gov<mailto:tech-talk-bounces@aps.anl.gov> [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Crisp, Daniel
Sent: Wednesday, November 29, 2017 2:48 PM
To: tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>
Subject: EPID bumpless restart



Hello,



I'm currently using the EPID record to stabilize a dipole fields. It is reading a magnetic field from a hallprobe controller, and driving a power supply current to match the hallprobe reading to a target value specified by the user.



1)      How can I make the EPID record perform a 'bumpless restart'?

Currently, if the power supply set point is significantly changed while the EPID feedback is off, the epid record will drive around the supply wildly once turned back on. I have some channels set up which pause a user's request to turn on feedback until the '<epid_channel>.I' field can be automatically set with the live value in the supply. And when I monitor the '<epid_channel>.I' value, I see that it in fact does get set, but it then gets overwritten and ignored. What's the best way of dealing with this?



2)      How to best implement a deadband? (It appears there was a thread about the ODEL field being present, but not used in the epid support code? Am I wrong? Is this still the case?)

Especially for some magnets that require a less frequent touch, I'd like the epid to only act on the supply when the error reaches a larger percent difference. Specifically, I'd like it to only react to errors in field greater than, say, .01% of the target field. We had tried to simply decrease the KP value enough that resulting P values are less than what can be acted on by the supply (supply doesn't recognize a difference in set points differing by the 3rd significant figure), but this isn't ideal.



Thank you!

-Dan



References:
EPID bumpless restart Crisp, Daniel
RE: EPID bumpless restart Crisp, Daniel

Navigate by Date:
Prev: Channel access blocking Hidas, Dean
Next: RE: Channel access blocking Mark Engbretson
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
Navigate by Thread:
Prev: RE: EPID bumpless restart Crisp, Daniel
Next: RE: EPID bumpless restart Crisp, Daniel
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
ANJ, 04 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·