Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
Loading...
Searching...
No Matches
Stability_estimate.h
Go to the documentation of this file.
1#ifndef _STABILITY_ESTIMATE_H
2#define _STABILITY_ESTIMATE_H
3
13#include "../../Constants.h"
14#include "../Helper_Functions/Symbolic_functions.h"
15#include "../../SubNetwork.h"
16
17class Bus;
18class Element;
19class Network;
20class SubNetwork;
21
31public:
33 StabilityEstimate() = default;
34
36 ~StabilityEstimate() = default;
37
42 void add_areas(Network* net);
43
50 MatrixXcd compute_equivalent_admittance_parameters_num(SubNetwork* subnet, double frequency);
51
60 MatrixXcd compute_closing_impedance(SubNetwork*, string&, MatrixXcd&, MatrixXcd&);
61
69 MatrixXcd compute_transfer_function(string converter_name, string location, double frequency);
70
79 void writeFileTF(string converter_name, string location, double start_frequency, double end_frequency, int number_of_points);
80
89 void bodeplotTF(string converter_name, string location, double start_frequency, double end_frequency, int number_of_points);
90
99 void nyquistplotTF(string converter_name, string location, double start_frequency, double end_frequency, int number_of_points);
100
102 void print_summary() const;
103
108 std::unordered_map<std::string, SubNetwork*>& get_ac_grids() { return ac_grids; }
109
114 std::unordered_map<std::string, SubNetwork*>& get_dc_grids() { return dc_grids; }
115
116private:
117 std::vector<std::string> ac_grid_names;
118 std::vector<std::string> dc_grid_names;
119
120 std::unordered_map<std::string, SubNetwork*> ac_grids;
121 std::unordered_map<std::string, SubNetwork*> dc_grids;
122 std::unordered_map<std::string, Element*> converters;
123
124 void compute_equivalent_impedance(Network* net, std::vector<Bus*> start_buses, std::vector<Bus*> end_buses, std::vector<Element*> skip_elements);
125 MatrixXcd compute_equivalent_impedance_num(Network* net, std::vector<Bus*> start_buses, std::vector<Bus*> end_buses, std::vector<Element*> skip_elements, double frequency);
126
127};
128
129
130#endif
A network node connecting one or more element terminals.
Definition Bus.h:21
Base class for multi-phase network elements with Y-parameters and MNA stamping hooks.
Definition Element.h:29
Root network model holding buses, elements, and AC/DC grid hierarchy.
Definition network.h:36
Performs impedance-based stability assessment of network areas.
Definition Stability_estimate.h:30
~StabilityEstimate()=default
Default destructor.
void print_summary() const
Prints a summary of identified AC/DC areas and converters.
Definition Stability_estimate.cpp:23
void add_areas(Network *net)
Populates AC/DC area maps from the network hierarchy.
Definition Stability_estimate.cpp:11
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.
Definition Stability_estimate.cpp:785
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.
Definition Stability_estimate.cpp:842
std::unordered_map< std::string, SubNetwork * > & get_dc_grids()
Returns the map of DC grid subnetworks by name.
Definition Stability_estimate.h:114
MatrixXcd compute_transfer_function(string converter_name, string location, double frequency)
Evaluates a converter transfer function at a single frequency.
Definition Stability_estimate.cpp:510
MatrixXcd compute_equivalent_admittance_parameters_num(SubNetwork *subnet, double frequency)
Computes numeric equivalent admittance parameters for a subnetwork.
Definition Stability_estimate.cpp:354
std::unordered_map< std::string, SubNetwork * > & get_ac_grids()
Returns the map of AC grid subnetworks by name.
Definition Stability_estimate.h:108
StabilityEstimate()=default
Default constructor.
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.
Definition Stability_estimate.cpp:752
MatrixXcd compute_closing_impedance(SubNetwork *, string &, MatrixXcd &, MatrixXcd &)
Computes the visible impedance when other subnetwork outputs are shorted.
Definition Stability_estimate.cpp:678
Named sub-network that inherits Network topology APIs but acts as a non-owning view.
Definition SubNetwork.h:20