.PowerSystems.Utilities.Complex

Complex functions (auxiliary sub-package)

Information

Auxiliary sub-package for didactic purposes showing the treatment of complex numbers with rotation matrices. Complex numbers are represented as 2x2 matrix, such that arithmetic operations on complex numbers become equivalent to arithmetic operations on their matrix representations.

Complex number (x + jy), considered as an element of an algebra, and represented by the real 2x2 matrix z:

  z = [x, -y]
      [y,  x]

The following relations hold for

- complex conjugate:   transpose(z)
- addition:            z1 + z2
- multiplication:      z1*z2
- inverse:             transpose(z)/det(z)
- absolute value:      sqrt(det(z))

where det(z) denotes the determinant of matrix z.

Example:

The linear differential equation with constant coefficients for a real scalar current I and voltage V

  L*dI/dt + R*I = V
is mapped by Fourier-transform to the algebraic equation
  (R + j*omega*L)*i = v
with complex i and v, if for simplicity only one frequency term is assumed. Using
  ComplexType Z =  R*re + omega*L*im (complex impedance)
  ComplexType i = i1*re + i2*im      ('current phasor')
  ComplexType v = v1*re + v2*im      ('voltage phasor')
the equation finally becomes
  Z*i = v

Contents

Name Description
 ComplexType matrix representation of complex number
 conjC Conjugate value of complex number
 absC Absolute value of complex number
 detC Determinant of complex number matrix
 invC Inverse of complex number
 sumC Sum of complex numbers
 prodC Product of complex numbers
 expI Exponential of imaginary number
 expC Exponential of complex number
 powerC Power of complex number
 sqrtC Square-root of complex number
 logC Logarithm of complex number
 cosC Cosine of complex number
 sinC Sine of complex number
 tanC Tangens of complex number
 atanC Arc-tangens of complex number
 coshC Hyperbolic cosine of complex number
 sinhC Hyperbolic sine of complex number
 tanhC Hyperbolic tangens of complex number
 atanhC Area-tangens-hyp of complex number

Generated at 2026-04-14T18:18:34Z by OpenModelicaOpenModelica 1.26.3 using GenerateDoc.mos