gregaxisne.com Posted February 24, 2016 Posted February 24, 2016 Working on a torque feed forward setup and was wondering if there is a structure built in at the motor level for desired accel (similar to despos or desvel) that could be used in the algorithm. Currently using desired.accel at the trajectory level causes issues with the CS segmentation time causing the signal not to be smooth. I know it can be calculated easily every servo cycle, but was hoping there is a more elegant way.....possibly a structure in a later firmware?
steve.milici Posted February 24, 2016 Posted February 24, 2016 This calculation is internal to the servo and is not stored so it is not available for program use. As you have noted you do have DesVel updated at the servo rate to maintain your own calculation of desired acceleration for this purpose.
curtwilson Posted February 24, 2016 Posted February 24, 2016 Our own servo algorithms store the DesVel value for the next cycle in the "F" polynomial filter's uf1 element of the Servo substructure. Then you can just subtract this from the new DesVel term to get your desired acceleration value. MyDesAccel = Mptr->DesVel - Mptr->Servo.uf1; ... Mptr->Servo.uf1 - Mptr->DesVel; // For next cycle We don't save a desired acceleration term because we must save the desired velocity term from cycle to cycle for the F filter and it is one simple operation to derive it. The trajectory acceleration term you tried to use is the value of acceleration at the start of each segment (a0) when the trajectory is running at 100% and there is no master position change and no desired position compensation.
Recommended Posts