# Is an Arduino/PI strong/good enough for my application or do I need custom hardware? [closed]

I am entirely new to using Arduinos/PIs and I am currently learning a bit out it in order to build a control unit for my masters project.

My setup:

1. 5 IMUs that measure acceleration and rotation about 3 axes. Each requires an I2C.

2. 4 variable DC voltage sources

3. 4 magnetorheological dampers

The IMUs send their data to the Arduino/PI where 26 Non-linear ODEs need to be solved simultaneously. A fuzzy logic controller will use the calculated values to determine the output voltage of each source and this is then sent to each damper. And the process continues. The model will be built in Simulink and exported via their toolboxes to the arduion/pi.

My questions:

1. Is there a way to connect the 5 IMUs' I2Cs to the 3 or so pins on the boards?

2. In your experienced/professional opinion, are any of the available products from Arduino/PI powerful enough to do my calculations in real-time?

I will be able to get some custom hardware from a company, but I am sure they will charge me an arm and two kidneys for it.

EDIT:
According to a few quick searches, most IMUs have a sampling rate upto about 1000Hz. The dampers respond to an input voltage in about 15ms.

The equations I will be using are in a pdf from this link: https://www.pdf-archive.com/2016/11/02/formulas-total/formulas-total.pdf

There are too many for me to type out here.

The fuzzy logic controller will have 6 fuzzy sets for each of the four wheels and 4 output fuzzy sets, one for each wheel. So in total, 28 fuzzy sets, each consisting of 5 Gaussian membership functions and two sigmoidal membership functions. The fuzzy associative matrix will be 7x7 in size. There will be 3 of these matrices per wheel, which brings as to the value of 6 fuzzy sets as was stated in the first sentence of this paragraph.

I hope this answers at least a few of the comments' concerns.

• You may want to consider a medium-sized FPGA for this. There are several reasonably-priced (for FPGAs) boards you can use for this. Commented Nov 2, 2016 at 6:19
• Do you perhaps have a specific product in mind? One that I can use as a baseline for further research? Commented Nov 2, 2016 at 6:26
• My FPGA experience is a little lacking so you'll want someone else to help you make your ultimate decision. SparkFun sells the Mojo v3 with a ATmega32U4 and Spartan 6 LX9, but you may need a LX16 or even LX25 for your project. Commented Nov 2, 2016 at 6:45
• I'd say it's difficult to say if a Pi/Adurino is powerful enough. First, you don't say much about your timing constraints, i.e. how fast do you need the result. Second, the complexity of the algorithm and the efficiency of its implementation is unknown. An FPGA offers highest performance, but may be, this is not necessary. In this case, a Pi could be more convenient. Commented Nov 2, 2016 at 7:34
• This question is too broad, and if you really are doing this for your Masters project, then you had better be able to do run the calculations yourself. Its almost insulting to yourself to ask other people how to do this. Its hard but is a process you need to go through. In short, you need to figure out the bandwidth of your system and how fast you want to calculate, How many multiplies and at what precision. Then find a digital system that can do that for you. Micros ->DSP's-> FPGA's in order of real time. You may want to take a real time processing class, or learn with online resources. Commented Dec 2, 2016 at 19:23

(too long for a comment)

First, as @sweber says, you'll have to calculate your real requirements: how much calculations, and at which frequency. With those figures in hand you can make a choice.

Within the Arduino's there is plenty of variation, from the lowly 8-bit Uno to the 32-bit Due to monsters that run Linux on the side.

As for a Pi: a Pi with Linux might not be a good idea for a real-time system: the Linux kernel and other processes might get in the way at unpredictable moments. But you can use a Pi bare-metal, and it is a fast beast. But this is not done very often, so you won't find much assistance for it on the web.

So it's back to work for you: create the simulation, use it to get the numbers, then you can make a decision.

• I have updated my post. Also, regarding the Pi bare-metal, is it possible to use Simulink's code generation package to help with it? It can generate code in quite a few languages, notably C, which seems to be the thing to use on the Pi bare-metal. EDIT: Will the communication between the peripherals and the PI be the main problem? If I understand the whole process correctly, essentially there wont be any drivers? Commented Nov 2, 2016 at 9:03
• If you go bare-metal there is nothing unless you add it yourself. That's bare-metal.... I dunno about exported Simulink code, does it use any extrenal libraries? How does it access the inputs and outputs? Commented Nov 2, 2016 at 9:13
• After some light reading, it seems that you have to do everything. Including writing drivers for the IMU for example. I wont be doing that. I will just get a stronger board if it is not possible on a PI running my exported Simulink code. I do not have nearly enough experience or knowledge in coding to do most of it myself. My time frame is definitely not long enough for me to learn it. Perhaps when I do my PhD. Maybe. Commented Nov 2, 2016 at 9:22
• As sweber stated: determine your requirements first, both the amount of calculations and the frequency at which they must be done. And how real-time is your requirement, is an occasional hickup allowed? If not, using a non-real-time operating system like Linux will likely get you in trouble. Commented Nov 2, 2016 at 9:26
• Thank you for the advice. I will consult the EE faculty staff regarding my new found knowledge(?). Commented Nov 2, 2016 at 9:31