Kugle-Embedded
Kugle-Embedded copied to clipboard
Embedded firmware code for the STM32H7 board on the Kugle robot running the Sliding mode attitude controller and path following MPC, to a certain extent based on code generated by MATLAB coder
The steady state LQR torque computed at: https://github.com/mindThomas/Kugle-Embedded/blob/master/KugleFirmware/Libraries/Modules/Controllers/LQR/LQR.cpp#L194-L221 is computed differently than what was derived in the report and implemented in the MATLAB and Simulink script: https://github.com/mindThomas/Kugle-MATLAB/tree/master/Controllers/BalanceLQR
The comment at line: https://github.com/mindThomas/Kugle-Embedded/blob/master/KugleFirmware/Libraries/Modules/Parameters/Parameters.h#L122-L123 is incorrect, since the gains relates to the error dynamics involving quaternion error and angular velocity error, not quaternion derivative error.
Robot mass is way too low: https://github.com/mindThomas/Kugle-Embedded/blob/master/KugleFirmware/Libraries/Modules/Parameters/Parameters.h#L320-L323 Parameters should be: Mb = 14.31 + 1.844 = 16.154 Jbx = 4.1612 Jby = 4.1727 Jbz = 0.1003