andes.core.discrete.AntiWindup#

class andes.core.discrete.AntiWindup(u, lower, upper, enable=True, no_warn=False, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, name=None, tex_name=None, info=None, state=None, allow_adjust: bool = True)[source]#

Anti-windup limiter.

Anti-windup limiter prevents the wind-up effect of a differential variable. The derivative of the differential variable is reset if it continues to increase in the same direction after exceeding the limits. During the derivative return, the limiter will be inactive

if x > xmax and x dot > 0: x = xmax and x dot = 0
if x < xmin and x dot < 0: x = xmin and x dot = 0

This class takes one more optional parameter for specifying the equation.

Parameters:
stateState, ExtState

A State (or ExtState) whose equation value will be checked and, when condition satisfies, will be reset by the anti-windup-limiter.

__init__(u, lower, upper, enable=True, no_warn=False, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, name=None, tex_name=None, info=None, state=None, allow_adjust: bool = True)[source]#

Methods

check_eq([allow_adjust, adjust_lower, ...])

Check the variables and equations and set the limiter flags.

check_iter_err([niter, err])

Check if the minimum iteration or maximum error is reached so that this discrete block should be enabled.

check_var(*args, **kwargs)

This function is empty.

do_adjust_lower(val, lower[, allow_adjust, ...])

Adjust the lower limit.

do_adjust_upper(val, upper[, allow_adjust, ...])

Adjust the upper limit.

get_limit_report()

Return a list of dicts describing variables clamped at limits.

get_names()

Available symbols from this class

get_tex_names()

Return tex_names of exported flags.

get_values()

list2array(n)

Allocate memory for the discrete flags specified in self.export_flags.

save_unconstrained()

Save the input variable's unconstrained value (call after init pass 1).

Attributes

class_name