## Modelica.Blocks.Nonlinear

Discontinuous or non-differentiable algebraic control blocks

### Information

This package contains discontinuous and non-differentiable, algebraic input/output blocks. In particular the following blocks are provided:

       Limiter           Limit the range of a signal to fixed limits.
       VariableLimiter   Limit the range of a signal to variable limits.
       DeadZone          Provide a region of zero output.

Main Author:
  Martin Otter
  Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)
  Oberpfaffenhofen
  Postfach 1116
  D-82230 Wessling
  email: Martin.Otter@dlr.de

Release Notes:

- October 21, 2002 by Christian Schweiger:
  New block VariableLimiter added.
- August 22, 1999 by Martin Otter:
  Realized, based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist.

Copyright © 1999-2002, Modelica Association and DLR.

The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package Modelica in file "Modelica/package.mo".

## Modelica.Blocks.Nonlinear.Limiter

Limit the range of a signal

### Information

The Limiter block passes its input signal as output signal as long as the input is within the specified upper and lower limits. If this is not the case, the corresponding limit is passed as output.

### Parameters

Name | Default | Description
--- | --- | ---
uMax[:] | {1} | Upper limits of input signals
uMin[size(uMax, 1)] | -uMax | Lower limits of input signals

### Modelica definition

    block Limiter "Limit the range of a signal"
      parameter Real uMax[:]={1} "Upper limits of input signals";
      parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax
        "Lower limits of input signals";
      extends Interfaces.MIMOs(final n=size(uMax, 1));

    equation
      for i in 1:n loop
        y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i]
           else u[i];
      end for;
    end Limiter;

## Modelica.Blocks.Nonlinear.VariableLimiter

Limit the range of a signal with variable limits

### Information

The Limiter block passes its input signal as output signal as long as the input is within the upper and lower limits specified by the two additional inputs limit1 and limit2. If this is not the case, the corresponding limit is passed as output.

### Parameters

Name | Default | Description
--- | --- | ---
n | 1 | Number of inputs (= number of outputs)

### Modelica definition

    block VariableLimiter
      "Limit the range of a signal with variable limits"
      extends Interfaces.MIMOs;

      Interfaces.InPort limit1(final n=n);
      Interfaces.InPort limit2(final n=n);
    protected
      Real uMax[n];
      Real uMin[n];

    equation
      for i in 1:n loop
        uMax[i] = max(limit1.signal[i], limit2.signal[i]);
        uMin[i] = min(limit1.signal[i], limit2.signal[i]);
        y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i]
           else u[i];
      end for;
    end VariableLimiter;

## Modelica.Blocks.Nonlinear.DeadZone

Provide a region of zero output

### Information

The DeadZone block defines a region of zero output.

If the input is within uMin ... uMax, the output is zero. Outside of this zone, the output is a linear function of the input with a slope of 1.

### Parameters

Name | Default | Description
--- | --- | ---
uMax[:] | {1} | Upper limits of dead zones
uMin[size(uMax, 1)] | -uMax | Lower limits of dead zones

### Modelica definition

    block DeadZone "Provide a region of zero output"
      parameter Real uMax[:]={1} "Upper limits of dead zones";
      parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax
        "Lower limits of dead zones";
      extends Interfaces.MIMOs(final n=size(uMax, 1));

    equation
      for i in 1:n loop
        y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] then u[
          i] - uMin[i] else 0;
      end for;
    end DeadZone;