Author Topic: Interesting PWM shunt control observations  (Read 4344 times)

0 Members and 1 Guest are viewing this topic.

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Interesting PWM shunt control observations
« on: November 01, 2011, 06:32:48 AM »
First a few words on what my system is and isn't - it has a bearing on the way I designed the controller(s)!! It is not a system that charges the batteries, dumps the excess and uses the available power as a normal off grid system does but one of charge the batteries and then cream off the top 10% of the charge into one or other of the swimming pool pumps - in effect using the pool pumps (1kw 1HP) as a dump load but never really running the batteries down (except in an emergency).

As a result, the typical voltage charge curve looks like this:
4262-0

Even though the original controller is charge counting, the voltage gets pretty wild at times and the 1kw load is used in short 10 minute bursts to control the excess.

The new controller I'm working on uses a PWM shunt load to try and avoid the high voltage peaks in the first place but I've been surprised in just how much the voltage is nailed at the shunt cut-in voltage. It is presently set up to start diverting to the shunt at 27 volts with a shunt full on at 28.8 volts with a linear change between. The PWM frequency is about 900Hz (not that that has any effect!)
4263-1

The shunt is detailed with the rest of the controller at http://gilks.ath.cx/~g8ecj/New_Turbine/new_controller.html and draws about 25 amps when full on. During the log above is never went over 38%.

Perhaps some of our dear readers have some ideas for the brickwall curve that results!!
Robin Down Under (Or Are You Up Over)

ghurd

  • Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 8059
Re: Interesting PWM shunt control observations
« Reply #1 on: November 01, 2011, 09:20:10 AM »
I don't know much (anything) about the demo board...

Something does not feel right in the fet driver board.
D1 and D2 Schottkys (BYV10) should maybe be Zeners?

Might help to slow the frequency down a lot.  Then try to chart it with higher resolution.
Kind of looks lke the fet driver is latching up?  Simply slowing it down may solve the problem.

G-
www.ghurd.info<<<-----Information on my Controller

Simen

  • Sr. Member
  • ****
  • Posts: 479
  • Country: no
  • Grimstad, Norway
Re: Interesting PWM shunt control observations
« Reply #2 on: November 01, 2011, 12:07:47 PM »
I don't know much (anything) about the demo board...

Something does not feel right in the fet driver board.
D1 and D2 Schottkys (BYV10) should maybe be Zeners?

Might help to slow the frequency down a lot.  Then try to chart it with higher resolution.
Kind of looks lke the fet driver is latching up?  Simply slowing it down may solve the problem.

G-

I've just built a similar controller, and i can vouch for the D1 and D2 not being Zeners... I just used some fast recovery diodes from the primary side of an pc-psu, and the scope curve at the gates are completely square; not a single peak... (controlled by an PicAxe 08M2...)
I will accept the rules that you feel necessary to your freedom. I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do. - (R. A. Heinlein)

RP

  • Hero Member
  • *****
  • Posts: 722
  • A dog with novelty teeth. What could go wrong?
Re: Interesting PWM shunt control observations
« Reply #3 on: November 01, 2011, 12:11:32 PM »
How much gain is there in the PWM circuit? 

In other words, if it starts to add load at 27.1v and goes to full on at 27.15, that might be what you're seeing.

oztules

  • Hero Member
  • *****
  • Posts: 1477
  • Country: aq
  • Village idiot
Re: Interesting PWM shunt control observations
« Reply #4 on: November 01, 2011, 05:52:39 PM »
The diodes are immaterial to the problem. (could use zeners to protect the gate, or shottky to suppress spikes). Your control loop is at fault.... it it wasn't, you would not drop below 27v

How you use your feedback will determine your pulse width according to your explanation.... thats not happening....




...............oztules

Edit: In this application I would be inclined to use a dedicated chip (tl494 etc) to control this part of the business autonomously, and leave the logging to the micro, which could override it if needs be (deadtime control pin perhaps)
« Last Edit: November 01, 2011, 06:05:51 PM by oztules »
Flinders Island Australia

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Interesting PWM shunt control observations
« Reply #5 on: November 01, 2011, 07:01:40 PM »
Interesting responses!!

I'll try and deal with the points raised one by one...

Diodes - they are schottky diodes to protect the FET driver - see the Motorola MC 34151 spec sheet
Control loop - linear from a sense voltage of 27.0 to 28.8 (configurable - thats how its set up at present anyway!!)

The diodes are immaterial to the problem. (could use zeners to protect the gate, or shottky to suppress spikes). Your control loop is at fault.... it it wasn't, you would not drop below 27v
The voltage drops below 27 sometimes because the wind stops blowing... Also when a 40 amp load is applied to the batteries the voltage drops.

How much gain is there in the PWM circuit? 

Here is the function that does the work - the 'OCR1A' variable is actually the PWM register and runs from 0 to 0x3ff (0-1023), gVolts is the voltage on the battery terminals having been through a 25 entry averaging buffer (running average over about 5 seconds). All voltage values are scaled by 100.

void
run_pwm (void)
{
   int16_t diff;
   uint16_t regval, range = 0, tmp;

   // see if smoothed voltage is over our shunt load threshold
   diff = gVolts - gVshunt;
   if (diff > 0)
   {
      // see what range we're operating the PWM over
      range = gVupper - gVshunt;
      // if above the top value then set near max on time but make sure its still pulsing
      if (diff > range)
         regval = 1000;
      else
         regval = 1000 / range * diff;

      OCR1A = regval;
      tmp = gShunt;
      gShunt = regval;              // shunt load is activated - show initial value
      if (tmp == 0)                 // if going from OFF to ON then log the event
         log_event(LOG_SHUNTON);
   }
   else
   {
      OCR1A = 0;
      if (gShunt > 0)
      {
         gShunt = 0;
         log_event(LOG_SHUNTOFF);
      }
   }
}


I don't think there is a problem - its just interesting the effect that results from the batteries being close to float voltage during a bit of a blow pushes the volts up a fair bit unless that (relatively) small amount of shunt current loads the generator down.

Cheers all :)

Robin Down Under (Or Are You Up Over)

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Interesting PWM shunt control observations
« Reply #6 on: November 01, 2011, 07:19:48 PM »
Perhaps the best illustration is the logged shunt load percentage on the same plot as system voltage - the green is the shunt load...

4266-0

Voltage scale on the left, % shunt load on the right axis. Jolly clever stuff this gnuplot ;)
Robin Down Under (Or Are You Up Over)

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Interesting PWM shunt control observations
« Reply #7 on: November 01, 2011, 08:31:17 PM »
Aha - I've found the artifact in the logging/display.

Each time the shunt load is turned on or off (even by a very small amount) a new log entry is created. This makes another point on the display graph which makes it look more dense - as though there was a line drawn at the threshold voltage.

Filtering out these values and just plotting the 'once per minute' log entries gives a much more believable display :)

4267-0

Who said a picture was worth a thousand words?

Cheers
Robin Down Under (Or Are You Up Over)

oztules

  • Hero Member
  • *****
  • Posts: 1477
  • Country: aq
  • Village idiot
Re: Interesting PWM shunt control observations
« Reply #8 on: November 01, 2011, 09:36:13 PM »
"The new controller I'm working on uses a PWM shunt load to try and avoid the high voltage peaks in the first place but I've been surprised in just how much the voltage is nailed at the shunt cut-in voltage. It is presently set up to start diverting to the shunt at 27 volts with a shunt full on at 28.8 volts with a linear change between. The PWM frequency is about 900Hz (not that that has any effect!)"

If that is as you say. then I have no idea what your trying to achieve. To me you seem to be sneaking up on the batteries with a cricket bat, and bludgeoning them  to near death (23v or so), then letting them recover.

I thought you meant that you would turn on the pwm and use it to start diverting at 27v, (and I thought proportionally to maintain 27v),and turn off if it dropped below 27v. And that if it rose further than 27 after switch on (soft start?), you would increase the pulse width to keep it in the 27-28v range......


Obviously not what you intended....... my bad.




..................oztules
Flinders Island Australia

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Interesting PWM shunt control observations
« Reply #9 on: November 01, 2011, 10:31:10 PM »
I thought you meant that you would turn on the pwm and use it to start diverting at 27v, (and I thought proportionally to maintain 27v),and turn off if it dropped below 27v. And that if it rose further than 27 after switch on (soft start?), you would increase the pulse width to keep it in the 27-28v range......

Yup - got it in one... but when the battery bank *IS* fully charged, then use the power for something useful (filter the water in the swimming pool!!). That useful load *DOES* cane the batteries a bit, and pulls them down to 23 volts,  which is why I'm shopping for something double the existing size.

In the meantime, the battery bank should never be less than about 80% charged for those unexpected earthquakes etc ;)

Certainly the PWM is much kinder than the 10 minute application of the cricket bat which is what I've been using for the last 3 years  :-\

Cheers

Robin Down Under (Or Are You Up Over)