mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-14 14:40:26 +00:00
industry/foc foc_ident: adding flux linkage identification
This commit is contained in:
parent
5ae5ab7f44
commit
30dbdf71ff
3 changed files with 248 additions and 24 deletions
|
|
@ -35,13 +35,47 @@
|
|||
* Public Type Definition
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_INDUSTRY_FOC_IDENT_FLUX
|
||||
/* Identification routine callbacks */
|
||||
|
||||
struct foc_routine_ident_cb_f32_s
|
||||
{
|
||||
/* Private data for angle callbacks */
|
||||
|
||||
FAR void *priv_angle;
|
||||
|
||||
/* Private data for speed callbacks */
|
||||
|
||||
FAR void *priv_speed;
|
||||
|
||||
/* Openloop angle zero callback */
|
||||
|
||||
CODE int (*zero)(FAR void *priv);
|
||||
|
||||
/* Identification openloop angle callback */
|
||||
|
||||
CODE float (*angle)(FAR void *priv, float speed, float dir);
|
||||
|
||||
/* Identification openloop speed callback */
|
||||
|
||||
CODE float (*speed)(FAR void *priv, float des, float now);
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Identification routine configuration */
|
||||
|
||||
struct foc_routine_ident_cfg_f32_s
|
||||
{
|
||||
#ifdef CONFIG_INDUSTRY_FOC_IDENT_FLUX
|
||||
struct foc_routine_ident_cb_f32_s cb; /* Identification routine callbacks */
|
||||
|
||||
float flux_vel; /* Flux linkage measurement velocity */
|
||||
float flux_volt; /* Flux linkage measurement voltage */
|
||||
int flux_steps; /* Flux linkage measurement steps */
|
||||
#endif
|
||||
float per; /* Routine period in sec */
|
||||
float res_current; /* Resistance measurement current */
|
||||
float ind_volt; /* Inductance measurement current */
|
||||
float ind_volt; /* Inductance measurement voltage */
|
||||
int res_steps; /* Resistance measurement steps */
|
||||
int ind_steps; /* Inductance measurement steps */
|
||||
int idle_steps; /* IDLE steps */
|
||||
|
|
@ -54,6 +88,9 @@ struct foc_routine_ident_final_f32_s
|
|||
bool ready; /* Result ready */
|
||||
float res; /* Phase resistance */
|
||||
float ind; /* Phase inductance */
|
||||
#ifdef CONFIG_INDUSTRY_FOC_IDENT_FLUX
|
||||
float flux; /* Motor flux linkage */
|
||||
#endif
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue