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

0 Members and 2 Guests 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: 16604
  • 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: 16604
  • 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: 21657
  • 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: 16604
  • 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: 16604
  • 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: 21657
  • 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!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf