Matlab Simulink Dual Axis Solar Tracker Fuzzy

FLC=Fuzzy Logic Controller

Hi there,
I have to implement a dual-axis solar tracker.
In order to detect sun's position I will use a system of 4 LDRs placed in an enclosure. The panel will be rotated by using a L298 motor driver to drive 2 Pololu DC Motors 120:1 3mm shaft.
For the controlling part, when there is a misalignment between solar panel and the sun, an error signal appears...it's an error signal identified by the LDR sensors.
This will be the first input of the FLC I designed.
I will also use a change_in_error input in order to know if my panel is moving towards the right direction. So my FLC will have 2 inputs and one output: the speed of any of the motors.
The driver works with PWM commands so the sense of the motor woudn't be a problem.
The problem is I don't know if the FLC controller I designed works well or not and for this I need to integrate it with Matlab Simulink and I don't know how.
I don't even know if I have a reference to follow. For example when I need to control the temperature, my reference will be the desired temperature and the system has to follow it.
In my case I don't know if it's the same...I mean, I will know my panel is perfect perpendicular to the sun when the error value will be zero which means the solar panel tracked the sun's position.
I don't know how to implement this system in Simulink in order to find out whether the FLC I designed is ok or not. Maybe someone can help me :slight_smile:
My guess is that the output of the FLC controller(simulink element) will have to be connected to the input of the motor driver Simulink element, right? I guess I will also have to set some params for the driver motor element!
I already exported FLC to a Matlab variable :)...I need to scope the output of the system but don't know how to interconnect the elements in a closed-loop way :slight_smile:
How can I modify this http://www.mathworks.com/matlabcentral/fileexchange/screenshots/6985/original.jpg,
in order to adapt it for my needs? :slight_smile:
Here is the motor I will use: Pololu - Mini Plastic Gearmotor, 90° 3mm D-Shaft Output with Pololu Wheel 32×7mm.
Thanks in advance :slight_smile:

Nobody?

If you have reason to believe the motion of the sun is about to become fuzzy I should start saving for a ticket on the first rocket to another galaxy.

...R

Predict very accurately where the sun is in the sky, with this simple Arduino program.

Guys, I need to do this :slight_smile:

a "solar tracker" at breadboard level, not the sun itself. I need to know if you have a thing with Simulink or if you've ever heard of Matlab program...only this way you could help me with :expressionless:
I need to simulate a close-loop system for a solar tracker and see how the output modifies in order to minimize de initial error, error=LDR(V)-LDR(E).
It doesn't matter the controller...it could be a PID...I just need to know how to simulate the whole system, including the motor driver. Thanks :slight_smile:

This is the Arduino forum, not a MATLAB or Simulink forum.

Hi,
Hmm how many threads...
If I needed to know all this about matlab and simulink, I'd be going back to the teachers/lectures who taught it to me and get them to explain it.

Tom..... :slight_smile: