► Improved controller: faster and better overall

- the controller is faster and more light in memory footprint
- motor control is now done intependenly using Reusable code generation setting in Simulink
- fixed bug when chaging direction fast
This commit is contained in:
EmanuelFeru
2019-06-05 22:39:30 +02:00
parent 19e4115d06
commit fe4bd76d7e
339 changed files with 30978 additions and 148177 deletions

View File

@@ -1,42 +1,25 @@
function CodeDefine() {
this.def = new Array();
this.def["rt_OneStep"] = {file: "ert_main_c.html",line:42,type:"fcn"};
this.def["main"] = {file: "ert_main_c.html",line:78,type:"fcn"};
this.def["rtDW"] = {file: "BLDC_controller_c.html",line:89,type:"var"};
this.def["rtPrevZCX"] = {file: "BLDC_controller_c.html",line:92,type:"var"};
this.def["rtU"] = {file: "BLDC_controller_c.html",line:95,type:"var"};
this.def["rtY"] = {file: "BLDC_controller_c.html",line:98,type:"var"};
this.def["plook_u8s32u32n31_evenc_s"] = {file: "BLDC_controller_c.html",line:129,type:"fcn"};
this.def["intrp1d_s16s32s32u8u32n31l_s"] = {file: "BLDC_controller_c.html",line:163,type:"fcn"};
this.def["div_nde_s32_floor"] = {file: "BLDC_controller_c.html",line:179,type:"fcn"};
this.def["F01_03_Direction_Detection"] = {file: "BLDC_controller_c.html",line:190,type:"fcn"};
this.def["Edge_counter_Reset"] = {file: "BLDC_controller_c.html",line:238,type:"fcn"};
this.def["Edge_counter_Disable"] = {file: "BLDC_controller_c.html",line:249,type:"fcn"};
this.def["Edge_counter"] = {file: "BLDC_controller_c.html",line:266,type:"fcn"};
this.def["Motor_Speed_Calculation"] = {file: "BLDC_controller_c.html",line:319,type:"fcn"};
this.def["falling_edge2"] = {file: "BLDC_controller_c.html",line:371,type:"fcn"};
this.def["rising_edge"] = {file: "BLDC_controller_c.html",line:384,type:"fcn"};
this.def["F03_01_Pure_Trapezoidal_Method"] = {file: "BLDC_controller_c.html",line:401,type:"fcn"};
this.def["F03_02_Sinusoidal_Method"] = {file: "BLDC_controller_c.html",line:429,type:"fcn"};
this.def["F03_02_Sinusoidal3rd_Method"] = {file: "BLDC_controller_c.html",line:457,type:"fcn"};
this.def["F02_Electrical_Angle_Ca_Disable"] = {file: "BLDC_controller_c.html",line:485,type:"fcn"};
this.def["F02_Electrical_Angle_Calculatio"] = {file: "BLDC_controller_c.html",line:500,type:"fcn"};
this.def["falling_edge2_b"] = {file: "BLDC_controller_c.html",line:567,type:"fcn"};
this.def["rising_edge_f"] = {file: "BLDC_controller_c.html",line:580,type:"fcn"};
this.def["BLDC_controller_step"] = {file: "BLDC_controller_c.html",line:593,type:"fcn"};
this.def["BLDC_controller_initialize"] = {file: "BLDC_controller_c.html",line:1279,type:"fcn"};
this.def["DW_F01_03_Direction_Detection"] = {file: "BLDC_controller_h.html",line:39,type:"type"};
this.def["DW_Edge_counter"] = {file: "BLDC_controller_h.html",line:45,type:"type"};
this.def["DW_Motor_Speed_Calculation"] = {file: "BLDC_controller_h.html",line:51,type:"type"};
this.def["ZCE_Motor_Speed_Calculation"] = {file: "BLDC_controller_h.html",line:56,type:"type"};
this.def["DW"] = {file: "BLDC_controller_h.html",line:111,type:"type"};
this.def["PrevZCX"] = {file: "BLDC_controller_h.html",line:117,type:"type"};
this.def["ConstP"] = {file: "BLDC_controller_h.html",line:204,type:"type"};
this.def["ExtU"] = {file: "BLDC_controller_h.html",line:216,type:"type"};
this.def["ExtY"] = {file: "BLDC_controller_h.html",line:230,type:"type"};
this.def["P"] = {file: "BLDC_controller_h.html",line:295,type:"type"};
this.def["rtP"] = {file: "BLDC_controller_data_c.html",line:27,type:"var"};
this.def["rtConstP"] = {file: "BLDC_controller_data_c.html",line:108,type:"var"};
this.def["rtM_"] = {file: "ert_main_c.html",line:29,type:"var"};
this.def["rtMPtr"] = {file: "ert_main_c.html",line:30,type:"var"};
this.def["rtP"] = {file: "ert_main_c.html",line:31,type:"var"};
this.def["rtDW"] = {file: "ert_main_c.html",line:88,type:"var"};
this.def["rtU"] = {file: "ert_main_c.html",line:89,type:"var"};
this.def["rtY"] = {file: "ert_main_c.html",line:90,type:"var"};
this.def["rt_OneStep"] = {file: "ert_main_c.html",line:104,type:"fcn"};
this.def["main"] = {file: "ert_main_c.html",line:140,type:"fcn"};
this.def["plook_u8s32u32n31_evenc_s"] = {file: "BLDC_controller_c.html",line:93,type:"fcn"};
this.def["intrp1d_s16s32s32u8u32n31l_s"] = {file: "BLDC_controller_c.html",line:127,type:"fcn"};
this.def["div_nde_s32_floor"] = {file: "BLDC_controller_c.html",line:143,type:"fcn"};
this.def["BLDC_controller_step"] = {file: "BLDC_controller_c.html",line:150,type:"fcn"};
this.def["BLDC_controller_initialize"] = {file: "BLDC_controller_c.html",line:668,type:"fcn"};
this.def["RT_MODEL"] = {file: "BLDC_controller_h.html",line:35,type:"type"};
this.def["DW"] = {file: "BLDC_controller_h.html",line:58,type:"type"};
this.def["ConstP"] = {file: "BLDC_controller_h.html",line:116,type:"type"};
this.def["ExtU"] = {file: "BLDC_controller_h.html",line:124,type:"type"};
this.def["ExtY"] = {file: "BLDC_controller_h.html",line:133,type:"type"};
this.def["P"] = {file: "BLDC_controller_h.html",line:173,type:"type"};
this.def["rtConstP"] = {file: "BLDC_controller_data_c.html",line:27,type:"var"};
this.def["int8_T"] = {file: "rtwtypes_h.html",line:55,type:"type"};
this.def["uint8_T"] = {file: "rtwtypes_h.html",line:56,type:"type"};
this.def["int16_T"] = {file: "rtwtypes_h.html",line:57,type:"type"};
@@ -58,9 +41,6 @@ this.def["char_T"] = {file: "rtwtypes_h.html",line:77,type:"type"};
this.def["uchar_T"] = {file: "rtwtypes_h.html",line:78,type:"type"};
this.def["byte_T"] = {file: "rtwtypes_h.html",line:79,type:"type"};
this.def["pointer_T"] = {file: "rtwtypes_h.html",line:100,type:"type"};
this.def["ZCDirection"] = {file: "zero_crossing_types_h.html",line:33,type:"type"};
this.def["ZCSigState"] = {file: "zero_crossing_types_h.html",line:36,type:"type"};
this.def["ZCEventType"] = {file: "zero_crossing_types_h.html",line:49,type:"type"};
}
CodeDefine.instance = new CodeDefine();
var testHarnessInfo = {OwnerFileName: "", HarnessOwner: "", HarnessName: "", IsTestHarness: "0"};
@@ -80,8 +60,6 @@ function Html2SrcLink() {
this.html2Root["BLDC_controller_data_c.html"] = "BLDC_controller_data_c.html";
this.html2SrcPath["rtwtypes_h.html"] = "../rtwtypes.h";
this.html2Root["rtwtypes_h.html"] = "rtwtypes_h.html";
this.html2SrcPath["zero_crossing_types_h.html"] = "../zero_crossing_types.h";
this.html2Root["zero_crossing_types_h.html"] = "zero_crossing_types_h.html";
this.getLink2Src = function (htmlFileName) {
if (this.html2SrcPath[htmlFileName])
return this.html2SrcPath[htmlFileName];
@@ -97,4 +75,4 @@ function Html2SrcLink() {
}
Html2SrcLink.instance = new Html2SrcLink();
var fileList = [
"ert_main_c.html","BLDC_controller_c.html","BLDC_controller_h.html","BLDC_controller_data_c.html","rtwtypes_h.html","zero_crossing_types_h.html"];
"ert_main_c.html","BLDC_controller_c.html","BLDC_controller_h.html","BLDC_controller_data_c.html","rtwtypes_h.html"];