sysloss.components#

Components that can be added to the system.

Constants#

LIMITS_DEFAULT = {
“vi”: [0.0, 1.0e6], # input voltage (V)
“vo”: [0.0, 1.0e6], # output voltage (V)
“vd”: [0.0, 1.0e6], # voltage difference, vi-vo (V)
“ii”: [0.0, 1.0e6], # input current (A)
“io”: [0.0, 1.0e6], # output current (A)
“pi”: [0.0, 1.0e6], # input power (W)
“po”: [0.0, 1.0e6], # output power (W)
“pl”: [0.0, 1.0e6], # power loss (W)
“tr”: [0.0, 1.0e6], # temperature rise (°C)
“tp”: [-1.0e6, 1.0e6]} # peak temperature (°C)

Classes#

Source

Voltage source.

PLoad

Power load.

ILoad

Current load.

RLoad

Resistive load.

RLoss

Resistive series loss.

VLoss

Voltage series loss.

Converter

Voltage converter.

LinReg

Linear voltage regulator.

PSwitch

Power switch.

PMux

Power multiplexer/switcher.

Rectifier

Full bridge rectifier.

Module Contents#

class Source(name: str, *, vo: float, rs: float = 0.0, limits: dict = LIMITS_DEFAULT)#

Voltage source.

The Source component must be the root of a system or subsystem.

Parameters:
  • name (str) – Source name.

  • vo (float) – Output voltage (V).

  • rs (float, optional) – Source resistance (Ohm), by default 0.0

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: io, po, pl.

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class PLoad(name: str, *, pwr: float, limits: dict = LIMITS_DEFAULT, pwrs: float = 0.0, rt: float = 0.0, loss: bool = False)#

Power load.

A power load represents a constant power sink, referenced to 0V. Other components can not be connected to a PLoad. The load can optionally be configured as a loss.

Parameters:
  • name (str) – Load name.

  • pwr (float) – Load power (W).

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, ii, tr, tp

  • pwrs (float, optional) – Load sleep power (W), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

  • loss (bool, optional) – Count power as a loss, by default False

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class ILoad(name: str, *, ii: float, limits: dict = LIMITS_DEFAULT, iis: float = 0.0, rt: float = 0.0, loss: bool = False)#

Current load.

A current load represents a constant current sink, referenced to 0V. Other components can not be connected to an ILoad. The load can optionally be configured as a loss.

Parameters:
  • name (str) – Load name.

  • ii (float) – Load current (A).

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, pi, tr, tp

  • iis (float, optional) – Load sleep current (A), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

  • loss (bool, optional) – Count power as a loss, by default False

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class RLoad(name: str, *, rs: float, rt: float = 0.0, limits: dict = LIMITS_DEFAULT, loss: bool = False)#

Resistive load.

A resisitve load represents a constant resistance, referenced to 0V. Other components can not be connected to an RLoad. The load can optionally be configured as a loss.

Parameters:
  • name (str) – Load name.

  • rs (float) – Load resistance (Ohm).

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, ii, pi, tr, tp

  • loss (bool, optional) – Count power as a loss, by default False

Raises:

ValueError – If rs==0.0 or a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class RLoss(name: str, *, rs: float, rt: float = 0.0, limits: dict = LIMITS_DEFAULT)#

Resistive series loss.

A series resisitve loss represents a constant resistance connected in series with other components.

Parameters:
  • name (str) – Loss name.

  • rs (float) – Loss resistance (Ohm).

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class VLoss(name: str, *, vdrop: float | dict, rt: float = 0.0, limits: dict = LIMITS_DEFAULT)#

Voltage series loss.

This voltage loss element is connected in series with other elements. The voltage drop can be either a constant (float) or interpolated. Interpolation data dict for voltage drop can be either 1D (function of output current only):

vdrop= {"vi":[2.5], "io":[0.1, 0.5, 0.9], "vdrop":[[0.23, 0.41, 0.477]]}

Or 2D (function of input voltage and output current):

vdrop = {"vi":[2.5, 5.0, 12.0], "io":[0.1, 0.5, 0.9], "vdrop":[[0.23, 0.34, 0.477], [0.27, 0.39, 0.51], [0.3, 0.41, 0.57]]}

