.PowerSystems.Utilities.Complex

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

NameDescription
ComplexTypematrix representation of complex number
conjCConjugate value of complex number
absCAbsolute value of complex number
detCDeterminant of complex number matrix
invCInverse of complex number
sumCSum of complex numbers
prodCProduct of complex numbers
expIExponential of imaginary number
expCExponential of complex number
powerCPower of complex number
sqrtCSquare-root of complex number
logCLogarithm of complex number
cosCCosine of complex number
sinCSine of complex number
tanCTangens of complex number
atanCArc-tangens of complex number
coshCHyperbolic cosine of complex number
sinhCHyperbolic sine of complex number
tanhCHyperbolic tangens of complex number
atanhCArea-tangens-hyp of complex number

Generated at 2024-04-17T18:16:15Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos