Go to the documentation of this file.
76 #define GRAPH_BUFFER_NR 2 // Number of data arrays
78 #define GRAPH_BUFFER_SIZE 256 // Size of data arrays
79 #define GRAPH_BUFFER_MASK (256-1)
81 #define GRAPH_BUFFER_SPEED_TICK 100U
82 #define GRAPH_BUFFER_CURRENT_TICK 10U
84 #define GRAPH_SPEEDREF_DEFAULT 40.0f
85 #define GRAPH_SPEEDREF_STEP 60.0f
87 #define GRAPH_CURRENTREF_DEFAULT 0.0f
88 #define GRAPH_CURRENTREF_STEP -0.5f
90 #define GRAPH_TORQUE_DEFAULT 1.0f
91 #define GRAPH_TORQUE_STEP 4.0f
154 #if defined(STEP_RP_EN)
171 pBuffer->
write = next;
289 #endif // end of STEP_RP_H definition
GRAPH_BufferNR_e
Enumeration for the number of buffers.
Definition: graph.h:116
float32_t spdRef_StepSize
Definition: graph.h:166
uint16_t bufferCounter
Definition: step_response.h:128
float float32_t
Definition: sfra_f32.h:42
volatile float32_t * pSpeed_in
Definition: graph.h:157
volatile float32_t * pId_ref
Definition: step_response.h:135
GRAPH_Buffer_t bufferData[2]
Definition: step_response.h:150
volatile float32_t * pSpeed_ref
Definition: graph.h:161
void GRAPH_generateStepResponse(GRAPH_StepVars_t *pStepVars)
Sets the values to collect in a data array.
float32_t data[256]
Definition: graph.h:136
static bool GRAPH_writeDataBuffer(GRAPH_Buffer_t *pBuffer, float32_t data)
Write into the buffer.
Definition: step_response.h:166
static void GRAPH_updateBuffer(GRAPH_StepVars_t *pStepVars)
Sets the values to collect in a data array.
Definition: step_response.h:236
volatile float32_t * pIq_ref
Definition: step_response.h:138
#define GRAPH_BUFFER_NR
Definition: step_response.h:76
float32_t * pIq_in
Definition: graph.h:159
speed step response
Definition: step_response.h:112
float32_t IdRef_Default
Definition: graph.h:168
current step response
Definition: step_response.h:110
GRAPH_BufferNR_e
Initialization values of global variables.
Definition: step_response.h:102
float32_t IdRef_StepSize
Definition: graph.h:169
#define GRAPH_BUFFER_SIZE
Definition: step_response.h:78
void GRAPH_init(GRAPH_StepVars_t *pStepVars, volatile float32_t *pSpeed_ref, volatile float32_t *pSpeed_in, volatile float32_t *pId_ref, volatile float32_t *pId_in, volatile float32_t *pIq_ref, volatile float32_t *pIq_in)
Data gathering function for any iq value.
uint16_t bufferTick
Definition: step_response.h:130
uint16_t stepResponse
Definition: graph.h:155
Buffer define 1.
Definition: step_response.h:105
volatile float32_t * pId_in
Definition: step_response.h:136
volatile float32_t * pIq_in
Definition: step_response.h:139
#define GRAPH_BUFFER_MASK
Definition: step_response.h:79
uint16_t bufferTickCounter
Definition: step_response.h:129
GRAPH_STEP_RPM_Mode_e bufferMode
Definition: step_response.h:124
float32_t spdRef_Default
Definition: graph.h:165
struct _GRAPH_StepVars_t_ GRAPH_StepVars_t
Buffer define 0.
Definition: step_response.h:104
float32_t IqRef_Default
Definition: step_response.h:147
d-axis current step response
Definition: step_response.h:111
static void GRAPH_collectData(GRAPH_StepVars_t *pStepVars, GRAPH_BufferNR_e bufferNum, float32_t gData)
Data gathering function for any iq value.
Definition: step_response.h:199
struct _GRAPH_Buffer_t_ GRAPH_Buffer_t
float32_t IqRef_StepSize
Definition: step_response.h:148
uint16_t write
Definition: graph.h:138
static GRAPH_STEP_RPM_Mode_e GRAPH_getBufferMode(GRAPH_StepVars_t *pStepVars)
Definition: step_response.h:227
GRAPH_STEP_RPM_Mode_e
Definition: step_response.h:108
q-axis current step response
Definition: step_response.h:113
float32_t * pId_in
Definition: graph.h:158
Copyright 2023, Texas Instruments Incorporated