EBSILON®Professional Online Documentation
Objects (Components, Streams, ...) / Component Objects - General and Categories / Controllers / Component 69: Controller with threshold and switch
In This Topic
    Component 69: Controller with threshold and switch
    In This Topic

    Component 69: Controller with threshold and switch


    Specifications

    Line connections

    1

    Scheduled value - target value -  set point

    2

    Actual value - process value

    3

    Controlled value

    4

    Inlet for value that starts controller

    5

    Inlet for threshold value

     The colour indicates the type of activation of the controller (depending upon the switch FACT):

     

    General       User Input Values       Characteristic Lines       Physics Used       Displays       Example 

    General

    Component 69 is a versatile component that combines a switch and a controller. The control process can be activated or deactivated depending on two additional control inputs. The setpoint to be set can be specified either externally via connection 1 or internally as a specification value SCV (switch FSCV). When specifying via SCV, line 1 does not need to be connected or it is possible to hide this connection. This is done on the ‘Portssheet of the component properties.

    The controller can be switched off initially and activated when a threshold value is passed.  Conversely, a controller that is initially active can be deactivated when a threshold value is reached. It is also possible to switch the controller on or off permanently. In this case, lines 4 and 5 do not need to be connected.

    This controller also outputs a value when switched off, namely that of the specification variable L3OFF. If the L3OFF field is left empty, the controller retains the value it had in the last iteration step before switching off.

    Approximate control can be realised using the specification value TOL. The controller is switched off if the actual value deviates from the setpoint by less than TOL. This measure is used to speed up the calculation if an exact setting of the target value is not required.

    Controllers can be damped even more. Three additional attenuation levels (‘very very high’, ‘even higher’, ‘extremely high’) have been introduced for this purpose.


    The order of the default values in the input mask has been sorted. The default values relating to the comparison value come first, followed by the values relating to the correction variable. Then general controller parameters such as characteristic, activation, start value specification and damping or change limitation.

     

    Decoupling of turn-on/-off feature and delayed start


    The flag FACT served both to turn a controller on and off, and to specify a delayed start. In order to be able to better expand the setting options, this feature has been distributed to the two flags FACT and FFU.
    The flag FACT is used to specify at which iteration step the controller is to start (at the earliest). FACT=0 means that the controller is to start as early as possible. The previous variants FACT=-1 and FACT=-2 for deactivating the controller with (-1) and without (-2) start value setting respectively have been marked as “deprecated“, but they are still operational for reasons of compatibility. However, it is recommended to use the new flag FFU for this purpose.
    The flag FFU offers various variants for activating and deactivating controllers in different load cases. There are the following setting options:

    • Controller active
       - always: FFU=1  
       - only in design case: FFU=4 or -4
       - only in off-design case: FFU=5 or -5
       - never: FFU=0 or -1

    • Controller not active (i.e. does not control) but sets its start value
       - always: FFU=0 
       - only in design case: FFU=5
       - only in off-design case: FFU=4

    • Controller not active, without start value setting
       - always: FFU=-1 
       - only in design case: FFU=-5
       - only in off-design case: FFU=-4

    Alternative start value in the case of deactivated controller 


    The start value one wants to set with deactivated controller is not always suitable as start value in the case of activated controller (e.g. 0 kg/s). You then had to set different starting values in the different profiles. There is an alternative start value L2STARTOFF (Component 39) and L3STARTOFF (Components 12 and 69) respectively for this. It is used when the controller is deactivated but is to set its start value. If no value is entered here, L2START and L3START respectively will be used also in the case of deactivated controller.

    Compliance with limits

    The limits L2MIN / L2MAX (component 39) and L3MIN / L3MAX (component 12, component 69) were not always strictly adhered to, but only caused the controller to be deactivated when the respective limit was exceeded. This mainly served to prevent a drifting off in the course of the iteration. For the final result, however, this behaviour is unsatisfactory as the precise achieved value depends on the behaviour of the iteration.
    For this reason, now the limits are strictly complied with.  For reasons of compatibility, however, it is possible to switch back to the old behaviour via the flag FLIM. For this, FLIM has to be set to 0 (“Shut off controller after limit was exceeded“). The standard setting is FLIM=1 (“Stop at limit“).

     

    Functionality of the limits

    The limits L3MIN/L3MAX (Component 12, Component 69) and L2MIN/L2MAX (Component 39) only become effective if numerical values are specified for them.

    If that is the case, the flag FLIM checks according to the specification with
    FLIM=0: the controller is switched off after the limit L3MIN/L3MAX is fallen below / transgressed
    or with
    FLIM=1: the controller stops on the limit L3MIN/L3MAX.

    Examples of the functionality of L3MIN, L3MAX and FLIM see Controller component 39 (EBSILON®Professional,Online Help).

     

    Deactivation of warnings


    A warning is issued by default when the controller cannot achieve its target value. In some cases, however, this is unnecessary, e.g. when, in the case of an injection, the inlet temperature is already below the set point temperature. In such cases it is possible to shut off the warning with the flag FWARN.
    The flag FWARNOFF allows to activate or deactivate warnings for deactivated controllers. Here it is checked if the start value (in the case of component 69 also the off-value L3OFF) is within the range of validity.

    Note:

    It is a warning issued only if the relative as well as the absolute deviation is larger than the warning level.
     

    Start Value Transfer In controllers (FMODE)

    (Components 12, 39, and 69) it is possible to take over the result for the controlled variable as start value for the next calculation. As there is a certain analogy with respect to the transfer of the reference values for off-design calculations here, the flag for this has been named FMODE as well. The following settings exist:

    The transferred value is written onto the specification values L3START and L3STARTOFF. However, it only has an impact if FL3START is set to “internal start value specification“. Also, the transfer only takes place if a value was entered into L3START respectively before. If the field has been set to the “empty”, the field will remain empty. When adding new controllers, FMODE=1 will be set by default. This is consistent with the previous behaviour. In a good modeling, the final result should in fact not (or only slightly) depend on the start value, but a change of the start value may lead to convergence problems. An influence on the final result also arises from the interaction of controllers with threshold values and limit values if it depends on the convergence behaviour when a controller is activated and deactivated respectively.

     

    Flag FWARN

    In the controllers there is a flag FWARN that allows setting in which situations the controller is to output warnings. For this there is a new setting FWARN=3.
    With this setting, a warning is only output if the controller has not reached its target but the control variable has not reached its limit value either.

    This setting makes sense  if reaching the limit value represents a “normal” condition, like e.g. in the case of an injection where a certain temperature is to be set downstream of the injection. By the injection, however, only a reduction of the temperature can be effected. If the temperature is below this set point value, nothing needs to be injected.
    FWARN=3 allows to set that in this case no warning is to be effected. The control variable of the controller then equals the lower limit value of 0 kg/s, and no warning is output if the set point value of the temperature has not been reached.

    It is possible to output an error message instead of a warning with the setting FWARN=4.

    FWARN=5 allows to individually program in a Kernel expression EWARN under which circumstances a comment, a warning or an error message is to be output.

     

    Set Point Specification via Kernel Expressions

    For the controllers that have the option for an internal set point specification (Components 39 and 69) a Kernel expression ESCV can be used as an alternative to the specification value SCV. The control is affected via the flag FSCV:

    • FSCV=0: the specification value SCV is used as set point value

    • FSCV=1: (only for Component 69)

    • FSCV=2: the set point value is determined from the Kernel expression ESCV.

    Please note: as the set point value is usually a variable with units and – in contrast to the simple specification value – no automatic unit conversion can be carried out in the case of Kernel expressions, the value must be calculated in standard Ebsilon units.

    Control Precision

    For the solution of an equation system, Ebsilon continues the iteration as long as the changes from one iteration step to the next are smaller than the specified iteration precision.
    Here the termination of the iteration is independent of to what extent the controllers have reached their set point value. Only a warning will be output if the deviation between actual value and set point value is too great.

    In the case of strongly damped controllers in particular, the change from one iteration step to the next is relatively small, so that the convergence criterion is already fulfilled although the control target has not been achieved yet. In these cases it would be desirable if the iteration were continued for another couple of steps in order to get closer to the specified target. Therefore the possibility to prevent a termination of the iteration in the case of too great a deviation from the set point value has been created.

    Inversely, there are also cases where the adjustment of an unimportant variable requires very many iteration steps and thus increases the computing time for the entire model. In such cases it is desirable to be able to carry out the control with a greater fuzziness.

    This option is available with the specification value TOL (for all controllers).

    The specification value TOL is used for setting the control precision in both cases. Which one of the two cases is desired is set via the flag FTOL:

    FTOL=1 (“TOL=lower bound“) serves to accelerate the control by means of a greater fuzziness. In this case, the controller terminates the control if the relative deviation between actual value and set point value falls below the bound TOL.

    FTOL=2 (“TOL=upper bound“) prevents the termination of the iteration as long as the relative deviation between actual value and set point value transgresses the bound TOL. However, this does not apply if the correction variable has reached its lower or upper bound. As the controller does not continue operating in this case, carrying out further iteration steps does not make sense.

    For analyzing the convergence behaviour, in the case FTOL=2 you can see in the result value ITNOTCONV up to which iteration step the controller has prevented a termination of the iteration. This allows to systematically find out the controllers that are responsible for a deterioration of the convergence behaviour and to improve their settings if necessary.

    FTOL=0 is the default setting.

     

    Zero point Shift

    As in the case of controllers in Ebsilon the change of the actuating variable is effected via a change factor, controllers previously could not be operated in such a way that the actuating variable was able to change its algebraic sign. To enable this, there is now a specification value CZP that serves to shift the zero point of the controller internally. Shifting is effected in positive direction. If e.g. “100“ is entered, -100 will be mapped onto 0 and it will also be possible to control beyond 0 in the range >-100.

    With great values of CZP, the internal actuating variable will become great accordingly so that this way, in the case of similar relative changes, the absolute change of the actuating variable will become very great too. This may lead to convergence problems. In this case, it is recommended to decrease the maximum change factor (CHL3 respectively), and that from the beginning ( ITCHL3 = 0 respectively).

    Kernel Expressions for Range Limits

    Previously, only fixed values could be entered as range limits for the actuating variable. Now it is possible to use a Kernel expression as the limit. To do so, the corresponding flag (FL3MIN and FL3MAX respectively for Components 12 and 69) has to be set to “Kernel expression“, and an EbsScript that calculates the corresponding limit has to be created in EL3MIN and EL3MAX respectively for Components 12 and 69.

    This feature was needed for the variation of the steam inlet pressure for a preheater in order to achieve a certain feed water outlet temperature. Without limitation, the controller decreased the pressure so far that the saturated water temperature dropped below the feed water inlet temperature and no condensation was possible anymore. A fixed limit, however, was not possible either as the feed water inlet temperature is not known in advance but only appears in the course of the calculation. For instance, the following Kernel expression allows to set the lower pressure limit to a reasonable value in each iteration step:

    function evalexpr:REAL;
    
    
    begin
    
    
        evalexpr:=waterSteamTable(1006, Feedwater.T, 0.0);
    
    end;
    

     

    Note - Setting a relative humidity of 100% or super saturation in air and flue gas lines   

    To a relative humidity of for example, to set 100% or super saturation, a controller is required.

    In the previous handling with the function "air humidity (rel.)", It could happen after iteration course that the air was supersaturated, i. Water contained in the liquid phase. The reason for this was that even with supersaturated air, the relative humidity remained at the value of 100% and the controller had thus reached its set point.

    In order to allow a regulation to the saturation point (100%) or the setting of a certain super saturation, there is a function "saturation factor".

    The saturation factor always refers to the maximum possible proportion of gaseous water. If the water content is higher, you get liquid water XH2OL. Humid air can only be considered approximately as an ideal gas. With increasing water content, the real proportion of gaseous water XH2OG decreases again. In the ideal approximation, the proportion of gaseous water would then simply remain constant, no matter how much liquid water would add to it. In reality, that's probably not the case and therefore with supersaturated air:

                                                                     XH2OG> X_SAT = f (p, t (air outlet line))

    For values up to 100%, the results of the "Saturation factor" function are the same as those of the "Humidity (rel.)" Function. 

    Definition Saturation factor for "saturated air" 0 - 100%: The result values agree with the results of the "relative humidity" function.

    Definition saturation factor for "supersaturated air"> 100% = corresponds to the ratio: total water content (XH2O) / maximum possible gaseous water content
    Water vapour saturation concentration x_sat = f (p, t (air, port 2))

     

    Example: Application of saturation factor:

    See example "Saturation factor" in the chapter Component 39 "Controller  (internal set value)"


     

     

    User Input Values

    FMODE

    Flag to define the position in calling sequence

    =0 : After calculation in design mode
    =1 : No
    =-1: After each calculation

    FL1L2

    Switch for comparison type between L1 (target value)  and L2  (process value) 

    Here you will find a table for the values of FL1L2 and the physical values used for each of the three connections.

    FSUBST

    Substance to be controlled (in combination with FL1L2 = Composition)

    Entering two to three significant letters of the desired material value is sufficient to obtain a targeted selection of material values.                

    FDAMP

    Controller damping

    Here you will find a table for the values of FDAMP and the associated change gradients.

    FL3

    Flag for corrected value type

    =1: Pressure
    =3: Enthalpy
    =4: Mass flow

    FACT

    Number of iterations, after which the controller is activated

    =0: start immediately
    =20: start after 20 iterations
    =30: start after 30 iterations
    =40: start after 40 iterations
    =50: start after 50 iterations
    =100: start after 100 iterations
    =-1: controller deactivated, only start value setting (deprecated)
    = -2: controller completely deactivated 
    (deprecated)

    FSEQ

    Flag to define the position in calling sequence

    =0: Parallel to other components

    =1: Late, after fluids are recalculated

    CHL3

    Maximum change factor of correction value

    (set as constant 0.5 until ITCHL3 is reached,

    after reaching ITCHL3 according to the preset between the boundaries: 0 < CHL3 <= 0.5)

    ITCHL3

    Number of iterations, after which the change factor becomes active

    FCHAR

    Flag for controller characteristic

    =1:  Positive (i.e. an increase of the corrected quantity leads to an increase of the actual value)
    =-1: Negative (i.e. an increase of the corrected quantity leads to a decrease of the actual value)

    FFU

    Switch for activation / deactivation / Start value set - Controller

    =0: OFF: Controller not active, but start value set in all load cases
    =1: ON: Controller active in all load cases
    =4: ON: Controller active in design, OFF: (only set starting value ) in off-design
    =5: OFF: (only set starting value) in design, ON: Controller active in off-design
    =-1: OFF: Completely deactivated in all load cases
    =-4: ON: Controller active in design, OFF: completely deactivated in off-design
    =-5: OFF: Completely deactivated  in design, ON: Controller active in off-design
    =-6: OFF: (only set starting value) in design, OFF: in off-design it isn't
    =-7: OFF: (only set starting value) in off-design, OFF: in design it isn't

            Note to -6/ - 7: In both cases, no controlling takes place. Actually the use of a controller is redundant in this case as the same effect could be achieved
            by means of a measured value input (Component 46) instead. The fact that a control can be activated on demand after all, however, facilitates a uniform
           design of several models or the creation of generally applicable macros.

    ADD21

    Additive term for comparison actual value / scheduled value
    <L2>=<L1> + ADD21

    FL4L5

    Comparison between L4 and L5 (necessary for FSCC)

    =1: Pressure
    =2: Temperature
    =3: Enthalpy
    =4: Mass flow
    =5: Power/heat flow

    ADD

    Additive value for comparison
    L4 <--> L5 + ADD

    This value is added to the set value (line 5), before the comparison is done.

    ITCHECK

    Check of the ON/OFF state

    =0:     Every time
    =5:     Every 5th iteration
    =10:   Every 10th iteration
    =20:   Every 20th iteration
    =50:   Every 50th iteratio
    =100: Every 100th iteration
    =-1: never

    FSCC

    Starting criteria for the controller

    =10: Start with controller off, at S4-(S5+ADD)>=0 on
    =11: Start with controller on, at S4-(S5+ADD)< 0 off
    =20: Start with controller off, at S4-(S5+ADD)< 0 on
    =21: Start with controller on, at S4-(S5+ADD)>=0 off
    =0: Permanent off (S4, S5 set to 1)
    =1: Permanent on (S4, S5 set to 1)

    L3OFF

    Value of line 3, if controller is off

    In order to retain the value last reached before deactivation, the field L3OFF must be left blank

    FLIM

    Handling of L3MIN and L3MAX

    =0: Shut controller off after limit was exceeded

    =1: Stop at limit

    L3MIN

    Minimum value for the correction value: if, during the regulation, the correction value falls below L3MIN, then instead the
    value L3MIN is set and the regulation is continued.

    L3MAX

    Maximum value for the correction value: if during the regulation the correction value exceeds L3MAX, then instead the
    value L3MAX is set and the regulation is continued.

    FL3START

    Flag for the type of start value input

    =0: internal definition via the specification value L3START

    =1: external specification via line 3 (Stricter plausibility checks:, (error messages !) if 
          - FL3START respectively are set to “external start value specification“, but no corresponding start value or measured value exists on the respective line.
         - a value is used as actuating variable that cannot be modified at all but is determined by other components. )

    L3START

    Start value for the controlled value (if FL3START=0)

    L3STARTOFF

    Alternative Start value if controller is off (optional)

    ITSTEP

    Controller is active every n-th step

    FSCV

    Flag for the source of the target value

    =0: internal definition via the specification value SCV
    =1: external specification via line 1
    =2: by Kernel expression ESCV

    SCV

    Target value

    ESCV

    Function for target value

    function evalexpr:REAL;
    begin
        evalexpr:=1.0;
    end;
    

    FTOL

    Meaning of TOL

    =0: not used
    =1: TOL= lower limit: controller is working only as long as relative deviation> TOL
    =2: TOL= upper limit: relative deviation must be<TOL before iteration stops

    TOL

    Controller tolerance

    If the relative deviation between the actual value and the scheduled value is less than TOL, the controller is deactivated

    FSTOP

    Flag for Stop behaviour if controller has not started

    =0: Do not stop iteration before controller has started
    =1: Stop in case of convergency even if controller has not started

    FWARN

    Warning in case of missed target

    =0: Not notification
    =1: Warning
    =3: Warning,  unless correction value is at limit
    =4: Error
    =5: Notification  according to EWARN
          FWARN=5 allows to individually program in a Kernel expression EWARN under which circumstances a comment, a warning or an error
          message is to be output.

    EWARN

    Function for notification

    function evalexpr:REAL;
      var target,actual,correction,errorlevel:real;
      diff:real;   
    begin
       target:=keGetInternal("TARGET");
       actual:=keGetInternal("ACTUAL");
       correction:=keGetInternal("CORRECTION");
       errorlevel:=keGetInternal("ERRORLEVEL");
                    
       if (abs(target)>0) then begin //use relative deviation
          diff:=abs(actual-target)/target;
       end else begin  
          diff:=abs(actual-target);
       end;
                 
       if (diff > errorlevel) then begin
          evalexpr := 3;  //Error
       end else if (diff > 0.1*errorlevel) then begin
          evalexpr := 2;  //Warning
       end else if (diff > 0.01*errorlevel) then begin
          evalexpr := 1;  //Comment
    end else begin evalexpr := 0; //None end;
    end;
    

    FWARNOFF

    Plausibility check in case of inactive controller

    =0: No warning if range (L3MIN to L3MAX) is exceeded
    =1: Warning if range (L3MIN to L3MAX) is exceeded

    Generally, all inputs that are visible are required. But, often default values are provided.

    For more information on colour of the input fields and their descriptions see Edit Component\Specification values

    For more information on design vs. off-design and nominal values see General\Accept Nominal values

     


    Result Values

    Information on the controller's result values can be found here.

     


     

    Characteristic Lines

    CCHL3 - Correction factor for CHL3

    This characteristic enables one to change the maximum change factor CHL3 continuously in the course of the iteration (ITCHL3 enables an abrupt change in the iteration step ITCHL3). Normally, one will be able to narrow down the permissible deviation at the end of the iteration, in order to achieve a faster convergence.

    x-value: Iteration step

    y-value: Correction factor (CHL3 used = default value CHL3 * y-value)


    Physics Used

    Equations

    relative deviation

     

     

                 (Target value - actual value)  

    Si =     -----------------------------------------------------

                                 Target value               

     

     

     

    relative change of the corrected value f

     

     

             |      f(new)-f(old)        |

    Ki=   |  ------------------------   | 

             |            f(old)              |  

     

     

     

    Change gradient

     

     

                Ki

    GRi = -----

                Si

     

     

     

    During the steps 1 to 10, GRi will be set for the iteration;

    from 1 to  5 with GRi = 0.95, and

    from 6 to 10 with GRi = 0.90 .

    The gradient GRi will be calculated after iteration 11 by the interpreting the previous controlling success.

    The maximum and minimum values for GRi can be defined by the user via FDAMP (see the list of input values).

    The value f(new) is limited via a sensitivity according to the following instruction.

    f(new)=f(old)*(1 +/- CHL3)

     

    The following rules apply for determining CHL3:

     

    The controller has a "self-learning" characteristic i.e. the best possible change of the correction value for the next iteration is taken from the analysis of the controlling success of the last iteration step. For this, the change gradient is used, which is defined as follows: The change gradient is a measure of the relative change of the correction value as a function of the relative deviation. A change gradient of GRi=1.0 results in a relative change of, for instance, 5% to a change of the correction value of this 5% itself. The change gradient set to GRi=0.5 returns, for this change, the correction value of 2.5%.

     

    This gradient calculated from the last two steps is used to define a new value for the correction value as shown in the following equations.

    Correction value

     

     

    Df = f *  GRi * Si

    f(new)  = f(old) * (1.0 + Df) * FCHAR

     

     

     

    There are positive and negative characteristics of controlling. It is positive, when and increase of the corrected quantity leads to an increase of the actual value. It is negative, when and increase of the corrected quantity leads to a decrease of the actual value. A negative characteristic leads to instability of the iteration. A remedy for this is creating a negative value for FCHAR.

     


    Component Displays

    Display Option 1

    Example

    Click here >> Component 69 Demo << to load an example.

    See Also