My homebuilt VFD progress

AC, DC, amps, volts and kilowatt. It's all discussed in here
a4x4kiwi
Senior Member
Posts: 772
Joined: Thu, 03 Jan 2008, 19:04
Real Name: Malcolm Faed
Location: Australia
Contact:

My homebuilt VFD progress

Post by a4x4kiwi »

Choosing the correct number of pulses per revolution is a balancing act to have the maximum possible without exceeding the input capability of the controller, and not having a lumpy ©tm output.

For example a 500PPR sensor will have a frequency output of 50kHz at 6000RPM.

In my ute, I never got closed loop working well enough to drive.Probably a limitation of the old VFD. I used sensor-less vector.

Mal.
Silicon is just sand with attitude.

Blog: http://malfunction.faed.name
User avatar
Richo
Senior Member
Posts: 3737
Joined: Mon, 16 Jun 2008, 00:19
Real Name: Richard
Location: Perth, WA

My homebuilt VFD progress

Post by Richo »

No the issue is low RPM.
This is where the chip BGA lists is better.
At low RPM you can use exact position rather PPR.
Most micros on a custom controller should easily handle 50kHz.
So the short answer is NO but the long answer is YES.
Help prevent road rage - get outta my way!
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

My homebuilt VFD progress

Post by Tritium_James »

The issue is actually 'dumb' controllers counting pulses, rather than timing the period between edges with a fast clock. Ours works just fine with a 48ppr encoder...
User avatar
acmotor
Senior Member
Posts: 3607
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

My homebuilt VFD progress

Post by acmotor »

True, a 48ppr encoder means that the control loop, if fed by a period counter, can update torque and RPM <50 times a second (20ms) at 60RPM.

Note, most industrial servo control aims at 5ms or less torque updates.

Period counting can't replace actual pulses to inform controller of RPM.

Agreed 48ppr should be fine for EV work where locked rotor or <60RPM is temporary, however to provide almost cog free torque down to zero RPM in servo applications usually requires 1000+ppr and that usually run in quadrature so edge detecting sine/cosine (A/B) encoder signals thus providing 4000 actual ppr.

Can't agree that it is dumb though TJ, just horses for courses.

The VFD can make assumptions on dRPM/dt and keep it slow. e.g. never apply <>120RPM from last measured RPM including from locked rotor. I guess these are the sort of smarts the TJ controller considers for EV work ?

Absolute encoders ? A bit historical compared to quadrature incremental encoders..... but then BLDC is a bit like a 3ppr absolute encoder
Image

iMiEV MY12     110,230km in pure Electric and loving it !
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

My homebuilt VFD progress

Post by Tritium_James »

Don't forget you get the 4x resolution multiplication with period timing too, so at 60rpm we are updating at 5ms intervals. :)

Also don't forget that for induction motor control you only care about speed, not position. And the slip speed (what you're trying to control) is an absolute value, not ratiometric to actual speed. So as you get edges from the encoder further and further apart as the motor slows down, you also care less and less, because the error in your speed measurement can't make much difference. Example: say you're trying to regulate 20rpm slip speed with a motor speed of 1rpm, if the controller thinks the motor is doing 1rpm or 2rpm (100% error in speed measurement) it makes hardly any difference to the actual slip you're applying, it will be either 20rpm or 19rpm.
User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

My homebuilt VFD progress

Post by BigMouse »

Tritium_James wrote:Example: say you're trying to regulate 20rpm slip speed with a motor speed of 1rpm, if the controller thinks the motor is doing 1rpm or 2rpm (100% error in speed measurement) it makes hardly any difference to the actual slip you're applying, it will be either 20rpm or 19rpm.


I'm curious, does the Tritium controller modulate torque using the slip method, or a space vector method?
User avatar
acmotor
Senior Member
Posts: 3607
Joined: Thu, 26 Apr 2007, 03:30
Real Name: Tuarn
Location: Perth,Australia

My homebuilt VFD progress

Post by acmotor »

Tritium_James wrote: Don't forget you get the 4x resolution multiplication with period timing too, so at 60rpm we are updating at 5ms intervals. :) .......


