This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: About PI control of CLOSED_LOOP_POSITION

Part Number: AM2434

Hello there,

I have a question regarding the single_chip_servo.c program from the following URL

https://www.ti.com/lit/zip/sprad03

1. Why is 0~360 counterclockwise and 720-1080 clockwise?

2. Why are the gPosArray values 180,180,359.5,359.5,0.5,0.5,0.5,180,180?

Best regards,

Ryuto

  • Hi Ryuto,

    1. Our motor control expert is looking into this question. Will get back to you soon.

    2.  As of the gPosArray values, they are just random 8 positions we used to demonstrate how the closed loop position work.

    Best regards,

    Ming  

  • Hi Ryuto,

    Here is the answer for question 1 from our motor control expert:

    This is a 0-1080 degree reference frame (three-turn) with considering second turn as the center of reference frame. Therefore, 0-360 is overflow with a counter-clockwise turn and 720-1080 is overflow with a clockwise turn. The reason for this choice of reference frame is to avoid discontinuities in the position error signal. If the mechanical angle was used directly, it would jump from 359 to 0 degrees when the motor completes one revolution in the counter-clockwise direction, or from 0 to 359 degrees when the motor completes one revolution in the clockwise direction. This would cause a large spike in the error signal, which would affect the performance of the PI controller. By using a 0-1080 degree reference frame, the error signal is always continuous and smooth, regardless of the direction and number of rotations of the motor. This makes the control algorithm more robust and stable. 

    Best regards,

    Ming