MPPT...yet again

mickm2au

Member
Being pretty new to this forum I've been going through previous threads looking for stuff of interest. A subject that caught my eye was MPPT and I think I have now read all previous threads relating to it, but they all seem to have peetered out.

I think "Dippy" mentioned starting thread to explain his experiments with MPPT, I look forward to seeing that.

"Adiman" seems to have a very good working unit. see...

http://www.picaxeforum.co.uk/showthread.php?t=9816&highlight=mppt post19

BB's Switchmode Charger thread was very informative, although this paragraph has me a bit puzzled...

I don't have the ACTUAL numbers to hand that came from my results but this example explains the problem.
Suppose that a duty of 30% makes the MPPT run at it's optimum. Let's say about 80% efficient.
A duty of 29% would hardly load the panel at all and efficiency would drop off dramatically. A duty of 31% would excessively load the panel again resulting in a MASSIVE drop in efficiency. Now let's say the battery gains a little charge and the optimum duty would be 30.01%. Running at 30% would only give about 50% efficiency and running at 31% would give only about 30% efficiency. The PICAXE is simply not capable of running at the required duty to give a better efficiency than just connecting the panel direct.
I would have thought that to adjust the duty cycle of the converter to get the best position on "the hill" curve for maximum power out would not have needed such a fine adjustment as less than 1%? Looking at the curve of my solar panels, I have 2 X 64 watt Unisolar on the roof of our motorhome, its very rounded and would have thought that a few % either way wouldn't make too much difference at the peak. I also thought that the curve would remain a similar shape but in a different position under different light conditions. If I've missed the point could you explain this to me please BB.

I would like to have a go at a Picaxe based MPPT when I have collected enough information. I realise that an extra panel would give much more than a MPPT would but it wouldn't be as interesting a project. I did design a 20 amp 24v to 12v converter based on a switcher about 20 years ago.

I don't mind re-inventing the wheel or trying to improve or build on someone elses, so if there are any ideas out there maybe this thread can be the start
 

Dippy

Moderator
I think BB is doing some work on an MPPT.
I've paused for a while.

Hopefully BB can post some more explanations - as I didn't quite follow the last bit of that quoted paragraph.

Switchers seem destined for MPPT. Its all a balancing act.
And I've read many other postings a while back where the principle of MPPT has been completely missed. No doubt we'll go off at numerous irrelevant tangents.

So, wait on for BB. He'll have got back from the pub soon ;)
 

BeanieBots

Moderator
Yes, you did miss the point somewhere.
The problem is NOT with where on the IV curve your controller is operating, it is to do with how changes in PWM duty effect where you are.
This is also (obviously) a significant factor in which switching topology you choose to use. Please ensure you have read and understood all the caveats I gave.
My comments relate to the use of a flyback converter. Don't forget, the converter output is feeding a very low impedance load. Namely a battery. Hence, a VERY small change in output voltage results in a VERY large change in output current and sence drop in PV voltage.

Add to that the fact that a small change in duty results in a large change of output voltage, the change in duty vs the PV voltage change is MASSIVE.
Hence, with all those caveats, the resolution of duty from a PICAXE is not sufficient to make a worthwhile MPPT controller if that controller is charging a battery.

If you stick a resistor in series with the battery, then all is fine. The output voltage will change a bit, the output current will change a bit and the panel will make slight move along its IV curve. However, you are now dissipating valuable power in the series resistor. The irony is, the better (more efficient) you make the switcher, the worse the problem becomes.

If your load is just a simple resistor, then there is no problem. Ideal as a demo for how MPPT works, but not much practical use.

EDIT:
Missed the most important caveat to the statement.
It assumes PICAXE PWM is used to drive the switching.
If you use PICAXE PWM to control the DEMAND (be that OP current, PV voltage or whatever) of the switcher (and NOT the switching), then of course it's possible. Just requires the correct scaling over the required range.
 
Last edited:

mickm2au

Member
Hi BB,

Hope the beer was cold :p had one or three myself...just had 45.6 deg C a couple of days ago...

I didn't miss the bit about the Picaxe PWM used to drive the switching, it was that I didn't quite see why the very fine adjustment would be needed. Thanks for your explanation, I can now see the difference in having a resistive load or a battery load.

I'll start looking along the lines of having a PWM generated variable voltage controlling a small range of the converters output and play around with the scaling, unless there's other ideas.
 

BeanieBots

Moderator
For a PICAXE MPPT, the best results I've had is when the fast hardware loop controls PV voltage and the PICAXE controls the voltage demand based on switcher output current. That does assume that the switcher output voltage will not be subject to rapid changes and avoids the need to measure and calculate power. If the load is highly resistive, then you will also need to measure switcher output voltage.

Naturally, "buck" is the simplest topology, but a well made "flyback" will give just as good results with much more flexibility. Keep well clear of SEPIC. Nice in theory, but wait till you try to find the components!
If you want "high" power, then go for push-pull forward converter.
 

premelec

Senior Member
In battery charging application you only really need to go for maximum current to the battery [with eventual voltage cutoff before explosion of batteries!!] - so effectively you don't need the power as you are interested in moximum charging current... just keep sampling the current [with high side current monitor...] and adjusting the drive circuits up and down... This can likely be done with CMOS XORs looking at slope of change each time you sample the current reading and their output driving PW up or down appropriately - OK I haven't built it yet but it looks good on paper.... :) [small capacitor stores 'last' current value reading...] probably only a few hundred hours of development needed... :)
 

moxhamj

New Member
Re "Hence, a VERY small change in output voltage results in a VERY large change in output current and sence drop in PV voltage."

I agree. I'm wondering if there is a way around that, by putting a large C across the solar panel? Say you have a PWM running at a certain value and you increase the power draw. This overshoots and draws far too much from the panel and the volts collapse. Ok, next pulse, you decrease the pulse width. But that assumes the picaxe is capable of changing the pwm width every single pulse. The picaxe is not as fast as that. So a way around that would be to have a big C, and the pulse width increases and draws more power from the solar panel/C combination, but mostly the energy is coming from the C. Such a system will hunt, but it will hunt slowly enough for a picaxe to keep up. As long as it doesn't hunt too far off the peak of the efficiency curve. So the time constant for that hunting would be determined by code and by the C, and it could be helpful to get stats on that. You also want it to adjust reasonably quickly to new conditions, eg a cloud goes over so now the MPP is at a different spot, and you would want to get there within ? 1 second.

The other point, I think said before, is to get the switch mode part right. Even though technically you only need to measure current out, I think it still could be helpful to measure current in, volts in, current out, volts out, and then calculate watts in and watts out and that can give the efficiency of the switch mode supply. Then you can isolate how much efficiency is to be gained from improving the switch mode supply vs how much you can gain from changing the MPPT algorithm.
 
Last edited:

mickm2au

Member
At the moment I have the two 64 watt panels, 230 a/h of batteries and a locally made PL20 solar regulator which is PWM control, gives a read out of amps in, amps out, a/h in, a/h out, % charge and a heap of other data with a memory of 30 days, so I would like to keep that in the equation if possible and put a MPPT between the panels and the regulator. Any thoughts how that may work? or would I likely get too much interaction between the two switchers. I'll have to put my CRO on the regulator and see what frequency its running at. I'm doing a lot of searching and reading but there's not a real lot of practical info out there, plenty of deep engineering theory which is a bit beyond me.

This guy has what looks like an ok unit based on a pic PWM running at 20 mhz.....

http://www.timnolan.com/

And here's a 10 year old non-processor design which I'll read up on and may be able to borrow some ideas from....

http://electronicdesign.com/Articles/Print.cfm?AD=1&ArticleID=6262

I've decided to just collect info at this stage and maybe start on the switcher. We're heading off on a 6 month trip around the top end of Oz in about 6 weeks and looking at it now it will be a bit impractical to try and design/build some thing before we go.
 

moxhamj

