Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We take the series RLC block located in ’artemis/SSN/SSN Components/SSN Series RLC’ for our explanations.

Image RemovedImage Added

The Series RLC state-space equations are well-known:

Mathblock
alignmentleft
V_{i n}-R i_{L}-L \frac{d i_{L}}{d t}-v_{C}=0

Mathblock
alignmentleft
i_{L}-C \frac{d v_{C}}{d t}

Mathblock
alignmentleft
\begin{bmatrix}
L & 0 \\
0 & C \\
\end{bmatrix} \begin{bmatrix} i_L \\ v_c \\ \end{bmatrix}
= \begin{bmatrix} -R & -1 \\ 1 & 0 \\ \end{bmatrix} \begin{bmatrix} i_L \\ v_c \\ \end{bmatrix} + \begin{bmatrix} 1 \\ 0 \\ \end{bmatrix} v_{in}

Mathblock
alignmentleft
i_{in}= \begin{bmatrix} 1 & 0\\ \end{bmatrix} \begin{bmatrix} i_L \\ v_c \\ \end{bmatrix} 

In the model, these matrices are built using Simulink:

Info

Note: The order of the states (vC and iL) is inverted from the equations. Both representations are correct.

The continuous-time domain matrices Ac Bc Cc, with a null D matrix, are then discretized using both Trapezoidal and Backward Euler rule of integration. The resulting discrete A matrix Ad depends on the discretization method used. The same comment also applies to the discrete B matrix. C and D matrices are not affected by discretization. h is the discretization time step.

Trapezoidal

Mathblock
alignmentleft
A_d = \frac{I+ \frac{Ah}{2}}{I- \frac{Ah}{2}}

Backward Euler

Mathblock
alignmentleft
A_d = \frac{I}{I-Ah}

This is done in the following subsystem, with Ts being the discretization time step.

Mathblock
alignmentleft
A_d = (I- \frac{Ah}{2})^{-1} (I+ \frac{Ah}{2})

Mathblock
alignmentleft
R_{d1}=R_{d2}= \frac{Bh/2}{I-Ah/2}

Mathblock
alignmentleft
C_d =C

Mathblock
alignmentleft
DCM \: Admittance \quad Y_e=C_dB_{d2}

Mathblock
alignmentleft
DCM \: History \: Source \quad I_h=C_d(A_dx+B_{d1}u_n)

In the model, this is again made using only Simulink blocks: