-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new VSG_MODEL2 and VSGCONTROL2 with different structure from VSG_…
…MODEL and VSGCONTROL0. Pass test. Add WT3GX and need more work
- Loading branch information
Showing
20 changed files
with
1,838 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#ifndef VSG_MODEL2_H | ||
#define VSG_MODEL2_H | ||
|
||
#include "header/STEPS.h" | ||
|
||
class BUS; | ||
|
||
class VSG_MODEL2 | ||
{ | ||
public: | ||
VSG_MODEL2(STEPS& toolkit); | ||
~VSG_MODEL2(); | ||
void set_toolkit(STEPS& toolkit); | ||
STEPS& get_toolkit() const; | ||
|
||
void set_bus(unsigned int bus); | ||
BUS* get_bus_pointer() const; | ||
|
||
void set_Pref_in_pu_based_on_mbase(double P); | ||
void set_Qref_in_pu_based_on_mbase(double Q); | ||
void set_Vref_in_pu(double V); | ||
void set_P_in_pu_based_on_mbase(double P); | ||
void set_Q_in_pu_based_on_mbase(double Q); | ||
void set_V_in_pu(double V); | ||
|
||
double get_Pref_in_pu_based_on_mbase() const; | ||
double get_Qref_in_pu_based_on_mbase() const; | ||
double get_Vref_in_pu() const; | ||
double get_P_in_pu_based_on_mbase() const; | ||
double get_Q_in_pu_based_on_mbase() const; | ||
double get_V_in_pu() const; | ||
|
||
void set_initial_virtual_voltage_in_pu(double V); | ||
void set_initial_virtual_angle_in_rad(double angle); | ||
double get_initial_virtual_voltage_in_pu() const; | ||
double get_initial_virtual_angle_in_rad() const; | ||
|
||
double get_virtual_frequency_deviation_in_pu() const; | ||
double get_virtual_frequency_in_pu() const; | ||
double get_virtual_frequency_in_Hz() const; | ||
double get_virtual_angle_in_deg() const; | ||
|
||
void initialize_base_frequency_and_base_angle_speed(); | ||
double get_base_frequency_in_Hz() const; | ||
double get_base_angle_speed_in_radps() const; | ||
public: | ||
virtual string get_model_name() const = 0; | ||
|
||
virtual void initialize() = 0; | ||
virtual void run(DYNAMIC_MODE mode) = 0; | ||
|
||
virtual double get_virtual_frequency_deviation_in_Hz() const = 0; | ||
virtual double get_virtual_angle_in_rad() const = 0; | ||
virtual double get_virtual_voltage_in_pu() const = 0; | ||
virtual string get_standard_psse_string() const = 0; | ||
private: | ||
STEPS* toolkit; | ||
BUS* busptr; | ||
double P, Pref, Q, Qref, V, Vref; | ||
double angle0, V0; | ||
double fbase_Hz, wbase_radps; | ||
}; | ||
|
||
#endif // VSG_MODEL2_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef VSGCONTROL2_H | ||
#define VSGCONTROL2_H | ||
|
||
#include "header/model/vsg_model/vsg_model2.h" | ||
#include "header/block/integral_block.h" | ||
|
||
class VSGCONTROL2 : public VSG_MODEL2 | ||
{ | ||
public: | ||
VSGCONTROL2(STEPS& toolkit); | ||
virtual ~VSGCONTROL2(); | ||
VSGCONTROL2(const VSGCONTROL2& model); | ||
virtual VSGCONTROL2& operator=(const VSGCONTROL2& model); | ||
void clear(); | ||
void copy_from_const_model(const VSGCONTROL2& model); | ||
public: | ||
void set_Tj_in_s(double Tj); | ||
void set_D(double D); | ||
void set_Ku(double Ku); | ||
void set_Te_in_s(double Ke); | ||
|
||
double get_Tj_in_s() const; | ||
double get_D() const; | ||
double get_Ku() const; | ||
double get_Te_in_s() const; | ||
public: | ||
virtual string get_model_name() const; | ||
virtual void initialize(); | ||
virtual void run(DYNAMIC_MODE mode); | ||
|
||
virtual double get_virtual_frequency_deviation_in_Hz() const; | ||
virtual double get_virtual_angle_in_rad() const; | ||
virtual double get_virtual_voltage_in_pu() const; | ||
virtual string get_standard_psse_string() const; | ||
private: | ||
double D, Ku; | ||
INTEGRAL_BLOCK virtual_frequency_deviation_block, virtual_angle_block, virtual_voltage_block; | ||
}; | ||
|
||
#endif // VSGCONTROL2_H |
Oops, something went wrong.