An example of importing Embedded Coder code into the mbed IDE. Currently doesn't connect IO to PWM, ADC, and Encoder, instead provides random inputs and measures execution time.
Dependencies: mbed-dsp mbed Nucleo_pmsmfoc
rtwdemo_pmsmfoc.h@2:bbc155b0b886, 2014-11-25 (annotated)
- Committer:
- paulcox
- Date:
- Tue Nov 25 07:52:02 2014 +0000
- Revision:
- 2:bbc155b0b886
- Parent:
- 0:70d27fec6d71
adding doc?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
paulcox | 0:70d27fec6d71 | 1 | /* |
paulcox | 0:70d27fec6d71 | 2 | * File: rtwdemo_pmsmfoc.h |
paulcox | 0:70d27fec6d71 | 3 | * |
paulcox | 0:70d27fec6d71 | 4 | * Code generated for Simulink model 'rtwdemo_pmsmfoc'. |
paulcox | 0:70d27fec6d71 | 5 | * |
paulcox | 0:70d27fec6d71 | 6 | * Model version : 1.2949 |
paulcox | 0:70d27fec6d71 | 7 | * Simulink Coder version : 8.7 (R2014b) 11-Aug-2014 |
paulcox | 0:70d27fec6d71 | 8 | * C/C++ source code generated on : Sat Oct 11 00:06:05 2014 |
paulcox | 0:70d27fec6d71 | 9 | * |
paulcox | 0:70d27fec6d71 | 10 | * Target selection: ert.tlc |
paulcox | 0:70d27fec6d71 | 11 | * Embedded hardware selection: Generic->32-bit Embedded Processor |
paulcox | 0:70d27fec6d71 | 12 | * Code generation objective: Execution efficiency |
paulcox | 0:70d27fec6d71 | 13 | * Validation result: Not run |
paulcox | 0:70d27fec6d71 | 14 | */ |
paulcox | 0:70d27fec6d71 | 15 | |
paulcox | 0:70d27fec6d71 | 16 | #ifndef RTW_HEADER_rtwdemo_pmsmfoc_h_ |
paulcox | 0:70d27fec6d71 | 17 | #define RTW_HEADER_rtwdemo_pmsmfoc_h_ |
paulcox | 0:70d27fec6d71 | 18 | #include "rtwtypes.h" |
paulcox | 0:70d27fec6d71 | 19 | #include <float.h> |
paulcox | 0:70d27fec6d71 | 20 | #include <math.h> |
paulcox | 0:70d27fec6d71 | 21 | #include <string.h> |
paulcox | 0:70d27fec6d71 | 22 | #ifndef rtwdemo_pmsmfoc_COMMON_INCLUDES_ |
paulcox | 0:70d27fec6d71 | 23 | # define rtwdemo_pmsmfoc_COMMON_INCLUDES_ |
paulcox | 0:70d27fec6d71 | 24 | #include "rtwtypes.h" |
paulcox | 0:70d27fec6d71 | 25 | #endif /* rtwdemo_pmsmfoc_COMMON_INCLUDES_ */ |
paulcox | 0:70d27fec6d71 | 26 | |
paulcox | 0:70d27fec6d71 | 27 | /* Macros for accessing real-time model data structure */ |
paulcox | 0:70d27fec6d71 | 28 | |
paulcox | 0:70d27fec6d71 | 29 | /* Forward declaration for rtModel */ |
paulcox | 0:70d27fec6d71 | 30 | typedef struct tag_RTM RT_MODEL; |
paulcox | 0:70d27fec6d71 | 31 | |
paulcox | 0:70d27fec6d71 | 32 | #ifndef _DEFINED_TYPEDEF_FOR_EnumErrorType_ |
paulcox | 0:70d27fec6d71 | 33 | #define _DEFINED_TYPEDEF_FOR_EnumErrorType_ |
paulcox | 0:70d27fec6d71 | 34 | |
paulcox | 0:70d27fec6d71 | 35 | typedef enum { |
paulcox | 0:70d27fec6d71 | 36 | NoError = 0, /* Default value */ |
paulcox | 0:70d27fec6d71 | 37 | MeasuredVelocityError |
paulcox | 0:70d27fec6d71 | 38 | } EnumErrorType; |
paulcox | 0:70d27fec6d71 | 39 | |
paulcox | 0:70d27fec6d71 | 40 | #endif |
paulcox | 0:70d27fec6d71 | 41 | |
paulcox | 0:70d27fec6d71 | 42 | #ifndef _DEFINED_TYPEDEF_FOR_EnumCommandType_ |
paulcox | 0:70d27fec6d71 | 43 | #define _DEFINED_TYPEDEF_FOR_EnumCommandType_ |
paulcox | 0:70d27fec6d71 | 44 | |
paulcox | 0:70d27fec6d71 | 45 | typedef enum { |
paulcox | 0:70d27fec6d71 | 46 | Torque = 0, /* Default value */ |
paulcox | 0:70d27fec6d71 | 47 | Velocity, |
paulcox | 0:70d27fec6d71 | 48 | Position |
paulcox | 0:70d27fec6d71 | 49 | } EnumCommandType; |
paulcox | 0:70d27fec6d71 | 50 | |
paulcox | 0:70d27fec6d71 | 51 | #endif |
paulcox | 0:70d27fec6d71 | 52 | |
paulcox | 0:70d27fec6d71 | 53 | #ifndef _DEFINED_TYPEDEF_FOR_EnumControllerMode_ |
paulcox | 0:70d27fec6d71 | 54 | #define _DEFINED_TYPEDEF_FOR_EnumControllerMode_ |
paulcox | 0:70d27fec6d71 | 55 | |
paulcox | 0:70d27fec6d71 | 56 | typedef enum { |
paulcox | 0:70d27fec6d71 | 57 | StandBy = 0, /* Default value */ |
paulcox | 0:70d27fec6d71 | 58 | Startup, |
paulcox | 0:70d27fec6d71 | 59 | TorqueControl, |
paulcox | 0:70d27fec6d71 | 60 | VelocityControl, |
paulcox | 0:70d27fec6d71 | 61 | PositionControl |
paulcox | 0:70d27fec6d71 | 62 | } EnumControllerMode; |
paulcox | 0:70d27fec6d71 | 63 | |
paulcox | 0:70d27fec6d71 | 64 | #endif |
paulcox | 0:70d27fec6d71 | 65 | |
paulcox | 0:70d27fec6d71 | 66 | #ifndef _DEFINED_TYPEDEF_FOR_SENSORS_STRUCT_ |
paulcox | 0:70d27fec6d71 | 67 | #define _DEFINED_TYPEDEF_FOR_SENSORS_STRUCT_ |
paulcox | 0:70d27fec6d71 | 68 | |
paulcox | 0:70d27fec6d71 | 69 | typedef struct { |
paulcox | 0:70d27fec6d71 | 70 | uint16_T adc_phase_currents[2]; |
paulcox | 0:70d27fec6d71 | 71 | uint16_T encoder_valid; |
paulcox | 0:70d27fec6d71 | 72 | uint16_T encoder_counter; |
paulcox | 0:70d27fec6d71 | 73 | } SENSORS_STRUCT; |
paulcox | 0:70d27fec6d71 | 74 | |
paulcox | 0:70d27fec6d71 | 75 | #endif |
paulcox | 0:70d27fec6d71 | 76 | |
paulcox | 0:70d27fec6d71 | 77 | #ifndef _DEFINED_TYPEDEF_FOR_CTRLPARAMS_STRUCT_ |
paulcox | 0:70d27fec6d71 | 78 | #define _DEFINED_TYPEDEF_FOR_CTRLPARAMS_STRUCT_ |
paulcox | 0:70d27fec6d71 | 79 | |
paulcox | 0:70d27fec6d71 | 80 | typedef struct { |
paulcox | 0:70d27fec6d71 | 81 | real32_T Current_P; |
paulcox | 0:70d27fec6d71 | 82 | real32_T Current_I; |
paulcox | 0:70d27fec6d71 | 83 | real32_T Velocity_P; |
paulcox | 0:70d27fec6d71 | 84 | real32_T Velocity_I; |
paulcox | 0:70d27fec6d71 | 85 | real32_T Position_P; |
paulcox | 0:70d27fec6d71 | 86 | real32_T Position_I; |
paulcox | 0:70d27fec6d71 | 87 | real32_T StartupAcceleration; |
paulcox | 0:70d27fec6d71 | 88 | real32_T StartupCurrent; |
paulcox | 0:70d27fec6d71 | 89 | real32_T RampToStopVelocity; |
paulcox | 0:70d27fec6d71 | 90 | real32_T AdcZeroOffsetDriverUnits; |
paulcox | 0:70d27fec6d71 | 91 | real32_T AdcDriverUnitsToAmps; |
paulcox | 0:70d27fec6d71 | 92 | real32_T EncoderToMechanicalZeroOffsetRads; |
paulcox | 0:70d27fec6d71 | 93 | real32_T PmsmPolePairs; |
paulcox | 0:70d27fec6d71 | 94 | } CTRLPARAMS_STRUCT; |
paulcox | 0:70d27fec6d71 | 95 | |
paulcox | 0:70d27fec6d71 | 96 | #endif |
paulcox | 0:70d27fec6d71 | 97 | |
paulcox | 0:70d27fec6d71 | 98 | /* Block signals and states (auto storage) for system '<Root>' */ |
paulcox | 0:70d27fec6d71 | 99 | typedef struct { |
paulcox | 0:70d27fec6d71 | 100 | real32_T Merge; /* '<S5>/Merge' */ |
paulcox | 0:70d27fec6d71 | 101 | real32_T position; /* '<S63>/Integrate_To_Position' */ |
paulcox | 0:70d27fec6d71 | 102 | real32_T velocity_command; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 103 | real32_T position_command; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 104 | real32_T torque_command; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 105 | real32_T Integrator_DSTATE; /* '<S17>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 106 | real32_T Integrator_DSTATE_l; /* '<S18>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 107 | real32_T Velocity_Delay_DSTATE; /* '<S58>/Velocity_Delay' */ |
paulcox | 0:70d27fec6d71 | 108 | real32_T Integrate_To_Position_DSTATE;/* '<S63>/Integrate_To_Position' */ |
paulcox | 0:70d27fec6d71 | 109 | real32_T Integrate_To_Velocity_DSTATE;/* '<S63>/Integrate_To_Velocity' */ |
paulcox | 0:70d27fec6d71 | 110 | real32_T Integrator_DSTATE_lc; /* '<S42>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 111 | real32_T Integrator_DSTATE_f; /* '<S45>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 112 | int32_T Position_Delay_DSTATE; /* '<S55>/Position_Delay' */ |
paulcox | 0:70d27fec6d71 | 113 | EnumErrorType error_l; /* '<Root>/Data Store Memory' */ |
paulcox | 0:70d27fec6d71 | 114 | int16_T DelayInput1_DSTATE; /* '<S13>/Delay Input1' */ |
paulcox | 0:70d27fec6d71 | 115 | uint16_T Position_Valid; /* '<S49>/Wait_For_Valid_Position' */ |
paulcox | 0:70d27fec6d71 | 116 | int8_T Integrator_PrevResetState; /* '<S17>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 117 | int8_T SwitchCase_ActiveSubsystem; /* '<S5>/Switch Case' */ |
paulcox | 0:70d27fec6d71 | 118 | int8_T Integrator_PrevResetState_c; /* '<S18>/Integrator' */ |
paulcox | 0:70d27fec6d71 | 119 | uint8_T is_active_c2_rtwdemo_pmsmfoc;/* '<S49>/Wait_For_Valid_Position' */ |
paulcox | 0:70d27fec6d71 | 120 | uint8_T is_c2_rtwdemo_pmsmfoc; /* '<S49>/Wait_For_Valid_Position' */ |
paulcox | 0:70d27fec6d71 | 121 | uint8_T temporalCounter_i1; /* '<S49>/Wait_For_Valid_Position' */ |
paulcox | 0:70d27fec6d71 | 122 | uint8_T is_c1_rtwdemo_pmsmfoc; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 123 | uint8_T is_Motor_On; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 124 | uint8_T is_Motor_Control; /* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 125 | boolean_T RelationalOperator_a; /* '<S51>/Relational Operator' */ |
paulcox | 0:70d27fec6d71 | 126 | boolean_T Lo_to_Hi_Rate_Transition3_Buffe;/* '<S6>/Lo_to_Hi_Rate_Transition3' */ |
paulcox | 0:70d27fec6d71 | 127 | boolean_T OpenLoopPosition_MODE; /* '<S51>/Open Loop Position' */ |
paulcox | 0:70d27fec6d71 | 128 | } D_Work; |
paulcox | 0:70d27fec6d71 | 129 | |
paulcox | 0:70d27fec6d71 | 130 | /* Constant parameters (auto storage) */ |
paulcox | 0:70d27fec6d71 | 131 | typedef struct { |
paulcox | 0:70d27fec6d71 | 132 | /* Computed Parameter: Lookup_Table_table |
paulcox | 0:70d27fec6d71 | 133 | * Referenced by: '<S28>/Lookup_Table' |
paulcox | 0:70d27fec6d71 | 134 | */ |
paulcox | 0:70d27fec6d71 | 135 | uint16_T Lookup_Table_table[7]; |
paulcox | 0:70d27fec6d71 | 136 | } ConstParam; |
paulcox | 0:70d27fec6d71 | 137 | |
paulcox | 0:70d27fec6d71 | 138 | /* Real-time Model Data Structure */ |
paulcox | 0:70d27fec6d71 | 139 | struct tag_RTM { |
paulcox | 0:70d27fec6d71 | 140 | /* |
paulcox | 0:70d27fec6d71 | 141 | * Timing: |
paulcox | 0:70d27fec6d71 | 142 | * The following substructure contains information regarding |
paulcox | 0:70d27fec6d71 | 143 | * the timing information for the model. |
paulcox | 0:70d27fec6d71 | 144 | */ |
paulcox | 0:70d27fec6d71 | 145 | struct { |
paulcox | 0:70d27fec6d71 | 146 | struct { |
paulcox | 0:70d27fec6d71 | 147 | uint8_T TID[2]; |
paulcox | 0:70d27fec6d71 | 148 | } TaskCounters; |
paulcox | 0:70d27fec6d71 | 149 | } Timing; |
paulcox | 0:70d27fec6d71 | 150 | }; |
paulcox | 0:70d27fec6d71 | 151 | |
paulcox | 0:70d27fec6d71 | 152 | /* Block signals and states (auto storage) */ |
paulcox | 0:70d27fec6d71 | 153 | extern D_Work DWork; |
paulcox | 0:70d27fec6d71 | 154 | |
paulcox | 0:70d27fec6d71 | 155 | /* Constant parameters (auto storage) */ |
paulcox | 0:70d27fec6d71 | 156 | extern const ConstParam ConstP; |
paulcox | 0:70d27fec6d71 | 157 | |
paulcox | 0:70d27fec6d71 | 158 | /* |
paulcox | 0:70d27fec6d71 | 159 | * Exported Global Signals |
paulcox | 0:70d27fec6d71 | 160 | * |
paulcox | 0:70d27fec6d71 | 161 | * Note: Exported global signals are block signals with an exported global |
paulcox | 0:70d27fec6d71 | 162 | * storage class designation. Code generation will declare the memory for |
paulcox | 0:70d27fec6d71 | 163 | * these signals and export their symbols. |
paulcox | 0:70d27fec6d71 | 164 | * |
paulcox | 0:70d27fec6d71 | 165 | */ |
paulcox | 0:70d27fec6d71 | 166 | extern real32_T phase_currents[2]; /* '<S48>/Product' */ |
paulcox | 0:70d27fec6d71 | 167 | extern real32_T rotor_position; /* '<S49>/Add' */ |
paulcox | 0:70d27fec6d71 | 168 | extern real32_T velocity_measured; /* '<S55>/Scale_Output' */ |
paulcox | 0:70d27fec6d71 | 169 | extern real32_T d_current_error; /* '<S12>/Sum2' */ |
paulcox | 0:70d27fec6d71 | 170 | extern real32_T q_current_command; /* '<S5>/Lo_to_Hi_Rate_Transition1' */ |
paulcox | 0:70d27fec6d71 | 171 | extern real32_T q_current_measured; /* '<S22>/Add' */ |
paulcox | 0:70d27fec6d71 | 172 | extern real32_T q_current_error; /* '<S12>/Sum' */ |
paulcox | 0:70d27fec6d71 | 173 | extern real32_T phase_voltages[3]; /* '<S27>/Select_Sector' */ |
paulcox | 0:70d27fec6d71 | 174 | extern real32_T velocity_error; /* '<S11>/Sum2' */ |
paulcox | 0:70d27fec6d71 | 175 | extern EnumControllerMode controller_mode;/* '<S1>/Controller_Mode_Scheduler' */ |
paulcox | 0:70d27fec6d71 | 176 | |
paulcox | 0:70d27fec6d71 | 177 | /* |
paulcox | 0:70d27fec6d71 | 178 | * Exported Global Parameters |
paulcox | 0:70d27fec6d71 | 179 | * |
paulcox | 0:70d27fec6d71 | 180 | * Note: Exported global parameters are tunable parameters with an exported |
paulcox | 0:70d27fec6d71 | 181 | * global storage class designation. Code generation will declare the memory for |
paulcox | 0:70d27fec6d71 | 182 | * these parameters and exports their symbols. |
paulcox | 0:70d27fec6d71 | 183 | * |
paulcox | 0:70d27fec6d71 | 184 | */ |
paulcox | 0:70d27fec6d71 | 185 | extern CTRLPARAMS_STRUCT ctrlParams; /* Variable: ctrlParams |
paulcox | 0:70d27fec6d71 | 186 | * Referenced by: |
paulcox | 0:70d27fec6d71 | 187 | * '<S1>/Controller_Mode_Scheduler' |
paulcox | 0:70d27fec6d71 | 188 | * '<S48>/ADC_Driver_Units_To_Amps' |
paulcox | 0:70d27fec6d71 | 189 | * '<S48>/ADC_Zero_Offset' |
paulcox | 0:70d27fec6d71 | 190 | * '<S49>/Offset_Between_Encoder_Zero_And_Mechanical_Zero' |
paulcox | 0:70d27fec6d71 | 191 | * '<S14>/number_of_pole_pairs' |
paulcox | 0:70d27fec6d71 | 192 | * '<S42>/Integral Gain' |
paulcox | 0:70d27fec6d71 | 193 | * '<S42>/Proportional Gain' |
paulcox | 0:70d27fec6d71 | 194 | * '<S45>/Integral Gain' |
paulcox | 0:70d27fec6d71 | 195 | * '<S45>/Proportional Gain' |
paulcox | 0:70d27fec6d71 | 196 | * '<S63>/Startup_Acceleration_Constant' |
paulcox | 0:70d27fec6d71 | 197 | * '<S17>/Integral Gain' |
paulcox | 0:70d27fec6d71 | 198 | * '<S17>/Proportional Gain' |
paulcox | 0:70d27fec6d71 | 199 | * '<S18>/Integral Gain' |
paulcox | 0:70d27fec6d71 | 200 | * '<S18>/Proportional Gain' |
paulcox | 0:70d27fec6d71 | 201 | */ |
paulcox | 0:70d27fec6d71 | 202 | |
paulcox | 0:70d27fec6d71 | 203 | /* Model entry point functions */ |
paulcox | 0:70d27fec6d71 | 204 | extern "C" void Controller_Init(void); |
paulcox | 0:70d27fec6d71 | 205 | |
paulcox | 0:70d27fec6d71 | 206 | /* Customized model step function */ |
paulcox | 0:70d27fec6d71 | 207 | extern "C" EnumErrorType Controller(uint16_T motor_on, EnumCommandType command_type, |
paulcox | 0:70d27fec6d71 | 208 | real32_T current_request, SENSORS_STRUCT *sensors, uint16_T pwm_compare[3]); |
paulcox | 0:70d27fec6d71 | 209 | |
paulcox | 0:70d27fec6d71 | 210 | /* Real-time Model object */ |
paulcox | 0:70d27fec6d71 | 211 | extern RT_MODEL *const M; |
paulcox | 0:70d27fec6d71 | 212 | |
paulcox | 0:70d27fec6d71 | 213 | /*- |
paulcox | 0:70d27fec6d71 | 214 | * The generated code includes comments that allow you to trace directly |
paulcox | 0:70d27fec6d71 | 215 | * back to the appropriate location in the model. The basic format |
paulcox | 0:70d27fec6d71 | 216 | * is <system>/block_name, where system is the system number (uniquely |
paulcox | 0:70d27fec6d71 | 217 | * assigned by Simulink) and block_name is the name of the block. |
paulcox | 0:70d27fec6d71 | 218 | * |
paulcox | 0:70d27fec6d71 | 219 | * Use the MATLAB hilite_system command to trace the generated code back |
paulcox | 0:70d27fec6d71 | 220 | * to the model. For example, |
paulcox | 0:70d27fec6d71 | 221 | * |
paulcox | 0:70d27fec6d71 | 222 | * hilite_system('<S3>') - opens system 3 |
paulcox | 0:70d27fec6d71 | 223 | * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3 |
paulcox | 0:70d27fec6d71 | 224 | * |
paulcox | 0:70d27fec6d71 | 225 | * Here is the system hierarchy for this model |
paulcox | 0:70d27fec6d71 | 226 | * |
paulcox | 0:70d27fec6d71 | 227 | * '<Root>' : 'rtwdemo_pmsmfoc' |
paulcox | 0:70d27fec6d71 | 228 | * '<S1>' : 'rtwdemo_pmsmfoc/Mode_Scheduler' |
paulcox | 0:70d27fec6d71 | 229 | * '<S2>' : 'rtwdemo_pmsmfoc/Model Info' |
paulcox | 0:70d27fec6d71 | 230 | * '<S3>' : 'rtwdemo_pmsmfoc/Motor_Control' |
paulcox | 0:70d27fec6d71 | 231 | * '<S4>' : 'rtwdemo_pmsmfoc/Mode_Scheduler/Controller_Mode_Scheduler' |
paulcox | 0:70d27fec6d71 | 232 | * '<S5>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller' |
paulcox | 0:70d27fec6d71 | 233 | * '<S6>' : 'rtwdemo_pmsmfoc/Motor_Control/Phase_Voltages_to_PWM_Compare_Values' |
paulcox | 0:70d27fec6d71 | 234 | * '<S7>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units' |
paulcox | 0:70d27fec6d71 | 235 | * '<S8>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control' |
paulcox | 0:70d27fec6d71 | 236 | * '<S9>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Position_Control' |
paulcox | 0:70d27fec6d71 | 237 | * '<S10>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Torque_Control' |
paulcox | 0:70d27fec6d71 | 238 | * '<S11>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Velocity_Control' |
paulcox | 0:70d27fec6d71 | 239 | * '<S12>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Current_Controllers' |
paulcox | 0:70d27fec6d71 | 240 | * '<S13>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Detect_Change' |
paulcox | 0:70d27fec6d71 | 241 | * '<S14>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Rotation_Coefficients_Sin_Cos' |
paulcox | 0:70d27fec6d71 | 242 | * '<S15>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_ABC_to_dq' |
paulcox | 0:70d27fec6d71 | 243 | * '<S16>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC' |
paulcox | 0:70d27fec6d71 | 244 | * '<S17>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Current_Controllers/Direct_Current_Control' |
paulcox | 0:70d27fec6d71 | 245 | * '<S18>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Current_Controllers/Quadrature_Current_Control' |
paulcox | 0:70d27fec6d71 | 246 | * '<S19>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Current_Controllers/Direct_Current_Control/Clamping circuit' |
paulcox | 0:70d27fec6d71 | 247 | * '<S20>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Current_Controllers/Quadrature_Current_Control/Clamping circuit' |
paulcox | 0:70d27fec6d71 | 248 | * '<S21>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_ABC_to_dq/Clarke_Transform' |
paulcox | 0:70d27fec6d71 | 249 | * '<S22>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_ABC_to_dq/Park_Transform' |
paulcox | 0:70d27fec6d71 | 250 | * '<S23>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC' |
paulcox | 0:70d27fec6d71 | 251 | * '<S24>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Inverse_Park_Transform' |
paulcox | 0:70d27fec6d71 | 252 | * '<S25>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Inverse_Clarke_Transform' |
paulcox | 0:70d27fec6d71 | 253 | * '<S26>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation' |
paulcox | 0:70d27fec6d71 | 254 | * '<S27>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages' |
paulcox | 0:70d27fec6d71 | 255 | * '<S28>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Determine_Sector' |
paulcox | 0:70d27fec6d71 | 256 | * '<S29>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Phase_Advanced_Inverse_Clarke' |
paulcox | 0:70d27fec6d71 | 257 | * '<S30>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Va_Sectors_1_and_4' |
paulcox | 0:70d27fec6d71 | 258 | * '<S31>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Va_Sectors_2_and_5' |
paulcox | 0:70d27fec6d71 | 259 | * '<S32>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Va_Sectors_3_and_6' |
paulcox | 0:70d27fec6d71 | 260 | * '<S33>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vb_Sectors_1_and_4' |
paulcox | 0:70d27fec6d71 | 261 | * '<S34>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vb_Sectors_2_and_5' |
paulcox | 0:70d27fec6d71 | 262 | * '<S35>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vb_Sectors_3_and_6' |
paulcox | 0:70d27fec6d71 | 263 | * '<S36>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vc_Sectors_1_and_4' |
paulcox | 0:70d27fec6d71 | 264 | * '<S37>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vc_Sectors_2_and_5' |
paulcox | 0:70d27fec6d71 | 265 | * '<S38>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Calculate_Phase_Voltages/Vc_Sectors_3_and_6' |
paulcox | 0:70d27fec6d71 | 266 | * '<S39>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Determine_Sector/Compare_VA_To_Zero' |
paulcox | 0:70d27fec6d71 | 267 | * '<S40>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Determine_Sector/Compare_VB_To_Zero' |
paulcox | 0:70d27fec6d71 | 268 | * '<S41>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Current_Control/Transform_Coordinates_dq_to_ABC/Alpha_Beta_to_ABC/Space_Vector_Modulation/Determine_Sector/Compare_VC_To_Zero' |
paulcox | 0:70d27fec6d71 | 269 | * '<S42>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Position_Control/Position_Control' |
paulcox | 0:70d27fec6d71 | 270 | * '<S43>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Position_Control/Wrap_Error_pi' |
paulcox | 0:70d27fec6d71 | 271 | * '<S44>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Position_Control/Position_Control/Clamping circuit' |
paulcox | 0:70d27fec6d71 | 272 | * '<S45>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Velocity_Control/Rotor_Speed_Control' |
paulcox | 0:70d27fec6d71 | 273 | * '<S46>' : 'rtwdemo_pmsmfoc/Motor_Control/Field_Oriented_Controller/Velocity_Control/Rotor_Speed_Control/Clamping circuit' |
paulcox | 0:70d27fec6d71 | 274 | * '<S47>' : 'rtwdemo_pmsmfoc/Motor_Control/Phase_Voltages_to_PWM_Compare_Values/Enumerated_Constant' |
paulcox | 0:70d27fec6d71 | 275 | * '<S48>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/ADC_Level_to_Phase_Current' |
paulcox | 0:70d27fec6d71 | 276 | * '<S49>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Encoder_To_Position' |
paulcox | 0:70d27fec6d71 | 277 | * '<S50>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity' |
paulcox | 0:70d27fec6d71 | 278 | * '<S51>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Startup_Open_Loop_Control' |
paulcox | 0:70d27fec6d71 | 279 | * '<S52>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Encoder_To_Position/Wait_For_Valid_Position' |
paulcox | 0:70d27fec6d71 | 280 | * '<S53>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Explicit_Angle_Wrap' |
paulcox | 0:70d27fec6d71 | 281 | * '<S54>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Explicit_Angle_Wrap_With_Error' |
paulcox | 0:70d27fec6d71 | 282 | * '<S55>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Implicit_Integer_Wrap_With_Error' |
paulcox | 0:70d27fec6d71 | 283 | * '<S56>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Explicit_Angle_Wrap_With_Error/Detect_Velocity_Error' |
paulcox | 0:70d27fec6d71 | 284 | * '<S57>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Explicit_Angle_Wrap_With_Error/Detect_Velocity_Error/Generate_Error' |
paulcox | 0:70d27fec6d71 | 285 | * '<S58>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Implicit_Integer_Wrap_With_Error/Detect_Velocity_Error' |
paulcox | 0:70d27fec6d71 | 286 | * '<S59>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Implicit_Integer_Wrap_With_Error/Detect_Velocity_Error/Enumerated_Constant' |
paulcox | 0:70d27fec6d71 | 287 | * '<S60>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Implicit_Integer_Wrap_With_Error/Detect_Velocity_Error/Generate_Error' |
paulcox | 0:70d27fec6d71 | 288 | * '<S61>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Position_To_Velocity/Implicit_Integer_Wrap_With_Error/Detect_Velocity_Error/Generate_Error/Enumerated_Constant' |
paulcox | 0:70d27fec6d71 | 289 | * '<S62>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Startup_Open_Loop_Control/Enumerated Constant' |
paulcox | 0:70d27fec6d71 | 290 | * '<S63>' : 'rtwdemo_pmsmfoc/Motor_Control/Sensors_To_Engineering_Units/Startup_Open_Loop_Control/Open Loop Position' |
paulcox | 0:70d27fec6d71 | 291 | */ |
paulcox | 0:70d27fec6d71 | 292 | |
paulcox | 0:70d27fec6d71 | 293 | /*- |
paulcox | 0:70d27fec6d71 | 294 | * Requirements for '<Root>': rtwdemo_pmsmfoc |
paulcox | 0:70d27fec6d71 | 295 | */ |
paulcox | 0:70d27fec6d71 | 296 | #endif /* RTW_HEADER_rtwdemo_pmsmfoc_h_ */ |
paulcox | 0:70d27fec6d71 | 297 | |
paulcox | 0:70d27fec6d71 | 298 | /* |
paulcox | 0:70d27fec6d71 | 299 | * File trailer for generated code. |
paulcox | 0:70d27fec6d71 | 300 | * |
paulcox | 0:70d27fec6d71 | 301 | * [EOF] |
paulcox | 0:70d27fec6d71 | 302 | */ |