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?
Inner control loop on raspberry pi, is it feasible?
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Inner control loop on raspberry pi, is it feasible?
Here is another good reference: http://www.botched.co.uk/picopter-improvements/
Re: Inner control loop on raspberry pi, is it feasible?
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
Re: Inner control loop on raspberry pi, is it feasible?
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.
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.