Parameters:
  • name (str) – Loss name.

  • vdrop (float | dict) – Voltage drop (V), a constant value (float) or interpolation data (dict).

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class Converter(name: str, *, vo: float, eff: float | dict, iq: float = 0.0, limits: dict = LIMITS_DEFAULT, iis: float = 0.0, rt: float = 0.0)#

Voltage converter.

The converter efficiency can be either a constant (float) or interpolated. Interpolation data dict for efficiency can be either 1D (function of output current only):

eff = {"vi":[3.3], "io":[0.1, 0.5, 0.9], "eff":[[0.55, 0.78, 0.92]]}

Or 2D (function of input voltage and output current):

eff = {"vi":[3.3, 5.0, 12.0], "io":[0.1, 0.5, 0.9], "eff":[[0.55, 0.78, 0.92], [0.5, 0.74, 0.83], [0.4, 0.6, 0.766]]}

Parameters:
  • name (str) – Converter name.

  • vo (float) – Output voltage (V).

  • eff (float | dict) – Converter efficiency, a constant value (float) or interpolation data (dict).

  • iq (float, optional) – Quiescent (no-load) current (A), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, ii, io, pi, po, pl, tr, tp

  • iis (float, optional) – Sleep (shut-down) current (A), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

Raises:

ValueError – If efficiency is 0.0 or > 1.0 or limit value has invalid format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class LinReg(name: str, *, vo: float, vdrop: float = 0.0, iq: float = 0.0, ig: float = 0.0, limits: dict = LIMITS_DEFAULT, iis: float = 0.0, rt: float = 0.0)#

Linear voltage regulator.

If vi - vo < vdrop, the output voltage is reduced to vi - vdrop during analysis.

The regulator ground current (ig) can be either a constant (float) or interpolated. Interpolation data dict for ground current can be either 1D (function of output current only):

ig = {"vi":[5.0], "io":[0.0, 0.05, 0.1], "ig":[[2.0e-6, 0.5e-3, 0.85e-3]]}

Or 2D (function of input voltage and output current):

ig = {"vi":[2.5, 5.0], "io":[0.0, 0.05, 0.1], "ig":[[1.2e-6, 0.34e-3, 0.64e-3], [2.0e-6, 0.5e-3, 0.85e-3]]}

Parameters:
  • name (str) – Converter name.

  • vo (float) – Output voltage (V).

  • vdrop (float, optional) – Dropout voltage (V), by default 0.0.

  • iq (float | dict, optional) – Ground current (A), by default 0.0. iq is deprecated and will be removed in a future version, use ig instead.

  • ig (float | dict, optional) – Ground current (A), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

  • iis (float, optional) – Sleep (shut-down) current (A), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

Raises:

ValueError – If vdrop > vo or limit value has invalid format.

classmethod from_file(name: str, *, fname: str)#

Read LinReg parameters from .toml file.

Parameters:
  • name (str) – LinReg name

  • fname (str) – File name.

class PSwitch(name: str, *, rs: float = 0.0, ig: float = 0.0, limits: dict = LIMITS_DEFAULT, iis: float = 0.0, rt: float = 0.0)#

Power switch.

The power switch ground current (ig) can be either a constant (float) or interpolated. Interpolation data dict for ground current can be either 1D (function of output current only):

ig = {"vi":[3.6], "io":[0.005, 0.05, 0.5], "ig":[[36e-6, 37e-6, 35e-6]]}

Or 2D (function of input voltage and output current):

ig = {"vi":[0.9, 1.8, 3.6], "io":[0.005, 0.05, 0.5], "ig":[[5e-6, 5e-6, 5e-6], [7e-6, 7e-6, 7e-6], [36e-6, 37e-6, 35e-6]]}

Parameters:
  • name (str) – Power switch name.

  • rs (float, optional) – Switch resistance (Ohm), by default 0.0

  • ig (float | dict, optional) – Ground current (A), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

  • iis (float, optional) – Sleep (shut-down) current (A), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

Raises:

