|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
Performs impedance-based stability assessment of network areas. More...
#include <Stability_estimate.h>
Public Member Functions | |
| StabilityEstimate ()=default | |
| Default constructor. | |
| ~StabilityEstimate ()=default | |
| Default destructor. | |
| void | add_areas (Network *net) |
| Populates AC/DC area maps from the network hierarchy. | |
| MatrixXcd | compute_equivalent_admittance_parameters_num (SubNetwork *subnet, double frequency) |
| Computes numeric equivalent admittance parameters for a subnetwork. | |
| MatrixXcd | compute_closing_impedance (SubNetwork *, string &, MatrixXcd &, MatrixXcd &) |
| Computes the visible impedance when other subnetwork outputs are shorted. | |
| MatrixXcd | compute_transfer_function (string converter_name, string location, double frequency) |
| Evaluates a converter transfer function at a single frequency. | |
| void | writeFileTF (string converter_name, string location, double start_frequency, double end_frequency, int number_of_points) |
| Writes transfer function data to a file over a frequency sweep. | |
| void | bodeplotTF (string converter_name, string location, double start_frequency, double end_frequency, int number_of_points) |
| Plots the transfer function as a Bode diagram over a frequency sweep. | |
| void | nyquistplotTF (string converter_name, string location, double start_frequency, double end_frequency, int number_of_points) |
| Plots the transfer function as a Nyquist diagram over a frequency sweep. | |
| void | print_summary () const |
| Prints a summary of identified AC/DC areas and converters. | |
| std::unordered_map< std::string, SubNetwork * > & | get_ac_grids () |
| Returns the map of AC grid subnetworks by name. | |
| std::unordered_map< std::string, SubNetwork * > & | get_dc_grids () |
| Returns the map of DC grid subnetworks by name. | |
Performs impedance-based stability assessment of network areas.
Partitions a Network into AC grids, DC grids, and converter subnetworks, then evaluates equivalent admittance parameters and transfer functions at specified frequencies for stability margin analysis.
|
default |
Default constructor.
|
default |
Default destructor.
| void StabilityEstimate::add_areas | ( | Network * | net | ) |
Populates AC/DC area maps from the network hierarchy.
| net | Network whose area decomposition is used. |
References Network::add_areas(), Network::get_ac_grid_names(), Network::get_ac_grids(), Network::get_converters(), Network::get_dc_grid_names(), Network::get_dc_grids(), and Network::is_area_empty().
Referenced by example_stability_check().
| void StabilityEstimate::bodeplotTF | ( | string | converter_name, |
| string | location, | ||
| double | start_frequency, | ||
| double | end_frequency, | ||
| int | number_of_points | ||
| ) |
Plots the transfer function as a Bode diagram over a frequency sweep.
Generates data and triggers a Bode plot for the Y-parameter matrix.
| converter_name | Name of the converter element. |
| location | Output port or bus identifier. |
| start_frequency | Sweep start frequency in Hz. |
| end_frequency | Sweep end frequency in Hz. |
| number_of_points | Number of frequency points. |
| start_frequency | The starting frequency for the plot. |
| end_frequency | The ending frequency for the plot. |
| number_of_points | The number of points to plot across the frequency range. |
References bode_plot_implot(), compute_transfer_function(), and j.
Referenced by example_stability_check().
| MatrixXcd StabilityEstimate::compute_closing_impedance | ( | SubNetwork * | sub, |
| string & | bus_name, | ||
| MatrixXcd & | Y_parameters, | ||
| MatrixXcd & | Y_closing | ||
| ) |
Computes the visible impedance when other subnetwork outputs are shorted.
Computes the equivalent closing impedance for a subnetwork port.
| subnet | Subnetwork under test. |
| location | Output port identifier (modified in place if needed). |
| Y_param | Admittance matrix of the subnetwork. |
| Z_param | Impedance matrix of the subnetwork. |
location.This function calculates the equivalent impedance seen from a specific output port (connection_name) of a subnetwork, considering the loading effects of other connected converters represented by Z_closing.
| sub | Pointer to the SubNetwork object. |
| connection_name | The name of the output port for which to compute the impedance. |
| Y_parameters | The multi-port admittance matrix of the subnetwork. |
| Z_closing | The closing impedance matrix representing loads at other ports. |
| std::runtime_error | if the connection_name is not found in the subnetwork's outputs. |
References SubNetwork::getOutputs().
Referenced by compute_transfer_function().
| MatrixXcd StabilityEstimate::compute_equivalent_admittance_parameters_num | ( | SubNetwork * | subnet, |
| double | frequency | ||
| ) |
Computes numeric equivalent admittance parameters for a subnetwork.
Computes the numerical equivalent multi-port admittance parameters for a subnetwork.
| subnet | Subnetwork whose Y-parameters are evaluated. |
| frequency | Evaluation frequency in Hz. |
frequency.| subnet | Pointer to the SubNetwork object. |
| frequency | The frequency in Hz for the calculation. |
| std::invalid_argument | if the subnet pointer is null or the subnetwork name is invalid. |
References Network::getBuses(), SubNetwork::getName(), SubNetwork::getOutputs(), SubNetwork::getTransformation(), Bus::isGround(), and j.
Referenced by compute_transfer_function().
| MatrixXcd StabilityEstimate::compute_transfer_function | ( | string | converter_name, |
| string | location, | ||
| double | frequency | ||
| ) |
Evaluates a converter transfer function at a single frequency.
Computes the transfer function for stability analysis of a specific converter.
| converter_name | Name of the converter element. |
| location | Output port or bus identifier. |
| frequency | Evaluation frequency in Hz. |
| converter_name | The name of the converter under analysis. |
| location | The side of the converter from which the analysis is performed (e.g., "AC1" or "DC1"). |
| frequency | The frequency in Hz for the calculation. |
References compute_closing_impedance(), compute_equivalent_admittance_parameters_num(), Element::compute_y_parameters(), Converter::getACarea(), Bus::getBusLocation(), Bus::getBusName(), Element::getConnections(), Converter::getDCarea(), and vectorToMatrix().
Referenced by bodeplotTF(), example_stability_check(), nyquistplotTF(), and writeFileTF().
|
inline |
Returns the map of AC grid subnetworks by name.
|
inline |
Returns the map of DC grid subnetworks by name.
| void StabilityEstimate::nyquistplotTF | ( | string | converter_name, |
| string | location, | ||
| double | start_frequency, | ||
| double | end_frequency, | ||
| int | number_of_points | ||
| ) |
Plots the transfer function as a Nyquist diagram over a frequency sweep.
Generates data and triggers a Nyquist plot for the Y-parameter matrix.
| converter_name | Name of the converter element. |
| location | Output port or bus identifier. |
| start_frequency | Sweep start frequency in Hz. |
| end_frequency | Sweep end frequency in Hz. |
| number_of_points | Number of frequency points. |
| start_frequency | The starting frequency for the plot. |
| end_frequency | The ending frequency for the plot. |
| number_of_points | The number of points to plot across the frequency range. |
References compute_transfer_function(), j, and nyquist_plot_implot().
Referenced by example_stability_check().
| void StabilityEstimate::print_summary | ( | ) | const |
Prints a summary of identified AC/DC areas and converters.
| void StabilityEstimate::writeFileTF | ( | string | converter_name, |
| string | location, | ||
| double | start_frequency, | ||
| double | end_frequency, | ||
| int | number_of_points | ||
| ) |
Writes transfer function data to a file over a frequency sweep.
Writes the Y-parameter matrix to a CSV file over a specified frequency range.
| converter_name | Name of the converter element. |
| location | Output port or bus identifier. |
| start_frequency | Sweep start frequency in Hz. |
| end_frequency | Sweep end frequency in Hz. |
| number_of_points | Number of logarithmically spaced frequency points. |
| start_frequency | The starting frequency for the sweep. |
| end_frequency | The ending frequency for the sweep. |
| number_of_points | The number of frequency points to compute and write. |
References compute_transfer_function(), and j.