Author Topic: MPPT noise reduction and Blog  (Read 14714 times)

0 Members and 1 Guest are viewing this topic.

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
MPPT noise reduction and Blog
« on: June 04, 2017, 06:31:56 pm »
I have noticed my MPPT code not always tracking very well, it runs on a PIC16LF1782. I think I have concluded it's getting confused by noise in the ADC readings for input current and voltage originating in the associated boost converter. I have tried many things like analogue filtering but without many poles (steep rolloff) it's difficult to get much improvement. I have an idea of using oversampling together with averaging as that's quite easy to do for binary modulo's like 8, 16 etc the theory being the signal will sum in the time domain but not the noise (being random) hence the result should have an improved SNR. Has anybody heard of this technique in this or similar situations or have any other idea's ?
« Last Edit: June 17, 2017, 01:42:33 pm by fourtytwo42 »
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: MPPT noise reduction
« Reply #1 on: June 05, 2017, 01:18:36 am »
Measure the ADC input voltage with a DSO and then you can be sure if noise is a problem

Schematics, Code, pcb, photos  and measurements can all help people to give better advice.

 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #2 on: June 05, 2017, 07:45:50 am »
You are quite right, the scope shot shows what happens in low light conditions, the MPPT is switching the duty cycle between nothing and something small but the PWM EMC swamps the current signal, the scope probe connection is not good so some EMC is entering that way.

As the picture shows the construction is less than ideal being stripboard though efforts have been made to limit lengths and bulk up high current connections with bare copper wire soldered along pairs of strips.

In the schematics U1 is the current amp sensing across an 0R01 resistor in the PV return leg. Missing from the schematic is a 1nF/56R snubber across the mosfet and also a 15R resistor in series with the gate to soften the mosfet a little.
« Last Edit: June 05, 2017, 07:53:03 am by fourtytwo42 »
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: MPPT noise reduction
« Reply #3 on: June 05, 2017, 08:41:02 am »
Yes it can be hard to probe without noise from the high impedance probes.

Short the probe tip to its ground lead and then touch the circuit to see how much is induced by the probes.


The most obvious things to check/ change IMO.

are you using Kelvin connections to the op amp?  You should and even twist them.
ground bounce, star ground, analogue ground. IOW could the ground be improved.
can you use a current sense amp? At least u have rail to rail In and out which you will need.
larger current sense resistor. @ 1 kw  I think you can afford a little more drop across the current sense resistor.
25 mV input if that is a full power you probably want more like Vref/2 whatever that is.

Hope that helps.

« Last Edit: June 05, 2017, 08:43:03 am by HackedFridgeMagnet »
 
The following users thanked this post: fourtytwo42

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: MPPT noise reduction
« Reply #4 on: June 05, 2017, 08:50:13 am »
First, I'd recommend not to connect U1's output directly to the ADC input. Place a series resistor (range 10R to 470R) and a capacitor as close as possible from the ADC input to ADC GND (10nF should do the job). You should use the capacitor to GND on every ADC input, it helps filtering and it also helps to charge the ADC input sampling capacitor.

And yes, oversampling and averaging can do a good job in reducing noise, I've done such things (oversampling and averaging) successfully before.
Safety devices hinder evolution
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #5 on: June 05, 2017, 09:57:40 am »
Yes it can be hard to probe without noise from the high impedance probes.
Short the probe tip to its ground lead and then touch the circuit to see how much is induced by the probes.
Yes quite a bit, I have to subtract in my mind when looking at the scope! I am thinking of flux-strapping the inductor as I have found this technique useful in other projects, unfortunately it got omitted and it's impossible to do in situ so awaiting heightened desperation level!

are you using Kelvin connections to the op amp?  You should and even twist them.
ground bounce, star ground, analogue ground.
Thats a very good idea, at the moment the only ground for the controller is from close to R1 to close to U1 but of course that carries psu and mosfet driver noise too. I shall certainly try moving the connection of U1/3 by a separate wire to R1 (twisted of course).

I think you can afford a little more drop across the current sense resistor.
Yes you are right I think I erred on the side of efficiency a little to much, going up to 0R022 is still just within the capacity of a 2.5W resistor.

Thank you for your insight :)
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #6 on: June 05, 2017, 10:02:37 am »
First, I'd recommend not to connect U1's output directly to the ADC input. Place a series resistor (range 10R to 470R) and a capacitor as close as possible from the ADC input to ADC GND (10nF should do the job). You should use the capacitor to GND on every ADC input, it helps filtering and it also helps to charge the ADC input sampling capacitor.
Ahh I had that in mind but like the flux strap its not possible to do in situ, so thats two reasons for a return to the workshop now!

And yes, oversampling and averaging can do a good job in reducing noise, I've done such things (oversampling and averaging) successfully before.
I haven't done it myself before so it's good to hear it's common practice, I am also considering reducing the resolution as it seems to high and is just another invitation to noise.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: MPPT noise reduction
« Reply #7 on: June 05, 2017, 10:19:39 am »
I have tried many things like analogue filtering but without many poles (steep rolloff) it's difficult to get much improvement.

Filtering and proper grounding and layout are a good place to start.  Also consider the reference input, ground, and power pins to be other ADC inputs.

Quote
I have an idea of using oversampling together with averaging as that's quite easy to do for binary modulo's like 8, 16 etc the theory being the signal will sum in the time domain but not the noise (being random) hence the result should have an improved SNR. Has anybody heard of this technique in this or similar situations or have any other idea's?

Noise is always a problem with non-sampling ADCs which are not integrating ADCs (1) and sampling ADCs.  Taking multiple samples over a specific interval is an easy way to gain the noise immunity of an integrating ADC and yields a sin(x)/x frequency response which can be used to reject noise.  Another way is to implement synchronous sampling where sampling occurs during a low noise point of the signal.

One thing I would do with multiple samples is calculate the standard deviation to get a quantitative measurement of the noise.  This will allow better evaluation of circuit changes for reducing noise.

