# Constraint

This block outputs values so that its input remains zero. This works only if there is a path back from its output to its input in the diagram. If F is the function corresponding to this path, the block solves the equation F(x)=0 where x denotes the output of the block. If the solver cannot find an initial solution, you can provide an initial guess value for the output. If F(x)=0 has several solutions, the initial guess helps the solver to select the desired solution. It is also possible to make use of the output derivative to build the F function, such as F(xapos;,x)=0. In this case, the guess values for x and its derivative xapos; should be provided.

## Library

Activate/MathOperations

## Description

The Algebraic Constraint block constrains the input signal f(x) to zero and outputs an algebraic state x. The block outputs the value necessary to produce a zero at the input.

The output must affect the input through some direct feedback path, i.e., the feedback path should only contain blocks with direct feedthrough (without internal states). This enables you to specify algebraic equations for index-1 differential/algebraic systems (DAEs). By default, the initial value of the state which is used as initial guess values is zero.

If the solver cannot converge towards the solution at the beginning of the integration, you can help the solver by providing an initial guess that is close to the solution value. If f(x) has several solutions, the initial guess helps the solver to select the desired solution.

## Parameters

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| Provide output derivatives | Number | 0 | |

| Initial output (guess value) | real value. default value of the state is 0. | Matrix | |

| initial output derivative (guess value) | Structure | ||

| Initial state derivative | Cell of matrices |

## Ports

Name | Type | Description | IO Type | Number |
---|---|---|---|---|

| explicit | output | 1 | |

| explicit | output | dae | |

| explicit | input | 1 |

## Advanced Properties

Name | Value | Description |
---|---|---|

| yes | |

| no | |

| no | |

| no | |

| yes | |

| no |