Any idea regarding MPPT system?

Thread Starter

shiva007nand

Joined Sep 25, 2015
38
Mod edit:
Please don't hijack other member's post, now you have your own.
This thread was split from Maximum power point tracker code.



rednwhite,
Is your code working properly ?? I have taken timer interrupt to read adc.
from your logical algorithm. also can you explain hardware part for duty cycle.
 

Thread Starter

shiva007nand

Joined Sep 25, 2015
38
Have you tried using a web browser and a search engine? Or perhaps Wikipedia?
Yeah I have tried that, I have question.

without MPPT battery make force to charge on given voltage eg. 12 V even if solar panel is
able to provide voltage around 14 to 17 volts.

with MPPT charger what does it make difference to battery charging ??
voltage remains same or current gets increases.
 

blocco a spirale

Joined Jun 18, 2008
1,546
Yeah I have tried that, I have question.

without MPPT battery make force to charge on given voltage eg. 12 V even if solar panel is
able to provide voltage around 14 to 17 volts.

with MPPT charger what does it make difference to battery charging ??
voltage remains same or current gets increases.
Look at it from the MPPTs point of view; In its basic form the MPPT sees any load as a resistor, it doesn't know or care what the load is called e.g. it could be a motor, lightbulb, battery etc. The MPPT follows the same algorithm regardless i.e. it will always attempt to deliver the maximum power into whatever load is connected to it.
 
Last edited:

Roderick Young

Joined Feb 22, 2015
408
rednwhite,
Is your code working properly ?? I have taken timer interrupt to read adc.
from your logical algorithm. also can you explain hardware part for duty cycle.
I can see the bug in his original code. There is a variable called FLAG. If FLAG==1, duty cycle is increasing. But when we hit the point that the new power is less than the old power, that's a sign that should start decreasing the duty cycle. So we set FLAG=0. But then the next block of code sees this FLAG==0 right away, and decides that FLAG should be set back to 1, before even taking a new reading of the power. Basically, there is

if (FLAG==1) {
climb the hill...
}

if (FLAG==0) {
descend the hill...
}

when it should be

if (FLAG==1) {
climb the hill...
} else {
descend the hill...
}

To the other question about MPPT in relation to solar charging a battery, the basic concept is to draw the maximum power from the panel (we'll assume that the battery can absorb whatever charge rate is given for now). There is always an inductive element in the circuit. As an example, suppose the panel delivers maximum power at 21 volts. The MPPT charger is set up like a buck converter, where current is drawn at an average rate such that the panel is putting out 21 volts. A short pulse of current goes into charging up an inductor, then the inductor maintains some of that current for a short time. The process repeats itself thousands of times per second.

The above example assumes that the panel voltage is sufficiently higher than the battery voltage. There are other switching converter topologies that can handle when the battery voltage is lower, or even about the same. If you read up on DC switching converters, the idea hopefully will become clearer.
 

Thread Starter

shiva007nand

Joined Sep 25, 2015
38
Look at it from the MPPTs point of view; In its basic form the MPPT sees any load as a resistor, it doesn't know or care what the load is called e.g. it could be a motor, lightbulb, battery etc. The MPPT follows the same algorithm regardless i.e. it will always attempt to deliver the maximum power into whatever load is connected to it.
To obtain maximum power from MPPT, internal resistance of MPPT should be equal to load resistance.
So, it can draw maximum power from panel.
 

Thread Starter

shiva007nand

Joined Sep 25, 2015
38
I can see the bug in his original code. There is a variable called FLAG. If FLAG==1, duty cycle is increasing. But when we hit the point that the new power is less than the old power, that's a sign that should start decreasing the duty cycle. So we set FLAG=0. But then the next block of code sees this FLAG==0 right away, and decides that FLAG should be set back to 1, before even taking a new reading of the power. Basically, there is

if (FLAG==1) {
climb the hill...
}

if (FLAG==0) {
descend the hill...
}

when it should be

if (FLAG==1) {
climb the hill...
} else {
descend the hill...
}

To the other question about MPPT in relation to solar charging a battery, the basic concept is to draw the maximum power from the panel (we'll assume that the battery can absorb whatever charge rate is given for now). There is always an inductive element in the circuit. As an example, suppose the panel delivers maximum power at 21 volts. The MPPT charger is set up like a buck converter, where current is drawn at an average rate such that the panel is putting out 21 volts. A short pulse of current goes into charging up an inductor, then the inductor maintains some of that current for a short time. The process repeats itself thousands of times per second.

The above example assumes that the panel voltage is sufficiently higher than the battery voltage. There are other switching converter topologies that can handle when the battery voltage is lower, or even about the same. If you read up on DC switching converters, the idea hopefully will become clearer.
Thanks for reply,
According to bug reported by you, I have made some cosmetic changes in original code. Please let me know whether I am correct in coding or not. If possible report an error and try to correct it.
 

Attachments

A power audio amplifier would not work very well, if the output Z was 8 ohms and the speaker was 8 ohms.

With RF, you do have to pay attention to power factor and reflections, but not for resistive power.

Besides that, you can
1) Improve the power factor of the AC distribution
or
2) Get the most power out of the panel.

In #1, you could possbibly generate/absorb current to make the PF=1. Solar installations by the power company can do LOCAL power factor correction. This may actually be more important than extracting the most power out of the panel.

Well, you really want the second derivative of a fit curve to be zero. That's kinda hard so one of the methods is to perturb and see which way the power goes.
Another way is to measure the irradiate with another sensor. Clouds mess this up a bit. You can also track the path. So, you have an "operating point" that you can move or you can physically move the panel or do both.
 

Lestraveled

Joined May 19, 2014
1,946
Guys, I think some of you have missed a very important point about what a MPPT does. Its only job is to control the charge current to the batteries. It does not supply power to lights, radios, or hair dryers. An MPPT maximizes the charge current to batteries only. When there as an abundance of power, the MPPT is not used, and the batteries are charging at their max current. When there is not an abundance of power, the MPPT comes into play and varies the charge current with a switch mode power conversion to squeeze the most charge current it can from the available power. The MPPT keeps the batteries charged as best as it can. Batteries, through and inverter, supply power to lights, radios, and hair dryers.
 

MrAl

Joined Jun 17, 2014
11,496
Hi,

I think what Les is trying to say is that you can not max power point track with a light bulb unless you dont mind dim light sometimes :)

A brief restatement of the MPPT methods is basically to measure the power available from the array and determine when it is at a maximum, and do this often due to environmental changes like cloud cover. Alternately, use a single cell to monitor the available power.
Power is E*I and I is viewed as the independent variable, so E is a function of I:
P=E(I)*I

It is unfortunate that this is not the end of the story, because various environmental factors also makes both E and I a function of time:
P=E(I,t)*I(t)

and it is also unfortunate that I(t) is an unknown function, and E(x,t) is also unknown. This is what makes the perturbation method inherently unstable.
To effectively use that method would require small measurements and small perturbations, and they would have to be repeatable measurements before any kind of decision can be made.
That alone is not the only problem, but the shape of the static curve is also a problem. There is a relatively slow rise followed by a steep decent, and that steep decent follows the max power point.
In other words, the algorithm can have the tendency to "fall off the deep end" when it gets near the max power point, because any change in environment can cause the power to shoot down low, which can cause a line tied unit to disconnect from the line. If the unit times out and connects again, the same thing can happen again, and repeat over and over.
When i worked with Sandia Labs back in the 1980's this is probably what made them decide to go with the extra solar cell sensor instead of the perturbation method. Since then however measurement accuracy has improved in general.
The best bet using the perturbation method is probably to make a lot of measurements often, and try to determine if it is your controller or the environment that is doing the actual perturbation. That way you might be able to make an intelligent decision how to proceed.
Personally though, i would hate to have to go outside every day and make sure that the little solar cell sensor is clean :)
 

blocco a spirale

Joined Jun 18, 2008
1,546
I should make it clear, I wasn't suggesting that connecting a lightbulb to an MPPT is a good idea only that the MPPT does not care. It was in response to the TSs question about charging a battery as though a battery is a special case.
 

Roderick Young

Joined Feb 22, 2015
408
Thanks for reply,
According to bug reported by you, I have made some cosmetic changes in original code. Please let me know whether I am correct in coding or not. If possible report an error and try to correct it.
That's conceptually the right idea, but as MrAl pointed out above, that kind of algorithm can go unstable under real life conditions. You may need to do some digital filtering on many past readings rather than just blindly looking at the last one. Search the web for MPPT algorithms - last I checked, there was at least one person who posted their master's thesis on it.
 
Last edited:

Thread Starter

shiva007nand

Joined Sep 25, 2015
38
That's conceptually the right idea, but as MrAl pointed out above, that kind of algorithm can go unstable under real life conditions. You may need to do some digital filtering on many past readings rather than just blindly looking at the last one. Search the web for MPPT algorithms - last I checked, there was at least only person who posted their master's thesis on it.
Thanks Young and MrAl,
for digital filtering, I think it will be better to take average of last 10 readings. store it in some variable and make changes for duty cycle according to it. Thesis language is little bit hard to understand. but I will try to google it and get best one.
 

MrAl

Joined Jun 17, 2014
11,496
Hello again,

The most difficult part is trying to determine from a function like:
P=p(x,t)

what variable (x or t) is causing the change.

A Statement of the Main Problem:
If 'x' (your control variable) is causing the change, then any change in 'P' can be perfectly attributed to your change in 'x' and thus you have made a good measurement and can then exactly determine what to do next.
On the other hand, if 't' is causing the change (due to natural occurrences) you wont be able to tell because 'x' might be (by sheer coincidence) simultaneous with 't'.

What might help is to repeat the control test several times in a row, probably spaced by random short time intervals, using the same test and then backing up to the original point before the next test. IF several tests show the same result then you might assume that your control variable is responsible for any change. If any test shows a different result, then you would have to repeat the test until you get a result that is the same every time. This of course still assumes that the next change will happen under the same environmental conditions, which it may not. If the test changes are small and frequent, it might work most of the time.

The natural phenomena include variable cloud cover and moving dust particles for example. Cloud cover can be very erratic where it blocks the sun light for a second or two, then allows it through, then blocks again, then unblocks again, etc., due to variable cloud shape and travel speed and direction. Dust can blow over the array and cover part of it, then blow away, etc.
Just a couple examples of what you will have to deal with :)

If you find anything good on the web on this subject please post a link.

BTW, this thread got moved because you must have started this conversation within someone elses thread.
 
Last edited:
Top