Fuzzy logic controller Simulink embedding for dual axis solar-tracker

9 views (last 30 days)
I am trying to test the FLC I designed for dual axis solar tracker. My system uses a 4 LDR sensor system(these 4 LDR's are placed in an enclosure) to detect when the sun's position changed. When the controller sees a difference between voltages output obtained from the 4 LDRs, an error appears in the system and the controller has to drive the motors accordingly in order to compensate for solar panel misalignment. So, my FLC's inputs will be: error and change_in_error. Well, it might sound stupid but I don't know whether I have a reference input or not. In a similar example from Mathworks, "water tank" there was a setpoint: desired level of the water. In my case I want just the solar panel to be aligned with the sun which means I want my solar panel to be almost perpendicular! Well, when this happens the sun's light will fall proportionally on the both sensors which means I will have a zero value error and the panel followed the desired position...do I have a setpoint?? how can I implement this kind of closed-loop control in Simulink? For driving the panel on any of the two axes I will use L298 motor driver to drive 2 Pololu Dc Motors 120:1 3mm shaft. This driver will receive PWM commands from the FLC output as the driver works with PWM commands. How can I implement this in Simulink?...I saw many blocks in Simulink's libraries that has to do with motors but none to be related to Pololu Dc Motor(brushed motor).I guess the output of the controller which will be the speed of the motor will have to be connected at the input of motor driver Simulink element and then scoped, right? :) Thanks in advance!

Answers (2)

youssef ait khallouk
youssef ait khallouk on 14 Mar 2019
sad story

Abdul Majeed
Abdul Majeed on 5 Sep 2023
share file

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!