IscHarmonic

The IscHarmonic class provides access to an IPSA harmonic source. Individual harmonic orders are indexed using an integer number. This corresponds to a specific harmonic order which is a float, meaning that harmonic orders may be any value as shown below:

Order Index

Harmonic Order

1

2

2

2.5

3

3.75

4

15

Field Values

IscHarmonic Field Values

Type

Field Name

Description

Integer

FromUID

Gets the unique ID for busbar.

String

BusName

Gets the busbar name.

String

Name

Gets the harmonic source name.

Integer

Status

Status:

  • 0 = Switched in

  • -1 = Switched out

Integer

InjectionType

Sets and gets the harmonic injection type which is defined as follows:

  • 0 = Current injection

  • 1 = Voltage injection

Integer

ImpedanceType

Sets and gets the harmonic impedance type which is defined as follows:

  • 0 = Not specified

  • 1 = Ideal impedance

  • 2 = Single R and X value for all harmonic orders

  • 3 = User defined R and X values for each harmonic order

String

VoltageImpedanceR

Sets and gets the resistance for the harmonic impedance if ImpedanceType is 2.

String

VoltageImpedanceX

Sets and gets the reactance for the harmonic impedance if ImpedanceType is 2.

IscHarmonic Class

class ipsa.IscHarmonic

Provides access to an IPSA harmonic source.

SetName(strName: str) bool

Sets the name as a string.

Parameters:

strName (str) – The selected string name.

Returns:

True if successful.

Return type:

bool

GetIValue(nFieldIndex: int) int

Returns an integer value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The integer value.

Return type:

int

GetDValue(nFieldIndex: int) float

Returns a double value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The double value.

Return type:

float

GetSValue(nFieldIndex: int) str

Returns a string value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The string value.

Return type:

str

GetBValue(nFieldIndex: int) bool

Returns a boolean value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The boolean value.

Return type:

bool

SetIValue(nFieldIndex: int, nValue: int) bool

Sets the value for the enumerated field from an integer.

Parameters:
  • nFieldIndex (int) – The field index.

  • nValue (int) – The given integer value.

Returns:

True if successful.

Return type:

bool

SetDValue(nFieldIndex: int, dValue: float) bool

Sets the value for the enumerated field from a double.

Parameters:
  • nFieldIndex (int) – The field index.

  • dValue (float) – The given double value.

Returns:

True if successful.

Return type:

bool

SetSValue(nFieldIndex: int, strValue: int) bool

Sets the value for the enumerated field from a string.

Parameters:
  • nFieldIndex (int) – The field index.

  • strValue (str) – The given string value.

Returns:

True if successful.

Return type:

bool

SetBValue(nFieldIndex: int, bValue: bool) bool

Sets the value for the enumerated field from boolean.

Parameters:
  • nFieldIndex (int) – The field index.

  • bValue (bool) – The given boolean value.

Returns:

True if successful.

Return type:

bool

SetOrder(nOrderIndex: int, h: float) None

Sets the harmonic order index to the selected harmonic order.

Parameters:
  • nOrderIndex (float) – The order index.

  • nOrderIndex – The selected harmonic order.

GetOrder(nOrderIndex: int) float

Returns the harmonic order for the order index.

Parameters:

nOrderIndex (int) – The order index.

Returns:

The harmonic order.

Return type:

float

GetMagnitudePU(nOrderIndex: int) float

Gets the current or voltage magnitude for the order index.

Parameters:

nOrderIndex (int) – The order index.

Returns:

The current or voltage magnitude.

Return type:

float

SetMagnitudePU(nOrderIndex: int, dMagnitude: float) None

Sets the current or voltage magnitude for the order index.

Parameters:
  • nOrderIndex (int) – The order index.

  • dMagnitude (float) – The current or voltage magnitude.

GetAngleDeg(nOrderIndex: int) float

Gets the current or voltage angle in degrees for the order index.

Parameters:

nOrderIndex (int) – The order index.

Returns:

The current or voltage angle in degrees.

Return type:

float

SetAngleDeg(nOrderIndex: int, dAngleDeg: float) None

Sets the current or voltage angle in degrees for the order index.

Parameters:
  • nOrderIndex (int) – The order index.

  • dAngleDeg (float) – The current or voltage angle in degrees.

GetAngleRad(nOrderIndex: int) float

Gets the current or voltage angle in radians for the order index.

Parameters:

nOrderIndex (int) – The order index.

Returns:

The current or voltage angle in radians.

Return type:

float

SetAngleRad(nOrderIndex: int, dAngleRad: float) None

Sets the current or voltage angle in radians for the order index.

Parameters:
  • nOrderIndex (int) – The order index.

  • dAngleRad (float) – The current or voltage angle in radians.

GetHarmonicR() Dict[int, float]

Returns a dictionary of harmonic resistances. The dictionary key values are the order indexes and the values are the harmonic resistances in per unit.

Returns:

A dictionary of harmonic resistances.

Return type:

dict(int, float)

GetHarmonicX() Dict[int, float]

Returns a dictionary of harmonic reactances. The dictionary key values are the order indexes and the values are the harmonic reactances in per unit.

Returns:

A dictionary of harmonic reactances.

Return type:

dict(int, float)

SetHarmonicR(dicHarmonic: Dict[int, float]) None

Sets the harmonic resistances from a dictionary. The dictionary key values are the order indexes and the values are the harmonic resistances in per unit.

Parameters:

dicHarmonic (dict(int,float)) – The harmonic resistances.

SetHarmonicX(dicHarmonic: Dict[int, float]) None

Sets the harmonic reactances from a dictionary. The dictionary key values are the order indexes and the values are the harmonic reactances in per unit.

Parameters:

dicHarmonic (dict(int,float)) – The harmonic reactances.