Menu

complex valued quantities Log in to Edit

Martin Mueller

Complex valued quantities

MUSE can represent complex valued quantities by the real and imaginary part as well as by an argument (angle) and a magnitude (absolut value or modulus).

A complex valued quantity can therefore be described by a two dimensional PDF where one marginal distribution defines the real and the other one the imaginary part. If x is a complex valued quantity re(x) defines the PDF of the real part and im(x) the PDF of the imaginary part of x. MUSE provides three ways to define a complex valued quantity.

  • The distribution complex
  • The function complex
  • The function polar

It is also possible to convert between the two different representations.

The distribution complex

A complex distribution with a Gaussian distributed real- and imaginary part can be defined as a basic model like follows:

<model name="Complex" targetid="s">
 <model name="Complex" targetid="s">
  <influence id="s" name="Complex">
    <distribution id="c">
      <complex>
        <realpart>
          <distribution>
            <gauss>
              <mu parameter="#111">1</mu>
              <sigma parameter="#112">1</sigma>
            </gauss>
          </distribution>
        </realpart>
        <imaginarypart>
          <distribution>
            <gauss>
              <mu parameter="#113">1</mu>
              <sigma parameter="#114">1</sigma>
            </gauss>
          </distribution>
        </imaginarypart>  
      </complex>
    </distribution>
  </influence>
</model>

By this definition the real part is Gaussian distributed with a mean value of 0 and a standard deviation of 1. The imaginary part has a mean of 1 with a standard deviation of 1. This distribution can now be used in the same way like other distributions. So we can define a influence in the initialization section by the statement

<instance name="s1" model="complex"></instance>

and use it with all the given operators in the formula to calculate the uncertainty.

Of course it is possible to use each supported distribution instead of Gaussian distributions in the definition above.

Function complex

(since version 0.6)

A complex valued quantity can be defined using the function complex. This function returns the complex number which corresponds to a specified real and imaginary part in Cartesian form. For example we can take a Gaussian distribution with a mean of 1 and a standard deviation of 0.1 for the real part and the same one for the imaginary. This can be defined by the following simulation file.

<simulation>
  <initialization>
    <instance name="_real" model="gaussparam">
      <parameters>
        <parameter id="#1">1</parameter>
        <parameter id="#2">.1</parameter>
      </parameters>
    </instance>
    <instance name="_real" model="gaussparam">
      <parameters>
        <parameter id="#1">1</parameter>
        <parameter id="#2">.1</parameter>
      </parameters>
    </instance>
  </initialization>
  <calculation dimensions="-1">
    <analyse mode="on" histbars="40" datafiles="delete"/>
    <uncertainty> complex(_real,_imag) </uncertainty>
  </calculation>
</simulation>

Function polar

(since version 0.6)

A complex valued quantity can be defined using the function polar. This function returns the complex number which corresponds to a specified modulus and argument part in the polar form. For example we can take a Gaussian distribution with a mean of 1 and a standard deviation of 0.1 for the modulus part and a Gaussian distribution with a mean value of pi/4 and a standard deviation of 0.1 for the argument. This can be defined by the following simulation file.

<simulation>
  <initialization>
    <instance name="_mod" model="gaussparam">
      <parameters>
        <parameter id="#1">1</parameter>
        <parameter id="#2">.1</parameter>
      </parameters>
    </instance>
    <instance name="_arg" model="gaussparam">
      <parameters>
        <parameter id="#1">pi/4</parameter>
        <parameter id="#2">.1</parameter>
      </parameters>
    </instance>
  </initialization>
  <calculation dimensions="-1">
    <analyse mode="on" histbars="40" datafiles="delete"/>
    <uncertainty> polar(_mod,_arg) </uncertainty>
  </calculation>
</simulation>

Beware that not all operations are defined in polar coordinates! Here you can see how to convert between the two different representations of complex numbers.


Related

Wiki: Conversion of Complex valued quantities
Wiki: Distributions

MongoDB Logo MongoDB