Python-based controllers and estimators

Firmware/software/electronics/mechanics
Post Reply
fdp
Beginner
Posts: 1
Joined: Wed Jun 24, 2020 8:13 am

Python-based controllers and estimators

Post by fdp » Wed Jun 24, 2020 8:30 am

Good afternoon

I am new to the embedded world, being more focused on Matlab as a development environment. I want to use the CF as a training platform for control and estimation. As far as I understand it, the following estimators are needed and are actually implemented in the firmware:

1 - The attitude estimator for the inner loop control
2 - The position and velocity estimator for the outer control loops.

I addition to this I understand that one needs the following control loops:

- Perhaps rate control
- Attitude control
- Perhaps velocity control
- Position control
- Altitude control

Having said all of this, I want to come to my questions:

- Which of these loops and estimators can be implemented in an off-board Python implementation?
- Can someone please give a starting point or some example code for starting such a Python controller?

I would prefer to go as far as possible in the control system development before I have to jump into the embedded code.

Regards
Francois



tobias
Bitcraze
Posts: 2013
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Python-based controllers and estimators

Post by tobias » Fri Jun 26, 2020 9:50 am

Basically everything above rate control should work well. It will not work as well as onboard the CF due to the induced delays but I think good enough. I say think as I have not tested it myself but seen others do it. I've even seen someone controlling at the rate level as well but that requires rewriting the firmware to make the round-time as fast as possible.

Post Reply