(1) Not all flash and successive approximation converters are sampling converters.
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #8 on: June 05, 2017, 10:32:37 am »
Filtering and proper grounding and layout are a good place to start.
Sadly pretty tough on stripboard!
Noise is always a problem with non-sampling ADCs which are not integrating ADCs (1) and sampling ADCs.  Taking multiple samples over a specific interval is an easy way to gain the noise immunity of an integrating ADC and yields a sin(x)/x frequency response which can be used to reject noise.  Another way is to implement synchronous sampling where sampling occurs during a low noise point of the signal.
Its an integrated sampling ADC (I think thats what you mean) and I do use synchronous sampling however part of the problem I believe maybe the noise is being added to the samples by integration within the low pass filters!
One thing I would do with multiple samples is calculate the standard deviation to get a quantitative measurement of the noise.  This will allow better evaluation of circuit changes for reducing noise.
Unfortunately I am limited by the arithmetic capability of an 8 bit risc processor programmed in assembler with very limited memory and no human readable io :(

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: MPPT noise reduction
« Reply #9 on: June 05, 2017, 12:42:23 pm »
Filtering and proper grounding and layout are a good place to start.

Sadly pretty tough on stripboard!

That is going to be a problem and may be enough to explain your poor results.

Quote
Noise is always a problem with non-sampling ADCs which are not integrating ADCs (1) and sampling ADCs.  Taking multiple samples over a specific interval is an easy way to gain the noise immunity of an integrating ADC and yields a sin(x)/x frequency response which can be used to reject noise.  Another way is to implement synchronous sampling where sampling occurs during a low noise point of the signal.

Its an integrated sampling ADC (I think thats what you mean) and I do use synchronous sampling however part of the problem I believe maybe the noise is being added to the samples by integration within the low pass filters!

An integrated ADC is very different from an integrating ADC.  The former means it is part of an integrated circuit with other functions like a microcontroller and the later means that the input signal is integrated over a defined period of time to make a measurement.  Integrated ADCs often have problems with noise from the other circuits they are integrated with.

What are you sampling synchronous to?  The switching regulator clock?

Making a measurement like an integrating ADC for lower noise using a sampling ADC means averaging multiple samples.

Quote
One thing I would do with multiple samples is calculate the standard deviation to get a quantitative measurement of the noise.  This will allow better evaluation of circuit changes for reducing noise.

Unfortunately I am limited by the arithmetic capability of an 8 bit risc processor programmed in assembler with very limited memory and no human readable io :(

The standard deviation is also the root mean square; so you take the square root of the average (arithmetic mean) of the squares.  It is a pretty small step from calculating the average of multiple samples to calculating the average and the standard deviation.  On a small microcontroller, I would do it in parallel with the average calculation so the only extra memory requirement is another memory location for holding the sum and whatever scratch pad memory is needed for the square and square root operations.

If I did not have any way to monitor what is going on, then I would add a display interface via a serial port like SPI or I2C.
 
The following users thanked this post: fourtytwo42

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: MPPT noise reduction
« Reply #10 on: June 05, 2017, 01:11:26 pm »
First rule of differencing algorithms: FILTER FILTER FILTER!  (In analog or digital.)
First rule of ADC inputs: FILTER FILTER FILTER! ;D (In analog.)

An MPPT has the advantage that the difference must be correlated, but to the extent that noise enters the correlation bandwidth (i.e., it acts like a radio tuned to a particular frequency, rather than just a straight (baseband) input -- and the radio has some bandwidth defined by your circuit and algorithm, and any noise within that bandwidth will be treated as signal).  So, at the very least, you should be measuring many samples, perhaps hundreds per MPPT step, averaging them together; and the MPPT steps themselves, that are resolved by the algorithm, should be numerous, so you have a strong confidence interval in the resulting calculated derivative.  (There are many derivative finding algorithms, based around finding the curvature of an arc segment, rather than the slope of a line as defined by two points -- these use more points, so more operating points are evaluated.)

Higher SNR also allows you to use smaller perturbations in the first place, so that you average more time very, very close to the true peak. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #11 on: June 05, 2017, 01:42:32 pm »
Filtering and proper grounding and layout are a good place to start.
Sadly pretty tough on stripboard!
That is going to be a problem and may be enough to explain your poor results.
Yup it was only ever a toe in the water and experiment so I have to live with that and work around it the best I can.
Noise is always a problem with non-sampling ADCs which are not integrating ADCs (1) and sampling ADCs.  Taking multiple samples over a specific interval is an easy way to gain the noise immunity of an integrating ADC and yields a sin(x)/x frequency response which can be used to reject noise.  Another way is to implement synchronous sampling where sampling occurs during a low noise point of the signal.
I already do the latter and am now going to add the former.
An integrated ADC is very different from an integrating ADC.  The former means it is part of an integrated circuit with other functions like a microcontroller and the later means that the input signal is integrated over a defined period of time to make a measurement.  Integrated ADCs often have problems with noise from the other circuits they are integrated with.
What are you sampling synchronous to?  The switching regulator clock?
Sorry I get confused with some nomenclature, it's integrated in the PIC, has a sample and hold and is successive approximation.
The standard deviation is also the root mean square; so you take the square root of the average (arithmetic mean) of the squares.  It is a pretty small step from calculating the average of multiple samples to calculating the average and the standard deviation.  On a small microcontroller, I would do it in parallel with the average calculation so the only extra memory requirement is another memory location for holding the sum and whatever scratch pad memory is needed for the square and square root operations.
If I did not have any way to monitor what is going on, then I would add a display interface via a serial port like SPI or I2C.
Well presently I have a snapshot system that stores 256 samples of what I want to look at in EEPROM, it's limited but avoids the complexity of adding external connections and more logic, I agree however it would be superior.
I hope I got all the quotes right :)
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #12 on: June 05, 2017, 01:46:38 pm »
First rule of differencing algorithms: FILTER FILTER FILTER!  (In analog or digital.)
First rule of ADC inputs: FILTER FILTER FILTER! ;D (In analog.)
An MPPT has the advantage that the difference must be correlated, but to the extent that noise enters the correlation bandwidth (i.e., it acts like a radio tuned to a particular frequency, rather than just a straight (baseband) input -- and the radio has some bandwidth defined by your circuit and algorithm, and any noise within that bandwidth will be treated as signal).  So, at the very least, you should be measuring many samples, perhaps hundreds per MPPT step, averaging them together; and the MPPT steps themselves, that are resolved by the algorithm, should be numerous, so you have a strong confidence interval in the resulting calculated derivative.  (There are many derivative finding algorithms, based around finding the curvature of an arc segment, rather than the slope of a line as defined by two points -- these use more points, so more operating points are evaluated.)
Higher SNR also allows you to use smaller perturbations in the first place, so that you average more time very, very close to the true peak. :)
Yes I think my primitive implementation was very weak taking only one sample per MPPT cycle, also I found the electrical noise environment much higher than I had expected. Hopefully by taking note of your combined experience I can build something better.
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #13 on: June 05, 2017, 01:50:53 pm »
Just a note to say now it's off the wall and back on the bench I have decided to go the whole hog and change the topology to buck-boost to enable me to capture just a bit more in winter and dull days :) This of course means a total rebuild of both the hardware and software. I am very grateful for all your inputs and will incorporate them all BUT I will still be limited to stripboard construction! I might also note I have not been impressed by the ESR of the polypropylene capacitors so that may be another area for improvement. Many thanks again :)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: MPPT noise reduction
« Reply #14 on: June 05, 2017, 03:29:43 pm »
Filtering and proper grounding and layout are a good place to start.

Sadly pretty tough on stripboard!

That is going to be a problem and may be enough to explain your poor results.

Yup it was only ever a toe in the water and experiment so I have to live with that and work around it the best I can.

If you pay attention to the ground and supply return currents and add wires and decoupling capacitors to reduce their loop area, then a lot of improvement is possible.

http://www.analog.com/media/en/technical-documentation/application-notes/6001142869552014948960492698455131755584673020828AN_345.pdf
http://www.analog.com/AN-347?doc=CN0397.pdf
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #15 on: June 05, 2017, 06:13:02 pm »
Filtering and proper grounding and layout are a good place to start.

Sadly pretty tough on stripboard!

That is going to be a problem and may be enough to explain your poor results.

Yup it was only ever a toe in the water and experiment so I have to live with that and work around it the best I can.

If you pay attention to the ground and supply return currents and add wires and decoupling capacitors to reduce their loop area, then a lot of improvement is possible.

http://www.analog.com/media/en/technical-documentation/application-notes/6001142869552014948960492698455131755584673020828AN_345.pdf
http://www.analog.com/AN-347?doc=CN0397.pdf
Yup been there done that many times but the devil as they say is in the detail, timely reminder though, thank you :) Ohh for a PCB!!!!!
 

Offline Codebird

  • Regular Contributor
  • *
  • Posts: 161
  • Country: gb
Re: MPPT noise reduction
« Reply #16 on: June 06, 2017, 07:34:22 am »
Quote
I have an idea of using oversampling together with averaging as that's quite easy to do for binary modulo's like 8, 16 etc the theory being the signal will sum in the time domain but not the noise (being random) hence the result should have an improved SNR.

Sometimes the simplist means is the best.

reading=(reading*0.95) + (getnewreading()*0.05);

It's very very crude, but it got my MPPT tracker working.
 
The following users thanked this post: fourtytwo42

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: MPPT noise reduction
« Reply #17 on: June 06, 2017, 03:40:59 pm »
Being primarily an analog guy it does not surprise me but there have been many simple analog designs for MPPT which implemented sampling and integration for free.  They mostly predate the internet so finding references to them is difficult.  The only problem they sometimes have is locking on to a local maximum but this is only an unimportant corner case which occurs when panels are shaded.
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #18 on: June 07, 2017, 11:00:33 am »
Being primarily an analog guy it does not surprise me but there have been many simple analog designs for MPPT which implemented sampling and integration for free.  They mostly predate the internet so finding references to them is difficult.  The only problem they sometimes have is locking on to a local maximum but this is only an unimportant corner case which occurs when panels are shaded.
Yes I agree introducing digital sometimes means you end up chasing your tail trying to solve problems you just introduced notably using sampling within feedback loops and coping with the delays introduced! Certainly this is the case in certain types of power supply and amplifiers. I have seen analogue mppt's but the ones I recall were still using sample & hold techniques. I guess a well considered mixture of analogue and digital is best, I certainly don't hold with digital is king! Back in the 70's we used to design and manufacture analogue modems, they were expensive partly due to needing high precision components for repeatability but also the amount of select on test stuff. It took a long time for digital circuits to become powerful enough, I still remember the first 48 bit MAC chips from TRW fresh off the secrets list physically bigger than a modern BGA CPU chip and consuming over 10 watts!
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #19 on: June 10, 2017, 06:26:39 am »
I took the plunge and rebuilt the converter, here are the power and cpu boards ready for bench test, the inductor now has a flux strap, the current amp has kelvin input connections and an RC connection to the ADC, there are heavier connections under the power board and common mode chokes on the power in and out. Hopefully this will combine to reduce noise along with some software changes such as oversampling/averaging and reduced resolution. A new feature has been incorporated a continuously variable PWM for the immersion heater enabling it to better match the panels mppt at low insolations, with some juggling it was possible to fit this on the existing heatsink. I was hoping to improve the ripple capacitors but there is insufficient space so just settled for an extra on the input squeezed under the inductor.
Quite a bit of software to write now before testing can begin.
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #20 on: June 11, 2017, 06:49:30 pm »
This has become an ongoing rebuild blog, finished the software today, around 700 codewords of PIC16F assembly much of it of course from before but some major new extensions. Started some testing at moderate voltage input (15V) that seemed to revel an unexpected 500mV on an analogue input configured as the +input of an op-amp but leave that till later otherwise ok.
Rest of day spent rebuilding and testing the APU (Aux Power Unit) this being a critical piece of solar technology, it produces a stable 12V rail for turning on the mosfets from any input between 12.1V & 170V, as it is capable of also powering a fan this is now a switcher (see pic). The old linear unit I used to use could keep an LVPIC alive down to a PV voltage of 2V, worked in moonlight but couldn't produce any useful power and certainly couldn't power a fan!
I used to be an ultra efficient energy scraper that could power up in moonlight but sadly some things had to go upon entering the Kw plus range.
Next up adding this module to the other two (power & cpu) then start high voltage testing (bench).
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #21 on: June 17, 2017, 08:19:52 am »
Outside on the wall again, early 7am to catch the morning sun, bit of a false start with some leftover debug only code!! Picture shows the input voltage modulated by mppt at low power hence the high voltage swing, something to come back to maybe but its one way of keeping the noise out. This version also reduces efficiency to improve EMI, I can even use the scope and see the signals now :)
Last picture interesting bug in converter when transitioning from buck to boost mode around 600W, patience is rewarded!
« Last Edit: June 17, 2017, 09:56:27 am by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #22 on: June 17, 2017, 02:03:53 pm »
Back on the bench again, BLOWN MOSFET :(:(:(
Sometimes I could give up but...................
Removed the probes etc from this mornings session with PV breaker open for safety, screwed lid on box, PV breaker on then tidy gear away......after a while checked power meter Zilch! Ohh I thought forgot to turn it on, nooo check PV volts umm 2!! OMG breaker off, lid open, check, Boost mosfet short circuit, impossible!!

Off the wall on the bench, boost mosfet definitely s/c hmmm why ??
Well there is a nasty overvoltage mode in boost converters and it goes like this.....power is applied, current flows through boost inductor and boost diode to charge output capacitor/s. When output is charged, flux collapses and current reverses in the boost inductor just like at the end of a switching cycle BUT if there is no load on the output the voltage rises uncontrollably until either the inductor runs out of energy or something breaks down.

The reason there is no load is all mosfets are prevented from turning on till there is sufficient voltage in the auxiliary supply to ensure they turn on properly and the software has completed a startup delay but the above failure sequence happens in the first 50-100uS. Most times it doesn't happen because the breaker is not used when the panels are generating lots of power.

It's a hard one to fix as medium voltage mosfets with low rdson and low TQc are hard to find, I use IRFB4227's and sadly I have shot myself in the foot by being mechanically constrained to TO220. TVS devices capable of absorbing more avalanche than the mosfet have a wide voltage between breakdown and clamp voltages. The problem is self inflicted as there is really insufficient headroom between the intended maximum operating voltage and the mosfet vds.

My compromise solution for now will be to reduce the maximum operating voltage a bit to allow a TVS to be used I am hoping a 1.5KE170A will be enough to protect the mosfet AND remembering to try not use the breaker when running at fairly high power.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: MPPT noise reduction and Blog
« Reply #23 on: June 17, 2017, 07:58:51 pm »
So add a voltage limit to the control... ???

Here's an example how to do that:



All the feedback stuff is at the bottom, feeding an error amp feeding an opto (the UC3842 controller is wired as a follower, so the opto sets the current setpoint).  When any of the three conditions is exceeded (current, temperature or voltage), the setpoint is reduced.  Note that the secondary thresholds are quite soft (the 2N3906s are used in common base configuration, with lots of resistance in the emitter circuit --> low gain), and everything is limited to a bounded range (i.e., the emitter resistance plus the collector resistors preventing them from driving the op-amp into hard saturation).

It's not enough to simply say "if temperature > 100C, set current to 0".  That will chatter like a motherfucker.  Consider what that means: as long as temperature is high, turn it off completely; temperature had been rising in the first place, so presumably, this will last for a few cycles -- battle won, right?  Well it'll cool down in the mean time, and then it's going to slam right back on again -- right back to 100% full power (or worse, your PID has saturated and it commands something else into saturation), right at maximum temperature.  It oscillates with the thermal delay and time constant of the system.

Most ICs do it by shutting down at a high temperature, and remaining off until temperature falls below a lower threshold (hysteresis).  This gives a little reprieve from the high temperature, but changes it for thermal cycling, which still isn't good.  In short: you need to avoid situations like this, and preferably solve it with an alternate method: the fault can be latched, waiting a much longer timeout period, or until power cycle or user reset*; or the power output can be reduced, so that temperature remains nominal.

*With a timeout enforced on THAT, so the user can't simply spam the button until the thing explodes!  Or, for that matter, holding it down.  Nay, you need the button edge-triggered, so holding it down doesn't mean anything.  Easily solved with a few resistors and capacitors, or logic gates, but easily overlooked!

But that means changing your controller.  Controlling temperature requires a much longer time constant than controlling voltage or MPPT.  This is why the above circuit has such a soft threshold on temperature: the limited gain keeps it stable.  The light output simply dims to whatever level it can operate at!

So it's not very good to put a hard limit on things.  Much better to approach it slowly: create a temperature variable, scaled and offset to the same range as your main control variable, and do something like: feedback_variable = max(control_variable, temperature_variable).  This is equivalent to using ideal diodes, or using transistors normally biased off (as above). :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: HackedFridgeMagnet

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #24 on: June 18, 2017, 06:42:18 am »
Hello Tim, thank you for your reply, I like your circuit :) Very true about to much gain and a bang-bang response, I have to avoid that in the MPPT algorithm itself. There is output voltage control, it was just set to high, but the voltage control doesn't help the initial power on situation that happens before any controller receives power. That is in part caused by the high inductance for a wide operating voltage range and small capacitors caused by avoiding electrolytics and being designed for high frequency (125Khz). Boost inductor is 100uH, input and output capacitors are 4.7 & 6.6uF respectively. All designs are full of compromises, it's just some of them turn into gotcha's later :)
The output voltage is an issue, I need 148V to push 1100W into a 20R heater but also I was hoping to run at ~180V when the heater was switched off to power another unmentionable device that was going to automatically start once its UVLO was exceeded. Having reduced the maximum working voltage to something like 148V the other device will have to be explicitly told to start instead of relying on it's UVLO.....more wires!
Back on the wall outside after repair and software upgrade, hope to get a clean buck to boost transition today and no more failures.
If the Chinese stole your circuit the first thing they would take out to cost reduce it is all those expensive EMI components you so carefully crafted and they don't understand the need for or care!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: MPPT noise reduction and Blog
« Reply #25 on: June 18, 2017, 06:45:27 am »
4.7 and 6.6uF?  That's way too little...

It seems you've discovered why!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #26 on: June 18, 2017, 07:24:51 am »
4.7 and 6.6uF?  That's way too little...
It seems you've discovered why! Tim
Well like I say all designs are a compromise, economics, space, performance etc
Firstly this converter operates at 125Khz, there are no ripple components below that, secondly the load is purely resistive and there is no requirement for a low ripple output, thirdly the panels are a fairly low impedance source so the remaining ripple current produces a small ripple voltage that marginally reduces there efficiency however the ripple imposed by the mppt algorithm is much larger! I do not feel the need to fit excessive expensive space consuming capacitance just to be nearer some theoretical perfection, as it is the converter is cheap, small and reasonably efficient and insofar as its main capacitors electrolytic free!
In fact the main reason for any output capacitors is to control the rate of rise of output voltage should the output suddenly go open for some reason (fuse etc).
I had my own targets for the design and largely despite a few teething troubles they have been met :)
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #27 on: June 18, 2017, 05:31:37 pm »
And the teething troubles continue this time caused by the contents of the junk box! Old GREY silpads OMG I hadn't realized how bad they are compared to mica TO220 insulators see here http://www.bergquistcompany.com/thermal_materials/graph_pdfs/COMPARE_SPVALUE.pdf (400 series) and here https://www.fairchildsemi.com/application-notes/AN/AN-4166.pdf for a mica comparison.
Anyway as I had some old grey silpads in my junkbox that's what I used and I am pretty sure that's what led to yet another mosfet failure today, I actually watched it dying slowly on the scope but didn't realize that's what I was watching at the time, I now have a mosfet graveyard in the corner of my workbench having lost about three in the last few days. At the time the heatsink temperature was around 40C and the mosfet dissipation could have been 20W so that means the tab could have reached 200C, should have spat on it to check it  |O
Talk about unfit for purpose, whats the point of pad material that gives an interface of 8C/W under moderate pressure grrrrrrr rant rant grrrrrrrr
So I think more effort to be expended on a bench test setup to allow higher power testing under controlled conditions rather than have the sun let rip on me while I am dangling like a bat up some ladders lols
Just in case anybodies interested there is a 13 year long discussion on pad materials here http://www.diyaudio.com/forums/pass-labs/37262-mica-goop.html
« Last Edit: June 18, 2017, 07:32:34 pm by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #28 on: June 20, 2017, 10:17:20 am »
I know how much you like pictures so here is the bench test rig. There are a set of transformers capable of providing 110Vdc & 5A (limited by rectifier), the big blue variac can be used to change the voltage. This is connected in series with an ELECTRIC KETTLE as a ballast to represent the non-linear PV source. The output of the converter is connected to an electric fire with 1, 2 & 3Kw settings to represent the load. Ideally my source would be a CV/CC psu of around 1.5Kva but sadly I don't have one of those! So far the horrid grey silpads have been replaced with mica and gunk and the shorted mosfet replaced. I have been checking and verifying very carefully the mosfet switching conditions, as the rig cannot run at anything like full power I have been copying my observations at 200W into spice and then cranking up the power to 1100W in spice, once again not ideal but better then nothing :) I really cannot find anything wrong with it other than the suspect silpads, the mosfet dissipation extrapolates out to 16W at full power so it's certainly possible that was the cause.
There are some unexpectedly large current spikes at turn-on, either the boost inductor has quite a lot of capacitance, Qrr of boost diode or it's simply coupling EMI into the imperfect probes, in any case the mosfet rating is 65A (actually the soa is 130A@200V for 1uS) so it shouldn't be bothered. The turn on/off times are deliberately slowed to reduce EMI.
vdrive and vgate are the two sides of the gate resistor, the mosfet is an IRFB4227.
So today I will use the rig to verify some complex software around the buck to boost transition, much easier than waiting for the sun to do just the right thing!
« Last Edit: June 20, 2017, 10:25:00 am by fourtytwo42 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: MPPT noise reduction and Blog
« Reply #29 on: June 20, 2017, 10:56:34 am »
Huh, gate driver appears to be around 5 ohms Rds(on), and the gate resistor around 15 ohms.

What's the yellow trace actually measuring?  It doesn't seem to be carrying any load current at all, if that's what you had intended... ???

I hope the double-blip shape of the yellow trace isn't due to shoot-through or something.  The gate waveform is quite slow, so this would be a concern in a synchronous converter.

If you're using a PN diode, yes, reverse recovery is a big deal.  It can pay to increase (and snub) loop inductance, to reduce dI/dt and peak recovery current.  There are silicon schottky diodes available in that size (10s of amps, 200V), though they aren't very good (Vf is comparable to PN diodes -- but with no recovery loss, so this alone can be worthwhile).  (There are SiC schottky too, but these begin at 600V (and Vf ~ 2V), so they won't be worth it here.)

Ed: nevermind, I see MBR20200CT.  Pretty reasonable.  The schematic is very hard to read.

Tim
« Last Edit: June 20, 2017, 11:01:38 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #30 on: June 20, 2017, 12:17:09 pm »
Hello Tim, yes that's about right for the gate. The yellow trace is across the source resistor so its supposed to be source current, the main reason for including it in the scope shots is a common visible timing reference (I only have two channels). I suspect most of the actual trace is made up of probe artifacts and EMI as no attempt has been made at tip grounding. Ohh its an 0R05 resistor and were only running 200W so the normal run current is practically invisible, this resistor serves as an overcurrent protection not for current measurement as such TBH its almost superfluous except for inductor saturation that could occur due to a software fault.
I am sorry the schematic is very hard to read, it has to much crammed onto one sheet, just grew like topsy :)
Yup it's a schottky so Qrr isn't so bad although it is a fairly high voltage circuit. Some turn on spike will come from the snubber, some from the boost recovery and some from boost inductor capacitance, I don't really have the equipment to measure it all, as long as it is small enough not to represent a failure mode or generate to much EMI I am happy. I remain a little concerned about the double nature of that blip and may well spend some time trying to resolve the cause later.
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #31 on: June 21, 2017, 12:09:43 pm »
Today finished bench testing, as much as I can within the power available (a few hundred watts). Re-checked the weird double source pulse and found it changed when the scope ground was moved so pretty sure the double is actually spurious. Of course a single pulse in this location is perfectly normal :) Checked out the software moving from boost to buck and back again smoothly, takes a while to figure out how to use the test rig to simulate real PV conditions but got there in the end, basically if the load impedance is varied the MPPT acts to try and maintain the input power at it's peak which given a fixed input ballast resistor means it tries to maintain a constant input current that was visible on a test rig panel meter. I must admit I use the terms buck and pwm interchangeably, in one parlance it is bucking the input voltage but in another its simply pwm control of a heater :) Currently waiting for the conformal coating to dry prior to re-assembly then back outside (plus of course that kettle boiled) and I hope it knows I have no more mosfets left!! I did spend some time looking for something more robust but frankly the IRFB4227's are hard to beat without spending silly £££££ just hope the good old mica and gunk do the job.
« Last Edit: June 21, 2017, 12:53:02 pm by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #32 on: June 23, 2017, 11:59:27 am »
Just a quick note to say I am too clever for my own boots, boost mosfet failed again yesterday and it wasn't even sunny! Stupidly I went out after re-installation so wasn't watching (overconfidence). So not thermal, not voltage, leaves current! Inductor could be saturating due to software fault and current limit lackadaisical. Started checking everything from scratch, here is inductor saturation measured on my tester, vertical is 4A/Cm so ~18A, design value was 13A. There is some overly clever software switching PIC PSMC frequency between boost and buck modes (to reduce switching losses in the latter) that may be causing runt extended pwm on times to the boost stage. Unfortunately the PIC PSMC is very poorly documented and so far I have been unable to find any timing parameters for it so even its reaction time to shutdown (overcurrent) is unknown so many more things to measure. Amusing this spell checker doesn't like inductor :)

Update......I found a software fault that could cause the PWM to drive the boost stage at 100% duty cycle for several milli-seconds occasionally, certainly enough to saturate the inductor. The remaining mystery is why the resulting overcurrent was apparently unable to shutdown the PWM!

Answer leading edge blanking cap was HUGE! giving 5.5uS delay, well long enough to fry a mosfet facing a saturated inductor! Somehow a gremlin crept in and it was 100nF not 1nF shown on schematic........

No more mosfets till Wednesday as RS my usual supplier have let themselves run out of stock of one of the most popular mosfets till mid August......RS are going down the tubes, getting less and less interested in discretes! Anybody have this problem, switch to Farnell, most MOQ's reasonable too, just don't work weekends.
« Last Edit: June 24, 2017, 11:53:46 am by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #33 on: June 28, 2017, 02:55:58 pm »
Ewww this PIC PSMC thing is really nasty! firstly after several days on the mchip forum asking, no replies whatsoever regarding it's AC specifications. Then today I find a new glitch and it's caused by the way I handle it (dynamically changing steering) but I did find a way out, there is a synch bit that allows you to specify changing steering synchronously with the period. But another glitch caused by a similar problem with polarity doesn't have a synch option, however that glitch occurs at very low duty cycle and is not in the inductor (boost) drive so unlikely to have any bad effect.  Just beware anybody using this thing seriously you need kid gloves and a lot of time and patience :) pictures are some glitches.
Mosfets arrived today, fitted and bench tested, nearly flooded out yesterday/last night/this morning so a bit damp for refitting outside today.
Have a nice day :)
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #34 on: June 29, 2017, 03:36:34 pm »
Re-installed 0830 today, horrible grey skies all day but at 1600 have gotten 1Kwh, not bad for a 1Kw array, ran in pwm mode all day, power typically 75-200W (peaked at 465W). Tank thermostat just cut off at 64degC (148degF) and a few hours daylight left so very happy.

