andes.core.block.LeadLag#

class andes.core.block.LeadLag(u, T1, T2, K=1, zero_out=True, name=None, tex_name=None, info=None)[source]#

Lead-Lag transfer function block in series implementation.

     ┌───────────┐
     │   1 + sT1 │
u -> │ K ─────── │ -> y
     │   1 + sT2 │
     └───────────┘

Exports two variables: internal state x and output algebraic variable y.

Parameters:
uBaseVar or BaseParam

Input signal.

T1BaseParam

Numerator (lead) time constant.

T2BaseParam

Denominator (lag) time constant. Also used as the t_const of the internal state x.

KBaseParam or numeric, optional

Static gain (default 1).

zero_outbool, optional

If True (default), bypass the block as y = K * u when T2 <= 0. Set to False only if T2 > 0 is guaranteed by the data.

__init__(u, T1, T2, K=1, zero_out=True, name=None, tex_name=None, info=None)[source]#

Methods

define()

Notes

enforce_tex_name(fields)

Enforce tex_name is not None

export()

Method for exporting instances defined in this class in a dictionary.

f_numeric(**kwargs)

Function call to update differential equation values.

g_numeric(**kwargs)

Function call to update algebraic equation values.

j_numeric(**kwargs)

Per-iteration numerical Jacobian update.

j_reset()

Helper function to clear the lists holding the numerical Jacobians.

j_setup()

One-time Jacobian sparsity pattern and constant value setup.

Attributes

class_name

Return the class name.