-
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 PLL related models. Modify bus frequency model directory. Change …
…WT3G0 model with new PLL mode. Not tested.
- Loading branch information
Showing
13 changed files
with
470 additions
and
154 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
File renamed without changes.
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 PLL0_H | ||
#define PLL0_H | ||
|
||
#include "header/model/bus_model/pll_model/pll_model.h" | ||
#include "header/block/integral_block.h" | ||
|
||
class PLL0 : public PLL_MODEL | ||
{ | ||
public: | ||
PLL0(STEPS& toolkit); | ||
~PLL0(); | ||
PLL0(const PLL0& model); | ||
virtual PLL0& operator=(const PLL0& model); | ||
void clear(); | ||
void copy_from_const_model(const PLL0& model); | ||
public: | ||
void set_Kp(double K); | ||
void set_Ki(double K); | ||
void set_Pllmax(double P); | ||
void set_Pllmin(double P); | ||
|
||
double get_Kp() const; | ||
double get_Ki() const; | ||
double get_Pllmax() const; | ||
double get_Pllmin() const; | ||
|
||
double get_frquency_deviation_block_state() const; | ||
double get_angle_block_state() const; | ||
public: | ||
virtual void initialize(); | ||
virtual void run(DYNAMIC_MODE mode); | ||
|
||
virtual double get_pll_frequency_deviation_in_Hz() const; | ||
virtual double get_pll_angle_in_rad() const; | ||
private: | ||
double Kp; | ||
INTEGRAL_BLOCK frequency_deviation_in_Hz_block, angle_in_rad_block; | ||
}; | ||
|
||
#endif // PLL0_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef PLL_MODEL_H | ||
#define PLL_MODEL_H | ||
|
||
#include "header/STEPS.h" | ||
|
||
class BUS; | ||
|
||
class PLL_MODEL | ||
{ | ||
public: | ||
PLL_MODEL(STEPS& toolkit); | ||
~PLL_MODEL(); | ||
void set_toolkit(STEPS& toolkit); | ||
STEPS& get_toolkit() const; | ||
|
||
void set_bus_pointer(BUS* bus); | ||
BUS* get_bus_pointer() const; | ||
unsigned int get_bus() const; | ||
|
||
double get_pll_frequency_deviation_in_pu() const; | ||
double get_pll_frequency_in_pu() const; | ||
double get_pll_frequency_in_Hz() const; | ||
double get_pll_angle_in_deg() const; | ||
|
||
void initialize_base_frequency_and_base_period(); | ||
double get_base_frequency_in_Hz() const; | ||
double get_base_angle_speed_in_radps() const; | ||
double get_base_period_in_s() const; | ||
complex<double> get_terminal_complex_voltage_in_pu() const; | ||
double get_terminal_voltage_angle_in_rad() const; | ||
public: | ||
virtual void initialize() = 0; | ||
virtual void run(DYNAMIC_MODE mode) = 0; | ||
|
||
virtual double get_pll_frequency_deviation_in_Hz() const = 0; | ||
virtual double get_pll_angle_in_rad() const = 0; | ||
private: | ||
STEPS* toolkit; | ||
BUS* bus_ptr; | ||
double fbase_Hz, tbase_s; | ||
}; | ||
|
||
#endif // PLL_MODEL_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
2 changes: 1 addition & 1 deletion
2
...s_frequency_model/bus_frequency_model.cpp → ...s_frequency_model/bus_frequency_model.cpp
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
Oops, something went wrong.