Next project is to use the surplus energy without batteries!

BUT first of all see if it can hang together when the sun comes out again (maybe a week or so we seem to have been plunged into uk clag for a while).
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #35 on: July 03, 2017, 02:35:01 pm »
Well we have had some brief interludes of sun, no blown mosfets but a very aggressive overcurrent protector, every time it gets up between 550-600W it shuts down! I have proved this is the boost stage overcurrent protection that uses a 0R05 source resistor with a 100R/180pF filter into a comparator who's reference is a silicon diode (~600mV), the output of this comparator internally shuts down the PIC PSMC (Programmable Switch Mode Controller) module. OK so it could be the leading edge spike except the PSMC has LEB (Leading Edge Blanking) programmed and I have tried up to 1uS but the problem remains. Sadly I cannot access the comparator output with a scope as the output pin for it is in use for an ADC input with a whopping 680nF filter cap!

So it could be LEB doesn't work on this chip, or I am misunderstanding how to use/program it, or something else. This problem didn't used to happen when the filter on this pin was mistakenly 100nF, then it just used to evaporate mosfets instead!

It could be noise entering the pin at some other time than the leading edge although I have seen no evidence of it. So for now I just have my thinking cap on!

Scope shot is driver output (pre gate resistor) and comparator input after LC filter.
2nd scope shot is worst case noise at comparator input BUT should be covered by LEB

I am thinking of extending LEB even more than 1uS or slowing down the comparator but I am a little chicken to loose yet another mosfet even though I think I may have found the cause of that (occasional crazy on times).

