Hi there,
I hope I didn't post in the wrong topic but it's my first time on this site and I don't know how the things are going!
I can't put my head on my pillow because of an project for my dissertation on master: Well...I have to make a solar tracking system controlled by fuzzy logic..the concept behind this is quite simple:
I thought I might use a sensor-based feedback controller which consists of the LDR sensor, differential amplifier and comparator. In the tracking operation, the LDR sensor measures the sunlight intensity as a reference input signal. The unbalance in voltages generated by the LDR sensor is amplified and then generates a feedback error voltage(signal). The error voltage will be proportional to the difference between the sunlight location and the PV panel location.
If the comparator output goes high state, the motor driver and a relay are activated so as to rotate the dual-axis (azimuth and elevation) tracking motor and bring the PV panel to face the Sun. Accordingly, the feedback controller performs the vital functions: PV panel and sunlight are constantly monitored and send a differential control signal to drive the PV panel until the error voltage is less than a pre-specified threshold value or very close to zero!
Now comes the difficulty...I've never controlled a system with fuzzy logic before and my coordinator teacher expects some simulation and experimental results by the end of this month or even later but not too late.
For my licence I made a home automation minisystem using Arduino Uno platform. I have implemented a proportional temperature controller(using Darlington Transistor to PWM control my bulb(for heating) and cooler(for cooling) of the temperature sensor...and a vocal commander engine...or other said I was controlling my devices coolers and bulbs by using preregistered voice commands...this is my background concerning automated control...!
As I said, I looked for fuzzy logic and I gave my teacher two teoretical rapports but when it comes to practical implementing I get stucked...I don't know what to begin with!
All I know about my system is how I want it to behave...I know my fuzzy inputs and the output...!
Teoretically I know all the fuzzy stages but don't know how to implement them in MATLAB in order to get some simulation and experimental results...actually I'm not good at Matlab at all even though I graduated from Polytechnic University of Bucharest, Roumania!
I need someone to guide me from the beginning as I don't have such a good background about technical world...
Right now, at home I still have Arduino Uno platform...a cooler..some controlling Darlington Transistors...but for now my teacher is waiting for some experimental results..
How can I get those results without implementing the system itself?? I know fuzzy logic is based on user experience...what does it mean?...I think this is the first thing I have to understand!!
Sorry for my bad english and for my long message...I might shorten it if there is any problem!
Have a good day!!!
You've given a heap of non-essential information here ... (pillows, differential amplifiers, past projects, Romania etc.)
I could sum up your post perhaps as much as:
Does anyone have any good links to fuzzy logic tutorials ? especially pertaining to control and matlab.
However with respect to the arduino-y side of things:
You mention azimuth and elevation, yet talk about an LDR sensor singular, I've never played with fuzzy logic before, but it would seem a system could be implemented with less fuss with more LDR's than one. Also a thought that a PV cell could probably give you some of the information itself...
You also mention proportional errors but then discuss a comparator, which as far as I'm aware (op-amp implementation) outputs a binary signal.
It's possible your instructor wants you to simply 'prove' the system, by showing quick results that simply show correlations between input and expected output - it doesn't have to work fully, but the results should at least make sense that the direction it is heading is valid.
Also I've come to learn from my own studies that there is next to zero harm in simply asking him or her what they actually expect.
Also, another hot tip: to get experimental results, you have to experiment (!)
As you have stated, you can use LDRs to sense the light. They will need to be in tubes to shield from side light.
Rather than a comparator, use analogue inputs and compare via software.
There are also other sensors that can be used, LEDs generate a small voltage when lit.
You will also need to work out how to drive the panels to the light and how you intend to treat the end of day as you need to drive the panel back to the correct position for the morning. Leave it too late and you will not have enough to,run the motor. Too early and you do not get full production.
Weedpharma
weedpharma:
As you have stated, you can use LDRs to sense the light. They will need to be in tubes to shield from side light.
Snoots (tubes) imply that it would have to be tracking correctly to continue to track correctly ... and if it were tracking correctly, wouldn't side light by it's very nature already have much lower flux? and then the sun is going to be so much brighter than any reflection anyway?
ah no fuss though, just shooting the breeze
Here is a design for a solar tracker. All you would need to do is write fuzzy logic for it.
When are you expecting the motion of the sun to become fuzzy?
Should I start saving now for a trip to a safer galaxy?
...R
so a normal solartracker works with 4 light sensors and 2 motors.
meaning it compares always and tries to keep all the same, however when it is clouded it will move in a strange way.
You can make a system with only 1 Light Sensor and a servo motor to get 4 values in the directions.
you still need the 2 motors to move the panel.
In matlab there is a nice example on fuzzy, however it does not use a trackersystem.
for fuzzystarters:
make a horizontal input
with horleft,hornormal,horright
and another with vertlow,vertnormal,verthigh.
You can have one horizontal value or i would say 3 values, being the normal the average of all values.
assume the leftside is high lets say 80% and the right side is 40%
left is 25% of full scale and right is on 75% full scale
so just to keep it simple you will have 7 knots on the horzontal. knot 7 is when it ios dark the motors should go to the start position and wait until the sun comes up.
same for verical.
knot 7 ids combined for horizontal and vertical.
now defuzzy with the values the knots you are getting.
obviousyou will need exactly to move to the light so high values give direction.
fuzzy is analog so the motors also need a second fuzzy control to stop when the output is only small.
these can be combined to get a motorsignal, from the measured setpoint and the actual position.
to make a more complicated thing, just to get you a good point, make in the fuzzy that only one motor at a time is running (this should be in the fuzzy knots , so IF(motorneedsleft and vertmotorstopped) then motorgoleft..
that is enough for today i think.
Fuzzy logic is all about making a guess on uncertain data. It is nether analogue nor digital it is a process.
There is no fuzzy output because your motors move in the directed direction. There should be as many inputs ( sensors) as you can get each one saying what direction to move the motors in. The fuzzy logic then looks at all these diffrent inputs and moves in the direction that the majority of sensors say. It is like a voting system. The direction with the most number of votes wins and the motor moves in that direction.
in keeping with the idea of voting, or maybe standard deviation might be a better description.
you have a very crisp input. you fuzzy that to create some fuzzy values. you run calculations on those fuzzy values. then you de-fuzzify the result and send out a crisp value for your control.
your sensors are not fuzzy, they output some value, maybe with some hysteresis, but calculatable none the less.
your input is not fuzzy, it is digital to the value of the ADC and the accuracy of the sensor.
you have to fuzzy that up, then run your permutations, then come to some conclusion.
then you have to de-fuzzify the result in order to send out a signal to a non-fuzzy final device such as a motor.
I gave up on fuzzy and just used a multi-stage proportional control.
if the sensor is withing 30% of the desired setpoint, move the final device pretty fast towards the setpoint.
if the sensor value is within 20% move half as fast
if the sensor value is within 10%, move slow.
if the sensor value is within 3% move really-really slow
it meets most of the criteria of fuzzy, it is not pure boolean, it has intermediate true and false values,
the results are not purely true or false, but contain some true and some false.
Hi again,
First of all, thanks everyone for your help!
My solar tracker i want to look like is kind of this: http://www.instructables.com/id/solar-tracker/
There are 2 axis the solar tracker will move on: elevation and azimuth.
I answered so late because I wanted to settle some things...
For axial tracking, 2 motors are used as a driving source to rotate the solar panel in the direction of the sun. The position of the sun is determined by 4 LDRs; the tracking sensor reading is then converted into digital signal through ADC and then passed onto fuzzy logic controller for aligning the panel in the direction of the sun. The fuzzy controller output is connected to the driver of the two motors to rotate the panel accordingly until it faces the sun.
My Arduino Uno platform already has a builtin ADC so there will be no problem concerning this.
To sense the position of the sun in one direction i.e. east-west, two LDRs are mounted on the panel with a shadowing element in between. This shadowing element helps in determining the accurate light falling on the respective LDRs. Since the light intensity received by both the LDRs would be different every time the sun moves, the output of the two LDRs is compared.
The system determines which LDR has received more light than the other through ADC and drives the motor towards the direction of the sun.
Since Arduino Uno can't meet the motor current requirements, I will use this motor driver http://www.robofun.ro/shield-motoare-l298-v2
Driver: The motors are operated through a driver which gets the signal from the microcontroller which is based on the fuzzy logic control.
You may ask...so what's the problem...go for it!!
Fuzzy Logic Control for Axial Tracking
Error E=Voltage(LDR1-LDR2)
Change in Error CE=Error- Previous Error.
If the Error is positive and the Change in Error is negative then this means that the response is following the right direction and it should move forward in this direction but if the Error becomes negative and the Change in Error is negative, this implies that the response is following the wrong direction and it should start moving in the opposite direction until the panel faces the sun.
Here comes the questions
The panel itself should be made of solar cells or it could be even a plastic or wood?
I think, if I don't want that solar energy to be converted so I can use it after , there would be no need for the solar tracker to be made of solar cells...as it's much more expensive.
I mean, the light doesn't fall on the solar panel itself but on the LDR circuit which I thought it would be convenient to be placed at the top of the solar panel just like in the video from above :)..that black package from the top
As you could notice, I have used the term "motor" generally as I don't know what to choose from stepper motors or dc motors considering the panel's size you've just seen above??
I have at home 2 Pololu dc motors driven by L298 driver from the link but I don't know if it is enough..
...maybe you could give me a hint around this
So, my future plan is to get a solar panel asap and some LDRs and place them on the solar panel. Then I will read the sensors value and then arises the fuzzy logic question which will discuss further.
First, I want to have my assembling ready and afterwards to approach fuzzy control:)...this will be a chapter I will really need your help!
How does my plan sound for you? Is it feasible? Do you have any suggestions where to purchase components from?
I forgot to mention I'm from Roumania and I don't want the transport fees to be more expensive than the product's cost itslef :)...Cheers and thanks again for your help!...
alin91:
To sense the position of the sun in one direction i.e. east-west, two LDRs are mounted on the panel with a shadowing element in between. This shadowing element helps in determining the accurate light falling on the respective LDRs. Since the light intensity received by both the LDRs would be different every time the sun moves, the output of the two LDRs is compared.
int diff = ldrWestVal - ldrEastVal;
if (abs(diff) < deadVal) {
// do nothing
}
else if (diff > 1) {
// move a little West
}
else {
move a little East
}
// repeat
...R
find yourself the effl library, nice explanation is included, when you make one set you will understand its value fast enough.
find yourself 2 small motors and some very long screws, attach them to a construction. no need for solar as it is a school project.
use this 4 LDR setup and use 4 inputs or you can even use 2 analog inputs. one for up/down and another for left right. use the LDR as a voltage divider.
the motorshield is good for this purpose.
as it is only for demonstartion you also can use a simple light inside to be followed.
so a very small platform with 4 LDR mounted is enough.
Hi again,
right now I'm stucked at choosing the proper size and electrical specifications for my solar panel...
I know electronics but only in theory!
I want to show the solar tracker panel's utility by this scenario:
I want to show how small the output power generated by the solar system will be at the beginning when the panel is not perpendicular to the sunlight and how this changes when the system followed the sun's position. I hope you got my idea!
Let's take this kind of LED, it's a very basic 5mm LED and these are its power requirements:
1.8-2.2VDC forward drop
Max current: 20mA
What about this kind of solar panel?
Solar Panel's electric specifications are:
5V 200mA 1W
And if my calculations are correct,if I connect two of those solar panels in series I will get these values:
Voltage: 10V
Current : 200mA
Power: 2W
If i connect them in parallel I will get these values:
Voltage: 5V
Current: 400mA and of course the same power: 2W.
So, in case of maximum efficiency from the solar panel(series) I will be able to light a lot of LEDs and I think it would be better to connect the solar panels in order to get a bigger voltage which means, in series.
So...I will be able to light up to 3-4 leds...or I'm wrong?
And how many pieces of this do you think I will need in order to build a solar panel as big as these ones:
DUAL AXIS SOLAR TRACKING VIDEO - YouTube or
சூரியனின் ஒளியை நோக்கி சோலார் பேனல் சுற்றி அதிக வோல்ட்டேஜ் எடுக்க முடியும் என்ற காணொளி - YouTube or
I want my panel's size be within these 3 examples's sizes.
Wooow, just found this :
I know do you guys think this things are more than basic but I have to take it step by step..and my first step is to order asap a solar panel and trying to get some power from it to understand how the sun power-electrical power conversion takes place...and see its effect in lighting some loads/consumators.
Thanks again for your implication...hope to manage do stg together
Btw, why are those 5V 200MA 1W Solar Panel so cheap?...will it be able to convert sun energy into electrical energy or is something missing?
Meanwhile, I found this being more convenient
three, 6, 10 ? panels.
one is fixed for high noon.
then others in different directionsanthing
make one rotate only, not both asz and elev.
have one use solar trackers so it pauses when clouds are out
have one move in the calculated pattern
show how any why anything works
try to design a field where you can put 20 units, no shadows.
then try again with mild movement, no shadows,
or a roof that never moves.
========================
panels are rated on efficiency per sq ft. start a spreadsheet to compare.
I would offer that for any real experiments, you would want full size panels,
the desktop ones would be great for the academic process.
alin you are way too fast, please do one problem at a time.
so the maxoutput is 1 Watt, not enough for the arduino, so you will need a little more.
first make the basics working and then step by step.
to get the values when panel is not turning, move the panel every hour to one position from memory being the midposition of dayvalues.
Now you measure the current and then you give the fuzzy controller the works, and after 5 minutes you take another reading. that way you have 2 values to compare in a matrix.
Sorry, Are you kiddin'?
Why would I need so many panels...I thought two would be sufficient as I want to obtain that size:
Arduino based "sunflower" robot - dual axis solar tracker - YouTube.
As you said I want to obtain an academic size, not an industrial one. I want to implement this project at a breadbord level if you get me...I don't think size matters that much as I will use a flashlight or any other source of artifficial light instead of the natural Sun.
Dimension: 10 x 7 cm ...so there are 70 sq cm.
Guys, is here anyone available to answer me many questions on facebook or any other alternative way of chatting?
I want to order the components asap because they have a pretty late delievering time...and I want someone who already implemented a solar tracker to tell me what kind of solar panel to choose from ebay...
As I see here : http://www.ebay.com/itm/5V-0-22W-45mA-Mini-Solar-Panel-Module-DIY-for-Phone-Toys-Charger/281368634260?_trksid=p2047675.c100010.m2109&_trkparms=aid%3D555012%26algo%3DPW.MBE%26ao%3D2%26asc%3D31356%26meid%3Da58ce58ec71b43c5a3121ed8ed1f8ee8%26pid%3D100010%26rk%3D8%26rkt%3D24%26sd%3D351108888512 , 2 pieces of this would be sufficient for the dimensions I want to get as for the voltage I think it's enough too!
Or...should I buy a standalone panel...but that's too expensive
Waiting for some more suggestions...sorry I might be exacting but I just want to order something I will need as I will wait about 2 weeks for the product to come! Thanks again for your interest and have a good day!!
Reply to Shooter:
Sorry, Could you assist me on facebook or gmail? I don't think I got this...Why does it matter if it is enough for arduino or no?...you mean I will load Arduino with the output from the solar panel and forget about USB 5V from computer/laptop?
Well, in that case for the basics to be cleared I should obtain a minimum 5V voltage from my solar panel I intend to buy from ebay...so I will have to rectify myself and look for 2 panels with minimum 3V output...is that right?
I thought I will power arduino from my laptop and will use solar panel's energy just to light some leds or charge a phone only when the panel followed the sun's position...I'm open to any of your suggestions, observations or advices...just waiting for them
Though, allow me to contradict you: Ain't I supposed to get 2W from my solar panel...I mean, I should watch this panel as a whole composed from 2 smaller solar panels each supplying 1W...but I said I will connect them in series...anyway I will get 2W but still would not be sufficient to power the Arduino!
Needing for project:
arduino UNO or alike
power supply capable of 9 or 12 Volt for motors. (can not be done from USB)
stepper or motordrivershield , can also be a separate print that can be used on breadboard.
2 DC motors with 2 threads for the movement
mechanics for construction (obvious)
4 LDR for light sensing.
4 resistors same value as the dark resistance of the LDR, to have a voltagedivider for analog input.
a display to see what happens would be nice, however with serial you can see via USB the same.
That is enough.
as extra yes a solarpanel would be nice, a small bicycle light that will light up when you turn the panel into a light source.
order above if not already in stock.
in meantime try to figure out how the inputs work, and how to control the PWM outputs.
if above arrives assemble it, and test for working.
a small piece is
if leftsensor>rightsensor {go left}
If that all works get the voltage value of the panel into the arduino.
next step can be Fuzzy, as it is a learning thing, you will have to define the inputs to the fuzzy control, i would start with only 2 inputs, (left right) and have the height controlled conventional or with PID, that way you can see the difference in control behaviour.
If all above is working fine, and you have time left, and possibilty to move the complete setup to outside, you could make a diagram with the radiation levels in different angles, on different times.
the diagram has some strange behaviour, if you find it very good, however do not try to explain it, as this is higher scientology.
dont rush just make a good working thing, even if it is simple it is still better as a good concept, but poorly done.
This is the way I want to approach the working, going step by step.
For the moment, let's stick to the panel and montage and after that we can go further with fuzzy approaching.
If I managed to finish the assemblage by the end of this month, it would be great.
Well, I already have these pieces from a previous "home automation" project:
- Arduino Uno V3
- This motor shield http://www.robofun.ro/shield-motoare-l298-v2...mine is v1 for motors!
- I'm pretty accustomed to PWM control as I needed my coolers and bulb being controlled gradually...if I remember it well, I controlled my devices: cooler and 18W bulb using some darlington transistors and a control scheme I found it here.
I also have an LCD 16x2 segments from the same previous project...or have you made mention of other type of display? I might be wrong but do you mean I could monitor the values taken from the 4 sensors and display them in a zed graph for example?
That's exactly what I'm trying to reach...while I'm waiting for the pieces to come I want to understand perfectly well what my inputs are and how the outputs work too...I would just like to know what solar panel to choose ...maybe you could give me an ebay direct link if you don't mind
I'd also like to know why did you choose 2DC motors...cause in all the implementations I've seen so far, stepper motors are mentioned more frequently...even so I have 2 Pololu motors at home with this electrical characteristics:
Dimensions : 54.5 × 20 × 13.8 mm
supply voltage : 3 - 6 V
Current : 80 mA ( without load ) 0.8A (with load)
Torque: 1.4Kg/cm
Do you think they meet my project's requirements?
I feel the need to say it again...i'm not good at electronics at all, electricity and technical world in general...sorry but you will have to take patience with me but I will bring my A game...all I need is to have some tasks from one day to another and never let me limit myself:). All the best!