Load Estimators#

Load estimators are functions that describe the expected future load. The specific load estimator is specified by class name (e.g., Const) by the load_est key when starting a new session. Each class has specific configuration parameters to be specified in load_est_cfg. By default, MovingAverage is used.

Here’s an example setting the load estimator and config:

>>> from prog_client import Session
>>> s = Session('BatteryCircuit', load_est='Const', load_est_cfg={'load': 1.0})

The following load estimators are supported:

prog_server.models.load_ests.Const(t, x=None, session=None, cfg=None)#

Constant load estimator. Load is assumed to be constant over time.

cfg: dictionary with one key (load) where value is the constant load (dict)

e.g., {‘load’: {‘u1’: 0.1}}


prog_server.models.load_ests.Variable(t, x=None, session=None, cfg=None)#

Variable (i.e. piecewise) load estimator. The piecewise load function is defined in the load_est_cfg as ordered dictionary starting_time: load.

cfg: ordered dictionary starting_time: load. First key should always be 0

e.g., {‘0’: {‘u1’: 0.1}, ‘100’: {‘u1’: 0.2}, ‘300’: {‘u1’: 0.3}, ‘500’: {‘u1’: 0.0}}


prog_server.models.load_ests.MovingAverage(t, x=None, session=None, cfg=None)#

Moving average load estimator. Load is estimated as the mean of the last window_size samples. Noise can be added using the following optional configuration parameters:

  • base_std: standard deviation of noise

  • std_slope: Increase in std with time (e.g., 0.1 = increase of 0.1 in std per second)

  • t0: Starting time for calculation of std

std of applied noise is defined as base_std + std_slope (t-t0). By default no noise is added