VeraGridEngine.Simulations.SigmaAnalysis packageο
Submodulesο
VeraGridEngine.Simulations.SigmaAnalysis.sigma_analysis_driver moduleο
- class VeraGridEngine.Simulations.SigmaAnalysis.sigma_analysis_driver.SigmaAnalysisDriver(grid: MultiCircuit, options: PowerFlowOptions)[source]ο
Bases:
DriverTemplate- convergence_reportsο
- name = 'Sigma Analysis'ο
- optionsο
- tpe = 'Sigma Analysis'ο
- class VeraGridEngine.Simulations.SigmaAnalysis.sigma_analysis_driver.SigmaAnalysisResults[source]ο
Bases:
ResultsTemplate- CLASS_DATA_VARIABLES = {'Sbus': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'bus_names': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'distances': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'lambda_value': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'sigma_im': <VeraGridEngine.Simulations.results_template.ResultsProperty object>, 'sigma_re': <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>)ο
- 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>)ο
- Sbusο
- apply_from_island(results: SigmaAnalysisResults, b_idx)[source]ο
Apply results from another island circuit to the circuit results represented here.
Arguments:
results: PowerFlowResults
b_idx: bus original indices
elm_idx: branch original indices
- bus_namesο
- convergedο
- convergence_reportsο
- distancesο
- elapsedο
- lambda_valueο
- mdl(result_type: ResultTypes, indices=None, names=None) None | ResultsTable[source]ο
- Parameters:
result_type
indices
names
- Returns:
- nο
- plot(fig, ax, n_points=1000)[source]ο
Plot the sigma analysis :param fig: Matplotlib figure. If None, one will be created :param ax: Matplotlib Axis :param n_points: number of points in the curve
- sigma_imο
- sigma_reο
- VeraGridEngine.Simulations.SigmaAnalysis.sigma_analysis_driver.multi_island_sigma(multi_circuit: MultiCircuit, options: PowerFlowOptions, logger=<VeraGridEngine.basic_structures.Logger object>) SigmaAnalysisResults[source]ο
Multiple islands power flow (this is the most generic power flow function) :param multi_circuit: MultiCircuit instance :param options: PowerFlowOptions instance :param logger: list of events to add to :return: PowerFlowResults instance
- VeraGridEngine.Simulations.SigmaAnalysis.sigma_analysis_driver.sigma_distance(sigma_real, sigma_imag) ndarray[tuple[Any, ...], dtype[float64]][source]ο
Distance to the collapse in the sigma space
The boundary curve is given by y = sqrt(1/4 + x)
the distance is d = sqrt((x-a)^2 + (sqrt(1/4+ x) - b)^2)
the derivative of this is dβ=(2 (-a + x) + (-b + sqrt(1/4 + x))/sqrt(1/4 + x))/(2 sqrt((-a + x)^2 + (-b + sqrt(1/4 + x))^2))
Making dβ=0, and solving for x, we obtain:
- x1 = 1/12 (-64 a^3 + 48 a^2
12 sqrt(3) sqrt(-64 a^3 b^2 + 48 a^2 b^2 - 12 a b^2 + 108 b^4 + b^2)
12 a + 216 b^2 + 1)^(1/3) - (-256 a^2 + 128 a - 16)/
- (192 (-64 a^3 + 48 a^2
12 sqrt(3) sqrt(-64 a^3 b^2 + 48 a^2 b^2 - 12 a b^2 + 108 b^4 + b^2)
12 a + 216 b^2 + 1)^(1/3)) + 1/12 (8 a - 5)
- x2 = 1/12 (-64 a^3 + 48 a^2
12 sqrt(3) sqrt(-64 a^3 b^2 + 48 a^2 b^2 - 12 a b^2 + 108 b^4 + b^2)
12 a + 216 b^2 + 1)^(1/3) - (-256 a^2 + 128 a - 16) /
- (192 (-64 a^3 + 48 a^2
12 sqrt(3) sqrt(-64 a^3 b^2 + 48 a^2 b^2 - 12 a b^2 + 108 b^4 + b^2)
12 a + 216 b^2 + 1)^(1/3)) + 1/12 (8 a - 5)
- Parameters:
sigma_real β Sigma real array
sigma_imag β Sigma imag array
- Returns:
distance of the sigma point to the curve sqrt(0.25 + x)