ValueError – If a limits value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class PMux(name: str, *, rs: float = 0.0, ig: float = 0.0, limits: dict = LIMITS_DEFAULT, iis: float = 0.0, rt: float = 0.0)#

Power multiplexer/switcher.

The power mux can have up to 4 inputs and connects one of the inputs to the output in prioritized order. The first input that is active (not turned off) will be selected. If all inputs are off, the output will also be off. The ON resistance can be individually specified for each input. There can only be one PMux in a a system.

The power mux ground current (ig) can be either a constant (float) or interpolated. Interpolation data dict for ground current can be either 1D (function of output current only):

ig = {"vi":[5.0], "io":[0.005, 0.05, 0.5], "ig":[[36e-6, 37e-6, 35e-6]]}

Or 2D (function of input voltage and output current):

ig = {"vi":[3.3, 5.0, 12.0], "io":[0.005, 0.05, 0.5], "ig":[[5e-6, 5e-6, 5e-6], [7e-6, 7e-6, 7e-6], [36e-6, 37e-6, 35e-6]]}

Parameters:
  • name (str) – Power mux name.

  • rs (float | list, optional) – Mux on-resistance (Ohm), by default 0.0

  • ig (float | dict, optional) – Ground current (A), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

  • iis (float, optional) – Sleep (shut-down) current (A), by default 0.0.

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

Raises:

ValueError – If a parameter value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.

class Rectifier(name: str, *, vdrop: float | dict = 0.0, rs: float = 0.0, ig: float = 0.0, iq: float = 0.0, limits: dict = LIMITS_DEFAULT, rt: float = 0.0)#

Full bridge rectifier.

If the voltage drop (vdrop) is set to non-zero, a diode rectifier will be modelled. The rs, ig, iq and iis parameters are then ignored. Note that vdrop represents the forward voltage of a single diode. Total voltage drop will be 2 x vdrop. The voltage drop can be either a constant (float) or interpolated. Interpolation data dict for voltage drop can be either 1D (function of output current only):

vdrop= {"vi":[2.5], "io":[0.1, 0.5, 0.9], "vdrop":[[0.23, 0.41, 0.477]]}

Or 2D (function of input voltage and output current):

vdrop = {"vi":[2.5, 5.0, 12.0], "io":[0.1, 0.5, 0.9], "vdrop":[[0.23, 0.34, 0.477], [0.27, 0.39, 0.51], [0.3, 0.41, 0.57]]}

If the vdrop parameter is zero, a MOSFET bridge will be modelled. The parameters rs, ig, iq and iis then apply. Note that rs represents the resistance in a single MOSFET. Total resistance in bridge will be 2 x rs. The rectifier ground current (ig) can be either a constant (float) or interpolated. Interpolation data dict for ground current can be either 1D (function of output current only):

ig = {"vi":[5.0], "io":[0.005, 0.05, 0.5], "ig":[[36e-6, 37e-6, 35e-6]]}

Or 2D (function of input voltage and output current):

ig = {"vi":[3.3, 5.0, 12.0], "io":[0.005, 0.05, 0.5], "ig":[[5e-6, 5e-6, 5e-6], [7e-6, 7e-6, 7e-6], [36e-6, 37e-6, 35e-6]]}

The output voltage of the rectifier is always positive (or zero).

Parameters:
  • name (str) – Rectifier name.

  • vdrop (float | dict) – Diode (each) voltage drop (V), a constant value (float) or interpolation data (dict).

  • rs (float | list, optional) – MOSFET (each) on-resistance (Ohm), by default 0.0

  • ig (float | dict, optional) – Total ground current (A), by default 0.0.

  • iq (float, optional) – Quiescent (no-load) current (A), by default 0.0.

  • limits (dict, optional) – Voltage, current and power limits, by default LIMITS_DEFAULT. The following limits apply: vi, vo, vd, ii, io, pi, po, pl, tr, tp

  • rt (float, optional) – Thermal resistance (°C/W), by default 0.0.

Raises:

ValueError – If a parameter value is not of the correct format.

classmethod from_file(name: str, *, fname: str)#

Read component parameters from .toml file.

Parameters:
  • name (str) – Component name

  • fname (str) – File name.

Raises:

ValueError – If parameter value is not of the correct type.