Update..... managed to conceive a way of getting a realtime output from the PSMC when it's shutdown to trigger the scope this proves beyond doubt is is the current comparator and that LEB is not working!
3rd shot shows shutdown together with filtered overcurrent signal, 4th shot shows shutdown together with PIC boost drive signal (LEB starts at its leading edge). LEB here is set to 500nS!
« Last Edit: July 03, 2017, 04:39:09 pm by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #36 on: July 05, 2017, 12:36:14 pm »
Well at last a work-around for the unexpected shutdowns from the boost overcurrent! The thing that fixed it in the end was setting the comparator to SLOW MODE! I don't actually know why this works :( Either LEB doesn't work at all (well I have not seen any reports of anyone trying to use it), or there is a glitch at some other time than the leading edge, well there is no scope evidence for that and there is also no high power activity other than just this boost converter, so no asynchronous noise source except the APU but it's only <100mW when the fan is not running (it wasn't) and it's on a separate PCB.

I think my conclusion is LEB doesn't work at least on this chip and from the C1 input. That's what caused me to increase the filter capacitor so dramatically and enter the sorry downward spiral of mosfet failures :(  The only way to prove this would be an extensive breadboarding exercise that frankly I don't have time for.

Well thank you Microchip, you have cost me ££££ in failed mosfets and probably a month finding out your chip doesn't work, don't suggest I ask a question on your forum nor ask for tech support, I am still waiting after 2 weeks for someone to even answer the simple question of what is the Tpd from an asynch shutdown input to the PSMC outputs changing state! Time to move on to a better specified chip methinks for the future.

When you consider this PSMC is also used in the flagship DsPIC it's astonishing how poorly supported and documented it is!!
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #37 on: July 05, 2017, 06:26:35 pm »
It is a poor designer who blames an MCU for hardware failures... just sayin'. ;)

Tim
I find that a borish and stupid comment to say the least, I didn't think this site was infected with stupid trolls, perhaps I was wrong!!

It is a matter of fact that I have found several silicon faults in a long career and as author of several patents and past member of IEEE do not consider myself a poor designer, perhaps you should examine you mirror more closely, and please do not reply as I have no further interest in your comments.
« Last Edit: July 05, 2017, 06:36:41 pm by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #38 on: July 09, 2017, 07:14:28 am »
Well I did set up a test rig specifically to test leading edge blanking on this chip and indeed it doesn't work, duly documented and sent to Mchip. Fortunately there is a work around of sorts to simultaneously program trailing edge blanking though the downsides of this are application dependent.
I also measured the undocumented PSMC in to out delay and got a creditable 20nS.
So I have some fixes to install outside, this will allow the power to ramp up fully on hot days (not to many of those around at the moment) :)
1st scope shot shows PSMC in-out delay, 2nd shows a leading edge pulse successfully ignored by the blanking feature using the workaround.

PS I should mention the path from the comparator to the output pin is different from the internal path from the comparator to the PSMC so these measurements are only approximations to the conditions internal to the chip (if that makes sense) :)

PPS I had to set up a specific test rig as on the actual target the vital (to this problem) C1OUT pin is in use for something else that could not be dispensed with.
« Last Edit: July 09, 2017, 07:21:52 am by fourtytwo42 »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #39 on: July 15, 2017, 01:26:20 pm »
Been chugging away outside for almost a week, some sun so been up to 1100W, no more blown mosfets  :)
As for Mchip, they have ways of keeping there errata small, ensure you have a business case before investigating any bugs  :-DD I seem to remember someone on this site comparing micro-controllers according to the size of there errata, well that doesn't work if the manufacturer doesn't update the errata with known bugs  :palm:

EDIT: Just added a plot of tank temperature and watt hours for the last week or so, on the whole the weather has been poor but it's still enough to keep the water temperature up.
« Last Edit: July 27, 2017, 07:56:09 am by fourtytwo42 »
 

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 734
  • Country: us
Re: MPPT noise reduction
« Reply #40 on: July 16, 2017, 05:52:32 pm »
You are quite right, the scope shot shows what happens in low light conditions, the MPPT is switching the duty cycle between nothing and something small but the PWM EMC swamps the current signal, the scope probe connection is not good so some EMC is entering that way.



Can you have the A/D sample in sync with the PWM so it does not do a conversion in the noise area?  That's common with motor control.
 
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction
« Reply #41 on: July 16, 2017, 08:11:31 pm »
Can you have the A/D sample in sync with the PWM so it does not do a conversion in the noise area?  That's common with motor control.
Yes, it took me a long time to figure how to do it on that chip and it did make a dramatic improvement but then the whole thing has been a case of incremental improvement, like kelvin connections on the current sense amp also suggested here, oversampling and averaging the ADC, slowing down switching speeds and adding a flux strap to the inductor, all have contributed :) It's been a learning curve, very different from a simple SMPS! Many years ago I used to work on servo-motor systems with accurately controlled velocity profiles BUT the power stage was linear (big heatsinks) so no switching noise!!

Ohh I should also mention the "noise area" is somewhat extended by relatively slow op-amps AND is integrated by any low pass filtering prior to the adc further compounding the problem......so no magic solution just suppressed enough for the system to work :)

I should imagine the problems recovering low level current sense signals in high power motor inverters are a complete nightmare.

 

Offline RedSky

  • Contributor
  • Posts: 21
  • Country: au
Re: MPPT noise reduction and Blog
« Reply #42 on: July 24, 2017, 03:14:31 am »
I have been working on MPPT charge controllers as a hobby for a long time now.