New Member
If you are about to head off on a trip, I'd agree, best to leave it till you get back. But I'm sure you can sit under a gum tree somewhere outback with a notepad and pen and draw up designs. The problem here will be the watts 2x64. 5 pin "Simple switchers" are great but they only run up to about 5-10W. (And I've never managed to get a homebrew one up to their level of efficiency). Once you go above that power (and you certainly can, eg computer power supplies to 800W+), you either need a bigger inductor or a faster switching speed, and both introduce complexities that require specialised electronics knowledge. I've come to the conclusion myself that homebrew MPPT is not practical above 5W. But I'd love to be proved wrong. In terms of the extra gain you might get from MPPT, you would probably get just as much from physically moving your panels through the day - eg have them tilted almost vertical near sunset (just lean them against a tree?)
 

mickm2au

Member
Dr A
Adding an extra panel or angling them towards the sun would give better results, but that wasn't as interesting a challenge as MPPT. Also the panels are bolted to the roof of our truck so angling them would require getting up there...unlocking...tilting etc...missing some sitting-under-the-tree-with-beer-time. We get by ok with what we've got, average use is only about 20 odd a/h or 10% of capacity a day so its not really a problem, just an interesting project to look at, and if I get one going other people in our motorhome group might also be interested. Might be a little cottage industry I could do while traveling around, installing MPPT's!!
 

BeanieBots

Moderator
@ Doc,
I did do some tests along your ideas in post #7.
All results were actually worse! Admittedly, I only went along with gut feel and did not do any serious mathematical analysis because, to be quite honest, I've fully convinced myself that using PICAXE PWM to control the switching is simply NOT the way to do it.

The problem I found with the theory you outline is that it actually adds further confusion to any perturb & observe based algorythm. The core issue is that adding a large capacitance to the PV output results in a scenario where an increase in duty will ALWAYS result in increased output power until the stored charge has been used up. This enevitably leads to a much larger phase lag in the algoryhtm which results in much larger (yet slower) voltage variations on the PV output.

Bottom line, in the limited tests I did, things were actually worse. There might be some mileage in doing some more scientific testing combined with proper phase calculations but as that type of control method could never be optimum I don't see any point in persuing it. (with the caveat of PICAXE PWM controlling the switching).

I also agree with your statement about home-brew switchers only being possible for low power, although I'd be a little more optomistic and say that 20W should be feasable. The biggest problem likely to be encountered is the magnetics. Small magnetics require fast switching which is only possible with very well thought out board layout with proper FET drivers. Slower switching requires significantly larger magnetics to avoid saturation. Larger magnetics are very lossy which again brings about the very serious question of if MPPT with good PV choice is even worth while. Anything below about 80% will in most cases actually be WORSE.

For power ratings above 50W the topology of choice would be push-pull forward converter. This topology DOES require a good knowledge of switcher techniques. In particular, a very good knowledge of FET driving and syncronous rectification to avoid massive losses caused by shoot-through and diode drop. Also, there is absolutely no way that PICAXE PWM could be used to drive such a converter. (the ongoing caveat).

@mickm2au,
Not sure what your existing switcher actually does.
What is its purpose if it is not MPPT?

IF you already have a switcher which is both efficient and can handle the required power, then 98% of the problem has already been solved. All you need to do is control it. Nothing a PICAXE and maybe an op-amp or two couldn't solve, well in time for your trip.
 

moxhamj

New Member
It got worse with a cap? Oh dear :( This highlights the complexity of this problem!

If picaxe pwm is too coarse a resolution then this is a very sensitive control problem.
 

BeanieBots

Moderator
Not really.
Don't forget, you could use a PICAXE to control the voltage demand of the PV to within a few mV if you wanted to.
You simply CAN'T use PICAXE PWM to do the actual SWITCHING.

Other than that, then yes, it's obvious even with just a little thought.
The correlation between duty and switcher OP voltage is quite close. Especially with a forward converter topology. So, controlling PWM is close to controlling voltage. Controlling voltage into a low impedance load is VERY, VERY, VERY difficult. So, don't even try to do it.

Instead, use the PWM to control the demand which controls the PV voltage (and hence operating point on the curve). Then you have virtually infinite resolution over the switching duty (via analogue techniques in the switcher) and the problem goes away.

Try it. See for yourself. Alternatively, just go through a few iterations of the MPPT algorythm on paper and see what happens. It becomes more and more inherently unstable the BETTER you make the efficiency, due to quantising.
(with the same caveats).
 

mickm2au

Member
@BB,
My existing "switcher" is a locally produced PL 20 intelligent solar charge regulator/monitor made by Plasmatronics which uses MWM technology

See here...

http://www.plasmatronics.com.au/common/pl204060.html

So I don't have any access to the control part of it.

Could you point me to some sites which explains the different MPPT algorythms and techniques. Most of the info I've found so far is about 10 years old and mentions algorythm names but gives no real explanation of what they do. Even if I find its a bit beyond me to design and build one, I'd still like to learn a bit more about them.

Also if possible could you give a little more detail on this paragraph please..

Instead, use the PWM to control the demand which controls the PV voltage (and hence operating point on the curve). Then you have virtually infinite resolution over the switching duty (via analogue techniques in the switcher) and the problem goes away.
Thanks,
M
 

BeanieBots

Moderator
There are many fancy names for MPPT control but the basic theory is VERY simple.
As you already know, to get the most power, you need to run the PV at the right place on the IV curve.
If you plot out the (PV voltage) vs (PV power) curve, you will get a "slanted hill".
You need to operate at the peak of that hill.
However, it's actaully more important to operate at the peak output of your controller rather than the peak output of your PV because that will then include any "odities" that your controller might introduce.

So, how is done?
Simple. Measure power output. Make a small adjustment.
Did the power go up? If yes, adjust a bit more. If no, adjust the other way.
Repeat....

It's that simple. (in theory).

In practice a few things can come out to bite you but that depends on what overall design you go with. The thing to remember is that your switcher needs to control something but can't control everything at the same time. For example, if you opt to go for an existing smps design, then it will probably be designed to control output voltage. A switching LED driver would control current. For MPPT use, in MY experience, I've found controlling input voltage is the easiest to implement. A regular smps can be converted to control input voltage quite easily with an op-amp and a reference.

So, assuming you now have a smps which is controlling PV input voltage.
To make that do MPPT, simply use the PICAXE to modify what input voltage it controls at and make a small adjustment, then see if the adjustment was in the right direction by looking at the output power. Simple eh!
 

mickm2au

Member
BB,
As you say looks easy in theory...

There are a few nice smps chips around, unfortunately a lot of the ones which look really good are only available in smd or ssop packages which with my eyes trying to use something like that is out of the question.
I'll keep looking...
 
Last edited:

BeanieBots

Moderator
The basic switcher is also simple in theory, just like a car engine is.
"Squirt, queeze, bang, push".
The subtleties are also similar.
Turbo vs compressor equates to active/passive rectification.
Injectors vs carb, number of valves, number of cylinders, four stroke or two.
In-line or "V" all equate to the numerous topologies and as with engines, each is better suited to a particular application and power requirement.

Unlike engines though, many engineers think they can throw together a few components on a bit of breadboard and get better performance than a "Ferrari". At best, many will simply get one that actually works.
 
Last edited:

premelec

Senior Member
One consideration is that switcher speeds have gone higher and higher which makes a unit compact [smaller magnetics] and short time switching losses much more in play for overall efficiency - if you are willing to use lower switching frequencies and clunky but low loss magnetics some of the design gets to be not as critical - and if it doesn't work it makes an excellent door stop... :)
 

mickm2au

Member
That's right...about 20 years ago I built a few 24 to 12 volt 20 amp switchers using a LM494, an opto coupler and charge pump driving a couple of parallel mosfets. Used a 65mm dia ferrite toroid for the L and a stack of parallel electrolytics, I think it ran at about 20khz from memory. We were pretty pleased when we got over 80% efficiency.
 
Top