libdsp/lib_observe: fix typo and use b16sign()

This commit is contained in:
raiden00pl 2023-10-07 11:56:22 +02:00 committed by Xiang Xiao
parent ec5793db59
commit 819bec0888
2 changed files with 4 additions and 4 deletions

View File

@ -170,7 +170,7 @@ void motor_aobserver_smo_init(FAR struct motor_aobserver_smo_f32_s *smo,
* *
* and get correction factor (z): * and get correction factor (z):
* *
* sign = sing(err) * sign = sign(err)
* z = sign*K_SLIDE * z = sign*K_SLIDE
* *
* Once the digitalized model is compensated, we estimate BEMF (e_s.) by * Once the digitalized model is compensated, we estimate BEMF (e_s.) by

View File

@ -165,7 +165,7 @@ void motor_aobserver_smo_init_b16(FAR struct motor_aobserver_smo_b16_s *smo,
* *
* and get correction factor (z): * and get correction factor (z):
* *
* sign = sing(err) * sign = sign(err)
* z = sign*K_SLIDE * z = sign*K_SLIDE
* *
* Once the digitalized model is compensated, we estimate BEMF (e_s.) by * Once the digitalized model is compensated, we estimate BEMF (e_s.) by
@ -323,8 +323,8 @@ void motor_aobserver_smo_b16(FAR struct motor_aobserver_b16_s *o,
/* Slide-mode controller */ /* Slide-mode controller */
sign->a = (i_err->a > 0 ? b16ONE : -b16ONE); sign->a = b16sign(i_err->a);
sign->b = (i_err->b > 0 ? b16ONE : -b16ONE); sign->b = b16sign(i_err->b);
/* Get current error absolute value - just multiply value with its sign */ /* Get current error absolute value - just multiply value with its sign */