00001
00009 #ifndef _inverter_H
00010 #define _inverter_H
00011
00012 #include <stdarg.h>
00013 #include "../powerflow/powerflow_object.h"
00014
00015 #include "gridlabd.h"
00016 #include "power_electronics.h"
00017
00018
00019
00020 class inverter: public power_electronics
00021 {
00022 private:
00023
00024
00025 protected:
00026
00027 public:
00028 enum INVERTER_TYPE {TWO_PULSE=0, SIX_PULSE=1, TWELVE_PULSE=2, PWM=3}inverter_type_v;
00029 enum GENERATOR_STATUS {OFFLINE=1, ONLINE=2} gen_status_v;
00030
00031 complex V_In;
00032 complex I_In;
00033 complex VA_In;
00034 complex VA_Out;
00035 double P_Out;
00036 double Q_Out;
00037 double V_Set_A;
00038 double V_Set_B;
00039 double V_Set_C;
00040 double margin;
00041 complex I_out_prev;
00042 complex I_step_max;
00043 double internal_losses;
00044 double C_Storage_In;
00045 double power_factor;
00046
00047 complex V_In_Set_A;
00048 complex V_In_Set_B;
00049 complex V_In_Set_C;
00050
00051 complex *pCircuit_V;
00052 complex *pLine_I;
00053 complex *pLine12;
00054
00055 double output_frequency;
00056 double frequency_losses;
00057
00058 complex phaseA_I_Out_prev;
00059 complex phaseB_I_Out_prev;
00060 complex phaseC_I_Out_prev;
00061
00062 complex phaseA_V_Out;
00063 complex phaseB_V_Out;
00064 complex phaseC_V_Out;
00065 complex phaseA_I_Out;
00066 complex phaseB_I_Out;
00067 complex phaseC_I_Out;
00068 complex power_A;
00069 complex power_B;
00070 complex power_C;
00071 complex last_current[4];
00072
00073
00074
00075
00076 public:
00077
00078 inverter(MODULE *module);
00079 int create(void);
00080 int init(OBJECT *parent);
00081 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00082 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00083 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00084
00085 complex *get_complex(OBJECT *obj, char *name);
00086 public:
00087 static CLASS *oclass;
00088 static inverter *defaults;
00089 static CLASS *plcass;
00090 #ifdef OPTIONAL
00091 static CLASS *pclass;
00092 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00093 #endif
00094 };
00095
00096 #endif
00097
00107 #ifndef _inverter_H
00108 #define _inverter_H
00109
00110 #include <stdarg.h>
00111 #include "gridlabd.h"
00112
00113 class inverter {
00114 private:
00115
00116 protected:
00117
00118 public:
00119
00120 public:
00121
00122 inverter(MODULE *module);
00123 int create(void);
00124 int init(OBJECT *parent);
00125 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00126 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00127 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00128 public:
00129 static CLASS *oclass;
00130 static inverter *defaults;
00131 #ifdef OPTIONAL
00132 static CLASS *pclass;
00133 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00134 #endif
00135 };
00136
00137 #endif
00138