explain ?
quadtrature is only available with sine/cos encoder, where duty cycle is close to 50% ? Does that mean you use an A/B encoder ?
Period timing is prone to jitter if it edge detects as the mark space of basic low ppr encoders in particular is often not 1:1.
One advantage of increasing ppr is that mark / space becomes less of an issue for lower RPM.
I guess you use A/B so that you have direction control as well otherwise it is difficult to handle a roll back.

But yes, EV motive requirement is rather less critical than many industrial applications.
iMiEV MY12     110,230km in pure Electric and loving it !
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

My homebuilt VFD progress

Post by Tritium_James »

Yes, we're using a standard A/B quadrature encoder. Of course you need quadrature otherwise the controller has no idea about direction.

The only reason you would need a high count encoder is for accurate position feedback. Since this is entirely unnecessary in a traction application (heh: move my car back 2.785 degrees please!) it means we can use extremely robust and fairly low-cost bearing encoders such as the family from SKF.

BigMouse, those two things aren't an either/or situation. Space vector is a method to produce an output vector from the PWM signals. You then have a higher level algorithm to choose what that vector should be. In our case for induction motors we're running Field Oriented Control.
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

My homebuilt VFD progress

Post by Johny »

I notice that ecomodder's Paul and Sabrina have embarked on a 3 Phase Motor Controller. There maybe some useful ideas on their blog.
The isolated supply for the high-side Gate drivers is simple and effective.

This entry has a link to a preliminary circuit.
http://ecomodder.com/forum/showthread.p ... 39-52.html

Edit: supply
Last edited by Johny on Fri, 24 Jun 2011, 08:11, edited 1 time in total.
User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

My homebuilt VFD progress

Post by BigMouse »

Johny wrote: I notice that ecomodder's Paul and Sabrina have embarked on a 3 Phase Motor Controller. There maybe some useful ideas on their blog.
The isolated supply for the high-side Gate drivers is simple and effective.


Their gate drive supply looks quite similar to the design I came up with. I'm pretty happy with mine though. Off-the shelf parts, inexpensive, and effective. Poor gate drive methods were the reason I went through so much silicon in my early experiments. If only I had realised this and got it figured out when I was building my RX7's DC controller. It would have gone a lot smoother! Live and learn.
bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

My homebuilt VFD progress

Post by bga »

Hi all,

