Inner control loop on raspberry pi, is it feasible?

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
lysgaard
Posts: 11
Joined: Wed May 29, 2013 3:52 pm

Inner control loop on raspberry pi, is it feasible?

Post by lysgaard »

Hi. I've dicided to exercise my control theory. I'd like to write my control loops is a higher level language than C code, namely Haskell. My idea is as follows:
Multiwii reads all it's raw sensor data and RC channels. Packs this up in a efficient package and sends this to a raspberry pi over serial.
The raspberry pi does all filtering, estimation, and control calculations and sends back a reply containing the motor outputs.
I'm imagening the multiwii as a really dumb sensor board that only reads inputs and writes outputs, nothing more. The reason I'd like to do it this way is purely educational, because it let's me think about the control theory, and not the 8-bit limitations the AVR chip possesses.
What are the pitfalls of such a setup?
Is serial communication fast enough for this task?


copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Inner control loop on raspberry pi, is it feasible?

Post by copterrichie »

Here is another good reference: http://www.botched.co.uk/picopter-improvements/

ammarali
Posts: 8
Joined: Fri Feb 20, 2015 11:35 pm

Re: Inner control loop on raspberry pi, is it feasible?

Post by ammarali »

lysgaard wrote:Hi. I've dicided to exercise my control theory. I'd like to write my control loops is a higher level language than C code, namely Haskell. My idea is as follows:
Multiwii reads all it's raw sensor data and RC channels. Packs this up in a efficient package and sends this to a raspberry pi over serial.
The raspberry pi does all filtering, estimation, and control calculations and sends back a reply containing the motor outputs.
I'm imagening the multiwii as a really dumb sensor board that only reads inputs and writes outputs, nothing more. The reason I'd like to do it this way is purely educational, because it let's me think about the control theory, and not the 8-bit limitations the AVR chip possesses.
What are the pitfalls of such a setup?
Is serial communication fast enough for this task?

I want to know if u were able to take the readings of the sensors mounted on the multiwii as i want to make the same thing and i dont know how to extract the sensors readings

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Inner control loop on raspberry pi, is it feasible?

Post by QuadBow »

A raspberry pi board is much bigger than a arduino based fligth controller and it does not have the sensors already included.
The raspberry pi has no analog inputs on the board, so you need another card to watch voltage and currents.
Of course, the calculational power of an raspberry pi is overwhelming. But, for what purpose do you want to need this power, while a small 8-bit processor can do the same? One idea would be to build a super-stable multiwii version for the raspberry pi implementing the extended Kalman filter algorithm. But, you had to start from scratch developing this significanty new software.

In total: yes the use of a raspberry pi it feasible, but makes only sense for very specific use cases which require a new software design.

Post Reply