level measurement - controlglobal.com · drum level controller output that is trying to increase...

23
eHANDBOOK Level Measurement Spring 2019

Upload: others

Post on 08-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

  • eHANDBOOK

    Level Measurement

    Spring 2019

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 2

    TABLE OF CONTENTSWhen is reducing variability wrong? 4

    Level may vary the most when process and product variation are minimized.

    Solutions to prevent harmful feedforwards 8

    How to correct issues in boiler, distillation column and neutralization control.

    Understanding P, I and D 12

    The simple mathematics can be clarified with mechanical analogies and an example of level control.

    Is global warming like level control? 20

    Comparing the processes sheds light on the problem of regulating Earth’s temperature.

    AD INDEXEndress+Hauser • http://www.us.endress.com 11

    Krohne • http://us.krohne.com/radar 3

    Vega • http://www.vega.com/radar 7

  • Safe and accurate level measurement in chemical and petrochemical applicationsOPTIWAVE series – technology driven by KROHNE

    • New 24 and 80 GHz FMCW radar level transmitters for liquids,pastes and solids in process and storage applications

    • Over 28 years of experience with FMCW radar technology:from basic applications to agitated and corrosive liquidsin narrow tanks with internal obstructions

    • Measures media with dielectrics ≥1.4, process conditionsup to +200 °C / +392 °F and 100 barg/ 1450 psig

    fact

    More facts about our new radar portfolio: us.krohne.com/radar

    products solutions services

    ft

    bbl

    tcf

    gal

    http://us.krohne.com/radar

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 4

    When is reducing variability wrong?Level may vary the most when product and process variation are minimized.by Greg McMillan

    Having the blind wholesale goal of reducing variability can lead to doing the wrong thing that can reduce plant safety and performance. Here

    we look at some common mistakes made

    that users may not realize until they have

    better concepts of what is really going on.

    We seek to provide some insightful knowl-

    edge here to keep you out of trouble.

    Is a smoother data historian plot or a statis-

    tical analysis showing less short-term vari-

    ability good or bad? The answer is no for

    the following situations, misleading users

    and data analytics.

    First of all, the most obvious case is surge

    tank level control. Here we want to maxi-

    mize the variation in level to minimize the

    variation in manipulated flow, typically to

    downstream users. This objective has a

    positive name of absorption of variability.

    What this is really indicative of is the prin-

    ciple that control loops don’t make vari-

    ability disappear, but transfer variability

    from a controlled variable to a manipulated

    variable. Process engineers often have a

    problem with this concept because they

    think of setting flows per a Process Flow

    Diagram (PFD) and are reluctant to let a

    controller freely move them per some al-

    gorithm they don’t fully understand. This is

    seen in predetermined sequential additions

    of feeds or heating and cooling in a batch

    operation rather allowing a concentration or

    temperature controller do what is needed

    via fed-batch control. No matter how smart

    a process engineer is, not all of the situa-

    tions, unknowns and disturbances can be

    accounted for continuously. This is why fed-

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 5

    batch control is called semi-continuous. I

    have seen where process engineers, believe

    or not, sequence air flows and reagent flows

    to a batch bioreactor rather than going to

    Dissolved Oxygen or pH control. We need

    to teach chemical and biochemical engi-

    neers process control fundamentals, includ-

    ing the transfer of variability.

    The variability of a controlled variable is

    minimized by maximizing the transfer of

    variability to the manipulated variable. Un-

    necessary sharp movements of the ma-

    nipulated variability can be prevented by

    a setpoint rate of change limit on analog

    output blocks for valve positioners or VFDs,

    or directly on other secondary controllers

    (e.g., flow or coolant temperature), and the

    use of external-reset feedback (e.g., dy-

    namic reset limit) with fast feedback of the

    actual manipulated variable (e.g., position,

    speed, flow or coolant temperature). There

    is no need to re-tune the primary process

    variable controller by the use of external-

    reset feedback.

    Data analytics programs need to use ma-

    nipulated variables in addition to controlled

    variables to indicate what is happening.

    For tight control and infrequent setpoint

    changes to a process controller, what is

    really happening is seen in the manipulated

    variable (e.g., analog output).

    A frequent problem is data compression in

    a data historian that conceals what is really

    going on. Hopefully, this is only affecting

    the trend displays and not the actual vari-

    ables being used by a controller.

    The next most common problem has been

    extensively discussed by me, so at this point

    you may want to move on to more pressing

    needs. This problem is the excessive use of

    signal filters that may even be more insidi-

    ous because the controller doesn’t see a de-

    veloping problem as quickly. A signal filter

    that is less than the largest time constant in

    the loop (hopefully in the process) creates

    dead time. If the signal filter becomes the

    largest time constant in the loop, the previ-

    ously largest time constant creates dead

    time. Since the controller tuning based on

    largest time constant has no idea where

    it is, the controller gain can be increased,

    which, combined with the smoother trends,

    We need to teach chemical and biochemical

    engineers process control fundamentals,

    including the transfer of variability.

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 6

    can lead one to believe the large filter was

    beneficial. The key here is a noticeable in-

    crease in the oscillation period, particularly

    if the reset time was not increased. Signal

    filters become increasingly detrimental as

    the process loses self-regulation. Integrat-

    ing processes such as level, gas pressure

    and batch temperature are particularly

    sensitive. Extremely dangerous is the use of

    a large filter on the temperature measure-

    ment for a highly exothermic reaction. If the

    PID gain window (ratio of maximum to mini-

    mum PID gain) reduces due to measure-

    ment lag to the point of not being able to

    withstand nonlinearities (e.g., ratio less than

    6), there is a significant safety risk.

    A slow thermowell response, often due to

    a sensor that is loose or not touching the

    bottom of the thermowell, causes the same

    problem as a signal filter. An electrode that

    is old or coated can have a time constant

    that is orders of magnitude larger (e.g., 300

    sec) than a clean, new pH electrode. If the

    velocity is slightly low (e.g., less than 5 fps),

    pH electrodes become more likely to foul

    and if the velocity is very low (e.g., less than

    0.5 fps), the electrode time constant can

    increase by one order of magnitude (e.g.,

    30 sec) compared to an electrode seeing

    recommended velocity. If the thermowell

    or electrode is being hidden by a baffle, the

    response is smoother but not representa-

    tive of what is actually going on.

    For gas pressure control, any measure-

    ment filter, including that due to transmitter

    damping, generally needs to be less than

    0.2 sec, particularly if volume boosters on

    valve positioner output(s) or a variable-

    frequency drive is needed for a faster

    response.

    Practitioners experienced in doing Model

    Predictive Control (MPC) want data com-

    pression and signal filters to be completely

    removed so that the noise can be seen and

    a better identification of process dynamics,

    especially dead time, is possible.

    Virtual plants can show how fast the ac-

    tual process variables should be changing,

    revealing poor analyzer or sensor resolution

    and response time, and excessive filtering.

    In general, you want measurement lags to

    total up to less than 10% of the total loop

    dead time, or less than 5% of reset time.

    However, you can’t get a good idea of the

    loop dead time unless you remove the

    filter and look for the time it takes to see a

    change in the right direction, beyond noise,

    after a controller setpoint or output change.

    For more on the deception caused by a

    measurement time constant, see the Con-

    trol Talk Blog, “Measurement Attenuation

    and Deception.”

    http://www.controlglobal.com/blogs/controltalkblog/measurement-attenuation-and-deception-tipshttp://www.controlglobal.com/blogs/controltalkblog/measurement-attenuation-and-deception-tips

  • When it comes to contactless level measurement of liquids in small containers, smaller is better. With the smallest antenna of its kind, VEGAPULS 64 is simply the greatest! With its excellent focusing and insensitivity to condensation or buildup, this new radar sensor is truly exceptional. Simply world-class!

    www.vega.com/radar

    The ultimate for small tanks!The future is 80 GHz: a new generation of radar level sensors

    Wireless adjustment via Bluetooth with smartphone, tablet or PC. Compatible retrofit to

    all plics® sensors manufactured since 2002.

    http://www.vega.com/radar

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 8

    Solutions to prevent harmful feedforwardsHow to correct issues in boiler, distillation column and neutralization control.by Greg McMillan

    Here we look at applications where feedforward can do more harm than good, and what to do to prevent this situation. This problem is

    more common than one might think. In the

    literature, we mostly hear how beneficial

    feedforward can be for measured load

    disturbances. Statements are made that

    the limitation is the accuracy of the feed-

    forward and that, consequently, an error of

    2% can still result in a 50:1 improvement in

    control. This optimistic view doesn’t take

    into account process, load and valve dy-

    namics. The feedforward correction needs

    to arrive in the process at the same point

    and the same time as the load disturbance.

    This is traditionally achieved by passing

    the feedforward (FF) through a deadtime

    block and lead-lag block. The FF dead-

    time is set equal to the load path deadtime

    minus the correction path deadtime. The

    FF lead time is set equal to the correction

    path lag time. The FF lag time is set equal

    to the load path lag time. If the FF arrives

    too soon, we create inverse response,

    and if the FF arrives too late, we create

    a second disturbance. Setting up tuning

    software to identify and compute the FF

    dynamic can be challenging. Even more

    problematic are the following feedforward

    applications that do more harm than good

    despite dynamic compensation.

    1. Inverse response from the manipulated

    flow causes excessive reaction in the

    opposite direction of load. The inverse

    response from a feedwater change can be

    so large as to cause a boiler drum high or

    low level trip, a situation that particularly

    occurs for undersized drums and miss-

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 9

    ing feedwater heaters due to misguided

    attempts to save on capital costs. The

    solution here is to use a traditional three-

    element drum level control, but added to

    the traditional feedforward is an uncon-

    ventional feedforward with the opposite

    sign that is decayed out over the period of

    the inverse response. In other words, for a

    step increase in steam flow, there would be

    initially a step decrease in boiler feedwater

    feedforward added to the three-element

    drum level controller output that is trying

    to increase feedwater flow. This prevents

    shrink and a low level trip from bubbles

    collapsing in the downcomers from an

    increase in cold feedwater. For a step de-

    crease in steam flow, there would be a step

    increase in boiler feedwater feedforward

    added to the three-element drum level

    controller output that is trying to decrease

    feedwater flow. This prevents swell and

    a high level trip from bubbles forming in

    the downcomers from a decrease in cold

    feedwater. A severe problem of inverse re-

    sponse can occur in furnace pressure con-

    trol when the scale is a few inches of water

    column and the incoming manipultaed

    air is not sufficiently heated. The inverse

    response from the ideal gas law can cause

    a pressure trip. An increase in cold air flow

    causes a decrease in gas temperature and,

    consequently, a relatively large decrease

    in gas pressure at the furnace pressure

    sensor. A decrease in cold air flow causes

    an increase in gas temperature and, con-

    sequently, a relatively large increase in gas

    pressure at the furnace pressure sensor.

    2. Deadtime in the correction path is

    greater than deadtime in the load path. The

    result is a feedforward that arrives too late,

    creating a second disturbance and worse

    control than if there was no feedforward.

    This occurs whenever the correction path

    is longer than the load path. An example is

    a distillation column control when the feed

    load upset stream is closer to the tempera-

    ture control tray than the corrective change

    in reflux flow. The solution is to generate the

    feedforward signal for ratio control based

    on a setpoint change that is then delayed

    before being used by the feed flow control-

    ler. The delay is equal to the correction path

    deadtime minus the load path deadtime. The

    The result is a feedforward that arrives too late,

    creating a second disturbance and worse control

    than if there was no feedforward.

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 10

    same problem can occur for a reagent injec-

    tion delay that often occurs due to conven-

    tionally-sized dip tubes and small reagent

    flows. The same solution applies in terms of

    using an influent flow controller setpoint for

    feedforward ratio control of reagent, and

    delaying the setpoint used by the influent

    flow controller.

    3. Feedforward correction makes re-

    sponse from an unmeasured disturbance

    worse. This occurs in unit operations

    such as distillation columns and neutral-

    izers where the unmeasured disturbance

    from a feed composition change is made

    worse by a feedforward correction based

    on feed flow. Often, feed composition is

    not measured and is large due to parallel

    unit operations and a combination of flows

    that become the feed flow. For pH, the

    nonlinearity of titration curves increases

    the sensitivity to feed composition. Even if

    the influent pH is measured, the pH elec-

    trode error or uncertainty of the titration

    curve makes feedforward correction for

    feed pH to do more harm than good for

    setpoints on the steep part of the curve.

    If the feed composition change requires

    a decrease in manipulated flow and there

    is a coincidental increase in feed flow that

    corresponds to an increase in manipulated

    flow or vice-versa, the feedforward does

    more harm than good. The solution is to

    compute the required rate of change of

    manipulated flow from the unmeasured

    disturbance, and add this to the computed

    rate of change for the feedforward correc-

    tion needed, paying attention to the signs

    of the rate of change. If the required rate

    of change of manipulated flow for the un-

    measured disturbance is in the opposite di-

    rection, the feedforward correction rate of

    change in manipulated flow is decreased. If

    it exceeds the computed feedforward cor-

    rection rate of change in the manipulated

    flow, the feedforward rate of change is

    clamped at zero to prevent making con-

    trol terribly worse. If the required rates of

    change for the manipulated flow are in the

    same direction, the magnitude of the feed-

    forward rate of change is correspondingly

    increased.

    I am trying to see how all this applies in my

    responses to known and unknown upsets to

    my spouse.

  • Do you want to learn more?www.us.endress.com

    Customers around the world trust us when it comes to process automation. Our shared goal is plant safety, availability and e� ciency. We are with you every day, everywhere.

    People for Process Automation

    MEASURED VALUE+ ADDED VALUE

    You make confi dent decisions backed by process data and a complete portfolio of services and solutions to support you.

    We understand you need insightful process information to help you run your plant e� ciently.

    180227_Valuable_Process_Knowlwdge_7.875x10.5_US_Control.indd 1 18.04.2018 12:21:16

    http://www.us.endress.com

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 12

    Understanding P, I and DThe simple mathematics can be clarified with mechanical analogies and an example of level control.by R. Russell Rhinehart

    It is important to understand what the proportional, integral and derivative terms do within the PID controller. That understanding is essential to choose ap-

    propriate action, troubleshoot controllers,

    choose appropriate modifications, or set

    up advanced controllers. Unfortunately, the

    controller synthesis approach, in which PID

    magically appears within Laplace Transform

    analysis, does not provide that functional

    understanding. Hopefully, this more intuitive

    development of PID will be helpful.

    Chosen as an example is a commonly un-

    derstood process—level control in a tank of

    liquid (Figure 1). The inflow is a wild variable,

    or disturbance, that will upset the level, which

    is an indication of liquid inventory. The slide

    valve on the outflow will open or close to re-

    lease more or less fluid to keep the level at

    the desired setpoint. As notation, the con-

    trolled variable, CV, is the liquid level in the

    tank, h, and the manipulated variable, MV, is

    the valve stem position, U. Recognize that

    your region or community may use alternate

    terminology. The nominal, initial steady state

    values are h0 and U0.

    The controller, also shown in Figure 1, is

    a mechanical lever, a proportional-only

    controller. If the liquid level rises somewhat,

    then the float rises the same amount, which

    raises the lever that opens the valve an ad-

    ditional amount by the lever proportional-

    ity. This releases fluid faster, which seeks

    to counter the rising liquid inventory. If the

    liquid level falls somewhat, the lever closes

    the valve proportionally.

    The liquid level may rise or fall for any

    number of reasons. The inflow rate, Fin,

    may change, the viscosity of the fluid may

    change affecting its outflow speed, or the

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 13

    downstream pressure or in-pipe flow restric-

    tions may change, affecting Fout. The reason

    for a rise or fall in level is immaterial for the

    controller. This lever action moves the valve

    in the appropriate direction, and in a manner

    proportional to the level change.

    PROPORTIONAL ACTIONThe lever arm length ratio, b/a, is the gain

    of the controller. By changing the relative

    lengths of the lever arms, perhaps by chang-

    ing the position of the fulcrum, the controller

    can be more or less aggressive. If the level, h,

    starts at a base case of h0, which is also the

    setpoint, hSP, then using simple relations, the

    equation for the change in the valve stem po-

    sition with respect to level is:

    ∆U = b a ∆h = - b a (hSP - h) = Kce (1)

    Where Kc = - b a represents the controller gain

    and e = (hSP - h) represents the actuating er-

    ror, the deviation of the CV from its setpoint.

    Since ∆U = U - U0, then the equation rep-

    resenting the lever-type control is:

    U = U0 + Kc e (2)

    Figure 2 shows a block diagram of a con-

    trolled process using generic symbols for

    the MV, U; the CV, Y; and the disturbance, d.

    Contrasting the illustration of the physical

    process of Figure 1, this represents the path

    of cause-and-effect information exchange.

    The controller is shown acting on the actu-

    ating error, e.

    Note that although termed the process out-

    put, Y, the level of the liquid does not come

    out of the tank. The material liquid goes in

    or comes out, and level is a measure of the

    inventory response of the in-tank contents.

    The block diagram reveals the information

    LEVEL CONTROL EXAMPLEFigure 1: Here, inflow is a variable that will upset the level gauge float, which acts on the lever arm that controls the slide valve on the outflow. The controlled variable, CV, is the liquid level in the tank, h, and the manipulated variable, MV, is the valve stem position, U.

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

    LEVEL CONTROL BLOCK DIAGRAMFigure 2: A block diagram of the control scheme in Figure 1 shows the information transfer between controller and process, not material exchange. The block labeled C is the controller, which represents the lever, but could be a calculator that executes Equation (2): it multiplies Kc times e, then adds it to U0.

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 14

    transfer between controller and process, not

    material exchange. The lines in Figure 2 are

    not pipes. The block labeled C is the control-

    ler, which represents the lever, but could be

    a calculator that executes Equation (2). It is

    simple arithmetic: the controller multiplies Kc

    times e, then adds it to U0.

    Equation (2) seems very much like what is

    often presented as a proportional control-

    ler, U = Kc e. However, if U = Kc e was the

    relation, then if the CV were at the setpoint

    (e = 0), the controller would set U = 0, and

    close the valve, which would make the level

    rise, and cause it to deviate from the set-

    point. In Equation (2), the term U0 is the

    controller bias—it’s the value of U for which

    the initial MV position is required to hold

    the CV at setpoint. As illustrated in Figure 1,

    this is about 50%.

    The user chooses the controller gain. Nor-

    mally, the controller starts in manual mode

    (MAN) with the user deciding the MV value,

    then when the CV is at the setpoint, the

    user switches the controller to automatic

    (AUTO) mode. For bumpless transfer, the

    bias is usually set by the controller as the

    MV value when the controller is switched

    from MAN to AUTO.

    Figure 3 shows a block diagram of the arith-

    metic operations in the P-only control logic

    of Equation (2). The actuating error is multi-

    plied by the controller gain, and then added

    to the bias to determine the controller out-

    put. These are simple arithmetic operations

    (not calculus or Laplace-transformed magic).

    Note that It does not matter whether the

    controller in Figure 1 is an actual physical

    float-and-lever device, or whether it’s a digi-

    tal calculation of Equation (2) in a computer

    that sends the valve stem position target to

    an i/p device to move the valve stem. The

    logic and action are identical.

    STEADY STATE OFFSET AND INTEGRAL ACTIONP-only control is often good enough, but

    its problem is steady state offset. Consider

    what happens if Fin increases and holds at

    a new value, when the level is initially at the

    setpoint. Initially, Fout remains the same be-

    cause h has not yet changed, and the valve

    stem position is at the initial U0. Then, since

    the new inflow is greater than the outflow,

    level rises. As h rises, this increases U, which

    increases Fout Eventually, Fout will match Fin

    and the level will stop rising, but at this new

    PROPORTIONAL ONLYFigure 3: A block diagram of the P-only control calculation of Equation (2) shows the actuating error is multiplied by the controller gain, and then added to the bias to deter-mine the controller output. These are simple arithmetic operations (not calculus or Laplace-transformed magic).

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 15

    steady state, h is not at the setpoint. It must

    be above the setpoint for the valve to be

    open enough to let the outflow be higher.

    This h deviation is steady state offset.

    It is immaterial whether the disturbance is

    the inflow rate or some other aspect that af-

    fects either the inflow or outflow, or wheth-

    er the level falls or rises as a response to the

    disturbance. If the disturbance persists, the

    process will not settle at the setpoint.

    A method to eliminate steady state offset

    is to add integral action. But, that calculus

    terminology has little physical meaning, so

    to add understanding, consider the injection

    of a turnbuckle to the valve stem (Figure 4).

    In a turnbuckle, the ends of the rods are

    threaded to fit into the threaded holes of

    the buckle. The threads go in opposite

    directions. So, if the buckle is turned in one

    direction, the two sections of the valve stem

    are pulled together, the stem is shortened,

    and the valve opens. If turned in the other

    direction, the stem is lengthened and the

    valve closes. This permits opening and clos-

    ing of the valve without a change in tank

    level.

    If you notice that the liquid level has risen,

    you know that some disturbance is acting,

    and the buckle needs to be turned to short-

    en the stem, to open the valve a bit more

    than the original, pre-disturbance position

    for the tank level. If the level rises a little bit,

    there is only a small upset, and the buckle

    only needs to be turned a little. In contrast,

    a large level deviation indicates a large

    upset has occurred, which justifies a large

    turnbuckle readjustment. And, of course, a

    level rise or drop would direct turns in the

    opposite direction.

    So, let’s have an observer follow this rule:

    At each sampling, observe the level devia-

    tion from setpoint, and make an incremental

    change in the turnbuckle angle that’s pro-

    portional to the level deviation. In Equation

    (3), ∝ represents the thread pitch (axial

    distance per angle), β is the proportionality

    rule to change angle due to level deviation

    from setpoint (angle per h deviation), and

    c=∝β is their product:

    ∆U = ∝ ∆θ = ∝ βe = ce (3)

    After the most recent sampling, the ith ob-

    servation, control action changes the valve

    stem length from the previous length:

    INTEGRAL IS LIKE A TURNBUCKLEFigure 4. Integral action eliminates steady state offset, like adding a turnbuckle to the valve stem. If the buckle is turned in one direction, the stem is shortened and the valve opens; if turned in the other direction, the stem is lengthened and the valve closes, without a change in the tank level.

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 16

    Ui = U i - 1 + cei (4)

    The sequence of the past two adjustments is:

    Ui = U i-2 + cei + ce i-1 (5)

    Continuing to include past adjustments

    generates an equation that indicates how all

    of the adjustments have contributed to the

    current valve stem length change from the

    initial value, l0:

    Ui = U0 + c∑Ni=1 ei (6)

    In Equation (6), the number of items in the

    sum is N = t ∆t , where t is the total time that

    the controller has been in AUTO, and ∆t is the

    controller sampling interval. Multiplying and

    dividing the sum by ∆t reveals that the sum

    of rectangles (e-height times ∆t-base) is just

    the rectangle rule of integration, which can be

    represented by the calculus notation.

    U(t) = Ui = U0 + c ∆t ∑ ei ∆t = U0 +

    c ∆t ∫

    t o edt (7)

    Note that, even though the integral symbol

    is used in Equation (7), no calculus proce-

    dure was used by the turnbuckle adjuster. If

    this were to be implemented by a comput-

    er, the Equation (4) adjustment in the valve

    stem length is not calculus, but a simple

    algebraic multiplication and addition. Fur-

    ther, in the computer, the subscripts are not

    needed. The assignment statement repre-

    senting the Equation (4) action is U: = U +

    ce. Don’t let the integral symbol misdirect

    your understanding. There is no calculus to

    the doing of control.

    A common form of the controller calcula-

    tion is to incrementally sum (integrate) the

    scaled error, KC e, which means that the c ∆t

    coefficient needs to be divided by KC. Since

    the term tKCc only has dimensions of time, τi,

    one can represent the PI controller function

    as the block diagram of Figure 5. It shows

    the integral value (really, it’s just the sum of

    incremental changes) is added to the initial

    bias to make the controller bias adjust at

    each sampling. The block diagram nota-

    tion indicates the function (inside the box)

    and the function argument (the box input

    value). But again, don’t be thinking calculus,

    the integral operation is simply an arithme-

    tic incremental accumulation.

    In the standard form, KC is the controller

    gain that multiplies both the P and I terms,

    STANDARD PI CONTROLLERFigure 5. A block diagram of the standard form of the PI controller shows the integral value (the sum of incremental changes) is added to the initial bias to make the control-ler bias adjust at each sampling. The notation indicates the function (inside the box) and the function argument (the box input value).

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 17

    and the integral time, τi, divides the integral

    (which is actually calculated by incremental

    summation).

    Recall, the purpose of the proportional ac-

    tion was to immediately counter the effect

    of a disturbance, but its problem is that it

    leaves a steady-state offset. The integral

    purpose was not to be the primary control

    action, but to remove the offset left by the

    P-action. Accordingly, tune the P first (KC)

    to set the aggressiveness of the controller,

    then adjust the I-action (τi) to remove the

    residual offset at a desirable rate.

    ANTICIPATED ERROR AND DERIVATIVE MODEIn the description of P-action, the controller

    acts on the initial impact of the disturbance

    on the CV. However, the initial reveal that a

    disturbance has happened might be a small

    CV deviation, but, if allowed to fully develop

    over time, it might evolve to a large value.

    The fully developed CV deviation, not the

    initial indication, represents the magnitude

    of the disturbance that’s causing the CV

    to start deviating. With derivative action,

    the controller will take proportional action

    based on the anticipated error, not just on

    the initial reveal of the CV deviation. The

    question is how to forecast the anticipated

    error, the fully developed result of a distur-

    bance?

    If the process is linear and has a first-order

    response to a disturbance, then the model

    of how e would respond to a change in a

    disturbance, ∆d, is:

    τd dedt

    + e = Kd (∆d) = eanticipated (8)

    The value of eanticipated is the steady, fully de-

    veloped, anticipated value.

    Note that if the disturbance could be mea-

    sured and the process gain to the distur-

    bance were known, then eanticipated could be

    calculated from Kd (∆d) = eanticipated. However,

    those are often unmeasured and unknown.

    Fortunately, Equation (8) reveals that one

    can estimate the anticipated future error

    based on the current actuating error and

    its rate of change, the values of which are

    already known by the controller.

    eanticipated = τd dedt

    + e (9)

    Equation (9) does not specify what the dis-

    turbance is. The deviation could indicate a

    confluence of several disturbances, includ-

    ing the MV. Equation (9) is called a “lead,”

    which should be familiar. It represents what

    a ball thrower must do to have a running

    target catch the ball. The ball must be

    thrown to where the receiver will be when

    the ball gets there. The PI controller with

    the P-action based on eanticipated is:

    U = KC eanticipated + KCτi

    ∫ edt + U0 (10)

    When Equation (9) is substituted into Equa-

    tion (10) and rearranged, the PI controller

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 18

    with P-action on the anticipated error is the

    classical PID relation:

    U = KC e + KCτi

    ∫ edt + KC τd dedt

    + U0 (11)

    Although Equation (11) looks like calculus

    with its ∫ edt and dedt representation, the

    integral is actually just the incrementally

    updated sum, and the derivative will be cal-

    culated from a numerical approach (enew - eold)∆t, which, again, is simple arithmetic subtrac-

    tion and division.

    PD-action is equivalent to P-action on

    the anticipated error. Whether D action

    is used or not, one still needs incremental

    adjustment to the bias, I-action, to remove

    steady-state offset.

    If the process measurement is noisy, the

    numerical derivative amplifies the noise im-

    pact. And, if the process is relatively quick

    to respond, there’s no need to use the antic-

    ipated error concept. So, only use D-action

    on noiseless and slow-to-evolve processes.

    In block diagram notation, the PID con-

    troller (a PI controller with P based on the

    anticipated error, and the incremental ad-

    justment to remove steady state offset) is

    represented in Figure 6. The figure uses the

    Laplace transformed notation, where s in-

    dicates the operation to take the derivative

    of the input to the function block, and 1/s

    indicates to integrate the input. But, again,

    regardless of the symbols or calculus words

    to describe the functions all are simple

    arithmetic operations.

    PID IN SUMMARYProportional control is the simple concept

    of taking immediate proportional action on

    the actuating error, but P-only control,

    U = KC e + b0, with a fixed bias, leaves

    steady state offset. The user chooses the

    value for KC to set controller aggressive-

    ness.

    Integral action incrementally adjusts the

    bias to remove steady state offset. Note, al-

    though called “integral,” there’s no calculus

    in the action in the incremental accumula-

    tion. The user chooses the value for τi to set

    the speed at which offset is removed.

    Derivative action forecasts what the actuat-

    ing error will be, as a result of past influenc-

    es, if they’re left uncontrolled. It’s the lead

    commonly used in hitting a moving target.

    PD-action is equivalent to P-action on the

    anticipated error, and leaves steady state

    offset. Note, although called “derivative,”

    STANDARD PID CONTROLLERFigure 6. This block diagram of a PID control-ler uses the Laplace transformed notation, where s indicates the operation to take the derivative of the input to the function block, and 1/s indicates to integrate the input.

    ho

    Fin

    Uo

    b

    a

    Fout

    ho

    Fin

    Uo

    Uo

    U

    b

    a

    Fout

    d

    U Y

    U

    C+

    -

    +

    +

    Pe

    e

    YSP

    Kc

    Uo Fixed bias

    Turnbuckle

    Oppositethreads

    +

    +

    +

    +

    e

    ê

    Kcess

    +

    +Kc

    ∫dt1τ1

    1τ1s

    τps

    Û

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 19

    there is no calculus in the action of numeri-

    cally estimating the CV rate of change. The

    user chooses the value for τd to lead the aim

    of the controller.

    We communicate the PID procedure with

    calculus, or Laplace or Z-transforms, or oth-

    er advanced mathematical symbols. With a

    bit of sarcasm, it seems the reason to use

    fancy mathematics is to make people think

    it’s difficult, so they need to hire an expert.

    But, the reality is that the PID calculations

    are simple arithmetic procedures. By con-

    trast, an expert’s focus on the mathematics

    distracts those intellects from the impor-

    tant aspects of control, such as structuring

    ratio, cascade and override, or choosing

    appropriate modifications, anti-windup and

    initialization procedures. The real experts

    are not necessarily the mathematicians of

    control theory. They are the ones who can

    implement control.

    There are many modifications to the PID

    equation. Reset feedback, for example, is

    an alternate method to incrementally adjust

    the bias, which prevents integral windup,

    and is especially useful in override and con-

    straint strategies. Another common modifi-

    cation is the rate-before-reset or interacting

    controller, which can be created if incre-

    mental changes to the bias are also based

    on the anticipated error. For a discussion

    of such modifications, see Rhinehart, R. R.,

    H. L. Wade, and F. G. Shinskey in the Instru-

    ment Engineers’ Handbook, Vol II, Process

    Control and Analysis, 4th Edition, B. Liptak,

    Editor, Section 2.3, “Control Modes – PID

    Variations,” pp. 124-129, Taylor and Francis,

    CRC Press, Boca Raton, Fla., 2005.

    For a procedure to tune the controller,

    see “Criteria and procedure for control-

    ler tuning” by R.R. Rhinehart (Control, Jan

    ’17, p. 54-55, www.controlglobal.com/

    articles/2017/criteria-and-procedure-for-

    controller-tuning).

    R. Russell Rhinehart, engineering coach, R3eda, North

    Carolina State University, can be reached at russ@

    r3eda.com.

    The real experts are not necessarily

    the mathematicians of control theory.

    They are the ones who can implement control.

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 20

    Is global warming like level control?Comparing the processes sheds light on the problem of regulating Earth’s temperature.by Béla Lipták

    QIn a previous column, you wrote that understanding the control of global warming is very similar to understanding level control. Could you

    explain this in more detail? In what respect

    are the two processes similar?

    Z. Friedmann

    [email protected]

    A: You hit upon a large subject, one that will

    take up a full chapter in my upcoming book

    to be published by ISA. I will try to give you

    a brief answer.

    Figure 1 shows the rise of the surface tem-

    perature of the oceans during the indus-

    trial age. Now, if we look at the protection

    against climate change as a “control loop,”

    the measurement of that loop is that tem-

    perature, which has increased by only about

    1.5 °C during the past century, and today

    we’re just beginning to see its consequenc-

    es (melting ice, wildfires, hurricanes). This

    rate of rise is still slow (2.0-3.0 °C per cen-

    tury) but is accelerating. My estimate is it

    TEMPERATURE OVER TIMEFigure 1: The average surface temperature of the world’s oceans, using the baseline of 1971 to 2000 average. The shaded band shows the range of uncertainty in the data based on the number of measurements collected and the precision of the measurements used. Source: EPA

    Tem

    pera

    ture

    ano

    mal

    y (°F

    )

    2.0

    1.5

    1.0

    0.5

    0

    -0.5

    -1.0

    -1.5

    -2.01880 1900 1920 1940 1960 1980 2000 2020

    Year

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 21

    will reach a rise of about 5.0 °C by 2075. In

    my view, we’ll never stop at 2.0°C (recom-

    mended by the Paris Agreement of 2015)

    and particularly not at 1.5 °C (recommended

    by the U.N. Intergovernmental Panel on Cli-

    mate Change – IPCC in 2018) because this

    high-inertia process is totally out of control.

    Some believe that because the numbers de-

    scribing the temperature rise are small, the

    problem we face is also small. This is not the

    case. Let me compare them with our own

    body temperature, which is accurately con-

    trolled by our brain. The body temperature

    of a healthy, resting adult human being is

    98.6 °F (37.0 °C). Our “thermostat” (called

    the hypothalamus, a portion of the brain)

    controls body temperature. The span of our

    thermostat is 36.4–37.1 °C (97.5–98.8 °F)

    or about 0.7 °C. This thermostat turns on

    shivering at 97.5 °F and initiates sweating at

    98.8 °F. I mention this only to illustrate that

    certain processes must be controlled within

    small limits because small temperature

    changes can have large effects.

    According to all scientific data (www.nasa.

    gov/topics/earth/features/co2-temperature.

    html), the thermostat of global temperature

    control is CO2 concentration in the atmo-

    sphere. If it rises, the global temperature rises

    (because the thermal insulation of the planet

    increases), and when it dops, the planet cools.

    During the past 1 million years, nature

    “controlled” this concentration by keep-

    ing the inflow of CO2 into the atmosphere

    (generated by animal life and man) rough-

    ly equal the outflow (intake of plants and

    dissipation by the oceans), and therefore

    the atmospheric concentration of CO2

    stayed roughly constant, never exceeding

    280 ppm even during ice ages, chang-

    ing sun spot numbers, volcanic activity or

    meteor impacts.

    If we look at the atmosphere as a tank and

    CO2 concentration as the level in that tank,

    then we could say that this level stayed rea-

    sonably constant for a million years because

    it never exceeded 280 ppm (the planet didn’t

    need to start “sweating”) as nature took care

    of it. Since the beginning of the industrial

    revolution, humans gradually took over this

    control from nature, CO2 concentration in the

    atmosphere increased from 280 to more than

    410 ppm, and it’s predicted by most models

    that it will reach or even exceed 500 ppm by

    the end of this century.

    If a control engineer was to bring this

    process under control by returning CO2

    concentration to the stable, pre-industrial

    state, the task would be to balance the in

    and outflows of this tank, and on top of

    that, remove roughly half of the CO2 that

    accumulated during the industrial age. If a

    conventional level controller was installed

    on this tank, it would see an error of 410 –

    280 = 130 ppm and a past error accumula-

    tion of some 400-500 Gt (vvvgigatons) of

    carbon. It would immediately close the inlet

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 22

    valve and open the outlet valve.

    Unfortunately, in this process, these valves

    are stuck. The outflow from the tank (the

    CO2 intake of the plants and dissipation

    by the oceans) can’t be increased. In fact,

    it has probably decreased during the past

    century because of deforestation, acidifica-

    tion of the oceans, and building of dams/

    reservoirs, holding 8,000 km3 of water,

    which also emit carbon to the atmosphere.

    In short, this outlet valve is almost com-

    pletely stuck and we have no technology

    to open it further except reforestation,

    which is unlikely due to overpopulation

    (during the industrial age, population in-

    creased from 1.0 to 9.0 billion).

    As shown in Figure 2, every year we send 9

    Gt of carbon into the atmosphere. 3 Gt of

    that is taken up by the photosynthesis of

    CARBON IMBALANCEFigure 2: This figure shows the fast carbon cycle (left - on land, right - in the oceans) in billions of tons of carbon per year. Yellow numbers are natural fluxes, red are human contributions. White numbers refer to stored carbon. Source: NASA

  • www.controlglobal.com

    eHandbook: Level Measurement, Spring 2019 23

    plants, 2 Gt is dissipated by the oceans, and

    4 Gt remains in the atmosphere for the next

    20 to 200 years. So, the inflow exceeds the

    outflow by 4 Gt/yr.

    We do have some means to reduce this

    inflow, such as using more bicycles, public

    transport, converting to electric cars, insu-

    lating our homes, using smart thermostats

    and appliances, eliminating animal prod-

    ucts from our diet (which cuts greenhouse

    emissions by more than 10%), introduc-

    ing carbon taxes (not cap-and-trade, but

    taxes), and eventually, fully converting the

    energy economy from fossil/nuclear fuels

    to carbon-free ones. The speed of conver-

    sion is a function of both the marketplace

    and government support. Where both are

    present, the conversion is faster (in Cali-

    fornia today, green electricity is 30% of

    the total), while where only the market-

    place is driving the conversion, it is much

    slower (15% in the U.S. overall).

    It will probably take a generation or two

    to overcome the resistance of the fossil

    industry. Leaving some $35 trillion worth

    of fossil fuel in the ground justifies some

    resistance, and it will take time for society

    as a whole to realize that we must con-

    vert to solar energy and use hydrogen as

    the means of storing, transporting and

    distributing this energy to areas where

    insolation is insufficient. (For more solar

    storage technology, see my book, Post

    Oil Energy Economy, or tune in the video:

    http://techchannel.att.com/play-video.

    cfm/2011/8/25/Science-&-Technology-

    Author-Series-Bela-G-Liptak:-Post-Oil-

    Energy-Technology.)

    What even the best of our leaders seem

    to not understand is that, even after we’ve

    balanced the in and outflows, we will not

    have returned the planet to pre-industrial

    conditions because even after this tre-

    mendous technological and political trans-

    formation effort, we didn’t even start to

    remove the already accumulated 400-500

    Gt of carbon from the atmosphere, which

    can stay there for 20-200 years. And, as

    long as that accumulation remains, the

    CO2 concentration does not drop and the

    planet will keep warming.

    This is obvious to a process control engi-

    neer, but not to our well-intentioned leaders

    who wrote the Paris Agreement in 2015 or

    the smarter U.N. experts who participated

    in the IPCC meeting in 2018. It is for this

    reason that we who understand process

    control have the responsibility to explain

    that the present uncontrolled rate of carbon

    accumulation will reach approximately 500

    ppm by the end of this century, at which

    point the tropical regions of the planet are

    likely to become unlivable, and the resulting

    biblical-scale migration could destroy hu-

    man civilization.

    Béla Lipták

    [email protected]