# Miscellaneous#

## Per Unit System#

The bases for AC system are

• $$S_b^{ac}$$: three-phase power in MVA. By default, $$S_b^{ac}=100 MVA$$ (set by System.config.mva).

• $$V_b^{ac}$$: phase-to-phase voltage in kV.

• $$I_b^{ac}$$: current base $$I_b^{ac} = \frac{S_b^{ac}} {\sqrt{3} V_b^{ac}}$$

The bases for DC system are

• $$S_b^{dc}$$: power in MVA. It is assumed to be the same as $$S_b^{ac}$$.

• $$V_b^{dc}$$: voltage in kV.

Some device parameters are given as per unit values under the device base power and voltage (if applicable). For example, the Line model andes.models.line.Line has parameters r, x and b as per unit values in the device bases Sn, Vn1, and Vn2. It is up to the user to check data consistency. For example, line voltage bases are typically the same as bus nominal values. If the r, x and b are meant to be per unit values under the system base, each Line device should use an Sn equal to the system base mva.

Parameters in device base will have a property value in the Model References page. For example, Line.r has a property z, which means it is a per unit impedance in the device base. To find out all applicable properties, refer to the "Other Parameters" section of andes.core.param.NumParam.

After setting up the system, these parameters will be converted to per units in the bases of system base MVA and bus nominal voltages. The parameter values in the system base will be stored to the v attribute of the NumParam. The original inputs in the device base will be moved to the vin attribute. For example, after setting up the system, Line.x.v is the line reactances in per unit under system base.

Values in the v attribute is what get utilized in computation. Writing new values directly to vin will not affect the values in v afterwards. To alter parameters after setting up, refer to example notebook 2.

## Profiling Import#

To speed up the command-line program, import profiling is used to breakdown the program loading time.

With tool profimp, andes can be profiled with profimp "import andes" --html > andes_import.htm. The report can be viewed in any web browser.

## What won't not work#

You might have heard that PyPy is faster than CPython due to a built-in JIT compiler. Before you spend an hour compiling the dependencies, here is the fact: PyPy won't work for speeding up ANDES.

PyPy is often much slower than CPython when using CPython extension modules (see the PyPy_FAQ). Unfortunately, NumPy is one of the highly optimized libraries that heavily use CPython extension modules.