libdsp/lib_motor.c: remove maximum openloop speed limiter
This commit is contained in:
parent
eea371093c
commit
c43ec4283f
|
@ -237,7 +237,6 @@ struct svm3_state_f32_s
|
|||
|
||||
struct openloop_data_f32_s
|
||||
{
|
||||
float max; /* Open-loop max speed */
|
||||
float angle; /* Open-loop current angle normalized to <0.0, 2PI> */
|
||||
float per; /* Open-loop control execution period */
|
||||
};
|
||||
|
@ -445,8 +444,7 @@ void motor_sobserver_div(FAR struct motor_observer_f32_s *o,
|
|||
|
||||
/* Motor openloop control */
|
||||
|
||||
void motor_openloop_init(FAR struct openloop_data_f32_s *op,
|
||||
float max, float per);
|
||||
void motor_openloop_init(FAR struct openloop_data_f32_s *op, float per);
|
||||
void motor_openloop(FAR struct openloop_data_f32_s *op, float speed,
|
||||
float dir);
|
||||
float motor_openloop_angle_get(FAR struct openloop_data_f32_s *op);
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
*
|
||||
* Input Parameters:
|
||||
* op - (in/out) pointer to the openloop data structure
|
||||
* max - (in) maximum openloop speed
|
||||
* per - (in) period of the open-loop control
|
||||
*
|
||||
* Returned Value:
|
||||
|
@ -50,11 +49,9 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void motor_openloop_init(FAR struct openloop_data_f32_s *op, float max,
|
||||
float per)
|
||||
void motor_openloop_init(FAR struct openloop_data_f32_s *op, float per)
|
||||
{
|
||||
LIBDSP_DEBUGASSERT(op != NULL);
|
||||
LIBDSP_DEBUGASSERT(max > 0.0f);
|
||||
LIBDSP_DEBUGASSERT(per > 0.0f);
|
||||
|
||||
/* Reset openloop structure */
|
||||
|
@ -63,7 +60,6 @@ void motor_openloop_init(FAR struct openloop_data_f32_s *op, float max,
|
|||
|
||||
/* Initialize data */
|
||||
|
||||
op->max = max;
|
||||
op->per = per;
|
||||
}
|
||||
|
||||
|
@ -92,15 +88,6 @@ void motor_openloop(FAR struct openloop_data_f32_s *op, float speed,
|
|||
|
||||
float phase_step = 0.0f;
|
||||
|
||||
/* REVISIT: what should we do if speed is greater than max open-loop speed?
|
||||
* Saturate speed or stop motor ?
|
||||
*/
|
||||
|
||||
if (speed > op->max)
|
||||
{
|
||||
speed = op->max;
|
||||
}
|
||||
|
||||
/* Get phase step */
|
||||
|
||||
phase_step = dir * speed * op->per;
|
||||
|
|
Loading…
Reference in New Issue