00001
00009 #ifndef _dc_dc_converter_H
00010 #define _dc_dc_converter_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 dc_dc_converter: public power_electronics
00021 {
00022 private:
00023
00024
00025
00026 protected:
00027
00028 public:
00029 enum DC_DC_CONVERTER_TYPE {BUCK=0, BOOST=1, BUCK_BOOST=2}dc_dc_converter_type_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
00038
00039
00040 double V_Set;
00041 double margin;
00042 complex I_out_prev;
00043 complex I_step_max;
00044 double internal_losses;
00045
00046
00047 double service_ratio;
00048 double C_Storage_In;
00049 double C_Storage_Out;
00050
00051
00052
00053
00054
00055
00056
00057
00058 complex V_Out;
00059
00060
00061
00062
00063 complex I_Out;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 complex *pCircuit_V;
00074 complex *pLine_I;
00075
00076
00077 public:
00078
00079 dc_dc_converter(MODULE *module);
00080 int create(void);
00081 int init(OBJECT *parent);
00082 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00083 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00084 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00085
00086 complex *get_complex(OBJECT *obj, char *name);
00087 public:
00088 static CLASS *oclass;
00089 static dc_dc_converter *defaults;
00090 static CLASS *plcass;
00091 #ifdef OPTIONAL
00092 static CLASS *pclass;
00093 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00094 #endif
00095 };
00096
00097 #endif
00098
00108 #ifndef _dc_dc_converter_H
00109 #define _dc_dc_converter_H
00110
00111 #include <stdarg.h>
00112 #include "gridlabd.h"
00113
00114 class dc_dc_converter {
00115 private:
00116
00117 protected:
00118
00119 public:
00120
00121 public:
00122
00123 dc_dc_converter(MODULE *module);
00124 int create(void);
00125 int init(OBJECT *parent);
00126 TIMESTAMP presync(TIMESTAMP t0, TIMESTAMP t1);
00127 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00128 TIMESTAMP postsync(TIMESTAMP t0, TIMESTAMP t1);
00129 public:
00130 static CLASS *oclass;
00131 static dc_dc_converter *defaults;
00132 #ifdef OPTIONAL
00133 static CLASS *pclass;
00134 TIMESTAMPP plc(TIMESTAMP t0, TIMESTAMP t1);
00135 #endif
00136 };
00137
00138 #endif
00139