**Documentation Home Page** ◇ **HYPERSIM Home Page**

Pour la **documentation en FRANÇAIS**, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

# UCM | Switches

## Switches

Switches such as circuit-breakers and power electronic switches are simulated as resistors with two values: one small value (milliohms) for closing state and one large value (meghoms) for opening state. To know which resistor value to use, HYPERSIM® needs to know the state of switch prior to the calculation of Y matrix.

### Generalized Power Element

Each branch element described above is connected between node k and m of the substation and is equivalent to a resistor

in parallel to a current source

A generalized power element is simply a "black box" connected to nodes k, m, n etc. in the substation. It is equivalent to a conductance (inverse of resistance) square matrix

and a vector of historic current

Their dimensions are the number of nodes of the element.

of the matrix

is its self conductance at node k while

is the mutual conductance between node k and node m.

In case of a non-linear element, Y_{eq} is split into two parts:

where Y_{ini }is the fixed part used as initial condition and Y_{add} is the varying part used to update the conductance according to its operating point.

Therefore, all branches are also generalized elements connected to two nodes in the substation. Linear branches have Y_{add} = 0 and Y_{ini} = Y_{eq}

All power elements, fixed or non-linear, are equivalent to resistors in parallel with historic currents. In the node equation

therefore becomes a pure conductance matrix, I is the algebraic sum of currents, including source currents and historic currents, injected into nodes; currents entering a node have a + sign, currents leaving have a - sign.

### Solution of Substation's Node Equation

Y has dimension n x m where n is the number of nodes in the substation (excluding the ground node), V and I are vectors of dimension n. A three-phase bus bar corresponds to 3 nodes.

As with each individual element, HYPERSIM splits Y into a fixed part and a varying part:

is formed by the fixed parts Y_{ini} of all elements and Y_{ADD} is formed by varying parts Y_{add} of all elements.

The simulation of all power elements in a substation required to solve the node equation YV=I where Y and I are known eqs. to and V is the node voltage vector to be found.

HYPERSIM solves the node equation using the LDU conversion: Y=LDU

where L is a lower triangular matrix with all values in the upper triangular matrix equal to 0 and all elements on the diagonal equal to 1, D is a diagonal matrix, U is an upper triangular matrix with all values in the lower triangle equal to 0 and all elements on the diagonal equal to 1. For example, if the matrix Y has a dimension 3 times 3, the LDU conversion will have the following form:

The LDU conversion is chosen instead of the LU conversion because when Y is symmetrical (which is the case for most of the substation's node equation), U=L^{T}. HYPERSIM will use this advantage if it exists to save the time needed to compute U.

The node equation YV=I now becomes LDUV=I

This is solved in two steps: first, replace J=DUV and solve for J in:

**LJ = I**

using the forward substitution (because L is lower triangular). Then solve for V in

**DUV = J**

using the backward substitution (because DU is an upper triangular matrix).

**LDU decomposition**

The LDU conversion is done based on the pivot technique used to nullify a particular element in a matrix.

**Only the final formulas are listed here:**

**Elements in lower triangular:**

**Elements in upper triangular:**

For i<j.

At any time step, if Y does not change from the previous step, the LDU decomposition does not need to be redone.

If Y changes due to either switching or a change of behavior of some non-linear elements, then the LDU decomposition must be recalculated.

In HYPERSIM, for saving space, matrices L, D, and U are stored on a single Y_{LDU} matrix, as shown, for an example of 3 modes. Elements of D are on the diagonal, and elements of L and U (except their diagonal) are respectively in the lower left and upper right triangular.

Example of a

matrix and a part of it which needs to be recalculated if a resistor connected to node 2 changes

All equivalent resistors of power elements contributing to Y are connected either between a node k and the ground node or between two nodes k and m. According to previous equations, if a resistor connected to node k changes its value, this changes at least the value of

Therefore, D_{ii}, L_{ij} and U_{ij}, for all i and

have to be re-evaluated. In the Y_{LDU} matrix shown here, this corresponds to elements in the square block below and on the right starting from

k=2 in this example)

For the purpose of saving computation time, HYPERSIM orders the Y and Y_{LDU} matrices such as nodes connected to varying elements, groups them together and corresponds to the lower right part of these matrices.

### Sparseness of Y Matrix

The $Y$ matrix is normally sparse, meaning that many elements are zero. To avoid calculations with zero elements, HYPERSIM keeps a matrix $YF$ indicating the state of each element of

Y:

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323

Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter