Example: To Build the Integrator Element

  1. In the Component Manager, create a new ESDL module and rename it to IntegratorLimit.
  2. Open an ESDL Editor for IntegratorLimit.
  3. Add a continuous variable named mem (). The integrator’s memory stores the value of the outgoing signal.
  4. Add a continuous parameter K () and a dT element ().
  5. Add the limiter module from the following folder: Systemlib_ETAS\Nonlinears\Limiter.
  6. Add the methods out, reset, and compute.

    You can either rename the default method calc to compute or delete it.

  7. Use the Interface Editor to edit the corresponding method interfaces as follows:

    Method

    Arguments

    Returns

    compute

    cont mx

    cont in

    cont mn

    void

    out

    cont

    reset

    cont initVal

    void

  8. Enter the ESDL code for each method and save the method. The ESDL code for each method is listed below.

    Method

    ESDL code

    reset (initVal)

    mem = initVal;

    cont out ()

    return mem;

    compute (mn, in, mx)

    mem = mem + K * in * dT;

    mem = Limiter.out (mn, mem, mx);