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
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
How can I modify this http://www.mathworks.com/matlabcentral/fileexchange/screenshots/6985/original.jpg,
in order to adapt it for my needs?
Here is the motor I will use: Pololu - Mini Plastic Gearmotor, 90° 3mm D-Shaft Output with Pololu Wheel 32×7mm.
Thanks in advance