/* * * File: BLDC_controller_data.c * * Code generated for Simulink model 'BLDC_controller'. * * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex * Emulation hardware selection: * Differs from embedded hardware (MATLAB Host) * Code generation objectives: * 1. Execution efficiency * 2. RAM efficiency * Validation result: Not run */ #include "BLDC_controller.h" /* Constant parameters (auto storage) */ const ConstP rtConstP = { /* Computed Parameter: r_trapPhaA_M1_Table * Referenced by: '/r_trapPhaA_M1' */ { 1000, 1000, 1000, -1000, -1000, -1000, 1000 }, /* Computed Parameter: r_trapPhaB_M1_Table * Referenced by: '/r_trapPhaB_M1' */ { -1000, -1000, 1000, 1000, 1000, -1000, -1000 }, /* Computed Parameter: r_trapPhaC_M1_Table * Referenced by: '/r_trapPhaC_M1' */ { 1000, -1000, -1000, -1000, 1000, 1000, 1000 }, /* Computed Parameter: r_sinPhaA_M1_Table * Referenced by: '/r_sinPhaA_M1' */ { 500, 643, 766, 866, 940, 985, 1000, 985, 940, 866, 766, 643, 500, 342, 174, 0, -174, -342, -500, -643, -766, -866, -940, -985, -1000, -985, -940, -866, -766, -643, -500, -342, -174, 0, 174, 342, 500 }, /* Computed Parameter: r_sinPhaB_M1_Table * Referenced by: '/r_sinPhaB_M1' */ { -1000, -985, -940, -866, -766, -643, -500, -342, -174, 0, 174, 342, 500, 643, 766, 866, 940, 985, 1000, 985, 940, 866, 766, 643, 500, 342, 174, 0, -174, -342, -500, -643, -766, -866, -940, -985, -1000 }, /* Computed Parameter: r_sinPhaC_M1_Table * Referenced by: '/r_sinPhaC_M1' */ { 500, 342, 174, 0, -174, -342, -500, -643, -766, -866, -940, -985, -1000, -985, -940, -866, -766, -643, -500, -342, -174, 0, 174, 342, 500, 643, 766, 866, 940, 985, 1000, 985, 940, 866, 766, 643, 500 }, /* Computed Parameter: r_sin3PhaA_M1_Table * Referenced by: '/r_sin3PhaA_M1' */ { 813, 945, 1000, 996, 962, 926, 912, 926, 962, 996, 1000, 945, 813, 599, 319, 0, -319, -599, -813, -945, -1000, -996, -962, -926, -912, -926, -962, -996, -1000, -945, -813, -599, -319, 0, 319, 599, 813 }, /* Computed Parameter: r_sin3PhaB_M1_Table * Referenced by: '/r_sin3PhaB_M1' */ { -912, -926, -962, -996, -1000, -945, -813, -599, -319, 0, 319, 599, 813, 945, 1000, 996, 962, 926, 912, 926, 962, 996, 1000, 945, 813, 599, 319, 0, -319, -599, -813, -945, -1000, -996, -962, -926, -912 }, /* Computed Parameter: r_sin3PhaC_M1_Table * Referenced by: '/r_sin3PhaC_M1' */ { 813, 599, 319, 0, -319, -599, -813, -945, -1000, -996, -962, -926, -912, -926, -962, -996, -1000, -945, -813, -599, -319, 0, 319, 599, 813, 945, 1000, 996, 962, 926, 912, 926, 962, 996, 1000, 945, 813 }, /* Computed Parameter: z_commutMap_M1_table * Referenced by: '/z_commutMap_M1' */ { 1000, -1000, 0, 1000, 0, -1000, 0, 1000, -1000, -1000, 1000, 0, -1000, 0, 1000, 0, -1000, 1000 }, /* Computed Parameter: vec_hallToPos_Value * Referenced by: '/vec_hallToPos' */ { 0, 5, 3, 4, 1, 0, 2, 0 } }; P rtP = { /* Variable: cf_speedCoef * Referenced by: '/cf_spdCoef' */ 11111, /* Variable: cf_speedFilt * Referenced by: '/cf_speedFilt' */ 10, /* Variable: n_commAcvLo * Referenced by: '/n_commDeacv' */ 15, /* Variable: n_commDeacvHi * Referenced by: '/n_commDeacv' */ 30, /* Variable: n_motPhaAdvEna * Referenced by: '/n_motPhaAdvEna' */ 400, /* Variable: r_commDCDeacv * Referenced by: '/r_commDCDeacv' */ 70, /* Variable: r_phaAdvDC_XA * Referenced by: '/r_phaAdvDC_XA' */ { 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }, /* Variable: a_phaAdv_M1 * Referenced by: '/a_phaAdv_M2' */ { 0, 0, 0, 0, 0, 2, 3, 5, 9, 16, 25 }, /* Variable: dz_counterHi * Referenced by: '/dz_counter' */ 50, /* Variable: dz_counterLo * Referenced by: '/dz_counter' */ 20, /* Variable: z_maxCntRst * Referenced by: * '/z_counter' * '/z_counter2' * '/z_maxCntRst' * '/Constant1' * '/UnitDelay1' */ 1500, /* Variable: z_ctrlTypSel * Referenced by: '/z_ctrlTypSel1' */ 3U, /* Variable: b_phaAdvEna * Referenced by: '/a_elecPeriod1' */ 1 }; /* * File trailer for generated code. * * [EOF] */