Hi Sean, On Thu, Apr 18, 2013 at 3:27 AM, Sean Breheny wrote: > Hi Manu, > > I am not familiar with the PWM peripheral on the pic you are using but > usually cycle-by-cycle current limiting means very simply this: constantl= y > checking to see if the current is outside of some window (say, for exampl= e, > +/- 10 Amps) and when it goes outside this window, terminate the remainde= r > of the present PWM cycle (i.e., turn off all FETs and let the current go > through the body diodes back into the bus) and then recheck the current a= t > the beginning of the next PWM cycle. If it is now inside the window, > re-enable PWM as normal. If not, keep the FETs off for another whole PWM > cycle and check the current again at the beginning of the next PWM cycle, > etc. > > "cycle-by-cycle" meaning that the exit from current limit is synchronous > with the beginning of a new cycle, to avoid increasing switching losses b= y > allowing the system to introduce additional on/off edges beyond what woul= d > happen in normal PWM. > > I don't think this is what you want to prevent flux walking because, if y= ou > used such a scheme, and the current tended to increase in one particular > direction, then it would just keep hitting current limit in that directio= n. > You want some scheme which prevents the average flux from growing beyond > some tiny value in the first place, and this value would be much less tha= n > the peak flux achieved during each ON cycle. > > I've worked this out before in an SMPS design and I think, if I remember > correctly, that I got around it by simply increasing the PWM dead-time > (time from turning off one set of FETs, or in your case, one FET, to > turning on the next FETs) a little bit so that the current would always > decay to zero within each half PWM cycle. I'll have to look back at my > notes again. This was what I was thinking. I did simply play with the Dead time a bit here and there. It did help to some extend, but it still didn't fix the pro= blem as expected. In short, there are 2 problems that were occurring, quite inversely: #1, Flux walking problem: this reduced a bit by increasing dead time #2, As pulse width reduced, current increased per pulse, causing switching loss again. It looked like a bit too hard to reach the in-between stage empirically. It would be great, if you could have a look at your notes again, Thanks, Manu --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .