Using Fuzzy Logic in Simulink with Arduino
Show older comments
I am having difficulties executing my simulink model onto my Arduino Uno hardware due to complications from the Fuzzy Logic controller in the model. My arduino is connected to a motor shield, and this motor shield has one (in future two) motors connected. I will be sending speed and acceleration reference inputs to the fuzzy logic controller, it will determine the distribution of the voltage provided to each motor, which will in turn be converted to PWM and sent to each motor thorough the PWM output block. I have tested this block with step or random inputs and it works, I am having trouble creating PWM signals directly from the fuzzy logic controller (I am demuxing the output and attempting to send this to a PWM signal after changing the gain).
The errors are typically:
a) Not execute binary outputs DCMotorTest.c:1054:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ DCMotorTest.c:1054:1: error: this is the insn: (insn 1964 1963 1965 152 (set (reg:QI 26 r26) (reg:QI 612 [ y ])) DCMotorTest.c:70 70 {movqi_insn} (nil)) DCMotorTest.c:1054: confused by earlier errors, bailing out gmake: * [DCMotorTest.o] Error 1
b) Take up 1100% of the Data memory storage.
My fuzzy logic controller currently has two inputs and two outputs with approximately 20 rules. How would I be able to run the program on my Arduino without compromising on the fuzzy logic controller?
1 Comment
BISHMITA SHARMA
on 23 Jul 2017
I am having this trouble too.... I can't compromise with my fuzzy controller. It is showing the same memory storage problem. Is there any way that I can run the fuzzy controller part's calculation seperately and just feed the output to the arduino uno by calling the program in a separate window? is it possible and if yes, will that work?
Answers (0)
Categories
Find more on Motor Drives in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!