libdsp/lib_observer.c: update some comments

The angle observer always refer to a motor electrical angle,
while the speed observer can be applied to a motor electrical speed or a motor mechanical speed.
This commit is contained in:
raiden00pl 2022-02-13 13:34:53 +01:00 committed by Xiang Xiao
parent 26f1be27dd
commit 01cbe9133e
2 changed files with 11 additions and 11 deletions

View File

@ -289,9 +289,9 @@ struct motor_aobserver_f32_s
struct motor_sobserver_div_f32_s
{
float angle_diff; /* Mechanical angle difference */
float angle_acc; /* Accumulated mechanical angle */
float angle_prev; /* Previous mechanical angle */
float angle_diff; /* Angle difference */
float angle_acc; /* Accumulated angle */
float angle_prev; /* Previous angle */
float one_by_dt; /* Frequency of observer execution */
float cntr; /* Sample counter */
float samples; /* Number of samples for observer */

View File

@ -410,7 +410,7 @@ void motor_aobserver_smo(FAR struct motor_aobserver_f32_s *o,
*
* Input Parameters:
* so - (in/out) pointer to the DIV speed observer data
* sample - (in) number of mechanical angle samples
* sample - (in) number of angle samples
* filter - (in) low-pass filter for final omega
* per - (in) speed observer execution period
*
@ -447,13 +447,13 @@ void motor_sobserver_div_init(FAR struct motor_sobserver_div_f32_s *so,
* Name: motor_sobserver_div
*
* Description:
* Estimate motor mechanical speed based on motor mechanical angle
* difference.
* Estimate motor speed based on motor angle difference (electrical
* or mechanical)
*
* Input Parameters:
* o - (in/out) pointer to the speed observer data
* angle - (in) mechanical angle normalized to <0.0, 2PI>
* dir - (in) mechanical rotation direction. Valid values:
* angle - (in) angle normalized to <0.0, 2PI>
* dir - (in) rotation direction. Valid values:
* DIR_CW (1.0f) or DIR_CCW(-1.0f)
*
****************************************************************************/
@ -731,13 +731,13 @@ void motor_sobserver_pll(FAR struct motor_sobserver_f32_s *o,
* Name: motor_sobserver_speed_get
*
* Description:
* Get the estmiated motor mechanical speed from the observer
* Get the estmiated motor speed from the observer
*
* Input Parameters:
* o - (in/out) pointer to the speed observer data
*
* Returned Value:
* Return estimated motor mechanical speed from observer
* Return estimated motor speed from observer
*
****************************************************************************/
@ -758,7 +758,7 @@ float motor_sobserver_speed_get(FAR struct motor_sobserver_f32_s *o)
* o - (in/out) pointer to the angle observer data
*
* Returned Value:
* Return estimated motor mechanical angle from observer
* Return estimated motor electrical angle from observer
*
****************************************************************************/