VeraGridEngine.Simulations.StateEstimation packageο
Submodulesο
VeraGridEngine.Simulations.StateEstimation.observability_analysis moduleο
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.add_pseudo_measurements_for_unobservable_buses(bus_dict, unobservable_buses: object, se_input: object, V: object, Ybus: object, Cf: object, Ct: object, sigma_pseudo_meas_value: object = 1.0, Sbase=100, logger: object = None) StateEstimationInput[source]ο
Full preprocessing: detect unobservable buses and add pseudo-measurements
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.build_local_groups(measurement_ids, include_line_measurements_on_both_ends=True)[source]ο
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.bus_observability_profile(measurement_profile)[source]ο
Convert measurement_profile (from profile_measurements) into a nested dict: {measurement_type: {bus: worst_status}}
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.check_for_observability_and_return_unobservable_buses(nc: NumericalCircuit, Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, no_slack: ndarray[tuple[Any, ...], dtype[int64]], F: ndarray[tuple[Any, ...], dtype[int64]], T: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, se_input: StateEstimationInput, fixed_slack: bool = True, tolerance_for_observability_score=1e-06, do_profiling_of_measurements: bool = False, include_line_measurements_on_both_ends: bool = True, logger: Logger | None = None)[source]ο
Fast decoupled WLS state estimator using LU decomposition based observability analysis Active power -> angles Reactive power -> voltage magnitudes
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.classify_redundancy(H, idx, tol=1e-09)[source]ο
Classify redundant measurement into none/single/multiple redundancy.
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.parallel_measurement_profiling(Ha, Hr, Hv, Hi, measurement_ids, a_idx, r_idx, v_idx, i_idx, include_line_measurements_on_both_ends=True)[source]ο
Parallel execution of all 4 measurement profiling strategies.
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.plot_bus_observability(bus_status_per_type)[source]ο
bus_status_per_type: dict of dicts Example: {
βactiveβ: {βbus_1β: βcriticalβ, βbus_2β: βglobally redundantβ, β¦}, βreactiveβ: {β¦}, βvoltageβ: {β¦}, βcurrentβ: {β¦}
}
- VeraGridEngine.Simulations.StateEstimation.observability_analysis.profile_measurements(Hsub, ids, tol=1e-09, include_line_measurements_on_both_ends=True)[source]ο
Condition System rank Local rank Classification Rank drops system-wide β β Critical System rank full full full Locally redundant (local rank unchanged) System rank full full β Globally redundant ( local rank β)
VeraGridEngine.Simulations.StateEstimation.pseudo_measurements_augmentation moduleο
- class VeraGridEngine.Simulations.StateEstimation.pseudo_measurements_augmentation.PseudoMeasurement(value, sigma, api_obj: Bus, name='', idtag=None)[source]ο
Bases:
MeasurementTemplate- CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'diff_changes', 'device_idtag', 'tpe', 'device_name')ο
- CLASS_PROPERTIES_WITH_PROFILE = {'sigma': 'sigma_prof', 'value': 'value_prof'}ο
- CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:value, prop:sigma)ο
- CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name, prop:value, prop:sigma)ο
- CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'sigma': prop:sigma, 'tpe': prop:tpe, 'value': prop:value}ο
- VeraGridEngine.Simulations.StateEstimation.pseudo_measurements_augmentation.add_pseudo_measurements(se_input, unobservable_buses, V, Ybus, neighbors, bus_dict, sigma_pseudo=1.0, Sbase=100, logger=None)[source]ο
Extend se_input with pseudo-measurements for unobservable buses. neighbors: prebuilt neighbor list per bus
VeraGridEngine.Simulations.StateEstimation.state_estimation moduleο
- VeraGridEngine.Simulations.StateEstimation.state_estimation.Jacobian_SE(Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, V: ndarray[tuple[Any, ...], dtype[complex128]], f: ndarray[tuple[Any, ...], dtype[int64]], t: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, inputs: StateEstimationInput, pvpq: ndarray[tuple[Any, ...], dtype[int64]], load_per_bus: ndarray[tuple[Any, ...], dtype[complex128]], fixed_slack: bool)[source]ο
Get the arrays for calculation :param Ybus: Admittance matrix :param Yf: βfromβ admittance matrix :param Yt: βtoβ admittance matrix :param V: Voltages complex vector :param f: array of βfromβ indices of branches :param t: array of βtoβ indices of branches :param Cf: Connectivity matrix βfromβ :param Ct: Connectivity matrix βtoβ :param inputs: instance of StateEstimationInput :param pvpq: array of pq|pv bus indices :param load_per_bus: Array of load per bus in p.u. (used to compute the Pg and Qg measurements) :param fixed_slack: if true, the measurements on the slack bus are omitted :return: H (jacobian), h (residual), S (power injections)
- VeraGridEngine.Simulations.StateEstimation.state_estimation.b_test(sigma2: ndarray[tuple[Any, ...], dtype[float64]], H: csc_matrix, dz: ndarray, HtWH: csc_matrix, c_threshold: float = 4.0, logger: Logger | None = None)[source]ο
From RELIABLE BAD DATA PROCESSING FOR REAL-TIME STATE ESTIMATION, 1983 Monticelli & Garcia (1983) βb-testβ bad data detection :param sigma2: sigma 2 :param H: Jacobian at the solution (m x k) :param dz: residuals r = z - h(x^) (length m) :param HtWH: G = H^T W H (k x k) :param c_threshold: detection threshold βcβ (use 4.0 as in the paper) :param logger: Logger :return:
βrβ : residuals r_i βsigma2β : sigma_i^2 βPiiβ : residual variances P_ii βrNβ : normalized residuals r_i / sqrt(P_ii) βimaxβ : index of largest |rN| βbβ : b at imax βis_badβ : bool
- VeraGridEngine.Simulations.StateEstimation.state_estimation.decoupled_state_estimation(nc: NumericalCircuit, Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, Yshunt_bus: ndarray[tuple[Any, ...], dtype[complex128]], F: ndarray[tuple[Any, ...], dtype[int64]], T: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, se_input: StateEstimationInput, vd: ndarray[tuple[Any, ...], dtype[int64]], pv: ndarray[tuple[Any, ...], dtype[int64]], no_slack: ndarray[tuple[Any, ...], dtype[int64]], tol=1e-09, max_iter=100, verbose: int = 0, c_threshold: float = 4.0, prefer_correct: bool = False, fixed_slack: bool = False, logger: Logger | None = None) NumericStateEstimationResults[source]ο
Fast decoupled WLS state estimator using LU decomposition. Active power -> angles Reactive power -> voltage magnitudes
- VeraGridEngine.Simulations.StateEstimation.state_estimation.get_measurements_and_deviations(t: int | None, se_input: StateEstimationInput, Sbase: float, use_current_squared_meas: bool = True) Tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[object_]]][source]ο
get_measurements_and_deviations the measurements into βmeasurementsβ and βsigmaβ ordering: Pinj, Pflow, Qinj, Qflow, Iflow, Vm :param t: time step :param se_input: StateEstimationInput object :param Sbase: base power in MVA (i.e. 100 MVA) :param use_current_squared_meas: use squared current measurements? :return: measurements vector in per-unit, sigma vector in per-unit
- VeraGridEngine.Simulations.StateEstimation.state_estimation.solve_se_gauss_newton(nc: NumericalCircuit, Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, Yshunt_bus: ndarray[tuple[Any, ...], dtype[complex128]], F: ndarray[tuple[Any, ...], dtype[int64]], T: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, se_input: StateEstimationInput, vd: ndarray[tuple[Any, ...], dtype[int64]], pv: ndarray[tuple[Any, ...], dtype[int64]], no_slack: ndarray[tuple[Any, ...], dtype[int64]], tol=1e-09, max_iter=100, verbose: int = 0, c_threshold: float = 4.0, prefer_correct: bool = False, fixed_slack: bool = False, logger: Logger | None = None) NumericStateEstimationResults[source]ο
Linearize the non-linear measurement model around the current state estimate (Jacobian H)
Solve the linear WLS problem: Ξx = 1/(Hα΅WH)Hα΅Wdz
Update the state: x = x + Ξx
Repeat until convergence
- VeraGridEngine.Simulations.StateEstimation.state_estimation.solve_se_lm(nc: NumericalCircuit, Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, Yshunt_bus: ndarray[tuple[Any, ...], dtype[complex128]], F: ndarray[tuple[Any, ...], dtype[int64]], T: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, se_input: StateEstimationInput, vd: ndarray[tuple[Any, ...], dtype[int64]], pv: ndarray[tuple[Any, ...], dtype[int64]], no_slack: ndarray[tuple[Any, ...], dtype[int64]], tol=1e-09, max_iter=100, verbose: int = 0, c_threshold: float = 4.0, prefer_correct: bool = False, fixed_slack: bool = False, logger: Logger | None = None) NumericStateEstimationResults[source]ο
Solve the state estimation problem using the Levenberg-Marquadt method :param nc: instance of NumericalCircuit :param Ybus: Admittance matrix :param Yf: Admittance matrix of the from Branches :param Yt: Admittance matrix of the to Branches :param Yshunt_bus: Array of shunt admittances :param F: array with the from bus indices of all the Branches :param T: array with the to bus indices of all the Branches :param Cf: :param Ct: :param se_input: state estimation input instance (contains the measurements) :param vd: array of slack node indices :param pv: array of PV node indices :param no_slack: array of non-slack node indices :param tol: Tolerance :param max_iter: Maximum nuber of iterations :param verbose: Verbosity level :param c_threshold: Bad data detection threshold βcβ (4 as default) :param prefer_correct: if true the measurements are corrected instead of deleted :param fixed_slack: if true, the measurements on the slack bus are omitted :param logger: log it out :return: NumericPowerFlowResults instance
- VeraGridEngine.Simulations.StateEstimation.state_estimation.solve_se_nr(nc: NumericalCircuit, Ybus: csc_matrix, Yf: csc_matrix, Yt: csc_matrix, Yshunt_bus: ndarray[tuple[Any, ...], dtype[complex128]], F: ndarray[tuple[Any, ...], dtype[int64]], T: ndarray[tuple[Any, ...], dtype[int64]], Cf: csc_matrix, Ct: csc_matrix, se_input: StateEstimationInput, vd: ndarray[tuple[Any, ...], dtype[int64]], pv: ndarray[tuple[Any, ...], dtype[int64]], no_slack: ndarray[tuple[Any, ...], dtype[int64]], tol=1e-09, max_iter=100, verbose: int = 0, c_threshold: float = 4.0, prefer_correct: bool = False, fixed_slack: bool = False, logger: Logger | None = None) NumericStateEstimationResults[source]ο
Solve the state estimation problem using the Levenberg-Marquadt method :param nc: instance of NumericalCircuit :param Ybus: Admittance matrix :param Yf: Admittance matrix of the from Branches :param Yt: Admittance matrix of the to Branches :param Yshunt_bus: Array of shunt admittances :param F: array with the from bus indices of all the Branches :param T: array with the to bus indices of all the Branches :param Cf: :param Ct: :param se_input: state estimation input instance (contains the measurements) :param vd: array of slack node indices :param pv: array of PV node indices :param no_slack: array of non-slack node indices :param tol: Tolerance :param max_iter: Maximum nuber of iterations :param verbose: Verbosity level :param c_threshold: Bad data detection threshold βcβ (4 as default) :param prefer_correct: if true the measurements are corrected instead of deleted :param fixed_slack: if true, the measurements on the slack bus are omitted :param logger: log it out :return: NumericPowerFlowResults instance
VeraGridEngine.Simulations.StateEstimation.state_estimation_inputs moduleο
- class VeraGridEngine.Simulations.StateEstimation.state_estimation_inputs.StateEstimationInput[source]ο
Bases:
object- slice(bus_idx: ndarray[tuple[Any, ...], dtype[int64]], branch_idx: ndarray[tuple[Any, ...], dtype[int64]]) StateEstimationInput[source]ο
Slice this object given the island branch and bus indices :param bus_idx: array of bus indices of an island :param branch_idx: array of branch indices of an island :return: new sliced StateEstimationInput
- slice_with_mask(mask: ndarray[tuple[Any, ...], dtype[bool]]) StateEstimationInput[source]ο
Get a new StateEstimationInput without the measurements that fall in the mask marked with a 0 :param mask: mask of measurements to keep :return: StateEstimationInput
- VeraGridEngine.Simulations.StateEstimation.state_estimation_inputs.slice_pair(obj_measurements: List[MeasurementTemplate], obj_indices: List[int], index_map: Dict[int, int])[source]ο
Slice obj_measurements and obj_indices using an index->island index map :param obj_measurements: list of measurements :param obj_indices: list of device indices where the measurement applies :param index_map: main index -> island index mapping :return: new_obj_measurement, new_obj_index
VeraGridEngine.Simulations.StateEstimation.state_estimation_results moduleο
- class VeraGridEngine.Simulations.StateEstimation.state_estimation_results.NumericStateEstimationResults(V: ndarray[tuple[Any, ...], dtype[complex128]], Scalc: ndarray[tuple[Any, ...], dtype[complex128]], m: ndarray[tuple[Any, ...], dtype[float64]], tau: ndarray[tuple[Any, ...], dtype[float64]], Sf: ndarray[tuple[Any, ...], dtype[complex128]], St: ndarray[tuple[Any, ...], dtype[complex128]], If: ndarray[tuple[Any, ...], dtype[complex128]], It: ndarray[tuple[Any, ...], dtype[complex128]], loading: ndarray[tuple[Any, ...], dtype[complex128]], losses: ndarray[tuple[Any, ...], dtype[complex128]], Pf_vsc: ndarray[tuple[Any, ...], dtype[float64]], St_vsc: ndarray[tuple[Any, ...], dtype[complex128]], If_vsc: ndarray[tuple[Any, ...], dtype[float64]], It_vsc: ndarray[tuple[Any, ...], dtype[complex128]], losses_vsc: ndarray[tuple[Any, ...], dtype[float64]], loading_vsc: ndarray[tuple[Any, ...], dtype[float64]], Sf_hvdc: ndarray[tuple[Any, ...], dtype[complex128]], St_hvdc: ndarray[tuple[Any, ...], dtype[complex128]], losses_hvdc: ndarray[tuple[Any, ...], dtype[complex128]], loading_hvdc: ndarray[tuple[Any, ...], dtype[float64]], norm_f: float, converged: bool, iterations: int, elapsed: float, bad_data_detected=False, is_observable=True)[source]ο
Bases:
objectNumericStateEstimationResults, used to return values from the numerical methods
- Ifο
- If_vscο
- Itο
- It_vscο
- Pf_vscο
- Scalcο
- Sfο
- Sf_hvdcο
- Stο
- St_hvdcο
- St_vscο
- Vο
- bad_data_detectedο
- convergedο
- elapsedο
- is_observableο
- iterationsο
- loadingο
- loading_hvdcο
- loading_vscο
- lossesο
- losses_hvdcο
- losses_vscο
- methodο
- norm_fο
- tap_angleο
- tap_moduleο
- class VeraGridEngine.Simulations.StateEstimation.state_estimation_results.StateEstimationResults(n: int, m: int, n_hvdc: int, n_vsc: int, n_gen: int, n_batt: int, n_sh: int, bus_names: ndarray, branch_names: ndarray, hvdc_names: ndarray, vsc_names: ndarray, gen_names: ndarray, batt_names: ndarray, sh_names: ndarray, bus_types: ndarray, clustering_results=None)[source]ο
Bases:
ResultsTemplate- CLASS_DATA_VARIABLES = {'F': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'If': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'If_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'It': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'It_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Pf_hvdc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Pf_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Pt_hvdc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sbus': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Sf': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'St': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'St_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'T': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'Vbranch': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'area_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bad_data_detected': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'batt_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'battery_q': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'branch_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_area_indices': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_types': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'gen_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'gen_q': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_F': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_T': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'hvdc_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading_hvdc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'loading_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses_hvdc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'losses_vsc': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'sh_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'shunt_q': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'tap_angle': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'tap_module': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'voltage': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'vsc_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>}ο
- CLASS_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)ο
- If: CxVecο
- If_vscο
- It: CxVecο
- It_vscο
- LOCAL_RESULTS_DECLARATIONS = (<VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>, <VeraGridEngine.Simulations.results_template.ResultsProperty object>)ο
- Pf_hvdc: Vecο
- Pf_vscο
- Pt_hvdc: Vecο
- Sbus: CxVecο
- Sf: CxVecο
- St: CxVecο
- St_vscο
- Vbranch: CxVecο
- apply_from_island(results: NumericStateEstimationResults, b_idx: ndarray, br_idx: ndarray, hvdc_idx: ndarray, vsc_idx: ndarray) None[source]ο
Apply results from another island circuit to the circuit results represented here. :param results: NumericPowerFlowResults from an island circuit :param b_idx: bus original indices :param br_idx: branch original indices :param hvdc_idx: hvdc original indices :param vsc_idx: vsc original indices :return: None
- bad_data_detectedο
- batt_namesο
- battery_q: Vecο
- branch_names: StrVecο
- bus_names: StrVecο
- bus_types: IntVecο
- compare(other: StateEstimationResults, tol=1e-06) Tuple[bool, Logger][source]ο
Compare this results with another :param other: PowerFlowResults :param tol: absolute comparison tolerance :return: all ok?, Logger
- property convergedο
Check if converged in all modes :return: True / False
- convergence_reports: List[ConvergenceReport]ο
- property elapsedο
Check if converged in all modes :return: True / False
- property errorο
Check if converged in all modes :return: True / False
- gen_namesο
- gen_q: Vecο
- get_branch_df() DataFrame[source]ο
Get a DataFrame with the branches results :return: DataFrame, Pf in MW, Qf in MVAr, Pt in MW, Qt in MVAr, loading in %, Ploss in MW, Qloss in MVAr
- get_bus_df() DataFrame[source]ο
Get a DataFrame with the buses results :return: DataFrame, Vm in p.u., Va in deg, P in MW, Q in MVAr
- get_overload_score(branch_prices: ndarray[tuple[Any, ...], dtype[float64]])[source]ο
Compute the cost of overload :param branch_prices: array of branch prices :return:
- get_report_dataframe(island_idx=0)[source]ο
Get a DataFrame containing the convergence report.
Arguments:
island_idx: (optional) island index
Returns:
DataFrame
- hvdc_names: StrVecο
- property iterationsο
Check if converged in all modes :return: True / False
- loading: CxVecο
- loading_hvdc: Vecο
- loading_vscο
- losses: CxVecο
- losses_hvdc: Vecο
- losses_vscο
- mdl(result_type: ResultTypes) ResultsTable[source]ο
get the ResultsTable model :param result_type: ResultTypes :return: ResultsTable instance
- plot_bars_limit: intο
- sh_namesο
- shunt_q: Vecο
- tap_angle: Vecο
- tap_module: Vecο
- voltage: CxVecο
- vsc_names: StrVecο
VeraGridEngine.Simulations.StateEstimation.state_stimation_driver moduleο
- class VeraGridEngine.Simulations.StateEstimation.state_stimation_driver.StateEstimationConvergenceReport[source]ο
Bases:
ConvergenceReport- add_se(method, converged: bool, error: float, elapsed: float, iterations: int, bad_data_detected: bool, is_observable: bool, bus_contribution: list, pseudo_measurements: list, unobservable_buses: list, measurement_profile: dict)[source]ο
- Parameters:
method
converged
error
elapsed
iterations
bad_data_detected
is_observable
bus_contribution
pseudo_measurements
unobservable_buses
measurement_profile
- Returns:
- bad_data_detectedο
- bus_contributionο
- get_bad_data_detected() bool[source]ο
Get bad data detection results :return: List of bad data detection results
- property is_observable: boolο
Get info is the island was observable :return: List of is_obsevable booleans
- measurement_profileο
- pseudo_measurementsο
- unobservable_busesο
- class VeraGridEngine.Simulations.StateEstimation.state_stimation_driver.StateEstimationDriver(circuit: MultiCircuit, options: StateEstimationOptions | None = None)[source]ο
Bases:
DriverTemplate- static collect_measurements(circuit: MultiCircuit) StateEstimationInput[source]ο
Form the input from the circuit measurements :return: nothing, the input object is stored in this class
- name = 'State estimation'ο
- optionsο
- tpe = 'State estimation'ο
- class VeraGridEngine.Simulations.StateEstimation.state_stimation_driver.StateEstimationOptions[source]ο
Bases:
object- add_pseudo_measurementsο
- c_thresholdο
- fixed_slackο
- include_line_measurements_on_both_endsο
- max_iterο
- observability_analysisο
- prefer_correctο
- pseudo_meas_stdο
- run_meas_profilingο
- solverο
- tolο
- verboseο