The main reason I would go for 500 PPR is for the very low speed performance, particularly position holding to prevent roll back on hill starts. (Position holding isn't quite true, as there has to be a means of unloading the motor when the brakes are applied)

The other reason is to prevent a mode change (pulse interval to accumulation) in the sensing between low and high speed operation, although this would not be a serious issue.
Microprocessor hardware PQ sensing should be good to about 500khz, so the top end speed isn't an issue apart from the sensor, transmitter and noise limits. (100khz @ 500ppr = 12,000 RPM)

The dsPIC procesor that Paul & Sabrina are using in their controller is an improvement of the earler one I am using. It supports many channel simultaneous sampling (it does this by gating a number of holding registers for the ADC) and is a 30% faster than the earlier PIC. One downside is that it is 3.3V only so some care has to be taken around interfacing.
Speed should not be an issue in either case.

I was s bit concerned their gate driver design. It doesn't look to have any desaturation detection on the IGBTs and I doubt that the overcurrent detector thay have shown will be fast enough to protect the transistors from a shorted output and maybe won't detect a transistor failure.

The multiple secondary transformer looks to be used commonly in commercial products, although it may be simpler to have several single output transformers than the one multiple secondary type, especially condsidering the isolation needs of the secondaries.
Last edited by bga on Wed, 16 Nov 2011, 19:23, edited 1 time in total.
It's not the end of the world, but I can see it from here.
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

My homebuilt VFD progress

Post by Johny »

Yes, I agree bga. I would have thought that de-saturation protection was essential in the harsh EV environment (shorts to ground and motor insulation failure totally possible). There are lots of IGBTs available now that have their own protection (forgotten what it's called) but they require current sensing in your gate drive system to detect when the IGBT has gone into protect mode (gate drive gets shorted out). I think they (the IGBTS) still protect even if you don't sense it but then you can't spit a fault indication to the higher level.
bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

My homebuilt VFD progress

Post by bga »

I don't know of any big IGBTs that have in-built protection. None even have Zeners across the gate to stop it getting blown up when handling the device. (very sensitive to over-voltage on the gate)

Many (most?) power IGBTs have some short circuit tolerance, ususally in the 10 microsecond range. This is where desaturation detection is needed to be able to detect the gross overcurrent condition and turn the transistor off within the short window.

Depending on the gate driver, some latch this fault and won't operate until the controller clears the fault.

The transistors are allowed to operate above their mominal maximim current, provided that this is within the permissible pulse width and thermal envelope of the semiconductor, but more likely, the limitation will be the motor windings, which can be driven very hard for short periods of peak torque, but must be maintained within their operating temperature limit overall.

I am considering the following for IGBT protection:
1) Latching the DESAT signls from the gate drivers (Powerex drivers don't do this)
2) Generating a latched logic fault if both of a leg's high and low side drivers are enabled simultansously.

Because of the experimental nature of the design, I feel both if these are important.

Overcurrent and motor protection will be by software functions, intitially simple and conservative.
It's not the end of the world, but I can see it from here.
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

My homebuilt VFD progress

Post by Johny »

bga wrote: I don't know of any big IGBTs that have in-built protection.
OK so you forced my to go look it up.
The F series IGBTs (Trench Gate) - Eg CM300DU-24F

This is from a document: "MITSUBISHI SEMICONDUCTORS POWER MODULE MOS
USING F-SERIES IGBT MODULES".

5.3 RTC Description and Behaviour
F-series IGBTs include an integrated real-time current
control (RTC) circuit for protection against short circuits,
which was originally developed for intelligent power modules
(IPMs). The RTC is a separate chip wire-bonded directly to the
IGBT die and mounted adjacent to it. During normal operation of
the device, the RTC is effectively “transparent” to the
gate driver. It’s power supply is drawn from the main collectoremitter
path of the IGBT, so it....


Image

Trench Gate designs appear to need about twice the drive current so I'm not fond of them and as you can see you need to be aware of the gate circuit.

"Careful design of the power circuit and gate
driver is necessary to ensure that the collector-emitter voltage
limit is not exceeded. Note that the SCSOA of F-series IGBTs is
applicable for pulse widths less than 10µs. The SCSOA is valid
only for non-repetitive (“single shot”) operations"
bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

My homebuilt VFD progress

Post by bga »

That's interesting.

from www.pwrx.com:
"Mitsubishi Electric Power Module for Hybrid & Electric Vehicles is Now Available in the Americas from Powerex. read more"
That would explain the familiar part number!

It looks like DY designation doesn't have the protection circuit and DU designations do.
I don't see a 300DU mentioned in the Powerex selectors, nor do I see any reference to short circuit endurance in the similar Powerex CM300DY-24A spec sheet, but may have seen it in an application note.
Eventually, I will know if it's significant Image

Perhaps the idea of the protection circuit is to ensure that the overcurrent (DESAT) behavior is more consistent and less severe on the semiconductior junction?
The data sheets don't provide much guidance on this.

I would say that this circuit doesn't remove the need for desaturation detection and latching. It just makes the device more likely to survive one of these events.
It's not the end of the world, but I can see it from here.
Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

My homebuilt VFD progress

Post by Tritium_James »

It's not going to survive too long if you turn it on into a short every PWM cycle - desat should definitely be latched.
bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

My homebuilt VFD progress

Post by bga »

I'd go for one cycle, maybe two if you're lucky!

It points to an order of precedence in the design and implementation:

The protection (and shutdown) mechanisms need to be well tested and reliable before proceeding to anything else.

Any DESAT event is akin to having a hand gun go off while you're cleaning it. It just shouldn't happen and you're obviously doing it wrong. -- time for a rethink.

I have a small switch on the controller board to simulate this. It goes into one of the high priority interrupts on the processor so the PWM can be disabled before anything else happens.
It's not the end of the world, but I can see it from here.
User avatar
Johny
Senior Member
Posts: 3733
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

My homebuilt VFD progress

Post by Johny »

Yes I'd generally agree with both of you. When I came across this stuff I remember reading that the Gate drive system should be designed to detect the gate overcurrent and latch the event in the same way it would for a desat event. It is designed to replace desaturation systems and is supposed to be better because it responds at a lower current than desat takes to fire. It typically begins current limit at device max x 2 and restricts currenty to device max x 4.

"It is important to note that the RTC acts only to limit short circuit
current; it does not switch off the IGBT. Therefore the
gate driver circuit should be designed to ensure that the
IGBT is turned off within 10µs of a short circuit occuring."


Mitsubishi have a gate driver that detects this and latches - reporting a fault.

"Mitsubishi M57160L-01 hybrid gate driver
IC. This driver circuit senses a decrease in the gate-emitter
voltage at the device terminals when the RTC becomes active.
The short circuit protection is thus implemented without a
connection to the collector of the IGBT using a fast-recovery
diode."


Anyways, as I said, Gate drive requirement are a lot higher even though they say they are compatible so I generally don't think it's worth it.
Last edited by Johny on Thu, 30 Jun 2011, 05:05, edited 1 time in total.
bga
Senior Member
Posts: 492
Joined: Mon, 01 Sep 2008, 19:27
Real Name: Bruce Armstrong
Location: Perth WA

My homebuilt VFD progress

Post by bga »

Johny wrote: Yes I'd generally agree with both of you. When I came across this stuff I remember reading that the Gate drive system should be designed to detect the gate overcurrent and latch the event in the same way it would for a desat event. It is designed to replace desaturation systems and is supposed to be better because it responds at a lower current than desat takes to fire. It typically begins current limit at device max x 2 and restricts currenty to device max x 4.
...
I had a troll through the Powerex documentation.
Makes good sense.

I wonder the the limit is on the non-protected transistor. The VCE SAT graph provides some clues and my guess is that VCE will be about 4V (the likely trip point) with 1200A on the device.

Would I have selected different devices? --- Probably not.

It seems that the only 300 amp IGBTs listed as preferred devices and actually stocked are the ones I chose, so I'll not panic over this.

The gate driver I am using (VLA503) was listed as the compatible device for the IGBT (CM300DY-24A), along with the VLA106-15242 isolated gate power supply and B2GB-5015 demo gate driver PCB.

Powerex referred me to a reseller site: www.galco.com
I need to look at them a bit more - lots of industrial stuff and OK prices.

Back onto the gate driver..
The one I quoted above has desaturation protection and a latch to disable the transistor quickly, but requires an external optocoupler (on the demo gate driver PCB) to relay the signal back to the controller to stop the next pulse.

Gate overcurrent detection looks to be more in the domain of the transistors with built in overcurrent protection. I suspect that dragging the gate down is the means of feedback for an overcurrent event on the transistor.
It's not the end of the world, but I can see it from here.
User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

My homebuilt VFD progress

Post by BigMouse »

Latest progress on my controller.

YouTube video

I have all the bits to put my battery management system together now too, after a bit of a wait for parts to arrive from overseas. Now I just have to assemble a couple hundred boards to make it work. I really need a reflow oven.
Stiive
Groupie
Posts: 295
Joined: Wed, 31 Dec 2008, 08:26
Location: Melbourne

My homebuilt VFD progress

Post by Stiive »

Hi,
Any progress on this controller build?
Rgds,
Stiive
Stiive
Groupie
Posts: 295
Joined: Wed, 31 Dec 2008, 08:26
Location: Melbourne

My homebuilt VFD progress

Post by Stiive »

BigMouse wrote: You're probably right, I'll write my thinking and hopefully you guys can tell me if I'm making incorrect judgements and guide me in the right direction.



Sum of currents in a 3-phase motor equals zero (for equal load in each phase). This is because at any given point in the rotation, currents are flowing in different directions and magnitudes (some being negative). Correct?



If that is true, then the sum of the absolute values of the currents in each phase should equal the total current into the 3-phase bridge. This would be the "battery" current (with the capacitors on the battery side of the current sensor).



Because the magnitude of the total current determines the strength of the magnetic field (and the resulting torque), it seems that "battery" current should have a direct relationship to torque.



I'll stop there, before I go making too much of a fool of myself.



Does it work this way?



While trying to work out what control method you're using I found this old post. Not sure how you've progressed since then but noone seemed to pick up that you haven't accounted for power factor.
In order to get the DC current you'd have to work out the 3-phase electrical power P=sqrt(3)*V_LL*I_LL*PF.
Your DC power will be the same (plus some minor switching losses) therefore to get the current here just use P=V*I transformed to I=P/V. Of course now you need to know DC link voltage, but hey that's how it is.

Your theory is wrong because through the conservation of power, you can be having very large phase currents at a very small voltage, while your DC bus shows only a very small current at a large voltage.

Hope this helps (if you haven't already figured it out)
Rgds,
Stiive
User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

My homebuilt VFD progress

Post by BigMouse »

Stiive wrote:
While trying to work out what control method you're using I found this old post. Not sure how you've progressed since then but noone seemed to pick up that you haven't accounted for power factor.
In order to get the DC current you'd have to work out the 3-phase electrical power P=sqrt(3)*V_LL*I_LL*PF.
Your DC power will be the same (plus some minor switching losses) therefore to get the current here just use P=V*I transformed to I=P/V. Of course now you need to know DC link voltage, but hey that's how it is.

Your theory is wrong because through the conservation of power, you can be having very large phase currents at a very small voltage, while your DC bus shows only a very small current at a large voltage.

Hope this helps (if you haven't already figured it out)


Thanks for that. Yeah, I'd figured that out. I'm now using individual phase currents. The controller is going through a bit of an evolution at the moment (with the aim of building in active IGBT protection). Progress has been slow due to lack of money and time (both thanks to being a full-time uni student). I've also been focusing on my BMS recently and have a near-production-ready product at this stage. The controller will be getting some attention over the mid-year Uni break, possibly seeing the next major hardware revision complete before the end of July. It'll be down to software after that.
User avatar
BigMouse
Senior Member
Posts: 600
Joined: Thu, 28 Oct 2010, 02:39
Real Name: Vincent Tannahill
Location: Silicon Valley
Contact:

My homebuilt VFD progress

Post by BigMouse »

Image

Quick update:

Redesigned the power stage and switched to a different (more powerful and cheaper) microcontroller for the commutation. This meant I had to completely re-write the code from scratch. This is good though, since I was never really happy with the code I got from the Atmel application note for the previous microcontroller I was using. I prototyped the algorithms with excel before implementing them in code. This has proven VERY handy, both for troubleshooting, and tuning. It's nice to be able to verify observed behavior matches the behavior predicted by the spreadsheet.

I've switched to desaturation detection for IGBT protection, and am still measuring the phase and battery currents for customizable limiting.

As with before, capacitor precharge is built-in, though it's now solid state rather than relay-based. HV voltage sensing (battery and capacitor voltages) is now much faster.

Switched to film capacitors (600uF currently, can be expanded by connecting cylindrical capacitors to bus bars if needed).

The breadboard and jumble of wires is being used for verification of my circuits and methods before committing to a PCB. When complete, the PCB will mount directly to the pin headers which the wires are connected to now, requiring no changes to the main board. This also allows me to have heavy (2oz) copper on the main board (2 layer), and normal copper, but 4 layers on the "brain" board. I'm very happy with this board. It's the first time I haven't had to make any jumpers in order to make it work. There's only one thing I'd change about it, and it can be dealt with on the other board when I have it made. So as of now, this board design is complete and will be cheap to re-order. A milestone!

I've been testing this controller on a small 370w 4-pole motor and rectified (and isolated) mains. Torque-control mode is working very well with a 500ppr encoder. I hope it works as well with the 68ppr encoder-bearing in my big motor out in the garage. No reason it shouldn't, really. The sample rate is such that it can measure slip at as low as 1Hz, so it should be fine.

I need to work out a heatsink solution for this (water-cooled, any suggestions?), then I can bring it out to the garage and hook it up to the big boy for some REAL testing.
Stiive
Groupie
Posts: 295
Joined: Wed, 31 Dec 2008, 08:26
Location: Melbourne

My homebuilt VFD progress

Post by Stiive »

Looking good. Am i right in understanding your DC bus is integrated in/on the PCB?
Whats the max power your aiming for?
Rgds,
Stiive
Post Reply