My latest MPPT prototype oversamples the ADC pins 60 times and averages, 30 times a second.  The MPPT duty cycle is adjusted about 15 times a second.
To sample current I use a MAX4080S that reads from a 1mOhm sense resistor, the output of that is tied to a 10k resistor and 0.1uF ceramic cap to ground before going into the PIC ADC pin.    The PIC is an older model 8 bit job with a 10bit ADC.    I can get accurate 13bit readings out of the thing by oversampling (I don't divide the 60 readings by 60, generally by roughly 10).

My MPPT tracks very well, though I have sweep and active tracking algorithms (full sweep occurs every half an hour in bulk mode - adjustable - takes about 5 seconds) and active tracking is constant in Bulk, Absorb and Float modes.  The sweep action is mostly redundant though as the active tracking is always spot on.

My advice therefore is to oversample a lot.   DC conversion is noisy, no matter how much component level filtering you do, digital oversampling is necessary.  Also make absolutely sure your PIC voltage rail is very stable.   I use a MAX5033 powered from the battery side along with a combination of 7 capacitors to keep the thing rock solid.
« Last Edit: July 24, 2017, 12:30:48 pm by RedSky »
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #43 on: July 24, 2017, 06:17:28 am »
Hi Redsky, thank you for your comments :) I use binary modulo's for multiply/divide so I can use shift operations, sometimes it's a bit limiting but so much faster. My PV voltage is much higher so I use low side sensing, any op-amp with a common mode extending below zero will do, I used LTC1637 because I happened to have one :) I actually round my current resolution to 8 bit before MPPT processing, with an FSD of 10Amps this still gives a resolution of 39mA that I find more than enough.

I thought the PIC ADC source impedance spec was somewhere around <=2K but I may be wrong, in any case I use just 470R/10nF to kill the real nasties prior to the ADC, I found a lower Fc causes noise integration within the lpf leading to bigger errors.
Of course the whole thing is highly dependent upon the particular noise environment your working with so every case is individual :)

I agree on the ADC reference voltage or PIC supply rail, I use a LP2950-33 linear to generate 3V3 for the PIC from a ~12V source so the 3V3 is stable and nice and quiet.

My MPPT runs at around 16hZ that I find fast enough to track clouds, fortunately I don't have any tree shading to worry about, I don't bother with the additional complexity/power loss of sweeping because as you say I always find the MPPT spot on after extensive testing although that did take some effort at very low insolations (I use an adaptive step size).

It's good to hear what choices other people make, always interesting :)
 

Offline RedSky

  • Contributor
  • Posts: 21
  • Country: au
Re: MPPT noise reduction and Blog
« Reply #44 on: July 24, 2017, 01:24:49 pm »
I should point out the 10k resistor is in parallel with the cap to ground, not series and you are right, it is fairly specific to using the MAX4080 chip as the current sense to get very accurate and stable readings.

My prototype is designed to work with up to 50 amps output.  I process my current readings so they end up as the amperage value to 2 decimal places. For example 1234 in a variable would represent 12.34 amps.   I use that value in my MPPT algorithm and for display/data logging and other regulator functionality.  The duty cycle is changed in 0.2% increments.   It results in tracking that keeps fairly close, say +/- 0.2V to the actual MPP at most times, and doesn't hunt that much, which in my case is fine.  For example, The MPP may still hunt up a few volts within 10 seconds if the sun came out behind a cloud, which to me is fast enough and leads to maximum extraction of power in a day.  I don't do adaptive step size, for me that was unnecessary but I have read plenty of whitepapers that it's one of the best methods.  To deal with low isolation, I have very low amperage resolution (10mA) which helps, though i'll admit if the power is down to within a few amps output level the active tracking may get stuck if it wasn't for the full sweep now and then, I could of course increase the duty cycle increment on the active tracking to deal with that if I wanted but It's all a compromise at the end of the day, there is no perfect method.

I generally agree with your comments on the sweep vs active algorithm, however the sweep algorithm can be quite impressive.  I do a full solar open circuit to battery voltage sweep in less than 5 seconds, and for half of that 5 seconds its running a fine sweep very close to the MPP thus losing very little available power.   It also finds the MPP with an accuracy of 0.1V
If you do all the maths it works out for two sweeps an hour I lose on average less than 0.1% of the available energy from the sweeps.
I believe the Morningstar Tristar MPPT uses even faster sweeps as it's primary way of tracking, so does the Outback MPPT and the Midnite Classic, though some of these have configurable algorithm options.
For me that small percentage loss from more than a couple of sweeps per hour is unacceptable.  But I guess these big companies have to allow for all the different customer systems and forms of shading that might occur and can see that sweeping would be more reliable in some specific cases.
Having a sweep algorithm is also very handy to check your own active tracking algorithm.  I can initiate a sweep instantly anytime which then provides the results on the display for confirmation that the active tracking algorithm is accurate. It's also useful to give the active tracking algorithm a head start when the MPPT controller is first turned on.

I too think reading how you are going about doing your design is interesting.  Keep up the good work and posting about it.
« Last Edit: July 24, 2017, 02:07:51 pm by RedSky »
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #45 on: July 25, 2017, 08:27:59 am »
My prototype is designed to work with up to 50 amps output.  I process my current readings so they end up as the amperage value to 2 decimal places. For example 1234 in a variable would represent 12.34 amps.   I use that value in my MPPT algorithm and for display/data logging and other regulator functionality. 
Ahh potentially we are talking about different things here :) I measure my PV current for the MPPT algorithm! Measuring my output current would be no good as it is not directly related to PV current and would therefore give a false MPP for the panels. As I am measuring PV current in a single series string IFSD is 10A as that exceeds ISC of any panel I have encountered and certainly those I use (Axitec AC-260P/156-60S).
 

Offline RedSky

  • Contributor
  • Posts: 21
  • Country: au
Re: MPPT noise reduction and Blog
« Reply #46 on: July 25, 2017, 01:38:39 pm »
different load yes, still maximum power point tracking :)
 

Offline Inverted18650

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: us
    • Test Gear Addicts
Re: MPPT noise reduction and Blog
« Reply #47 on: August 19, 2017, 02:18:56 am »
This is the best thread I have read here. Thank you for detail and all the contributions. This is the level I hope to get to and would be stoked if I can pick your brain sometime fourtytwo42. Thanks for the knowledge.
« Last Edit: August 19, 2017, 02:32:33 am by Inverted18650 »
 
The following users thanked this post: fourtytwo42

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPPT noise reduction and Blog
« Reply #48 on: August 20, 2017, 03:16:48 pm »
Thats very kind of you to say that and thank you, I often wonder if my ramblings are any help to anybody, if nothing else I hope they either make people smile or inspire them to have a go themselves. Anybody is welcome to pick whatever is in my head anytime they like :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf