|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
Abstract power converter with ABCD matrices, controllers, and filters. More...
#include <Converter.h>


Public Member Functions | |
| Converter (const std::string &symbol, const std::string &location) | |
| Construct a three-phase, two-terminal converter element. | |
| virtual | ~Converter () |
| Eigen::MatrixXd | getA () const |
| Eigen::MatrixXd | getB () const |
| Eigen::MatrixXd | getC () const |
| Eigen::MatrixXd | getD () const |
| Eigen::MatrixXd | getAd () const |
| Eigen::MatrixXd | getBd () const |
| Eigen::MatrixXd | getCd () const |
| Eigen::MatrixXd | getDd () const |
| Eigen::VectorXd | getEquilibriumState () const |
| VectorXcd | getEigenvalues () |
| VectorXcd | getEigenvectors () |
| string | getACarea () const |
| string | getDCarea () const |
| virtual void | solveEquilibrium () |
| virtual void | computeABCD () |
| virtual void | discretize (double Ts) |
| virtual Eigen::MatrixXd | computeStateDerivatives (const Eigen::VectorXd &x, const Eigen::VectorXd &u) |
| void | computeEigenvalues () |
| Eigen::MatrixXd | computeParticipationFactors (const Eigen::MatrixXd &A_matrix) |
| virtual vector< MatrixXcd > | simulateTimeStep (const vector< MatrixXcd > &input, double Ts, int nKeep1, int nKeep2) |
| void | checkStability () const |
| Check system stability by evaluating eigenvalues of the A matrix. | |
| void | printEigenvalues () const |
| Print eigenvalues of the A matrix. | |
| virtual void | plotEigenvalues () override |
| Plot eigenvalues in the complex plane. | |
| virtual void | plotParticipationFactors () override |
| Plot participation factors (override in state-space elements). | |
Public Member Functions inherited from Element | |
| Element (const std::string &symbol, const std::string &location, int inputPins, int outputPins) | |
| Construct an element with symbol, location, and pin counts. | |
| virtual | ~Element () |
| Virtual destructor for derived-class cleanup. | |
| int | getInputPins () const |
| Get the number of input pins/phases. | |
| int | getOutputPins () const |
| Get the number of output pins/phases. | |
| void | setInputPins (int pins) |
| Set the number of input pins/phases. | |
| void | setOutputPins (int pins) |
| Set the number of output pins/phases. | |
| void | setTransformation (bool flag) |
| Enable or disable coordinate transformation for this element. | |
| std::string | getElementSymbol () const |
| Get the element type symbol. | |
| std::vector< Bus * > | getBuses () |
| Collect all buses connected to this element. | |
| int | getBusIndex (Bus *bus) |
| Find the terminal index associated with a given bus. | |
| Bus * | getOtherBus (Bus *) |
| Get the bus connected at the opposite terminal from a given bus. | |
| const std::map< Bus *, int > & | getConnections () const |
| Const access to the bus-to-terminal connection map. | |
| std::map< Bus *, int > | getConnections () |
| Copy of the bus-to-terminal connection map. | |
| string | getElementLocation () const |
| Get the element's grid or partition location label. | |
| void | attachBus (Bus *, int) |
| Attach a bus to a specific element terminal. | |
| void | printElementInfo () const |
| Print basic element metadata (symbol, input/output pin counts). | |
| virtual void | printElementValues () |
| Print extended element-specific values (override in derived classes). | |
| void | writeFile (double start_frequency, double end_frequency, int number_of_points) |
| Write Y-parameter matrix samples over a frequency sweep to a file. | |
| void | plotYParameters (double start_frequency, double end_frequency, int number_of_points) |
| Plot Y-parameter matrix entries versus frequency. | |
| virtual std::vector< std::vector< complex< double > > > | compute_y_parameters (double frequency) |
| Compute complex Y-parameters at a single frequency. | |
| virtual DenseMatrix | get_y_parameters () |
| Get the symbolic or stored Y-parameter matrix. | |
| virtual std::vector< std::vector< complex< double > > > | apply_transformation (std::vector< std::vector< complex< double > > > &Y1, std::vector< std::vector< complex< double > > > &Y2) |
| Apply a coordinate or coupling transformation to Y-parameter blocks. | |
| virtual void | writeMNAmatrix (SymEngine::DenseMatrix &, std::unordered_map< Bus *, int > &, int, std::map< Element *, std::vector< RCP< const Basic > > > &) |
| Stamp this element into the symbolic MNA matrix (override in derived classes). | |
| virtual int | getNumberOfInternalStates () const |
| Number of internal state variables for dynamic elements. | |
| virtual int | getNumberOfPlantStates () const |
| Number of plant states exposed for simulation (may differ from internal states). | |
| virtual std::vector< MatrixXcd > | simulateInputStep (const std::vector< MatrixXcd > &states, int nKeep) const |
| Simulate a step response given input states (override in dynamic elements). | |
| virtual std::vector< RCP< const Basic > > | getVirtualInputSymbols () const |
| Return symbolic names for virtual inputs used in stamping. | |
| virtual map_basic_basic | getParameterSubstitutions () const |
| Return parameter substitutions for symbolic evaluation. | |
| virtual void | computePowerFlow (std::map< std::string, double > &branchData, std::map< std::string, double > &globalParams) const |
| Compute branch power-flow quantities (override in derived classes). | |
| std::map< std::string, double > | getOPFInfo () const |
| Get stored OPF-related metadata for this element. | |
| void | setOPFInfo (std::map< std::string, double > &info) |
| Store OPF-related metadata for this element. | |
Protected Attributes | |
| double | omega_0 |
| double | P |
| double | Q |
| double | P_dc |
| double | P_min |
| double | P_max |
| double | Q_min |
| double | Q_max |
| double | theta |
| double | V_m |
| double | V_dc |
| double | L_reactor |
| double | R_reactor |
| double | t_delay |
| MatrixXd | A_matrix |
| MatrixXd | B_matrix |
| MatrixXd | C_matrix |
| MatrixXd | D_matrix |
| MatrixXd | Adelay |
| MatrixXd | Bdelay |
| MatrixXd | Cdelay |
| MatrixXd | Ddelay |
| MatrixXd | Ad_matrix |
| MatrixXd | Bd_matrix |
| MatrixXd | Cd_matrix |
| MatrixXd | Dd_matrix |
| int | pade_order = 2 |
| VectorXd | equilibrium_state |
| VectorXcd | eigenvalues |
| VectorXcd | eigenvectors |
| VectorXcd | initial_state |
| std::map< std::string, Controller * > | controls |
| std::map< std::string, Filter * > | filters |
| const std::vector< std::string > | controller_list |
| const std::vector< std::string > | filter_list |
Protected Attributes inherited from Element | |
| bool | transformation = false |
| std::string | element_symbol |
| std::string | element_location |
| int | input_pins |
| int | output_pins |
| std::map< Bus *, int > | connections |
| std::map< std::string, double > | element_OPF_info = {} |
| DenseMatrix | Y_matrix |
Abstract power converter with ABCD matrices, controllers, and filters.
|
inline |
| void Converter::checkStability | ( | ) | const |
Check system stability by evaluating eigenvalues of the A matrix.
Computes eigenvalues of the state matrix A_matrix and reports whether the linearized system around the operating point is stable, unstable, or marginally stable. A system is considered unstable if any eigenvalue has a positive real part. The function prints a short summary to stdout.
References A_matrix.
|
inlinevirtual |
Reimplemented in MMC.
|
inline |
References A_matrix, eigenvalues, and eigenvectors.
|
inline |
References A_matrix, j, and P.
Referenced by plotParticipationFactors().
|
inlinevirtual |
Reimplemented in MMC.
|
inlinevirtual |
|
inline |
References A_matrix.
Referenced by example_MMC().
|
inline |
References Element::element_location.
Referenced by StabilityEstimate::compute_transfer_function().
|
inline |
References Ad_matrix.
|
inline |
References B_matrix.
Referenced by example_MMC().
|
inline |
References Bd_matrix.
|
inline |
References C_matrix.
Referenced by example_MMC().
|
inline |
References Cd_matrix.
|
inline |
References D_matrix.
|
inline |
References Element::element_location.
Referenced by StabilityEstimate::compute_transfer_function().
|
inline |
References Dd_matrix.
|
inline |
References eigenvalues.
|
inline |
References eigenvectors.
|
inline |
References equilibrium_state.
Referenced by example_MMC().
|
overridevirtual |
Plot eigenvalues in the complex plane.
Collects eigenvalues of A_matrix and calls the helper plot_eigenvalues to render them in a graphical or saved-output form. The plot title contains the converter symbol for identification.
Reimplemented from Element.
References A_matrix, Element::element_symbol, and plot_eigenvalues_implot().
Referenced by example_MMC().
|
overridevirtual |
Plot participation factors (override in state-space elements).
Reimplemented from Element.
References A_matrix, computeParticipationFactors(), controls, Element::element_symbol, filters, matrixToVector(), P, pade_order, plot_participation_factors_implot(), and t_delay.
Referenced by example_MMC().
| void Converter::printEigenvalues | ( | ) | const |
Print eigenvalues of the A matrix.
Calculates and prints the full set of eigenvalues of A_matrix to stdout.
References A_matrix.
Referenced by example_MMC().
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in MMC.
|
protected |
|
protected |
Referenced by discretize(), and getAd().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), and MMC::computeStateDerivatives().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::compute_y_parameters(), MMC::computeABCD(), MMC::computeABCD_analytical(), discretize(), and getB().
|
protected |
Referenced by discretize(), and getBd().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), and MMC::computeStateDerivatives().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::compute_y_parameters(), MMC::computeABCD(), MMC::computeABCD_analytical(), discretize(), and getC().
|
protected |
Referenced by discretize(), and getCd().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), and MMC::computeStateDerivatives().
|
protected |
Referenced by MMC::init_Controller().
|
protected |
Referenced by ~Converter(), MMC::compute_y_parameters(), MMC::computeABCD(), MMC::computeABCD_analytical(), MMC::computePowerFlow(), MMC::computeStateDerivatives(), MMC::init_Controller(), plotParticipationFactors(), MMC::printElementValues(), MMC::solveEquilibrium(), MMC::stepControllers(), and MMC::update_MMC().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::compute_y_parameters(), MMC::computeABCD(), MMC::computeABCD_analytical(), discretize(), and getD().
|
protected |
Referenced by discretize(), and getDd().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), and MMC::computeStateDerivatives().
|
protected |
Referenced by computeEigenvalues(), and getEigenvalues().
|
protected |
Referenced by computeEigenvalues(), and getEigenvectors().
|
protected |
Referenced by MMC::MMC(), MMC::computeABCD(), MMC::computeABCD_analytical(), getEquilibriumState(), and MMC::solveEquilibrium().
|
protected |
Referenced by MMC::init_Filter().
|
protected |
Referenced by ~Converter(), MMC::computeStateDerivatives(), MMC::init_Filter(), and plotParticipationFactors().
|
protected |
|
protected |
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::computeABCD_analytical(), MMC::computeStateDerivatives(), and MMC::printElementValues().
|
protected |
|
protected |
|
protected |
Referenced by MMC::MMC(), and MMC::MMC().
|
protected |
Referenced by MMC::MMC(), and MMC::MMC().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::computeStateDerivatives(), MMC::init_Controller(), and plotParticipationFactors().
|
protected |
Referenced by MMC::MMC(), MMC::MMC(), MMC::computePowerFlow(), MMC::printElementValues(), MMC::solveEquilibrium(), and MMC::update_MMC().
|
protected |
Referenced by MMC::MMC(), and MMC::MMC().
|
protected |
Referenced by MMC::MMC(), and MMC::MMC().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |