[Logix5k] Trying to autotune IMC instruction, not sure what to expect

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hi all,

I'm attempting to set up an IMC instruction block instead of a PID block for my chlorine control loop; IMC blocks are apparently designed for control loops with long dead times, and my CL2 loop is exactly that.

I'm to the point of trying the autotune feature, but I'm not sure if it's working properly or not.

My CV span is CL2 residual, from 0-5 mg/L. The CV step is set for 20% in the autotone. Sure enough, the output is 1.0 (which is obviously 20% of my span). Great, I think. But it hasn't changed in the last, oh, twenty minutes or so? The timeout for the IMC autotune is set to 60 minutes (default) so I realize it might take awhile in theory but I'm wondering should I expect to see the CV step up after awhile? If my system has a ~10 minute lag, can I use that to estimate how long I should let the autotune run? The ATuneOn bit is still one, I have no faults, and no ATuneAbortbit...it still says "In Progress" but I'm not seeing any actual change in the output. I'm just wondering what I should expect and if this needs to run for hours.
 
Quick update: it just timed out after 60 minutes, never having gone above the initial 20% step of the CV. Not sure what to do, save let it run even longer? Maybe I've set it up incorrectly?
 
Just to make sure I understand what you are saying, you see the CV change by the initial 20% when you start the autotune but don't see it change any after that. Is that correct? Are you seeing the PV do anything during this time? Is the CV of the instruction tied to something that can create a change on the PV?

I don't know your process but are you sure a 20% output is enough to create a change in your process?

Keith
 
Hi Keith thanks for the response. My answers to your questions:

Just to make sure I understand what you are saying, you see the CV change by the initial 20% when you start the autotune but don't see it change any after that. Is that correct?
Exactly this, yes.

Are you seeing the PV do anything during this time? Is the CV of the instruction tied to something that can create a change on the PV?
Yes, it's responding to that initial bump as I would expect. The way I'm dosing chlorine is:

Code:
F=(K+C)*Q*8.34
F == CL2 in pounds per day (this gets scaled to 4-20mA later)
K == desired residual in mg/L (0-5)
C == IMC output in mg/L (0-5)
Q == system flow in MGD
8.34 == lb/gal of water
The IMC block is scaled so it outputs an offset, if you will, that is added to the dose (0-5 mg/L instead of 0-100%). Let's say we want 1.25 mg/L; we dose based on that setpoint, plus flow. But if that's too low, then I want the IMC to compare the residual to the setpoint, and make up the difference.

I don't know your process but are you sure a 20% output is enough to create a change in your process?
It is affecting things, yes; purely pacing off of flow, I see a residual about half of what we'd expect (we have to dose at 2.2 mg/L to get 1.0 mg/L). The 20% bump corresponds to 1 mg/L increase in dosing, so when we're in autotune and the CV is putting out the 20%, it doses beautifully. It's just that the IMC never seems to move on with the tuning, and times out.

Here's a screen grab of the IMC block, in case it helps. Maybe I don't have the setpoint to the right input for tuning since I have it set to SPProg?

6Z3jyN5.png


and here's the CPT block where I use the IMC output to dose along with the equation above:

bochPU5.png
 
Last edited:
I've never used the IMC instruction but from the little bit of reading I have done you may be getting held up by the NoiseLevel parameter n the instruction. This is intended to compensate for noise in the PV during autotuning. However, since your PV change is so small, this may be holding you up. you could try to set this to zero.

You could also come up with these numbers manually. There are specific parameters in the instruction structure where you enter gain, time constant and deadtime. You could determine all of these on your own from a trend of a step output command and enter them directly.

Keith
 
Thanks Ken. I will try the noise parameter and see if that helps.

As for manually setting the tuning parameters, I would definitely be interested in doing so; any chance you can point me in the right direction on how I would tackle that? I'm not sure if we're talking ODE level calculus, or if it's simpler than that.
 
First off, sorry Keith! I called you Ken by accident.

My noise parameter is already set to the lowest setting, so that wasn't it.

One thing I'm not sure about is how often to run the IMC instruction block's periodic function; since I'm going after a long dead time (about 10 minutes between CL2 dosage change and readback) should the periodic function be that slow? Should it be faster, since it takes into account the deadtime?
 
Last edited:
First of all, I would recommend you start here:

http://controlguru.com/table-of-contents/

Doug is a believer in IMC and his information is geared toward that control type, although it is applicable to about anything. Section 2 gets into what you are really concerned with.

In addition, Peter Nachtwey and Ron Beaufort each have a significant number of posts that deal with system identification based on step response data. Take a look at this:

http://www.plctalk.net/qanda/showthread.php?t=10316

You won't need the tuning correlations because you are entering the system parameters directly into the instruction and the instruction will take care of response relative to parameters.

The basic idea is you will do exactly what the IMC instruction is attempting to do except you will do it visually. You set a fixed output for CV, determine how long it takes for the change in CV to initiate a change in PV (deadtime), determine how long it takes for the PV to settle at it's new level (5 * process time constant) and determine the system gain (delta PV / delta CV).

As for update time, you want to be be at least 10 times faster than the system time constant. Slower updates make things more difficult to control, faster updates don't provide much help but don't really hurt anything either from a controllability standpoint.

Keith
 
First of all, I would recommend you start here:

http://controlguru.com/table-of-contents/

Doug is a believer in IMC and his information is geared toward that control type, although it is applicable to about anything. Section 2 gets into what you are really concerned with.

In addition, Peter Nachtwey and Ron Beaufort each have a significant number of posts that deal with system identification based on step response data. Take a look at this:

http://www.plctalk.net/qanda/showthread.php?t=10316

You won't need the tuning correlations because you are entering the system parameters directly into the instruction and the instruction will take care of response relative to parameters.

The basic idea is you will do exactly what the IMC instruction is attempting to do except you will do it visually. You set a fixed output for CV, determine how long it takes for the change in CV to initiate a change in PV (deadtime), determine how long it takes for the PV to settle at it's new level (5 * process time constant) and determine the system gain (delta PV / delta CV).

As for update time, you want to be be at least 10 times faster than the system time constant. Slower updates make things more difficult to control, faster updates don't provide much help but don't really hurt anything either from a controllability standpoint.

Keith

Thanks Keith, I will take a look at what you've linked to. I did a lot more reading yesterday and get the concept of manually doing IMC tuning parameters, I'll see if that helps.
 

Similar Topics

Hi all, I'm starting work on a system and the processor for said project is a Control Logix 1756-L82. When I open Logix, however, that CPU is...
Replies
9
Views
2,945
Hi all, I'm trying to use the Data Preserve Tool for Logix5k (CompactLogix controller) but I keep getting comms errors and I'm not sure why. I've...
Replies
4
Views
4,093
Hello, I have been working on an alarm tracking routine. I take several bits to get a status of a device and load then into an INT Dev_Stat. When...
Replies
0
Views
1,012
Hi all, I'm working on some Control and Compact Logix A&B PLCs, running Logix5K version 24. I've been doing online edits just fine, but I've...
Replies
6
Views
2,430
From what I can tell, AB's Connected Component Workbench (CCW) does not support CompactLogix L43 with RsLogix v20.xx Software. What are my...
Replies
6
Views
2,698
Back
Top Bottom