NMPC Controller for Hexacopter
« on: May 15, 2018, 09:44:25 pm »
Hi ,
I have developed a Non-Linear Model Predictive Controller for hexacopter, as a fault tolerant controller for hexacopter, to handle motor failures, windy conditions, communication delays etc. However, all of this have been working pretty well in simulation on MATLAB, and now I intend to perform hardware validation.

For hardware I am using Revo FC running I think Black Rhino Firmware. I am considering the following options ,
Opt 1) I want to use Beagle Bone Blue / RPi2 for this project with Librepilot firmware running on it
Opt 2) BBB/RPi2 communicate with Librepilot giving it motor commands.

One of the primary reason to use BBB/RPi2 is because, I believe Revo hardware in not capable of handling optimization and needed something powerful onboard the hexacopter. Hence, I am just trying to understand whats the best way moving forward using Librepilot. any suggestions or recommendation would be helpful.

Thank you..

Re: NMPC Controller for Hexacopter
« Reply #1 on: May 16, 2018, 03:44:58 am »
Just FYI: Revo class FCs have hardware floating point math.  There are several places in the code where it already does sinf(), cosf(), expf(), etc.

I would implement the code so that it could be run in either place, and first try it in Revo and check CPU usage.

Re: NMPC Controller for Hexacopter
« Reply #2 on: May 16, 2018, 05:23:08 am »
I would look into implementing the code on Revo itself. My choice of using BBB or RPi2 was as Matlab has an option of porting the optimization code directly to an any of these platforms.

I have a few follow up questions :
1) Also I believe implementing this code on Revo would be relatively straight forward. But is there a way that I can directly connect it to Matlab.
2)if I choose the BBB/RPi2, can I send motor commands rather just reading telemetry data.

I understand this might be a repetition, but it would be really helpful if you could just point to resource to understand UAVTalk and using it to send motor commands.

Thanks a lot.