00001
00009 #ifndef _rectifier_H
00010 #define _rectifier_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 rectifier: public power_electronics
00021 {
00022 private:
00023
00024
00025
00026 protected:
00027
00028 public:
00029 enum RECTIFIER_TYPE {ONE_PULSE=0, TWO_PULSE=1, THREE_PULSE=2, SIX_PULSE=3, TWELVE_PULSE=4}rectifier_type_v;
00030
00031
00032
00033 complex VA_In;
00034 complex VA_Out;
00035 double P_Out;
00036 double Q_Out;
00037
00038
00039
00040 complex V_In_Set_A;
00041 complex V_In_Set_B;
00042 complex V_In_Set_C;
00043 double V_Set;
00044 double margin;
00045 complex I_out_prev;
00046 complex I_step_max;
00047 double internal_losses;
00048
00049 double on_ratio;
00050 double input_frequency;
00051 double frequency_losses;
00052
00053 double C_Storage_Out;
00054
00055
00056
00057
00058
00059 complex phaseA_V_In;
00060 complex phaseB_V_In;
00061 complex phaseC_V_In;
00062
00063 complex V_Out;
00064
00065 complex phaseA_I_In;
00066 complex phaseB_I_In;
00067 complex phaseC_I_In;
00068
00069 complex I_Out;
00070
00071 complex power_A_In;
00072 complex power_B_In;
00073 complex power_C_In;
00074
00075
00076
00077 complex XphaseA;
00078 complex XphaseB;
00079 complex XphaseC;
00080
00081 complex *pCircuit_V;
00082 complex *pLine_I;
00083
00084 public:
00085
00086 rectifier(MODULE *module);
00087 int create(void);
00088 int init(OBJECT *parent);
00089
00090 void iterative_IV(complex VA, char* phase_designation);
00091
00092 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00093 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00094 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00095
00096 complex *get_complex(OBJECT *obj, char *name);
00097 public:
00098 static CLASS *oclass;
00099 static rectifier *defaults;
00100 static CLASS *plcass;
00101 #ifdef OPTIONAL
00102 static CLASS *pclass;
00103 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00104 #endif
00105 };
00106
00107 #endif
00108
00118 #ifndef _rectifier_H
00119 #define _rectifier_H
00120
00121 #include <stdarg.h>
00122 #include "gridlabd.h"
00123
00124 class rectifier {
00125 private:
00126
00127 protected:
00128
00129 public:
00130
00131 public:
00132
00133 rectifier(MODULE *module);
00134 int create(void);
00135 int init(OBJECT *parent);
00136 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00137 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00138 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00139 public:
00140 static CLASS *oclass;
00141 static rectifier *defaults;
00142 #ifdef OPTIONAL
00143 static CLASS *pclass;
00144 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00145 #endif
00146 };
00147
00148 #endif
00149