| 1 | /* |
| 2 | * File: PMSM_Controller.h |
| 3 | * |
| 4 | * Code generated for Simulink model 'PMSM_Controller'. |
| 5 | * |
| 6 | * Model version : 1.1245 |
| 7 | * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020 |
| 8 | * C/C++ source code generated on : Thu Apr 7 15:23:34 2022 |
| 9 | * |
| 10 | * Target selection: ert.tlc |
| 11 | * Embedded hardware selection: ARM Compatible->ARM Cortex-M |
| 12 | * Code generation objectives: |
| 13 | * 1. Execution efficiency |
| 14 | * 2. RAM efficiency |
| 15 | * Validation result: Not run |
| 16 | */ |
| 17 | |
| 18 | #ifndef RTW_HEADER_PMSM_Controller_h_ |
| 19 | #define RTW_HEADER_PMSM_Controller_h_ |
| 20 | #ifndef PMSM_Controller_COMMON_INCLUDES_ |
| 21 | #define PMSM_Controller_COMMON_INCLUDES_ |
| 22 | #include "rtwtypes.h" |
| 23 | #include "zero_crossing_types.h" |
| 24 | #endif /* PMSM_Controller_COMMON_INCLUDES_ */ |
| 25 | |
| 26 | /* Model Code Variants */ |
| 27 | |
| 28 | /* Macros for accessing real-time model data structure */ |
| 29 | #ifndef rtmGetErrorStatus |
| 30 | #define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) |
| 31 | #endif |
| 32 | |
| 33 | #ifndef rtmSetErrorStatus |
| 34 | #define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) |
| 35 | #endif |
| 36 | |
| 37 | /* Forward declaration for rtModel */ |
| 38 | typedef struct tag_RTM RT_MODEL; |
| 39 | |
| 40 | /* Block signals and states (default storage) for system '<S41>/Counter' */ |
| 41 | typedef struct { |
| 42 | uint16_T UnitDelay_DSTATE; /* '<S46>/UnitDelay' */ |
| 43 | } DW_Counter; |
| 44 | |
| 45 | /* Block signals and states (default storage) for system '<S37>/either_edge' */ |
| 46 | typedef struct { |
| 47 | boolean_T UnitDelay_DSTATE; /* '<S42>/UnitDelay' */ |
| 48 | } DW_either_edge; |
| 49 | |
| 50 | /* Block signals and states (default storage) for system '<S36>/Debounce_Filter' */ |
| 51 | typedef struct { |
| 52 | DW_either_edge either_edge_j; /* '<S37>/either_edge' */ |
| 53 | DW_Counter Counter_d; /* '<S40>/Counter' */ |
| 54 | DW_Counter Counter_f; /* '<S41>/Counter' */ |
| 55 | boolean_T UnitDelay_DSTATE; /* '<S37>/UnitDelay' */ |
| 56 | } DW_Debounce_Filter; |
| 57 | |
| 58 | /* Block signals and states (default storage) for system '<S47>/Low_Pass_Filter' */ |
| 59 | typedef struct { |
| 60 | int16_T UnitDelay1_DSTATE[2]; /* '<S56>/UnitDelay1' */ |
| 61 | } DW_Low_Pass_Filter; |
| 62 | |
| 63 | /* Block signals and states (default storage) for system '<S60>/PI_iq' */ |
| 64 | typedef struct { |
| 65 | int32_T UnitDelay_DSTATE; /* '<S65>/UnitDelay' */ |
| 66 | int32_T ResettableDelay_DSTATE; /* '<S67>/Resettable Delay' */ |
| 67 | uint8_T icLoad; /* '<S67>/Resettable Delay' */ |
| 68 | } DW_PI_backCalc_fixdt; |
| 69 | |
| 70 | /* Zero-crossing (trigger) state for system '<S60>/PI_iq' */ |
| 71 | typedef struct { |
| 72 | ZCSigState ResettableDelay_Reset_ZCE_p;/* '<S67>/Resettable Delay' */ |
| 73 | } ZCE_PI_backCalc_fixdt; |
| 74 | |
| 75 | /* Block signals and states (default storage) for system '<S79>/pi_speed' */ |
| 76 | typedef struct { |
| 77 | int32_T UnitDelay_DSTATE; /* '<S82>/UnitDelay' */ |
| 78 | int32_T ResettableDelay_DSTATE; /* '<S83>/Resettable Delay' */ |
| 79 | uint8_T icLoad; /* '<S83>/Resettable Delay' */ |
| 80 | } DW_pi_speed; |
| 81 | |
| 82 | /* Zero-crossing (trigger) state for system '<S79>/pi_speed' */ |
| 83 | typedef struct { |
| 84 | ZCSigState ResettableDelay_Reset_ZCE;/* '<S83>/Resettable Delay' */ |
| 85 | } ZCE_pi_speed; |
| 86 | |
| 87 | /* Block signals and states (default storage) for system '<Root>' */ |
| 88 | typedef struct { |
| 89 | DW_pi_speed pi_speed_g; /* '<S79>/pi_speed' */ |
| 90 | DW_PI_backCalc_fixdt PI_id; /* '<S59>/PI_id' */ |
| 91 | DW_PI_backCalc_fixdt PI_iq; /* '<S60>/PI_iq' */ |
| 92 | DW_Low_Pass_Filter Low_Pass_Filter_d;/* '<S47>/Low_Pass_Filter' */ |
| 93 | DW_either_edge either_edge_f; /* '<S36>/either_edge' */ |
| 94 | DW_Debounce_Filter Debounce_Filter_i;/* '<S36>/Debounce_Filter' */ |
| 95 | uint32_T z_counterRawPrev; /* '<S17>/z_counterRawPrev' */ |
| 96 | uint32_T UnitDelay1_DSTATE; /* '<S7>/UnitDelay1' */ |
| 97 | uint32_T UnitDelay3_DSTATE; /* '<S12>/UnitDelay3' */ |
| 98 | uint32_T UnitDelay2_DSTATE; /* '<S17>/UnitDelay2' */ |
| 99 | uint32_T UnitDelay3_DSTATE_l; /* '<S17>/UnitDelay3' */ |
| 100 | uint32_T UnitDelay5_DSTATE; /* '<S17>/UnitDelay5' */ |
| 101 | int16_T Merge[2]; /* '<S25>/Merge' */ |
| 102 | int16_T Divide; /* '<S34>/Divide' */ |
| 103 | int16_T Merge_b; /* '<S52>/Merge' */ |
| 104 | int16_T Switch2; /* '<S64>/Switch2' */ |
| 105 | int16_T Switch2_d; /* '<S68>/Switch2' */ |
| 106 | int16_T Divide1; /* '<S31>/Divide1' */ |
| 107 | int16_T Switch; /* '<S34>/Switch' */ |
| 108 | int16_T Switch1; /* '<S34>/Switch1' */ |
| 109 | int16_T Divide3; /* '<S26>/Divide3' */ |
| 110 | int16_T Divide11; /* '<S17>/Divide11' */ |
| 111 | int16_T UnitDelay2_DSTATE_p; /* '<S6>/UnitDelay2' */ |
| 112 | int16_T UnitDelay1_DSTATE_f; /* '<S6>/UnitDelay1' */ |
| 113 | int16_T UnitDelay_DSTATE; /* '<S30>/Unit Delay' */ |
| 114 | int16_T UnitDelay_DSTATE_d; /* '<S35>/UnitDelay' */ |
| 115 | int16_T UnitDelay4_DSTATE; /* '<S12>/UnitDelay4' */ |
| 116 | uint16_T UnitDelay2_DSTATE_f; /* '<S18>/UnitDelay2' */ |
| 117 | uint16_T UnitDelay3_DSTATE_lh; /* '<S18>/UnitDelay3' */ |
| 118 | uint16_T UnitDelay5_DSTATE_f; /* '<S18>/UnitDelay5' */ |
| 119 | int8_T Switch2_i; /* '<S8>/Switch2' */ |
| 120 | int8_T UnitDelay2_DSTATE_j; /* '<S8>/UnitDelay2' */ |
| 121 | uint8_T Delay_DSTATE; /* '<S9>/Delay' */ |
| 122 | uint8_T Delay1_DSTATE; /* '<S9>/Delay1' */ |
| 123 | uint8_T Delay2_DSTATE; /* '<S9>/Delay2' */ |
| 124 | uint8_T UnitDelay_DSTATE_j; /* '<S36>/UnitDelay' */ |
| 125 | uint8_T UnitDelay_DSTATE_b; /* '<S49>/Unit Delay' */ |
| 126 | uint8_T is_active_c5_PMSM_Controller;/* '<S4>/Control_Mode_Manager' */ |
| 127 | uint8_T is_c5_PMSM_Controller; /* '<S4>/Control_Mode_Manager' */ |
| 128 | uint8_T is_ACTIVE; /* '<S4>/Control_Mode_Manager' */ |
| 129 | boolean_T Compare; /* '<S20>/Compare' */ |
| 130 | boolean_T UnitDelay1_DSTATE_i; /* '<S17>/UnitDelay1' */ |
| 131 | boolean_T n_SpeedCtrl_Mode; /* '<S23>/n_SpeedCtrl' */ |
| 132 | boolean_T n_commDeacv_Mode; /* '<S18>/n_commDeacv' */ |
| 133 | } DW; |
| 134 | |
| 135 | /* Zero-crossing (trigger) state */ |
| 136 | typedef struct { |
| 137 | ZCE_pi_speed pi_speed_g; /* '<S79>/pi_speed' */ |
| 138 | ZCE_PI_backCalc_fixdt PI_id; /* '<S59>/PI_id' */ |
| 139 | ZCE_PI_backCalc_fixdt PI_iq; /* '<S60>/PI_iq' */ |
| 140 | } PrevZCX; |
| 141 | |
| 142 | /* Invariant block signals for system '<S60>/PI_iq' */ |
| 143 | typedef struct { |
| 144 | const int32_T DataTypeConversion2; /* '<S67>/Data Type Conversion2' */ |
| 145 | } ConstB_PI_backCalc_fixdt; |
| 146 | |
| 147 | /* Invariant block signals for system '<S79>/pi_speed' */ |
| 148 | typedef struct { |
| 149 | const int32_T DataTypeConversion2; /* '<S83>/Data Type Conversion2' */ |
| 150 | } ConstB_pi_speed; |
| 151 | |
| 152 | /* Invariant block signals (default storage) */ |
| 153 | typedef struct { |
| 154 | ConstB_pi_speed pi_speed_g; /* '<S79>/pi_speed' */ |
| 155 | ConstB_PI_backCalc_fixdt PI_id; /* '<S59>/PI_id' */ |
| 156 | ConstB_PI_backCalc_fixdt PI_iq; /* '<S60>/PI_iq' */ |
| 157 | } ConstB; |
| 158 | |
| 159 | /* Constant parameters (default storage) */ |
| 160 | typedef struct { |
| 161 | /* Computed Parameter: r_cos_M1_Table |
| 162 | * Referenced by: '<S58>/r_cos_M1' |
| 163 | */ |
| 164 | int16_T r_cos_M1_Table[1441]; |
| 165 | |
| 166 | /* Computed Parameter: r_sin_M1_Table |
| 167 | * Referenced by: '<S58>/r_sin_M1' |
| 168 | */ |
| 169 | int16_T r_sin_M1_Table[1441]; |
| 170 | |
| 171 | /* Computed Parameter: Vq_max_M1_Table |
| 172 | * Referenced by: '<S48>/Vq_max_M1' |
| 173 | */ |
| 174 | int16_T Vq_max_M1_Table[46]; |
| 175 | |
| 176 | /* Computed Parameter: iq_maxSca_M1_Table |
| 177 | * Referenced by: '<S48>/iq_maxSca_M1' |
| 178 | */ |
| 179 | uint16_T iq_maxSca_M1_Table[50]; |
| 180 | |
| 181 | /* Computed Parameter: vec_hallToPos_Value |
| 182 | * Referenced by: '<S11>/vec_hallToPos' |
| 183 | */ |
| 184 | int8_T vec_hallToPos_Value[8]; |
| 185 | } ConstP; |
| 186 | |
| 187 | /* External inputs (root inport signals with default storage) */ |
| 188 | typedef struct { |
| 189 | int16_T adc_a; /* '<Root>/adc_a' */ |
| 190 | int16_T adc_b; /* '<Root>/adc_b' */ |
| 191 | int16_T open_theta; /* '<Root>/open_theta' */ |
| 192 | int16_T rotor_speed; /* '<Root>/rotor_speed' */ |
| 193 | int16_T input_target; /* '<Root>/input_target' */ |
| 194 | uint8_T hall_a; /* '<Root>/hall_a' */ |
| 195 | uint8_T hall_b; /* '<Root>/hall_b' */ |
| 196 | uint8_T hall_c; /* '<Root>/hall_c' */ |
| 197 | uint32_T hw_count; /* '<Root>/hw_count' */ |
| 198 | boolean_T b_motEna; /* '<Root>/b_motEna' */ |
| 199 | boolean_T b_cruiseEna; /* '<Root>/b_cruiseEna' */ |
| 200 | uint8_T n_ctrlModReq; /* '<Root>/n_ctrlModReq' */ |
| 201 | int16_T i_dc_limit; /* '<Root>/i_dc_limit' */ |
| 202 | int16_T speed_limit; /* '<Root>/speed_limit' */ |
| 203 | int16_T vbus_voltage; /* '<Root>/vbus_voltage' */ |
| 204 | boolean_T b_hall_calibrate; /* '<Root>/b_hall_calibrate' */ |
| 205 | int16_T vd_open_target; /* '<Root>/vd_open_target' */ |
| 206 | int16_T vq_open_target; /* '<Root>/vq_open_target' */ |
| 207 | } ExtU; |
| 208 | |
| 209 | /* External outputs (root outports fed by signals with default storage) */ |
| 210 | typedef struct { |
| 211 | uint16_T PWM[3]; /* '<Root>/PWM' */ |
| 212 | uint8_T sector; /* '<Root>/sector' */ |
| 213 | uint8_T n_MotError; /* '<Root>/n_MotError' */ |
| 214 | int16_T VqPrev; /* '<Root>/VqPrev' */ |
| 215 | int16_T VdPrev; /* '<Root>/VdPrev' */ |
| 216 | int16_T iq; /* '<Root>/iq' */ |
| 217 | int16_T id; /* '<Root>/id' */ |
| 218 | int16_T angle; /* '<Root>/angle' */ |
| 219 | int16_T rpm; /* '<Root>/rpm' */ |
| 220 | int16_T hall_angle; /* '<Root>/hall_angle' */ |
| 221 | uint8_T hall_state; /* '<Root>/hall_state' */ |
| 222 | uint8_T running_mode; /* '<Root>/running_mode' */ |
| 223 | } ExtY; |
| 224 | |
| 225 | /* Real-time Model Data Structure */ |
| 226 | struct tag_RTM { |
| 227 | const char_T * volatile errorStatus; |
| 228 | PrevZCX *prevZCSigState; |
| 229 | ExtU *inputs; |
| 230 | ExtY *outputs; |
| 231 | DW *dwork; |
| 232 | }; |
| 233 | |
| 234 | extern const ConstB rtConstB; /* constant block i/o */ |
| 235 | |
| 236 | /* Constant parameters (default storage) */ |
| 237 | extern const ConstP rtConstP; |
| 238 | |
| 239 | /* Model entry point functions */ |
| 240 | extern void PMSM_Controller_initialize(RT_MODEL *const rtM); |
| 241 | extern void PMSM_Controller_step(RT_MODEL *const rtM); |
| 242 | |
| 243 | /*- |
| 244 | * These blocks were eliminated from the model due to optimizations: |
| 245 | * |
| 246 | * Block '<S2>/Scope' : Unused code path elimination |
| 247 | * Block '<S8>/Scope' : Unused code path elimination |
| 248 | * Block '<S10>/Scope' : Unused code path elimination |
| 249 | * Block '<S11>/Scope' : Unused code path elimination |
| 250 | * Block '<S3>/Scope' : Unused code path elimination |
| 251 | * Block '<S12>/Logical Operator4' : Unused code path elimination |
| 252 | * Block '<S17>/Abs2' : Unused code path elimination |
| 253 | * Block '<S17>/Add' : Unused code path elimination |
| 254 | * Block '<S19>/Compare' : Unused code path elimination |
| 255 | * Block '<S19>/Constant' : Unused code path elimination |
| 256 | * Block '<S17>/Sum7' : Unused code path elimination |
| 257 | * Block '<S17>/UnitDelay4' : Unused code path elimination |
| 258 | * Block '<S17>/UnitDelay6' : Unused code path elimination |
| 259 | * Block '<S17>/UnitDelay7' : Unused code path elimination |
| 260 | * Block '<S17>/UnitDelay8' : Unused code path elimination |
| 261 | * Block '<S17>/dz_cntTrnsDet' : Unused code path elimination |
| 262 | * Block '<S12>/Scope1' : Unused code path elimination |
| 263 | * Block '<S12>/Scope2' : Unused code path elimination |
| 264 | * Block '<S27>/Data Type Duplicate' : Unused code path elimination |
| 265 | * Block '<S27>/Data Type Propagation' : Unused code path elimination |
| 266 | * Block '<S28>/Data Type Duplicate' : Unused code path elimination |
| 267 | * Block '<S28>/Data Type Propagation' : Unused code path elimination |
| 268 | * Block '<S4>/Scope' : Unused code path elimination |
| 269 | * Block '<S25>/Scope' : Unused code path elimination |
| 270 | * Block '<S33>/Data Type Duplicate' : Unused code path elimination |
| 271 | * Block '<S33>/Data Type Propagation' : Unused code path elimination |
| 272 | * Block '<S32>/Scope' : Unused code path elimination |
| 273 | * Block '<S32>/Scope1' : Unused code path elimination |
| 274 | * Block '<S30>/Scope' : Unused code path elimination |
| 275 | * Block '<S31>/Scope' : Unused code path elimination |
| 276 | * Block '<S1>/Scope1' : Unused code path elimination |
| 277 | * Block '<S1>/Scope2' : Unused code path elimination |
| 278 | * Block '<S55>/Scope' : Unused code path elimination |
| 279 | * Block '<S47>/Scope' : Unused code path elimination |
| 280 | * Block '<S47>/Scope1' : Unused code path elimination |
| 281 | * Block '<S58>/Scope' : Unused code path elimination |
| 282 | * Block '<S48>/Scope' : Unused code path elimination |
| 283 | * Block '<S49>/Scope1' : Unused code path elimination |
| 284 | * Block '<S64>/Data Type Duplicate' : Unused code path elimination |
| 285 | * Block '<S64>/Data Type Propagation' : Unused code path elimination |
| 286 | * Block '<S62>/Data Type Duplicate' : Unused code path elimination |
| 287 | * Block '<S62>/Data Type Propagation' : Unused code path elimination |
| 288 | * Block '<S68>/Data Type Duplicate' : Unused code path elimination |
| 289 | * Block '<S68>/Data Type Propagation' : Unused code path elimination |
| 290 | * Block '<S66>/Data Type Duplicate' : Unused code path elimination |
| 291 | * Block '<S66>/Data Type Propagation' : Unused code path elimination |
| 292 | * Block '<S60>/Scope' : Unused code path elimination |
| 293 | * Block '<S50>/Scope' : Unused code path elimination |
| 294 | * Block '<S70>/Data Type Duplicate' : Unused code path elimination |
| 295 | * Block '<S70>/Data Type Propagation' : Unused code path elimination |
| 296 | * Block '<S69>/Scope' : Unused code path elimination |
| 297 | * Block '<S6>/Scope12' : Unused code path elimination |
| 298 | * Block '<S81>/Data Type Duplicate' : Unused code path elimination |
| 299 | * Block '<S81>/Data Type Propagation' : Unused code path elimination |
| 300 | * Block '<S79>/Scope' : Unused code path elimination |
| 301 | * Block '<S79>/Scope2' : Unused code path elimination |
| 302 | * Block '<S84>/Data Type Duplicate' : Unused code path elimination |
| 303 | * Block '<S84>/Data Type Propagation' : Unused code path elimination |
| 304 | * Block '<S85>/Data Type Duplicate' : Unused code path elimination |
| 305 | * Block '<S85>/Data Type Propagation' : Unused code path elimination |
| 306 | * Block '<S80>/Scope' : Unused code path elimination |
| 307 | * Block '<S10>/Manual Switch' : Eliminated due to constant selection input |
| 308 | * Block '<S3>/hall_motor_speed_choice' : Eliminated due to constant selection input |
| 309 | * Block '<S25>/Data Type Conversion' : Eliminate redundant data type conversion |
| 310 | * Block '<S6>/Data Type Conversion' : Eliminate redundant data type conversion |
| 311 | * Block '<S48>/Data Type Conversion' : Eliminate redundant data type conversion |
| 312 | * Block '<S79>/Manual Switch' : Eliminated due to constant selection input |
| 313 | * Block '<S10>/Constant' : Unused code path elimination |
| 314 | * Block '<S17>/Divide14' : Unused code path elimination |
| 315 | * Block '<S17>/smooth' : Unused code path elimination |
| 316 | * Block '<S79>/Constant' : Unused code path elimination |
| 317 | */ |
| 318 | |
| 319 | /*- |
| 320 | * The generated code includes comments that allow you to trace directly |
| 321 | * back to the appropriate location in the model. The basic format |
| 322 | * is <system>/block_name, where system is the system number (uniquely |
| 323 | * assigned by Simulink) and block_name is the name of the block. |
| 324 | * |
| 325 | * Note that this particular code originates from a subsystem build, |
| 326 | * and has its own system numbers different from the parent model. |
| 327 | * Refer to the system hierarchy for this subsystem below, and use the |
| 328 | * MATLAB hilite_system command to trace the generated code back |
| 329 | * to the parent model. For example, |
| 330 | * |
| 331 | * hilite_system('MotorController_FOC/PMSM_Controller') - opens subsystem MotorController_FOC/PMSM_Controller |
| 332 | * hilite_system('MotorController_FOC/PMSM_Controller/Kp') - opens and selects block Kp |
| 333 | * |
| 334 | * Here is the system hierarchy for this model |
| 335 | * |
| 336 | * '<Root>' : 'MotorController_FOC' |
| 337 | * '<S1>' : 'MotorController_FOC/PMSM_Controller' |
| 338 | * '<S2>' : 'MotorController_FOC/PMSM_Controller/1ms_Scheduler' |
| 339 | * '<S3>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation' |
| 340 | * '<S4>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager' |
| 341 | * '<S5>' : 'MotorController_FOC/PMSM_Controller/Diagnostics' |
| 342 | * '<S6>' : 'MotorController_FOC/PMSM_Controller/controller' |
| 343 | * '<S7>' : 'MotorController_FOC/PMSM_Controller/1ms_Scheduler/counter' |
| 344 | * '<S8>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Direction_Detection' |
| 345 | * '<S9>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Edge_Detect' |
| 346 | * '<S10>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Electrical_Angle_Estimation' |
| 347 | * '<S11>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Hall_Angle_Raw' |
| 348 | * '<S12>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Speed_Estimation' |
| 349 | * '<S13>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Electrical_Angle_Estimation/degree_rad' |
| 350 | * '<S14>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem' |
| 351 | * '<S15>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem1' |
| 352 | * '<S16>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Electrical_Angle_Estimation/degree_rad/If Action Subsystem2' |
| 353 | * '<S17>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation' |
| 354 | * '<S18>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Speed_Estimation/Subsystem' |
| 355 | * '<S19>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Speed_Estimation/Raw_Motor_Speed_Estimation/Compare To Constant' |
| 356 | * '<S20>' : 'MotorController_FOC/PMSM_Controller/Angle_Speed_Estimation/Speed_Estimation/Subsystem/Compare To Constant' |
| 357 | * '<S21>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Control_Mode_Manager' |
| 358 | * '<S22>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Field_Weakening_Enabled' |
| 359 | * '<S23>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Mode_Transition_Calculation' |
| 360 | * '<S24>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Subsystem' |
| 361 | * '<S25>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale' |
| 362 | * '<S26>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Field_Weakening_Enabled/Field_Weakening' |
| 363 | * '<S27>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Field_Weakening_Enabled/Field_Weakening/Saturation Dynamic' |
| 364 | * '<S28>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/Field_Weakening_Enabled/Field_Weakening/Saturation Dynamic1' |
| 365 | * '<S29>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/If Action Subsystem' |
| 366 | * '<S30>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/open_mode' |
| 367 | * '<S31>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/torque_mode' |
| 368 | * '<S32>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/open_mode/Rate_Control' |
| 369 | * '<S33>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/open_mode/Rate_Control/Saturation Dynamic' |
| 370 | * '<S34>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/open_mode/Rate_Control/Subsystem' |
| 371 | * '<S35>' : 'MotorController_FOC/PMSM_Controller/Control_Mode_Manager/target_scale/open_mode/Rate_Control/delayUnit' |
| 372 | * '<S36>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled' |
| 373 | * '<S37>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter' |
| 374 | * '<S38>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/either_edge' |
| 375 | * '<S39>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Default' |
| 376 | * '<S40>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification' |
| 377 | * '<S41>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification' |
| 378 | * '<S42>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/either_edge' |
| 379 | * '<S43>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification/Counter' |
| 380 | * '<S44>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Dequalification/Counter/rst_Delay' |
| 381 | * '<S45>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification/Counter' |
| 382 | * '<S46>' : 'MotorController_FOC/PMSM_Controller/Diagnostics/Diagnostics_Enabled/Debounce_Filter/Qualification/Counter/rst_Delay' |
| 383 | * '<S47>' : 'MotorController_FOC/PMSM_Controller/controller/Clarke_Park_Transform_Forward' |
| 384 | * '<S48>' : 'MotorController_FOC/PMSM_Controller/controller/Motor_Limitations_Enabled' |
| 385 | * '<S49>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller' |
| 386 | * '<S50>' : 'MotorController_FOC/PMSM_Controller/controller/Park_Transform_Inverse' |
| 387 | * '<S51>' : 'MotorController_FOC/PMSM_Controller/controller/SVM' |
| 388 | * '<S52>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller' |
| 389 | * '<S53>' : 'MotorController_FOC/PMSM_Controller/controller/current_sample' |
| 390 | * '<S54>' : 'MotorController_FOC/PMSM_Controller/controller/pid_schdule' |
| 391 | * '<S55>' : 'MotorController_FOC/PMSM_Controller/controller/Clarke_Park_Transform_Forward/Clarke' |
| 392 | * '<S56>' : 'MotorController_FOC/PMSM_Controller/controller/Clarke_Park_Transform_Forward/Low_Pass_Filter' |
| 393 | * '<S57>' : 'MotorController_FOC/PMSM_Controller/controller/Clarke_Park_Transform_Forward/Park' |
| 394 | * '<S58>' : 'MotorController_FOC/PMSM_Controller/controller/Clarke_Park_Transform_Forward/Sine_Cosine_Approximation' |
| 395 | * '<S59>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/id_ctrl' |
| 396 | * '<S60>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/iq_ctrl' |
| 397 | * '<S61>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/id_ctrl/PI_id' |
| 398 | * '<S62>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/id_ctrl/Saturation Dynamic1' |
| 399 | * '<S63>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/id_ctrl/PI_id/Integrator1' |
| 400 | * '<S64>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/id_ctrl/PI_id/Saturation Dynamic1' |
| 401 | * '<S65>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/iq_ctrl/PI_iq' |
| 402 | * '<S66>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/iq_ctrl/Saturation Dynamic2' |
| 403 | * '<S67>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/iq_ctrl/PI_iq/Integrator1' |
| 404 | * '<S68>' : 'MotorController_FOC/PMSM_Controller/controller/PID_Controller/iq_ctrl/PI_iq/Saturation Dynamic1' |
| 405 | * '<S69>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM' |
| 406 | * '<S70>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Saturation Dynamic1' |
| 407 | * '<S71>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem' |
| 408 | * '<S72>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/sector_select' |
| 409 | * '<S73>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector1' |
| 410 | * '<S74>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector2' |
| 411 | * '<S75>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector3' |
| 412 | * '<S76>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector4' |
| 413 | * '<S77>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector5' |
| 414 | * '<S78>' : 'MotorController_FOC/PMSM_Controller/controller/SVM/SVPWM/Subsystem/sector6' |
| 415 | * '<S79>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/speed_mode' |
| 416 | * '<S80>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/torque_mode' |
| 417 | * '<S81>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/speed_mode/Saturation Dynamic3' |
| 418 | * '<S82>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/speed_mode/pi_speed' |
| 419 | * '<S83>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/speed_mode/pi_speed/Integrator' |
| 420 | * '<S84>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/speed_mode/pi_speed/Saturation Dynamic1' |
| 421 | * '<S85>' : 'MotorController_FOC/PMSM_Controller/controller/Speed_Controller/torque_mode/Saturation Dynamic' |
| 422 | */ |
| 423 | #endif /* RTW_HEADER_PMSM_Controller_h_ */ |
| 424 | |
| 425 | /* |
| 426 | * File trailer for generated code. |
| 427 | * |
| 428 | * [EOF] |
| 429 | */ |
| 430 | |