# Home Grown Mini-EV



## zaxxon (Jul 11, 2009)

Thought we would share our progress converting a 2003 Mini-Cooper S to an EV. My sons and I started this effort in April 2009 with purchase of the donor car followed by the VFD, Batteries, and AC motor. We are still in the prototyping phase. We recently drove the car and have learned the limitations of our Industrial VFD. 

Donor Car: 2003 Mini Cooper S w/o Engine and Drive Tran









Motor: Ford F8Y8-14B280-AC (Siemens PV5133-4WS20 W11) 









Motor Control: BENSHAW 100 HP VFD 









Battery: Two custom packs made of 42 Prius Battery Modules









Motor and Transmission Mounted 










Manual Charging of Battery Stack


----------



## 80N541 (Jan 11, 2009)

it look good ^^
did you manage to make some wheel spin?


----------



## jockepocke (Nov 24, 2009)

Awesome! Whats was the cost of all that?


----------



## Woodsmith (Jun 5, 2008)

That looks great!
Where's the build thread? It would be good to see how you did it.


----------



## zaxxon (Jul 11, 2009)

80N541 said:


> it look good ^^
> did you manage to make some wheel spin?


 
If you mean a burn out, then no. We threw it together to try it before winter hits and did not torque the coupler properly yet. We need to disassemble to change out the non-lubricated bearings in the motor, wanted to make sure we could get it off. We did manage to spin the tires pulling up our drive way because of its angle. We have a video of that, but I was not able to upload to anywhere yet -- I am not that knowledgeable in that area. I hope to put a link to the video of Mini on road with some help from my son.


----------



## Guest (Nov 28, 2009)

Are you running the prius pack as one high voltage pack or two parallel packs? I am working on the same type of thing. Experimenting right now. My pack is a low voltage pack. Much harder to do. How do you like the Prius batteries? How's the charging? BMS? What is your running voltage? 

Pete


----------



## zaxxon (Jul 11, 2009)

jockepocke said:


> Awesome! Whats was the cost of all that?


I have not added all the costs up. Here is a breakdown of the major components. We don’t have a battery charger yet. I plan to modify a power supply for this.

Mini $3,400 + $700 shipping
Motor: $1,590
VFD: $ 990
Transmission: $1,700
Three Prius Battery Packs: $1,467
Misc. est. $1,400


----------



## zaxxon (Jul 11, 2009)

Woodsmith said:


> That looks great!
> Where's the build thread? It would be good to see how you did it.


Thanks !! . I don't have a thread or a web page. I hope to get some help from my sons getting something setup over the Chrismas Holidays, when we have some time.


----------



## zaxxon (Jul 11, 2009)

gottdi said:


> Are you running the prius pack as one high voltage pack or two parallel packs? I am working on the same type of thing. Experimenting right now. My pack is a low voltage pack. Much harder to do. How do you like the Prius batteries? How's the charging? BMS? What is your running voltage?
> 
> Pete


We are running two battery packs of 42 series modules in parallel (best case 13 amp-hr). I hope just enough to get me to work and back daily. I wanted to run all in series so we would not need to modify the controller we have -- not sure what effect the modifications have had on its overall performance. I was not able to get any answers on the dielectric operating voltage of the motor, so we went with the lower voltage. 

For test runs we are not fully charging or discharging (we think) the battery pack. Only charging the battery pack at 5 amps for now. We don’t have a battery fan or BMS setup yet. Have been charging the pack to 357 volts (42 x 8.5).

The Prius battery modules are nice to work with from a packaging and flexibility point of view. You must keep a close eye on the temperature of the battery modules when charging to get a full charge. We put one pack in what looked like thermal runaway before we got smarter about charging. It took two large fans more than an hour to get it back to room temperature.


----------



## zaxxon (Jul 11, 2009)

Posted these videos on youtube:

Home grown Mini-EV spins wheel first time
http://www.youtube.com/watch?v=pSs0aYbaRo0


Home grown Mini-EV slow but almost smooth start
http://www.youtube.com/watch?v=9bxt0E2ezGg 

Home grown Mini-EV driving first time in second gear 
http://www.youtube.com/watch?v=FduVqLQpz14


----------



## zaxxon (Jul 11, 2009)

zaxxon said:


> Posted these videos on youtube:
> 
> Home grown Mini-EV spins wheel first time
> http://www.youtube.com/watch?v=pSs0aYbaRo0
> ...


 
We have put up a web site http://www.bmpenterprises.net/ to caputure this and possible future projects. Below is the post on how we made the Mini-EV version of a Tischer style coupler. I could not include all the pictures here so if you want to see more please look at the web site.

*Making the Coupler*

The following shows the basic steps used to fabricate the Motor to Transmisson Coupler. This coupler used concepts shown by Tischer. 


Testing fit of B-lock on Centering Plug:

Not shown here but we clamped on the B-Lock and drilled pilot holes using B-Lock as guide by removing and replacing each B-Lock screws one by one to drill the holes shown:


Its tough, but Adam lets it know who’s the boss:

Transmission Spline Coupler is cut loose. Note, the circular step bushing on the back we can use to center this piece to the coupler.
 

Test fit of Transmission Spline Coupler to its centering hole:
 


Boring out motor shaft clearance hole:
 
Used previously drilled pilot holes to center and drill each hole through aluminum spacer. Then we bolted on the Transmission Spline Coupler to match drill the bolt and locating pin holes:


Looks like its going to work:


----------



## zaxxon (Jul 11, 2009)

These are the steps we used to create the adapter plate to attach and center properly the motor to the transmission.

We started with a 3/4" 6061 aluminum plate and made an acrylic template that showed the bolt holes from both transmission and motor as well as the outlines. This kept us on track and helped make decisions.
​
The next step was to drill holes for the alignment pins in the transmission. We marked the two spots using the transmission as a guide.


The use of transfer punches made sure the plate was marked properly.


Here are the finished holes with threads, looks like we selected the correct bolt lengths. 


From there we needed to find the exact center of the transmission to later line up with the exact center of the motor. To do this we created a 'center punch' that we fitted onto the transmission shaft and used the clutch action to make our mark.


At this point we didn't have the capability for precise machining on a piece of this size. So we hired a machinist to cut our centering ring and the hole for the coupler. Here it is back from the machine shop.


And then the first complete fitting test between motor and transmission.


Then we began the process of marking the bolt holes for the motor using a transfer screw set, shown above. 
http://bmpenterprises.net/blog/wp-content/uploads/2009/12/IMG_0600.jpg 
After drilling and testing all the holes they needed to be countersunk so the transmission could sit flush against the plate.


This is the plate countersunk and bolted to the motor. 

http://bmpenterprises.net/blog/wp-content/uploads/2009/12/IMG_03011.jpg 

The last modification to the plate was to make room for the trans-axle on that side. So we cut a radius by drilling several holes and cutting out with a saw.
​

See additional pictures at [URL="http://bmpenterprises.net/blog/2010/01/02/making-the-transmission-adapter-plate/"]http://bmpenterprises.net/blog/2010/01/02/making-the-transmission-adapter-plate/[/URL]


----------



## zaxxon (Jul 11, 2009)

This post contains a breif overview of what we learned trying to use an Industrial VFD as the Motor Controller.

If any one has some ideas or experience on how to overcome the issues associated with the transition from Coast to Stop, to Run, and then to Flying Start discussed below I would appriciate the help.

We purchased two used Industrial Variable Frequency Drives on eBay. The first one was a 30 HP 460 AC Benshaw Sensorless Vector Drive RSi030SX4B which turned out not have enough current output to get the car rolling consistently from a dead stop without tripping the hardware over-current protection circuit (~80 Amp). We were able to drive the car, once the car started rolling. It just could not supply enough current to move the car without tripping the hardware protection limit. The second one which we are using now is a 100 HP 460VAC Benshaw Sensorless Vector Drive RSi100SG-4B (~150 Amp).

*If you are planning to try to use an Industrial Motor Control in your electric vehicle project here are some lessons learned:* 

Most units above 30 HP are only available in the higher 460 VAC. Unless you plan to run a 600 VDC system you will need to modify the unit to operate at a lower voltage. 

Make sure it has a sensorless vector torque producing mode of operation, or you will need an external shaft position sensor to get high torque at low speeds. 

Make sure the maximum AC frequency output of the controller is known and is high enough to support the the max motor rpm desired. The 100 HP unit we have is limited to 120 hz which sets our max to 2500 rpms, 40 mph in second gear. To get more out of our motor, it should be more like 300 Hz. 

Make sure the controller has the ability to turn off the phase loss detection. If not you will need to "fake out" the detection circuits. 

Make sure that it has a control mode which lets you command an output torque not speed. Our present controller only lets us command a target motor speed with timed speed ramps which results in difficult operating conditions when stopping. 

If the controller does not have a command torque mode, it needs to have someway to associate an external switch input to the "COAST TO STOP/RUN control input to turn off the drive output when coming to a stop if you do not have a clutch. This input is needed to circumvent the controller speed control loop which is trying to hold the rpm at the commanded speed. 

If the controller does not have a commanded torque mode it needs a "flying start" mode which keeps the the Controller's output current low until the motor and commanded rpm are the same. Unfortunately our experience to date is that this does not work well in our electric vehicle application and is the only reason we cannot drive the car around town safely. If "flying start" mode does not work well, the only way to accelerate after a "COAST TO STOP/RUN" command is issued, is to come to a complete stop, and then accelerate. The alternative to a full stop and then start is a screaming controller and a bucking car while the controller tries to sync the speed. This does not work in traffic.


----------



## Dead End Kid (Jan 14, 2010)

I was a VFD Applications Specialist for Square D for a number of years. I’m new to the EV world and was wondering if someone had tried to adapt an AC VFD to the EV world. I’m assuming you bypassed the front-end AC/DC converter and tied into the DC/Capacitor part of the drive. Seems like one thing you discovered is that AC VFD’s, though are listed by H.P., are actually current rated devices. The Benshaw unit you listed is rated at 152A’s when set up in Variable Torque load. When set up in what Benshaw refers to as “Heavy Duty” ( other mfr’s label this as constant torque) this is reduced to 111A’s. What this really means is that VFD will allow the current draw to be 166-167 FLA’s for 1 minute before it kicks of on “Over-current”. This is all based on AC motor current draw of a 100 hp AC motor drawing about 124FLA’s @ 460V’s. One requirement of an AC VFD is to limit the current inrush associated with the AC motor. An across-the-line start can be 6-10 times the current full-load draw.

The first/most critical parameter to set/understand is the Ramp/Up Ramp down time. Sq. D’s out of box was set at 3 seconds. I’m not familiar with the Benshaw, but most/all VFD’s have different torque profile’s. Most common is a linear, but there are typically modes like “Torque Boost” which can be tried. The reason I bring this up is that it appears the biggest issue you seem to be having is with the “Flying Start” parameter….Also known as a “Catch-on-the-Fly” parameter by other Mfr’s. What actually happens is that in the sensorless flux vector setting the VFD is looking at _FREQUENCY_ the motor is running at, then induce more Hz back into the motor to accelerate the motor back up to the desired/set speed. Speed control on the VFD is usually achieved by a potentiometer wired into the VFD. If you go 0-100% on the pot and the ramp-up/ramp-down will follow the ramp speed you have set. IE: if you “floor” your EV it will allow current to flow to 100% whatever the ramp time is…same with ramp down/decel. Now when you get back on the “gas” while the EV is coasting you are trying to utilize the “flying start” and “coast to stop” parameters, but with the ramp times being a part of the speed control loop algorithm you are starting and stopping faster then what the algorithm is set to run. Have you played with the ramp times?


----------



## zaxxon (Jul 11, 2009)

Dead End Kid said:


> I was a VFD Applications Specialist for Square D for a number of years. I’m new to the EV world and was wondering if someone had tried to adapt an AC VFD to the EV world. I’m assuming you bypassed the front-end AC/DC converter and tied into the DC/Capacitor part of the drive. Seems like one thing you discovered is that AC VFD’s, though are listed by H.P., are actually current rated devices. The Benshaw unit you listed is rated at 152A’s when set up in Variable Torque load. When set up in what Benshaw refers to as “Heavy Duty” ( other mfr’s label this as constant torque) this is reduced to 111A’s. What this really means is that VFD will allow the current draw to be 166-167 FLA’s for 1 minute before it kicks of on “Over-current”. This is all based on AC motor current draw of a 100 hp AC motor drawing about 124FLA’s @ 460V’s. One requirement of an AC VFD is to limit the current inrush associated with the AC motor. An across-the-line start can be 6-10 times the current full-load draw.
> 
> The first/most critical parameter to set/understand is the Ramp/Up Ramp down time. Sq. D’s out of box was set at 3 seconds. I’m not familiar with the Benshaw, but most/all VFD’s have different torque profile’s. Most common is a linear, but there are typically modes like “Torque Boost” which can be tried. The reason I bring this up is that it appears the biggest issue you seem to be having is with the “Flying Start” parameter….Also known as a “Catch-on-the-Fly” parameter by other Mfr’s. What actually happens is that in the sensorless flux vector setting the VFD is looking at _FREQUENCY_ the motor is running at, then induce more Hz back into the motor to accelerate the motor back up to the desired/set speed. Speed control on the VFD is usually achieved by a potentiometer wired into the VFD. If you go 0-100% on the pot and the ramp-up/ramp-down will follow the ramp speed you have set. IE: if you “floor” your EV it will allow current to flow to 100% whatever the ramp time is…same with ramp down/decel. Now when you get back on the “gas” while the EV is coasting you are trying to utilize the “flying start” and “coast to stop” parameters, but with the ramp times being a part of the speed control loop algorithm you are starting and stopping faster then what the algorithm is set to run. Have you played with the ramp times?


Thanks !! for reading and trying to help. I had hoped to put more info up on how we modified the drive but other things are too demanding right now. To get the drive to operate at the lower voltage we shorted out and trimmed some of the input voltage sense resistors and startup resistors on the auxiliary power supplies. 

You are correct, we bypassed the AC/DC front end and tied into the DC Capacitor bus. We are using a pre-charge resistor before applying battery to prevent inrush. 

We learned quickly we had to set the ramp down time much longer than the ramp up time or our heads might come off when you let off the accelerator peddle. We learned the hard way how well Regen in an AC Induction motor can work. The drive I have unfortunately does not have a parameter to adjust Regen current level. In Regen, it only halts deceleration based on the sensed input voltage increase which is not useful because that is basically held fixed by the battery. Have thought about using the future battery current sense circuit to offset the input voltage sense. 

Last time we drove the Mini we had the ramp up time set for 5 seconds and the ramp down at 15 seconds. The 15 seconds avoids the head snapping and helps keep the Regen current to battery low. I have not investigated the relationship between the ramp times and the “flying start”. I was wondering if the issue was related to my inability to hold the throttle peddle still while the drive tries to sync up the frequency. I would like to think the drive would quickly sync up and then apply power to ramp like normal to whatever the set point was. It seems the ramp times and power should be off until it has synchronized. It acts like its driving current while its searching. I wondered if it is turning on the boost current during this time or some brake current. There is another mode “Delta Freq” I have not investigated to see if it would help here. In the “Delta Freq” mode the Accel/Decel time is the time that takes to reach a target frequency from any frequency. I tried this mode early on to try to address accelerator response. I did not like the results at the time. Do you think this mode would help with this issue?


----------



## Dead End Kid (Jan 14, 2010)

Please keep in mind I’m new to the EV world, but do know the Industrial VFD world. Trust me; I’m learning more from you and the other members on this forum then I will ever be able to give back. Don’t know your background, but it sounds like you really understand the electronics’ part of the drive (board-level if you will) better then me. One thing that might help you is to remember what the original intent of the VFD mfr. was/is. 
You’ve run into the regen braking capability built into even a sensorless flux vector drive. In your research you probably ran into full flux vector drives with encoder/resolver feed-backs. Suffice it to say a VFD can be used in indexing machine’s such as Hass CNC machines. The VFD will inject DC back into the motor to stop it as fast as you want…the one thing required is a (dynamic braking) resistor bank to allow the current to bleed off somewhere. These are available from a number of sources, but I have a feeling you know enough you might want to “roll your own”. This function, however, is utilized more in position control applications (CNC machines) and with my limited knowledge of EV’s I didn’t think this was something that would come into play in the EV world. On the decel side of things I would have thought that you would set the “Free-Wheel” stop parameter set which should effectively ignore the “ramp-down” time and not try to slow the motor down. Sounds like you tried this already, but maybe the motor on decel is generating enough current that is having a hard time trying to dissipate. Just a thought.

I don’t think your inability to hold constant the throttle pedal constant but you didn’t mention what you are using to control the speed. Don’t have a Benshaw manual handy, but it typically is a 10K pot. If your ramp up time is set at 5 seconds and you crank the pot to 100% the current flow should be linear over the 5 second ramp. If the linear ramp doesn’t suit the application there is typically other parameters that allow for voltage boost or other high enertia start applications to boost torque to the motor. These all work a little different from mfr. to mfr. Heavy flywheel’s, loaded conveyor system’s, etc. (EV’s) are the sort of applications the mfr’s. had in mind and they consider these to be constant torque (heavy duty in Benshaw language). The (potential) problem with setting your specific Benshaw VFD to “heavy duty” is that it is going to drop the FLA’s it bases everything on from 151 amps to 111 amps…probably not the direction you want to go.

The “Delta Freq” parameter I’m not positive as this sounds like Benshaw vernacular, but I’m fairly certain that this is more for set-point applications. An example is on a machine tool where there is a cutting speed at a specific rpm/frequency and then needs to jump to a different specific rpm/frequency. Doesn’t seem to be a parameter applicable to what you are trying to accomplish.


----------



## etischer (Jun 16, 2008)

Wow, not sure how I missed this thread. You have accomplished alot in 9 months, and thanks for posting. 

Sounds like you are going through the same learning process I went though with my conversion. I too started out in a v/hz speed mode. Is your inverter capable of Sensorless vector?


----------



## Dead End Kid (Jan 14, 2010)

Sorry...not trying to answer for zaxxon, but being the new excited guy, I just quickly went thru your build. The Benshaw VFD zaxxon is using is a current sensorless flux vector drive. Looks like you are utilizing a loop feed-back resolver/encoder approach. One of the suggestions I was going to make to zaxxon was to put his drive in a volts/hz mode to do the preliminary tuning and familiarization, then switch back to the flux vector control. I think you can do that with the Benshaw unit.You probably have very valuable input for that approach.


----------



## zaxxon (Jul 11, 2009)

Dead End Kid said:


> Please keep in mind I’m new to the EV world, but do know the Industrial VFD world. Trust me; I’m learning more from you and the other members on this forum then I will ever be able to give back. Don’t know your background, but it sounds like you really understand the electronics’ part of the drive (board-level if you will) better then me. One thing that might help you is to remember what the original intent of the VFD mfr. was/is.
> You’ve run into the regen braking capability built into even a sensorless flux vector drive. In your research you probably ran into full flux vector drives with encoder/resolver feed-backs. Suffice it to say a VFD can be used in indexing machine’s such as Hass CNC machines. The VFD will inject DC back into the motor to stop it as fast as you want…the one thing required is a (dynamic braking) resistor bank to allow the current to bleed off somewhere. These are available from a number of sources, but I have a feeling you know enough you might want to “roll your own”. This function, however, is utilized more in position control applications (CNC machines) and with my limited knowledge of EV’s I didn’t think this was something that would come into play in the EV world. On the decel side of things I would have thought that you would set the “Free-Wheel” stop parameter set which should effectively ignore the “ramp-down” time and not try to slow the motor down. Sounds like you tried this already, but maybe the motor on decel is generating enough current that is having a hard time trying to dissipate. Just a thought.
> 
> I don’t think your inability to hold constant the throttle pedal constant but you didn’t mention what you are using to control the speed. Don’t have a Benshaw manual handy, but it typically is a 10K pot. If your ramp up time is set at 5 seconds and you crank the pot to 100% the current flow should be linear over the 5 second ramp. If the linear ramp doesn’t suit the application there is typically other parameters that allow for voltage boost or other high enertia start applications to boost torque to the motor. These all work a little different from mfr. to mfr. Heavy flywheel’s, loaded conveyor system’s, etc. (EV’s) are the sort of applications the mfr’s. had in mind and they consider these to be constant torque (heavy duty in Benshaw language). The (potential) problem with setting your specific Benshaw VFD to “heavy duty” is that it is going to drop the FLA’s it bases everything on from 151 amps to 111 amps…probably not the direction you want to go.
> ...


My background is electrical engineering, I graduated from Purdue in 1974. I am one of those old analog circuit type guys with some early career background in switch mode power converters. Back when 10KHz switching was fast and the first 1524 came out. Three of my four sons and I were members of a High School Solar car team which won the World Wide Winston Solar Car competition. So I can’t say I am a newbee to EVs, but I am to AC Induction Motors and especially VF AC Drives. One of the main purposes of this build project was to educate myself and my youngest son in this area and plug in cars. I can say I have learned a bunch the last few months, but I am not an expert and appreciate your help and suggestions. 

I am using the Benshaw "COAST TO STOP/RUN control input to turn off the drive output when coming to a stop, I assume this is the same as “Free-Wheel” stop. I only want to use “Free-Wheel” stop when I use the mechanical brake. That way I can recover some energy back into the battery when slowing down before I put the brake on. The problem is under typical driving conditions one puts on the mechanical brake several times, like when someone slows quickly in front of you. Under this condition you don’t come to full stop and you want to go again. My issue is I have not found a configuration of functions where the motor smoothly recover to free wheeling motor rpm so I can reaccelerate. I think getting the “Flying Start” function to work is my last hope. I have not played extensity with the gain and integral setting provided for this function, but initial attempts did not seem to help. I have done my best to ensure the DC brake function and the like are off. But suggest anything that comes to your mind because again I am no expert either and I could have over looked something.


The Mini has what I think is a HALL position sensor on the throttle peddle that takes 5 volts and puts out a voltage proportional to the position. I added a regulator to the Benshaw sensor supply to provide 5 volts and ground and feed the signal into the A/D input and programmed the speed command to use the A/D channel and not key pad input. Then used program functions to set gain and offset to get full frequency range. 


PS. 
If you have an interest or think your High School would be interested in starting a Solar Car project go to this link http://www.winstonsolar.org/challenge/photos/2003/Day1/Originals/day1_12.jpg This was the last car we raced. The process to raise funds, plan, build and then race a car against your peers is a great learning experience for kids. Our car was called Solar Stealth. We raced 1997 to 2003.


----------



## etischer (Jun 16, 2008)

This is how I have my inverter programmed:

Foot off throttle: Speed set point = 0 rpm
Foot on throttle: Speed set point = 8500 rpm 
accel & decel ramp = 0.1 seconds

Throttle position 0->100% = Torque set point 0->150% 

Even though the speed set point is 8500 rpm, you are limiting torque, so the motor will only spin as fast as the torque demanded will allow it to spin. (you may need to disable speed error alarms)

If you want a bit of regen drag when off the throttle then 
Throttle position 0->100% = Torque set point -10% -> 150%

When I hit the brake pedal, Torque set point goes to -50% 

When braking, once battery voltage reaches 350 volts, for every volt above 350, I reduce regen torque limit by 5%. This gracefully prevents the bus voltage from going too high. 

When I was running v/hz mode, I too tried to catch a spinning motor. On my inverter it was called "fly catching". I couldn't ever get it to work properly. I also tried ramping stop instead of coasting stop. I kept a speed pot on my lap to control the speed of the car. The major down side is the inverter wants to follow a ramp down which may significantly increase your stopping distance, and if you ramp down too fast you will either over current, over voltage, or loose synch and start bucking. 

You really need to get torque control working to make the car drivable. Older drives may have a torque control mode, but often times at low rpm it is still using v/hz mode with dc boost. Does your inverter have an auto tune?


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Wow, not sure how I missed this thread. You have accomplished alot in 9 months, and thanks for posting.
> 
> Sounds like you are going through the same learning process I went though with my conversion. I too started out in a v/hz speed mode. Is your inverter capable of Sensorless vector?


 
Thanks !! As you see I relied heavily on your coupler concept. And would be nowhere as far along without that prior knowledge. 

I hoped you might see post and provide some insight into this VFD issue. Although, somewhere I got the impression your base control unit might have a commanded torque output mode. Dead End Kid is correct. The Benshaw drive I have is sensorless vector control type. It has ability to run V/F mode. I never tried running in V/F mode in the 100 HP drive because my initial attempts running the motor using the lower HP drive never were as good as vector control. I think its partly because I did not know what V/F ratio to program in and the vector control took care of that for me.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> This is how I have my inverter programmed:
> 
> Foot off throttle: Speed set point = 0 rpm
> Foot on throttle: Speed set point = 8500 rpm
> ...


 
The drive I have does not have a torque command mode from what I can determine. I have read about drives that do like the Allen Bradly enhanced 70EC version that has it and the Standard non-EC does not. 

These are the only control mode settings I have. The commanded input only sets a speed target for these modes.



0 V/F 
1 Slip compensation 
2 Sensorless vector control speed operation 


Does your drive's firmware have a specific control mode called torque control mode where the set point can be torque and not speed? By your discription above sounds like yours might have a speed set with independent torque limit control setting? 


The drive I have has auto tune and I have used it.


----------



## etischer (Jun 16, 2008)

My inverter has a speed set point, and also a torque set point. 

Torque is directly related to Slip speed. 

Slip speed = Commanded speed - Actual speed. 

If speed control is your only option, you could possibly get a torque control mode working with some external controls. 

I wonder if the siemens motor could be re-configured for 460v operation. This would match it better to your 100hp inverter. I know there are other Siemens motors in this size that are 460v, it may not take much to switch the voltage.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> My inverter has a speed set point, and also a torque set point.
> 
> Torque is directly related to Slip speed.
> 
> ...


I have thought about trying to use the drive’s “external the PID” loop to attempt to control torque by using a current sensor feedback to control speed/slip. Then I thought, better to just go buy a low cost drive with torque control features similar to what you did and perform a lobotomy on the drive. It seems they are not that easy to find at a reasonable price.

We need a low hp AC drive for future use to drive the Prius electric AC compressor we purchased. So I have been keeping watch for a cheap one. Saw a newer Allen Bradley 3hp PowerFlex 70 come up on eBay. I checked the manual on line before bidding and it implied it had torque control so I took a chance and got it. I should have read the fine print in the foot notes. As it turned out that feature is only available for the “enhanced EC” version. I found on the AB forum one response from AB that said the model 70 requires additional hardware and cannot be flashed to get the new enhanced features. I was lucky, I only paid $50 for it and it works fine just no torque set mode. I am still hopeful I can use for Prius compressor, but according to some things I read about the Prius compressor implied you need more like a 5 hp. Someday in the distant future we will find out. 

Not sure about rewiring the motor for higher voltage. Unless it is tapped internally for that, and I am no expert here, it would require a total rewind which I would guess in very costly unless you DIY. Also I never was able to get a good answer on the dielectric rating on the motor windings. I have read enough articles on the dielectric breakdown in pulsed motors to be very concerned about it. With the wrong kind of wire, the time to punch through decreases rapidly from years to days to hours as the voltage goes up. Output filters can be added to cut down on the really high voltage spikes, but I would guess impractical to filter all the way back to a nice voltage sine wave. So the windings see nearly the full switched line voltage under all operating conditions. 

I could be wrong here, but I think under vector control, the voltage is not a key factor except for the resulting pulse width to get the current wave to satisfy the speed/torque loop. So I think the input voltage sense alteration we did to the drive is not a factor. Except I have concerns the modification might effect the auto tune function. The magnetizing current it defaulted to based on hp also looked way to high so we took a guess and set lower – I don’t recall the value 17A ? I don’t think this initial value matters that much in vector control mode. There is indication that the Benshaw drive is monitoring the output voltage. I hope it is using that for auto tune. I thought I wrote them down, I think they were around 50 milliohms and 900 microhenry. How do these compare to your measured values? I just realized you probably were suggesting the rewire so I would have more power because of my lower currents. Right now the car seems have enough hp for my planned drive to and from work. I would like to upgrade in the future.

I have been reading and researching components and I am almost convinced I might have enough skill to attempt to marry one of the many available micro controllers out there with there available source code to the power section we have. Then we would have full control to do what we might need to expand box to box communications and replace the power section in the future. But I am not so naïve to think this would be easy because I have limited experience programming/modifying code and other time demands, and my youngest son recently started full time employment. In fact, although it’s Saturday, I should be working on my direct reports performance summaries right now - don’t tell my boss.


----------



## etischer (Jun 16, 2008)

The auto tune numbers won't mean anything from my inverter cause the inverter still thinks a 2hp motor is connected. 

My magnetizing current is 105A. Typically this is some fraction of FLA. Magnetizing current is flowing though the motor windings, and though the IGBT's (via fly back diode) and isn't used for producing torque. Since Mag is mostly circulating, it doesn't take much battery current to keep it going. Was your 17A from the battery, or at the motor?


----------



## zaxxon (Jul 11, 2009)

etischer said:


> The auto tune numbers won't mean anything from my inverter cause the inverter still thinks a 2hp motor is connected.
> 
> My magnetizing current is 105A. Typically this is some fraction of FLA. Magnetizing current is flowing though the motor windings, and though the IGBT's (via fly back diode) and isn't used for producing torque. Since Mag is mostly circulating, it doesn't take much battery current to keep it going. Was your 17A from the battery, or at the motor?


*The value is the displayed drive output current. What I recall, the value I programmed into the “Noload – Curr” on the 100 hp drive matched with the displayed output current shown when motor was put in Run. The 100 hp unit set a default value based on the motor hp entered. I don’t recall the number it placed, but it was much higher than the actual no load current we saw when running with the lower hp vector control drive. So I used the lower value since I want to use as little power as possible.*

*I found instructions below pulled this from a Siemens MicroMaster Manual. *Until I remove the motor again, I can only run transmission in neutral which is probably good enough. Its cold now so maybe this spring. It would be interesting to see how your neutral output current compares to the lower value or 100 amps at low speed. I guess one would need to lower the programmed value first and then run motor. The procedure does not say that. 

*Siemens MicroMaster Manual says:*
In order to determine the magnetizing current (P0320/r0331), the motor should
be accelerated *up to approximately 80% *of its rated speed *under no-load*
*operating conditions*.
In so doing, the following conditions must be carefully maintained:
− the vector control must be activated, P1300 = 20.21
− no field weakening (r0056.8 = 0)
− flux setpoint, r1598 = 100 %
− no efficiency optimization, P1580 = 0 %
*No-load operation means that the motor is operated without a load (i.e.*
*no coupled driven machine).*
Under steady-state conditions, a current r0027 (Act. current) is obtained that approximately corresponds to the rated magnetizing current r0331. (the current is always less than the no-load current for a pure V/f control).


----------



## Jimiev (Mar 6, 2010)

Thanks for sharing Zaxxon. Great progress and tidy engine bay. Where or who made the adaptor for the motor to gearbox?


----------



## Jimiev (Mar 6, 2010)

Sorry Zax, I've read the whole thread now and I see you manufactured it yourself. I'm new to these forums and has taken me a hour to figure it out.


----------



## zaxxon (Jul 11, 2009)

I thought you may not have looked at all the pages yet. My oldest son had bought the lathe at an action a few years back. I thought it would be a good project for us to learn how to use it.


----------



## etischer (Jun 16, 2008)

Any updates Zax?


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Any updates Zax?


Thanks for asking. Not much to report. I am still looking at options to build a drive with a microcontroller kit while keeping a look out for a used drive with torque control and other parts. 

It’s been a struggle to find a good combination of IGBT configurations and the needed driver circuits at an affordable cost and reasonable lead time. I bought some ebay 400A 600V dual IGBT PRX CM400DU-12F for $48 each recently to build an output stage. I should have researched them more first. Learned F type require a special driver circuit to work with the internal current sensor drive clamp. Also these are no longer recommended for new designs. It’s been difficult to find the required/desired drivers actually in stock. Told 26 wk lead time. Ordered from one company who claimed they had, turned out they only had four, and said their techs had pulled others, but did not record. Found more, they required a minimum buy of five which is all they had. 

Recently got quotes for liquid cooled cold plates. Looks like I will have to pay $350. Thought I should be able to get for under $250.

Also been trying hard to locate a sealed or shielded hybrid (ceramic balls) or insulated bearings for the motor. I am learning the hybrid bearings in this size are rare and are very expensive. Found the sealed bearings are limited to 5000 rpm. We still need to pull the motor out and replace the original bearings. Looked like you bought the higher speed shielded bearings. Do you know if the original were ceramic or insulated to prevent circulating currents? 

Saw where you installed your new batteries. Looked good.


----------



## etischer (Jun 16, 2008)

This is the chill plate I'm using from mcmastercarr.com
35035K32
Cold Plate 6" X 3-1/2" X 1/2" Surface Size, Copper Tube
In stock at $54.66 Each


For IGBT's I'm using a PowerEx IPM (intelligent power module). It has seven IGBTs, signal drivers and over current protection built in. I've never had an issue with these not being in stock. 

Im using standard ball bearings, I don't see any reason to go with an electrically isolated bearing. The original set of bearings were metal. 





zaxxon said:


> Thanks for asking. Not much to report. I am still looking at options to build a drive with a microcontroller kit while keeping a look out for a used drive with torque control and other parts.
> 
> It’s been a struggle to find a good combination of IGBT configurations and the needed driver circuits at an affordable cost and reasonable lead time. I bought some ebay 400A 600V dual IGBT PRX CM400DU-12F for $48 each recently to build an output stage. I should have researched them more first. Learned F type require a special driver circuit to work with the internal current sensor drive clamp. Also these are no longer recommended for new designs. It’s been difficult to find the required/desired drivers actually in stock. Told 26 wk lead time. Ordered from one company who claimed they had, turned out they only had four, and said their techs had pulled others, but did not record. Found more, they required a minimum buy of five which is all they had.
> 
> ...


----------



## zaxxon (Jul 11, 2009)

etischer said:


> This is the chill plate I'm using from mcmastercarr.com
> 35035K32
> Cold Plate 6" X 3-1/2" X 1/2" Surface Size, Copper Tube
> In stock at $54.66 Each
> ...


I needed a wider plate for the IGBT modules I purchased. The $350 quote came from MSC for a similar but non-stocked 12” x 5” four pass. Its hard to understand why it costs so much more. Thinking about using two lower cost ones, but its not a clean approach. 

I looked at the PM300RL1A060 and BP7B-LB driver. Total cost was about $650. At the time the price seemed out of my reach. Given more experience now I am thinking the price was not so bad. The other problem, there was an 88 day lead time for BP7B-LB driver interface card. 

If both the originals bearings were not insulated, now I am thinking I should go with the standard bearing also because the cost is too high for the hybrid one.


----------



## DawidvC (Feb 14, 2010)

Zaxxon

Sorry to but in to this conversation, but I was led here from another thread.



zaxxon said:


> Also been trying hard to locate a sealed or shielded hybrid (ceramic balls) or insulated bearings for the motor. I am learning the hybrid bearings in this size are rare and are very expensive. Found the sealed bearings are limited to 5000 rpm. We still need to pull the motor out and replace the original bearings. Looked like you bought the higher speed shielded bearings. Do you know if the original were ceramic or insulated to prevent circulating currents?


The only reason isolated (shielded or hybrid) bearings are used is due to circulating ground current. This will need to be addressed in sensitive applications. Usually just following recommended wiring practice for motors and drives eliminate the currents to such a degree that bearing livetimes in excess of ten yaers in 24/7 inverter applications is normal. In EV use, you would probably replace the motor long before bearing pitting ( the result of the currents ) will become a problem.

Regards
Dawid


----------



## zaxxon (Jul 11, 2009)

DawidvC said:


> Zaxxon
> 
> Sorry to but in to this conversation, but I was led here from another thread.
> 
> ...


Dawid, 

I got the impression from this paper and some others that circulating currents also occur internal to the motor due to VFD high voltage pulse voltages/magnetic field imbalance and it was something to be concerned about. It’s good to hear this is not likely a concern in a typical use EV application. 

http://www.mapro.skf.com/new_products/TKED1/whitepaper/SKF_WhitePaper_EDD.pdf


----------



## DawidvC (Feb 14, 2010)

Zaxxon, if you get it wrong, it can bite you in the tail. However, I have been working with industrial drives for more than 20 years, and I have only one motor that had problems with pitting in the bearings. Replaced the bearings, cables and fixed the earthing. I think we had to pull the motor last year because the bearings were shot because they put cheapies in the motor - it pull a flywheel in an 700 ton press, about 120kw - and they collapsed due to the sideload. Hopefully, decent (normal, heavyduty) bearings has cured it. Long cable lengths are a significantly bigger problem in industry, and also contribute to the problem of circulating current, but *NO* Ev is going to see 100 feet of cable .

This is also one of those problems that has slowly disappeared as technology matured, so unless you wish to used 20+ year old technology, it is not really a concern.

Regards
Dawid


----------



## fugdabug (Jul 14, 2008)

Wow! an AC system and some seriously smart design!
That is absolutely beautiful! And I do mean beautiful!
Prius packs... hmmm... that is totally do-able!


----------



## zaxxon (Jul 11, 2009)

fugdabug said:


> Wow! an AC system and some seriously smart design!
> That is absolutely beautiful! And I do mean beautiful!
> Prius packs... hmmm... that is totally do-able!


Thanks !! I don’t have long term experience with the Prius batteries yet. Given we got the batteries from three eBay locations and the batteries were built different years. And after crudely charging and running a couple of times and sitting without charge over the winter outside, that the two disconnected series packs measure within 0.5 volts says allot for their quality.


----------



## rmarotta (Aug 27, 2010)

Any progress on your AC drive yet?
Regards


----------



## zaxxon (Jul 11, 2009)

rmarotta said:


> Any progress on your AC drive yet?
> Regards


Unfortunately not allot of real useful progress. Investigated a Mircohip processor driving a Prius Inverter power stage. Was able to drive the Mini a couple of blocks in open-loop v/f and not as far in sensorless closed-loop. Can't get up my driveway. The closed-loop vector control has proven very difficult given the Microchip application note documentation and my limited software and microcode knowledge. Things are just not working the way they should. Lot of current going in, not much torque coming out. There are several unknowns which could be the root cause, but I am close to concluding the major problem is that the Prius Inverter maximum output current (~200 amp peak per phase) is just not enough to effectively move and accelerate the car without hitting the current limit. On the other hand I also can’t seem to get a reasonable high current waveform shape at low frequencies which may be the problem. I started playing with the Prius inverter because it had everything I was looking for: motor inverter, nice compact package and water cooled. It also has inverter for air conditioner and a dc to dc converter all in same package if I could just get these all to operate.


----------



## ellweber (Jun 3, 2009)

Hi Zaxxon,

I just discovered this thread and I am impressed by how much you have accomplished. I too have one of the Siemens/Ford motors and am slooooowly converting a Mazda Miata. The other area of common interest regards the user of a Prius A/C compressor.

I have succeeded in getting my compressor to run at part speed by adapting a TI/Luminary Micro BLDC development board. These board are available for $100-150, I paid more because I bought the development kit about a year ago.

http://www.luminarymicro.com/products/mdl_bldc.html

To this point I have only modified the software for the TI board and I have the compressor running at a maximum of ~2500 rpm. The limitation is caused by the back EMF, of the compressor’s motor at this speed, as it approaches the maximum voltage limit for the board. I am actually pushing the board to 48 vdc after studying the individual component’s absolute maximum ratings.

I plan to graft on a higher voltage output stage if the A/C cooling output proves to be inadequate. I have the compressor fully plumbed into the Miata and get abundant cold air. Since the Miata’s passenger compartment is so small I may be ok as-is. I can produce about 30 degree F temperature drop below ambient at the cold air output ducts.

The software mods are primarily related to controlling the motor drive and interfacing to the signals from the Miata. I have also spent some time (mostly trial and error) setting the drives parameters to work with the compressor’s motor. The sample code from TI is a decent starting point but I had to eventually get a compiler running to get it to do what I wanted.

If any of this would be helpful to you I am glad to share what I have.

Lynn


----------



## efan (Aug 27, 2009)

this is some impressive work, 
and since I am not really good with electronics I taught I would participate by bringing up this link:

http://www.youtube.com/user/tesla500#p/u/10/MaWrr5xQu7Y

the creator of the video seems to be quite knowledgeable


----------



## zaxxon (Jul 11, 2009)

ellweber said:


> Hi Zaxxon,
> 
> I just discovered this thread and I am impressed by how much you have accomplished. I too have one of the Siemens/Ford motors and am slooooowly converting a Mazda Miata. The other area of common interest regards the user of a Prius A/C compressor.
> 
> Lynn


Thanks for the offer. I have a 2HP Industrial controller I was planning to adapt to run off the main battery pack. My battery pack is only 13 AH so until I can upgrade, I will be without air conditioning and power steering. 

Did you go with a commercial controller for the Ford motor? Or is that an open item for you too?


----------



## zaxxon (Jul 11, 2009)

efan said:


> this is some impressive work,
> and since I am not really good with electronics I taught I would participate by bringing up this link:
> 
> http://www.youtube.com/user/tesla500#p/u/10/MaWrr5xQu7Y
> ...


Thanks for the video link. Its always nice to see the different approaches taken.


----------



## ellweber (Jun 3, 2009)

zaxxon said:


> Thanks for the offer. I have a 2HP Industrial controller I was planning to adapt to run off the main battery pack. My battery pack is only 13 AH so until I can upgrade, I will be without air conditioning and power steering.


I have a Leeson Speedmaster 2 hp VFD. I tried to tune it to work with the Prius compressor's BLDC motor but was not successful. I could get it to rotate but haltingly and it would only run a few hundred RPM. This VFD does not have any autotune capability and I am not very familiar with motors and drives so I went the other direction. 



zaxxon said:


> Did you go with a commercial controller for the Ford motor? Or is that an open item for you too?


I have a couple of old Solectria UMOC440 inverters that I plan to use initially. They seem to be able to control the moter quite well with no load, regen included. In my case I am going to use direct drive with a coupler somewhat like Eric's but attached to a stub transmission output shaft.


----------



## zaxxon (Jul 11, 2009)

ellweber said:


> I have a Leeson Speedmaster 2 hp VFD. I tried to tune it to work with the Prius compressor's BLDC motor but was not successful. I could get it to rotate but haltingly and it would only run a few hundred RPM. This VFD does not have any autotune capability and I am not very familiar with motors and drives so I went the other direction.
> 
> 
> 
> I have a couple of old Solectria UMOC440 inverters that I plan to use initially. They seem to be able to control the moter quite well with no load, regen included. In my case I am going to use direct drive with a coupler somewhat like Eric's but attached to a stub transmission output shaft.


I think the AB PowerFlex 70 I have has an autotune feature. If not I probably will need help. Since I have the Microchip development Tool I probably would do something with it. I looked at TI and Freescall Tools but I had purchased the Microchip stuff three years back to learn about microchips, but never got a chance to try to use it until now. 

The Solectria UMOC440 is a nice controller. I will be interested to see how well it works. My older son, who has a Solectria S10, has suggested I should buy one.


----------



## ellweber (Jun 3, 2009)

zaxxon said:


> I think the AB PowerFlex 70 I have has an autotune feature. If not I probably will need help. Since I have the Microchip development Tool I probably would do something with it. I looked at TI and Freescall Tools but I had purchased the Microchip stuff three years back to learn about microchips, but never got a chance to try to use it until now.
> 
> The Solectria UMOC440 is a nice controller. I will be interested to see how well it works. My older son, who has a Solectria S10, has suggested I should buy one.


I will be interested to hear how your tuning goes, well I hope! If you want to pursue the alternate path I would be happy to share what I have done (S/W, parameters etc.) with you at any time. I am really pleased with the TI board, it is small, uses little power and seems to be stable. Unfortunately I have another set of Vicor DC-DC converters needed to power it from the traction battery.


----------



## zaxxon (Jul 11, 2009)

Given the recent discussions on the use of Prius Inverter, I said I would put up some pictures on my efforts. 

Removed the link capacitor to see the driver circuit and replaced it with a smaller cap (blue) and hooked 36 volts across it. Using the setup below, hooked 12 volts between connector labels IGCT and GINV to power up the control logic and IGBT isolated drivers. Determined a low input on the Motor phase control signals (MWU, MVU, MUU) turned on the upper IGBT and a high signal turned on the low side IGBT. The control lines are pulled up to 12 volts. The switch point going low is around 6.8 volts and going high is 8 volts.



Some initial testing with the microchip development board.


Removed the Boost converter components to make room for the future control circuits.

 

Cleaned out heat sink compound and put link cap back in. Also put back the original harness to the inverter control board once I determined that I could alter one of the Prius Battery connectors and use it to bring out the connections I needed.


Made up harness to connect to the Microchip board, bottom of picture, and install inverter unit in car.


Using external current sensors that are centered at 2.5 volts which make it easier to interface to the microchip board. Planning to use the inverter's built-in current sensor which are centerd at zero and go plus and minus voltage in the future. One of the recent issues was that the external current sensors were saturating at 200 amps messing up the current loops. 

In November charged up the batteries to try out higher current sensors. Was able to set higher control currents, but still have signifcant control issues just before coming to a stop and still requires too much magnetization current to move the car resulting in Prius inverter overcurrent trips.


----------



## jddcircuit (Mar 18, 2010)

Thanks for sharing the prius inverter experience.

I haven't bought batteries yet nor a charger. Do you think that the boost circuit you removed from the inverter and the MG1 current sensors that are not used possibly make a good battery charging solution? I am picturing reversing the boost circuit input and output wiring so it could be modulated to boost the line voltage higher than the battery voltage and use the current sensor to control a charging profile.

I need to learn more about battery charging in general but I was thinking this would be a nice use of all the components and still take advantage of the prius cooling plate. I am always thinking of ways to save money and this looks like a possible way.

I am going to try something like this using the MG1 switches since I don't have a boost circuit on my inverter. You may have more luck with it. Let me know if you think this would work or if you are going to try it.

Thanks
jeff


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Thanks for sharing the prius inverter experience.
> 
> I haven't bought batteries yet nor a charger. Do you think that the boost circuit you removed from the inverter and the MG1 current sensors that are not used possibly make a good battery charging solution? I am picturing reversing the boost circuit input and output wiring so it could be modulated to boost the line voltage higher than the battery voltage and use the current sensor to control a charging profile.
> 
> ...


For now planning to modify a Vicor Power Supply for the battery charger unless I run across a much lower cost charger. It would be nice to use the second inverter stage for something. It seems it should be possible to use it along with some inductors and control circuits to build an AC to DC boost converter.

I am not sure I follow why you suggested reversing the input and output of the boost circuit. If it’s an ordinary boost converter (might be bi-directional buck-boost), I think one could use it as wired by supplying rectified and filtered 110 VAC at the battery input terminals and the battery hooked on the inverter stage side.


----------



## zaxxon (Jul 11, 2009)

zaxxon said:


> I am not sure I follow why you suggested reversing the input and output of the boost circuit. If it’s an ordinary boost converter (might be bi-directional buck-boost), I think one could use it as wired by supplying rectified and filtered 110 VAC at the battery input terminals and the battery hooked on the inverter stage side.


Update -- I feel dumb, what I described here is basically flipping the converter like you stated. 

Also did some reading, and the Prius is using a buck-boost configuration. http://inspire.ornl.gov/Document/View/f38948a5-d6a2-4f80-8cc9-34b77e3862a3?q=prius boost converter


----------



## etischer (Jun 16, 2008)

zaxxon said:


> In November charged up the batteries to try out higher current sensors. Was able to set higher control currents, but still have signifcant control issues just before coming to a stop and still requires too much magnetization current to move the car resulting in Prius inverter overcurrent trips.


You might be trying to run 0 hz (DC) into the motor at zero speed. You might try skipping over frequencies between 0 to 1 hz. 

Some inverters by default run DC injection braking to stop the motor, one thing in the configuration to double check. 

Have you tried disabling regen to see if it helps your "coming to a stop" control issue? 

Are you running an encoder?

Glad to see you're still at it, impressive work getting the Prius inverter working.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> You might be trying to run 0 hz (DC) into the motor at zero speed. You might try skipping over frequencies between 0 to 1 hz.
> 
> Some inverters by default run DC injection braking to stop the motor, one thing in the configuration to double check.
> 
> ...


Your correct, there is a zero Hz DC bias application happening. Seems sometimes its there near the stop and remains after stop and sometimes not. It could be some kind of brake algorithm. It not obvious it has one though. Have not been able to nail down the pattern. Guessing that it is some residual current command from the last PID calculation when the sensorless control looses its sync or something. I am not running an encoder. 

It gets worse at the higher magnetization levels (160A peak) needed to move the car. The last run down the driveway, when the acceleration felt good and I could pull up the slight incline into the garage without tripping the current limit, it was like throwing a car into park. My son said the tire just stopped and was sliding. I am worried I am going to break some mechanical drive components. It’s been getting lots of abuse. I have visions of twisted things like Jack R. 

I have not had much time to investigate. On my last attempt before it got too cold. For some reason I could not duplicate the movement of the car at the higher magnetization currents again. It might have been the cold batteries or I finally damaged something. 

I have been looking through the code. At one time I thought there was some parameter whose name gave me the impression it had something to do with the rpm it enabled the sensorless control. I have not been able to find again. May have been in some other code I was looking through. Given my limited microcode knowledge (and level of detailed documentation), it’s not clear to me how it starts the motor moving and transitions to closed-loop vector control. And I have not located a term that says below this RPM turn off the current. I am sure its there somewhere. If not, I am not sure I have the skill to add it correctly.

If the earlier sensored application code available was compatible out of the box with the 64 tooth encoder I would try it. It’s been awhile since I did it, but using their calculator said the minimum I could use was 150 and they recommend not to use under 250. I assume it has to do with the interrupt rate and required position resolution to maintain stable control. 

Plan is to learn how to use the real-time monitor interface software and get a portable storage scope by Spring, so I can verify without a doubt that the Prius inverter current limit trips first and its not the controller control loop actually dropping out.


----------



## etischer (Jun 16, 2008)

I'm working on installing an encoder on my Ford/Siemens motor. The bearings in most encoders are speed limited to about 4000 rpm, so I had to have some custom parts made. I should have the last piece from the machine shop this week. 

My inverter needs at least 200PPR. I've never run with encoder feedback so I'm curious to see if there are any improvements to be made. 

As an alternative to adding a 250ppr encoder, there is a company that sells a frequency multiplier for encoders. I wasn't sure how well this would work for speed feedback, it seems the application is more for totalizing footage but you might check them out. 
http://www.motrona.com/encoder_divider.html I was worried it might fire off a burst of pulses, keeping the pulse count accurate, but the pulses might not be evenly spaced. 

Of course if you're interested I can have another encoder made up in 250ppr to fit your motor

My first prototype inverter had sensorless vector mode, but at low speed it defaulted to v/hz. My second inverter uses "MRAS sensorless vector" technology. It still estimates motor speed at low rpm, but it has some adaptive learning algorithm which gives a huge improvement over my original prototype. I can climb my driveway in 3rd gear =)





zaxxon said:


> If the earlier sensored application code available was compatible out of the box with the 64 tooth encoder I would try it. It’s been awhile since I did it, but using their calculator said the minimum I could use was 150 and they recommend not to use under 250. I assume it has to do with the interrupt rate and required position resolution to maintain stable control.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> I'm working on installing an encoder on my Ford/Siemens motor. The bearings in most encoders are speed limited to about 4000 rpm, so I had to have some custom parts made. I should have the last piece from the machine shop this week.
> 
> My inverter needs at least 200PPR. I've never run with encoder feedback so I'm curious to see if there are any improvements to be made.
> 
> ...


I double checked the application note and it says: “An encoder of at least 250 lines per revolution should be used. The upper limit would be 32,768 lines per revolution”. The actual demo setup used a 500 ppr encoder. 

I am interested in your generous offer to have a 250 ppr (or more) tonewheel made especially if it would help you offset your costs. Is your design basically similar to the current tonewheel with more teeth and a different pick-up mounting? What kind of dollars are we talking about? Send me a private message to discuss further if you like.


----------



## etischer (Jun 16, 2008)

The limitation on PPR would be the upper frequency your encoder card can handle, my card is limited to 250khz. I chose 200 lines to keep the frequency low since I have a long cable run, and optically 200 lines is a bit less prone to dust and dirt compared to 2000. 

I'll pm you



zaxxon said:


> I double checked the application note and it says: “An encoder of at least 250 lines per revolution should be used. The upper limit would be 32,768 lines per revolution”. The actual demo setup used a 500 ppr encoder.
> 
> I am interested in your generous offer to have a 250 ppr (or more) tonewheel made especially if it would help you offset your costs. Is your design basically similar to the current tonewheel with more teeth and a different pick-up mounting? What kind of dollars are we talking about? Send me a private message to discuss further if you like.


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> Update -- I feel dumb, what I described here is basically flipping the converter like you stated.
> 
> Also did some reading, and the Prius is using a buck-boost configuration. http://inspire.ornl.gov/Document/View/f38948a5-d6a2-4f80-8cc9-34b77e3862a3?q=prius boost converter


I think that this might work. Let me know if you start to experiment with it.

I have another question about the Prius inverter. I have a gen 1 not a gen 2 but they seem similar in a lot of ways so far. On the bottom side of my cooling plate appears to be a DC to DC converter that would supply 12V output. It has a four wire connector that looks like control lines. Do you have any ideas on what these control signals might be to get it to turn on supply 12V? I want to use this to run my accessories.


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> I think that this might work. Let me know if you start to experiment with it.
> 
> I have another question about the Prius inverter. I have a gen 1 not a gen 2 but they seem similar in a lot of ways so far. On the bottom side of my cooling plate appears to be a DC to DC converter that would supply 12V output. It has a four wire connector that looks like control lines. Do you have any ideas on what these control signals might be to get it to turn on supply 12V? I want to use this to run my accessories.


 
I have not investigated the DC to DC converter on the back side other than looking at the pictures in the orln.gov. document. I want to use this DC to DC and AC Compressor Inverter in the future if I can get both to work. I plan to buy a second unit to experiment with, but have not found another at a price I am ready to pay. 

Does the Gen I have the 3-phase AC Compressor drive like the Gen II? On the Gen II that I have, there are two six pin connectors besides the 3-phase AC Compressor and single large pin DC to DC output connector. The one with five wires is near the DC-DC output connector. It could be for some remote battery voltage and temperature sensing and safety interlock enable network. 

I disconnected the power to the back side when I powered the HV side. So mine has not been powered since it was removed from its car. I was hoping the DC to DC just required the HV input and a load to work. If you have the HV hooked to its input and it did put out a voltage or current it could be like my car battery charger and not output current unless it sees a reasonable battery voltage at its terminals. 

If I pull the unit out of the car or get a second unit I will investigate and let you know what I find.


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> I have not investigated the DC to DC converter on the back side other than looking at the pictures in the orln.gov. document. I want to use this DC to DC and AC Compressor Inverter in the future if I can get both to work. I plan to buy a second unit to experiment with, but have not found another at a price I am ready to pay.
> 
> Does the Gen I have the 3-phase AC Compressor drive like the Gen II? On the Gen II that I have, there are two six pin connectors besides the 3-phase AC Compressor and single large pin DC to DC output connector. The one with five wires is near the DC-DC output connector. It could be for some remote battery voltage and temperature sensing and safety interlock enable network.
> 
> ...


 
I have it connected to the battery power but no voltage output like I was hoping for. I wasn't sure if because my battery voltage is too low or if there was an enable signal that I needed to bring active.

I must not have the extra inverter for the AC compressor on the gen 1 like on the gen 2. There are just not enough wires coming out.

Thanks
Jeff


----------



## nimblemotors (Oct 1, 2010)

I will try it with my GenI inverter and see if it works.
Yes, the GenI does not have the electric A/C compressor that is used in the GenII. 



jddcircuit said:


> I have it connected to the battery power but no voltage output like I was hoping for. I wasn't sure if because my battery voltage is too low or if there was an enable signal that I needed to bring active.
> 
> I must not have the extra inverter for the AC compressor on the gen 1 like on the gen 2. There are just not enough wires coming out.
> 
> ...


----------



## etischer (Jun 16, 2008)

Here are pics of the encoder kit I'm putting together.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Here are pics of the encoder kit I'm putting together.


Looks good !! Sign me up if you decide to make additional units. 

When do you think you will get to try it out with your controller?


----------



## etischer (Jun 16, 2008)

Will probably have to wait till next weekend, but I am excited to try it out for sure! 



zaxxon said:


> Looks good !! Sign me up if you decide to make additional units.
> 
> When do you think you will get to try it out with your controller?


----------



## etischer (Jun 16, 2008)

Got my encoder mounted today. 

I decided to ditch the plastic cover for the encoder, there would be no way to remove it once it is snapped on. I also have a big plate that covers the entire rear of the motor, so everything is practically submersible. 










Switching to closed loop mode yielded less acceleration off the line, but it was super smooth, especially noticeable when climbing hills. I started tweeking some tuning parameters and was able to make some quick improvements. For now I reverted back to sensorless vector. I was able to pull 305A at about 6000 rpm, much more than I have been able to do before. I have a 300A semiconductor fuse, so I have to be careful how close I push things!


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Got my encoder mounted today.
> 
> Switching to closed loop mode yielded less acceleration off the line, but it was super smooth, especially noticeable when climbing hills. I started tweeking some tuning parameters and was able to make some quick improvements. For now I reverted back to sensorless vector. I was able to pull 305A at about 6000 rpm, much more than I have been able to do before. I have a 300A semiconductor fuse, so I have to be careful how close I push things!


I feel bad. I somehow did not see this post until just now. 

So with encoder it was smoother but did not improve torque off the line. This may confirm my concern that an encoder my not help my low speed, high current, low torque issue. Seems although the encoder gives a more accurate indication of the rotor speed, it does not significantly improve the rotor torque flux angle estimation at low speed. 

Have you had time to investigate further?


----------



## etischer (Jun 16, 2008)

I've only spent 5 minutes playing with the drive in closed loop. I did crank up the current limit and was pulling some impressive numbers. My semiconductor fuse is rated 300A and I was pegging my 300A ammeter, I decided to call it quits before I left myself stranded. At the higher rpm range, around 6000rpm the current was a bit unstable. I'm sure it's a tuning issue, or possibly noise. The car runs really well in sensorless vector, so I'm seriously debating if it's worth investing a ton of time tuning the drive in closed loop. It sure would be sweet once it's working but it is nice to have finally worked all the bugs out. Too bad I hadn't installed the encoder a year ago!





zaxxon said:


> I feel bad. I somehow did not see this post until just now.
> 
> So with encoder it was smoother but did not improve torque off the line. This may confirm my concern that an encoder my not help my low speed, high current, low torque issue. Seems although the encoder gives a more accurate indication of the rotor speed, it does not significantly improve the rotor torque flux angle estimation at low speed.
> 
> Have you had time to investigate further?


----------



## DIYguy (Sep 18, 2008)

etischer said:


> I've only spent 5 minutes playing with the drive in closed loop. I did crank up the current limit and was pulling some impressive numbers. My semiconductor fuse is rated 300A and I was pegging my 300A ammeter, I decided to call it quits before I left myself stranded. At the higher rpm range, around 6000rpm the current was a bit unstable. I'm sure it's a tuning issue, or possibly noise. The car runs really well in sensorless vector, so I'm seriously debating if it's worth investing a ton of time tuning the drive in closed loop. It sure would be sweet once it's working but it is nice to have finally worked all the bugs out. Too bad I hadn't installed the encoder a year ago!


Hey Eric,
Depending on the exact type of fuse...that 300 amp one should be able to tolerate much higher numbers for short time periods. Perhaps double that.... I would think...yes/no? Giver!


----------



## zaxxon (Jul 11, 2009)

etischer said:


> I've only spent 5 minutes playing with the drive in closed loop. I did crank up the current limit and was pulling some impressive numbers. My semiconductor fuse is rated 300A and I was pegging my 300A ammeter, I decided to call it quits before I left myself stranded. At the higher rpm range, around 6000rpm the current was a bit unstable. I'm sure it's a tuning issue, or possibly noise. The car runs really well in sensorless vector, so I'm seriously debating if it's worth investing a ton of time tuning the drive in closed loop. It sure would be sweet once it's working but it is nice to have finally worked all the bugs out. Too bad I hadn't installed the encoder a year ago!


Not sure I fully understand the context of your last statement. Are you saying you feel the sensorless vector control works the best and that you wish you would have installed the encoder a year ago so you would have known that fact sooner? Or you’re just glad you can check this off your check list?


----------



## etischer (Jun 16, 2008)

DIYguy said:


> Hey Eric,
> Depending on the exact type of fuse...that 300 amp one should be able to tolerate much higher numbers for short time periods. Perhaps double that.... I would think...yes/no? Giver!


Semiconductor fuses are the fastest blowing type of fuses, they are supposed to be very sensitive since they are protecting silicon in transistors rather than overload in copper wire.


----------



## etischer (Jun 16, 2008)

zaxxon said:


> Not sure I fully understand the context of your last statement. Are you saying you feel the sensorless vector control works the best and that you wish you would have installed the encoder a year ago so you would have known that fact sooner? Or you’re just glad you can check this off your check list?


I spent about a year perfecting the drive tuning for sensorless vector mode. This tuning probably took into account some fudge factors which make up for the lack of speed feedback at low speed. Had I started with an encoder, I might have better performance than I do now. I really don't want to spend another year of tweaking numbers to get closed loop tuned for the small improvement it may bring. Closed loop should be better, but I wish I had started with closed loop so I'm not spending a second year tuning.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> I spent about a year perfecting the drive tuning for sensorless vector mode. This tuning probably took into account some fudge factors which make up for the lack of speed feedback at low speed. Had I started with an encoder, I might have better performance than I do now. I really don't want to spend another year of tweaking numbers to get closed loop tuned for the small improvement it may bring. Closed loop should be better, but I wish I had started with closed loop so I'm not spending a second year tuning.


That makes sense. Not sure which (sensor or sensorless) I should focus on. Given sensorless in-hand. I think I need to focus on getting the measurement tools in place to figure out what’s really going on and find out if my present component configuration is viable. 

On the subject of encoder options. I have some concern with an open optical working reliably long-term in my area given all the salt spray they put down and the white film it leaves on everything. What’s your opinion of this encoder: http://www.rls.si/document/RM44D01.pdf 

Thinking I could put magnet slug in a machined Delrin insert and loctite it into shaft and mount pick-up head. The head is sealed up to IP68 and has built-in RS422 driver option if needed.


----------



## etischer (Jun 16, 2008)

Looks like a good find, seems like it should work. How much do they cost?




zaxxon said:


> On the subject of encoder options. I have some concern with an open optical working reliably long-term in my area given all the salt spray they put down and the white film it leaves on everything. What’s your opinion of this encoder: http://www.rls.si/document/RM44D01.pdf
> 
> Thinking I could put magnet slug in a machined Delrin insert and loctite it into shaft and mount pick-up head. The head is sealed up to IP68 and has built-in RS422 driver option if needed.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Looks like a good find, seems like it should work. How much do they cost?


I am guessing expensive. I sent an email asking for a quote. I will let you know when I find out.


----------



## nimblemotors (Oct 1, 2010)

Zaxxon, are you sure there is nothing wrong with your motor? Or some other drivetrain issue that is causing increased motor load?
Is it possible to find someone with a working controller made for the motor you could borrow and hook it up to see if the controller really is the issue?

Jack



zaxxon said:


> That makes sense. Not sure which (sensor or sensorless) I should focus on. Given sensorless in-hand. I think I need to focus on getting the measurement tools in place to figure out what’s really going on and find out if my present component configuration is viable.
> 
> On the subject of encoder options. I have some concern with an open optical working reliably long-term in my area given all the salt spray they put down and the white film it leaves on everything. What’s your opinion of this encoder: http://www.rls.si/document/RM44D01.pdf
> 
> Thinking I could put magnet slug in a machined Delrin insert and loctite it into shaft and mount pick-up head. The head is sealed up to IP68 and has built-in RS422 driver option if needed.


----------



## zaxxon (Jul 11, 2009)

nimblemotors said:


> Zaxxon, are you sure there is nothing wrong with your motor? Or some other drivetrain issue that is causing increased motor load?
> Is it possible to find someone with a working controller made for the motor you could borrow and hook it up to see if the controller really is the issue?
> 
> Jack


Before I switched to the Microchip Controller/Prius Inverter combination, I was able to move the car reasonable well with the industrial controller. This is me driving the car with the industrial controller. http://www.youtube.com/watch?v=FduVqLQpz14 . It’s possible that I have damaged the motor since then, but I think it’s more likely the microchip controller is just not set or tuned right for the motor. 

The car accelerated reasonable well in Nov. with the field current cranked way up. It may just be that the Mini as geared requires a large amount of torque to get it rolling. Something the industrial controller was better able to do since I was able to take off in second gear with it. I may be able to significantly reduce the field current after the car begins moving. If that’s the case, then the bigger issue to resolve is the seemingly uncontrolled application of DC current when coming to a stop. 

I probably need a field current algorithm that sets the field current higher when going from 0 to 3 mph, then drops it down to reduce losses for driving, and then reduces it when stopping to prevent unwanted or uncontrolled braking torque. If only I was an experienced microcontroller programmer


----------



## jddcircuit (Mar 18, 2010)

Zaxxon,
I am having some success controlling my permanent magnet AC motor using the Prius inverter but it has been quite a learning curve for me. My next project will be to learn more about induction motor control. However, It seems that I might be able relate to some of your symptoms eventhough I am using a different motor type. I think you are on the right track thinking it is something in the software control at lower speeds. If I stop switching my motor it comes to a very abrupt stop with the short circuit of my stator windings since my rotor field is permanent. I would assume you would have the same thing happen if your induced rotor field was significant and you stopped switching all of a sudden. I would be interested in taking a look at your controller code if you wanted help trying to isolate what might be causing your problem.

A quick thing you might try is to experiment with the Prius inverter enable signal. You mentioned before that you had it hard wired to a kill switch. If this is deasserted by software then all the switches would open and allow you to coast at slow speeds. Put a condition in the code that deasserts this control signal if the rotating frequency tries to go less than the minimum you decide. I think a minimum duty cycle with a minimum rotating frequency should be enforced at all times in the code. 

Good luck
Jeff


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Zaxxon,
> I am having some success controlling my permanent magnet AC motor using the Prius inverter but it has been quite a learning curve for me. My next project will be to learn more about induction motor control. However, It seems that I might be able relate to some of your symptoms eventhough I am using a different motor type. I think you are on the right track thinking it is something in the software control at lower speeds. If I stop switching my motor it comes to a very abrupt stop with the short circuit of my stator windings since my rotor field is permanent. I would assume you would have the same thing happen if your induced rotor field was significant and you stopped switching all of a sudden. I would be interested in taking a look at your controller code if you wanted help trying to isolate what might be causing your problem.
> 
> A quick thing you might try is to experiment with the Prius inverter enable signal. You mentioned before that you had it hard wired to a kill switch. If this is deasserted by software then all the switches would open and allow you to coast at slow speeds. Put a condition in the code that deasserts this control signal if the rotating frequency tries to go less than the minimum you decide. I think a minimum duty cycle with a minimum rotating frequency should be enforced at all times in the code.
> ...


The software I am using is the Microchip AN1206 Source Code. I have only change scaling and tuning parameters to date. I am not skilled or confident enough to do more to the code yet. Part of the problem is the code is commented with pieces of C-code, but the actual code is microcode so it’s not so obvious (to me) where and how to add and change. 

I have tried to manually control the inverter enable signal, the resulting issue is similar to problem the sensorless industrial controller had with “flying start”. When you turn inverter back on after coasting the phase syncing has been lost and the controller goes nuts and the car stars bucking. 

I expect the microchip control software can gracefully handle the condition of slowing to a stop and starting. I suspect I don’t have something scalled or set correctly.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Looks like a good find, seems like it should work. How much do they cost?


Looks like a 10 bit absolute binary synchro-serial (SSI) + Incremental RS422A, 5 V can be had for around $140. Seems reasonable for what you get.


----------



## Jaesin (Mar 6, 2011)

*The Prius Inverter and organizing a group effort*

Hello everyone. My name is Jaesin. I am a software engineer in SF, CA. Hey etisher.

How about the ST Micro STM32F103. The chip, a 72MHz ARM Cortex M3, has several dedicated hardware timers and one that was specifically designed for 3 phase PWM signal generation. I believe is has rs485 as well. A dev board, The Leaf Labs maple, cost $47 USD.

Curent Projects based on the STM32F103.
Open BLDC: http://open-bldc.org/wiki/Open-BLDC
Tumanako: http://sourceforge.net/apps/mediawiki/tumanako/index.php?title=Main_Page

But more importantly, the Leaf Labs IDE. The IDE is an open source, cross platform ide with basically the same interface as arduino. This can help reduce the learning curve for making simple adjustments to your controller. 
http://leaflabs.com/devices/maple/
http://static.leaflabs.com/pub/leaflabs/maple-ide/
http://www.seeedstudio.com/depot/leaf-maple-cortex-m3-p-670.html

But the real benefit is the easability (new word) of development and easy software updates (the chip has a built in USB port). One click compile and update using the ide. Using github, we can share code (social coding, yay!).

All that said, What do you think about taking out the Toyota 32bit processor and taping in there? Does anyone know if that is where the PWM Signal generation is initiated?

My theory is that toyota has already spent countless hours developing the inverter board, It could be wise to do as little re-engineering as possible.

Just some thoughts.

- Jaesin


----------



## zaxxon (Jul 11, 2009)

*Re: The Prius Inverter and organizing a group effort*



Jaesin said:


> Hello everyone. My name is Jaesin. I am a software engineer in SF, CA. Hey etisher.
> 
> How about the ST Micro STM32F103. The chip, a 72MHz ARM Cortex M3, has several dedicated hardware timers and one that was specifically designed for 3 phase PWM signal generation. I believe is has rs485 as well. A dev board, The Leaf Labs maple, cost $47 USD.
> 
> ...


Thanks Jaesin for the detailed links. I have not looked into the capabilities of the STM32F103 or the Leaf Labs IDE. I think someone else has proposed this in one of the other brushless PMDC control threads. 

In my case, I had the microchip items before I stated the EV project except for the motor tail. I had purchased the items a few years earlier as an effort to educate myself on microcontrollers for applications at work and home. The other reason I have stuck with Microchip is that it had application notes with working code. I am not experienced enough to start from scratch and probably don’t have the discipline or skills to help develop code through an open forum. If the STM32 has DSP computational function or can do the required math or table look-ups to generate the PWM controlled 3-phase sinusoidal waveforms and required PID loops for vector control of an Induction Motor, it could be a lower cost alternative. 

Prior to 2010, the Prius Inverter’s PWM signals are supplied by the external electronic control module. The microchip is not in the inverter unit. So basically we are bypassing the microchip and using the inverter board just as Toyota’s micro drives it. Some details are provided in earlier posts here and others.


----------



## Jaesin (Mar 6, 2011)

Zaxxon, For you, I suppose it wouldn't make much since to change direction at all. I always say, first, go with what you know, second try what you have. I thought the open-bldc code might be easier for you to modify. I scanned over it. It looks pretty straight forward, at least there is no machine code. If you want to look at the code: https://www.github.com/esden/open-bldc. It is sensorless. 

I think the tumanako guys are using the same motor as you but I am unsure if they installed an encoder.
http://www.youtube.com/watch?v=y2ZOu1QqTNY&feature=mfu_in_order&list=UL

It looks like you got a good deal on the donor car. It looks great. I have the old Mini. A 1972 that is still going on petrol but you all are inspiring and I don't see it being that way for long.


-Jaesin


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> Zaxxon, For you, I suppose it wouldn't make much since to change direction at all. I always say, first, go with what you know, second try what you have. I thought the open-bldc code might be easier for you to modify. I scanned over it. It looks pretty straight forward, at least there is no machine code. If you want to look at the code: https://www.github.com/esden/open-bldc. It is sensorless.
> 
> I think the tumanako guys are using the same motor as you but I am unsure if they installed an encoder.
> http://www.youtube.com/watch?v=y2ZOu1QqTNY&feature=mfu_in_order&list=UL
> ...


I may have misused the term microcode to represent assembly language. The Tumanako project is interesting. Looks like they started out similar to me but using the STM3210B-MCKIT motor control starter kit. Looks like the STM32 is a reasonable microchip for motor control. The option to use an ARM Cortex base system with open sourced development tools is very compelling. The whole LINUX, Android GNU open source approaches is an area I would like to learn more about. But as you suggest, I think for now I will go with what I have and have become familiar with to see where I get to. I may jump soon if I can’t make progress with what I have.

Given the body was not damaged and I did not have to remove the engine it seems it was a good deal although I wish its paint scheme and hood had not been altered. You should get some ideas for your mini following this link: http://www.diyelectriccar.com/forums/showthread.php/dual-motor-austin-mini-52461.html


----------



## DawidvC (Feb 14, 2010)

I am sorry to be late chiming in here, but running a PM motor on induction mototr software will cause the problems you have been experiencing. On Microchips forums they suggest checking the following - http://ww1.microchip.com/downloads/en/AppNotes/70640A.pdf

I hope it helps. The tuning of the motor parameters is extremely important, especialy with PM motors.

Dawid


----------



## zaxxon (Jul 11, 2009)

DawidvC said:


> I am sorry to be late chiming in here, but running a PM motor on induction mototr software will cause the problems you have been experiencing. On Microchips forums they suggest checking the following - http://ww1.microchip.com/downloads/en/AppNotes/70640A.pdf
> 
> I hope it helps. The tuning of the motor parameters is extremely important, especialy with PM motors.
> 
> Dawid


Thanks for the link. I am familiar with this tuning document, but its worth reviewing again. The motor I have is an Induction Motor. One of the issues is large numbers calculated by the parameter tuning spreadsheet when using what I think are the motor inductance and resistances. 

I too think understanding the large numbers and making sure all the appropriate fixed point scaling changes throughout the various parts of the program is one of the important mysteries yet to be solved. When I did get a response from Microchip to my early questions on this issue, they recommended I read the "more up to date" PMSM document you referenced to find answerers to my questions.


----------



## DawidvC (Feb 14, 2010)

Glad to have been of assistance. Microchip has done a lot with their software, but the usability leaves a little to be desired. I think a large number of developers chipping away at the problem will see it evolve into something much more useful.

BTW, are you active on the Microchip forums?

Dawid


----------



## zaxxon (Jul 11, 2009)

DawidvC said:


> Glad to have been of assistance. Microchip has done a lot with their software, but the usability leaves a little to be desired. I think a large number of developers chipping away at the problem will see it evolve into something much more useful.
> 
> BTW, are you active on the Microchip forums?
> 
> Dawid


I am a member of Category: 16 bit Microcontrollers & Digital Signal controllers Forum: dsPIC33F Topics. I have to say I am not active. I get emails which I scan. Not seen any I could really provide help. I posted question there but did not get responses. Most other response to motor control questions refer one to the Application Notes.


----------



## DawidvC (Feb 14, 2010)

It is a pity the forums are not very active. Paul Holmes is busy developing a three-phase controller over on ecomodder - have you had a look over there yet?

Dawid


----------



## zaxxon (Jul 11, 2009)

DawidvC said:


> It is a pity the forums are not very active. Paul Holmes is busy developing a three-phase controller over on ecomodder - have you had a look over there yet?
> 
> Dawid


Looked over links on the dc design last year. Saw some early video on the AC work but have not followed. I should check progress. Thanks !!


----------



## Jaesin (Mar 6, 2011)

I know it's been a while but I was wondering if you ever got your setup working better.


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> I know it's been a while but I was wondering if you ever got your setup working better.


 
Continue plugging away at it when I have time. Did purchase a portable storage scope, which has proven to be very useful. With it, we determined that we were tripping the Prius Inverter’s current limit. We found the current limit trip point varied based on temperature of controller which was a significant unknown variable affecting current tuning attempts. Adding fluid cooling last week to keep the inverter cooler has resulted in more consistent behavior and longer runs up and down the street. Now I need to worry about cooling the motor – with longer runs its getting hot now. 

Still struggling with sensorless operation. Have modified program with logic to switch from open-loop to closed-loop sensorless vector control. This is needed because the sensorless algorithm cannot sync up at low RPMs. There are many logic and control behavior issues around switching to and running in closed-loop and switching back to open-loop to start from a stop. Continue to be constrained by an undesired closed-loop frequency control behavior at lower input commands causing uncontrolled hard braking. 

Have achieved reasonable performance and behavior in 1st and reverse gear. Trying to understand and eliminate an unwanted "shutter/jerking oscillation". The behavior is more predominate when trying to launch in 2nd gear. It occurs after starting to move (still in open-loop mode I think before switch over?). The commanded output looks constant, but the phase current peaks start varying. My guess is the rotor or stator is going into saturation or this is what you see when the rotor and stator magnetic field skip. Hope to do some more investigation today.


----------



## etischer (Jun 16, 2008)

Glad to see you're still making progress. Any chance you can use an encoder for speed feedback during low speed operation? 

You're going to be limited in off-the-line torque running v/hz. Have you tried some DC boost at low rpm to increase the torque?

Your uncontrolled hard braking issue at low input command... I've had a few similar issues:
Do you have a PID loop controlling torque/current? Your input might be zero, but the integrator might have accumulated a large error, causing the PID output to go negative instead of zero. 

Are you sure your controller isn't being reset and starting from zero hz while your motor is still spinning. I've had my inverter fault and instantly auto-reset causing the inverter to start ramping up from zero hz, needless to say it is like slamming on the brakes. 

Perhaps the prius inverter is tripping on over temp and not over current? My inverter seemed to be much more stable with improved liquid cooling. 

Good luck, let's see some pics!
-et




zaxxon said:


> Continue plugging away at it when I have time. Did purchase a portable storage scope, which has proven to be very useful. With it, we determined that we were tripping the Prius Inverter’s current limit. We found the current limit trip point varied based on temperature of controller which was a significant unknown variable affecting current tuning attempts. Adding fluid cooling last week to keep the inverter cooler has resulted in more consistent behavior and longer runs up and down the street. Now I need to worry about cooling the motor – with longer runs its getting hot now.
> 
> Still struggling with sensorless operation. Have modified program with logic to switch from open-loop to closed-loop sensorless vector control. This is needed because the sensorless algorithm cannot sync up at low RPMs. There are many logic and control behavior issues around switching to and running in closed-loop and switching back to open-loop to start from a stop. Continue to be constrained by an undesired closed-loop frequency control behavior at lower input commands causing uncontrolled hard braking.
> 
> Have achieved reasonable performance and behavior in 1st and reverse gear. Trying to understand and eliminate an unwanted "shutter/jerking oscillation". The behavior is more predominate when trying to launch in 2nd gear. It occurs after starting to move (still in open-loop mode I think before switch over?). The commanded output looks constant, but the phase current peaks start varying. My guess is the rotor or stator is going into saturation or this is what you see when the rotor and stator magnetic field skip. Hope to do some more investigation today.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Glad to see you're still making progress. Any chance you can use an encoder for speed feedback during low speed operation?
> 
> You're going to be limited in off-the-line torque running v/hz. Have you tried some DC boost at low rpm to increase the torque?
> 
> ...


I am seeing some behavior that might be explained by accumulated error as you suggest. The basic problem I have is that at slow RPM and low input commands, the closed loop vector control algorithm starts producing very slow and very non-linear current pluses which act like a DC brake. I have not figured out how to modify the low end frequency cutoff. It must be buried within the closed-loop frequency control’s assembly code. To avoid this, I have added c-code logic to shut off the drive output switches, set command ramp to zero, and switch to open-loop mode when the command and estimated speed fall below set levels. I would assume your controller is doing a similar open-loop to closed-loop switch over at some low frequency. The trick seems to be how low in RPM the sensorless speed estimating algorithm can work to. In ours, it seems to be around 400 to 600 rpm. If I don’t let off the accelerator all the way after it switches back to open-loop, I get a similar ramp up and the slamming on the brakes effect. 

The base Microchip code can work with and without sensor. I purchased the non-contact position sensor I showed in an earlier post some time back. I have been hoping to avoid the added effort to install. Based on what I have learned though, I do think using a speed sensor is a better choice for EVs especially a non-clutched one. If I need to kill the inverter output to shift gears its going to take more control logic to wait until estimated speed is back and to synced it up for smooth transition. The microchip software does not have this feature. With the independent speed sensor the actual speed would always be available.


I had to turn off boost because it caused unwanted braking when I switched back to open loop. I can move the car without boost. I get better torque performance using a low phase frequency, but it sounds and feels like a meat grinder. I like the smooth feel of a higher low end frequency but its does not have the same starting torque. 


Attached is a picture of the filtered Phase 1 PWM signal (green) and its resulting Phase 1 motor current (yellow) in open loop. Expanded view shows the current variation (yellow) which results in the shutter/jerking. Its smooth before and after this section. The higher current peaks are about 400 amps. Not sure what is causing this. Note the high regen currents 436 amp peak when reducing throttle.


----------



## etischer (Jun 16, 2008)

My inverter uses an MRAS speed estimator for approximating motor rpm at low speed. 

Here's a PDF that explains how it works, it's over my head! 
http://www.icgst.com/acse/Volume7/Issue1/P1110710001.pdf

Does your inverter perform an autotune on the motor?

Do you still get the braking effect if you disable regen braking? 

Is your throttle controlling motor rpm until 600 rpm, then it switches to torque mode? 

My inverter has "auto boost" where it can vary the boost based on motor current. 





zaxxon said:


> I am seeing some behavior that might be explained by accumulated error as you suggest. The basic problem I have is that at slow RPM and low input commands, the closed loop vector control algorithm starts producing very slow and very non-linear current pluses which act like a DC brake. I have not figured out how to modify the low end frequency cutoff. It must be buried within the closed-loop frequency control’s assembly code. To avoid this, I have added c-code logic to shut off the drive output switches, set command ramp to zero, and switch to open-loop mode when the command and estimated speed fall below set levels. I would assume your controller is doing a similar open-loop to closed-loop switch over at some low frequency. The trick seems to be how low in RPM the sensorless speed estimating algorithm can work to. In ours, it seems to be around 400 to 600 rpm. If I don’t let off the accelerator all the way after it switches back to open-loop, I get a similar ramp up and the slamming on the brakes effect.
> 
> The base Microchip code can work with and without sensor. I purchased the non-contact position sensor I showed in an earlier post some time back. I have been hoping to avoid the added effort to install. Based on what I have learned though, I do think using a speed sensor is a better choice for EVs especially a non-clutched one. If I need to kill the inverter output to shift gears its going to take more control logic to wait until estimated speed is back and to synced it up for smooth transition. The microchip software does not have this feature. With the independent speed sensor the actual speed would always be available.


----------



## etischer (Jun 16, 2008)

Does your inverter measure current on all three motor phases, or just two and back calculates the third. If it is calculating the third phase current, you might throw a clamp on current meter and measure each of the three phases to ensure they are balanced. If they aren't try tweeking your motor current settings till the three phases are the same. 

The higher current could just mean you have more slip, or you are loosing sync. I don't know if it is the cause of your jerking, or a result of the jerking.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> My inverter uses an MRAS speed estimator for approximating motor rpm at low speed.
> 
> Here's a PDF that explains how it works, it's over my head!
> http://www.icgst.com/acse/Volume7/Issue1/P1110710001.pdf
> ...


Thanks !! for the link I will take a look.

No, The Microchip Application code does not have an autotune. I have to provide it with the parameters.

The software does not have a way to shut off regen directly or to control its current that I know of. Right now it slams into the Prius Inverters current protection limit which effectively clamps it at 485 amps peak when its keep cool. This occurs in closed-loop torque mode also.

Yes, The throttle is doing V/Hz up to around 600 rpm, then switches to closed-loop torque mode. I lowered it the other day it might be closer to 400 rpm. I keep trying to lower the switch over point, but run into too large a switch over frequency missmatch which causes braking effects. 

Now that I have a better understanding of the code I could try to add some logic to dynamically add boost based on measured current.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Does your inverter measure current on all three motor phases, or just two and back calculates the third. If it is calculating the third phase current, you might throw a clamp on current meter and measure each of the three phases to ensure they are balanced. If they aren't try tweeking your motor current settings till the three phases are the same.
> 
> The higher current could just mean you have more slip, or you are loosing sync. I don't know if it is the cause of your jerking, or a result of the jerking.


The software uses two current sensors and calculates the third. The issue is occurring in the open-loop mode. I don’t think I have any handles to balance current in the open loop mode but will take a look. 

I think it’s an indication of losing sync and slipping. I was wondering if anyone might know if that’s what the current does when that happens. 

Its a long shot, but I was wondering if it’s possibly the magnetic field coupling into the throttle wiring causing positive feedback. I don’t see same kind of change in the filtered pwm command so I don’t think it’s this.


----------



## etischer (Jun 16, 2008)

Does the problem only occur running open loop (V/Hz) under load? If the motor is not driving a load, do you still have a problem? 





zaxxon said:


> The software uses two current sensors and calculates the third. The issue is occurring in the open-loop mode. I don’t think I have any handles to balance current in the open loop mode but will take a look.
> 
> I think it’s an indication of losing sync and slipping. I was wondering if anyone might know if that’s what the current does when that happens.
> 
> Its a long shot, but I was wondering if it’s possibly the magnetic field coupling into the throttle wiring causing positive feedback. I don’t see same kind of change in the filtered pwm command so I don’t think it’s this.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Does the problem only occur running open loop (V/Hz) under load? If the motor is not driving a load, do you still have a problem?


 
Just ran this No Load Neutral Test. It shows a current variation at a lower speed when motor just starts moving. This might indicate the current variation under load is due to slip/loss of sync.

In this plot you can see where it switches over to closed-loop where the current dropped.


----------



## Jaesin (Mar 6, 2011)

Did you move your inverter closer to the motor yet? Did you Shield the cables from the inverter to the motor? 

Just Curious. I have heard of allot of people having problems with EMI when upping the current from a load-less test environment.


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> Did you move your inverter closer to the motor yet? Did you Shield the cables from the inverter to the motor?
> 
> Just Curious. I have heard of allot of people having problems with EMI when upping the current from a load-less test environment.


We have not moved the inverter to front yet. Still trying to prove the setup we have should go from learning/prototyping to a more permanent installation. I am almost convinced. 

I am not using any shielded cable. The three phase cables are running outside under car floor. They are not twisted.. The throttle and control cables are multi-wire ribbon and single wires. I did need to add filter caps on the Microchip board to prevent the switch interface from getting set when I turn on the contactor. Last week I added filter caps to Throttle input circuit, but did not see any difference. The current sensor lines are twisted. Actually I am surprised how well it works with the present wiring configuration. When the inverter is on its impossible to use the touch pad mouse on the Laptop.

Can’t seem to get a smooth take off in second gear. Did manage to shift smoothly from first to second gear while in closed-loop control using the Prius Inverter enable switch input. The car got up to around 40 MPH before we had to stop. Planning to mount switch on gear shift this weekend to make the process easier. Had my son working the enable switch on my verbal command. 

I am concerned about the amount of current required and heat being generated. The system does not seem to be very efficient with present settings. Even the battery pack is heating up during short runs. A little scary since we don’t have a battery cooling system and they are NiMH. Its looking like the small 3,600 watt-hr. battery pack may not make the 6 mile round trip to work.


----------



## Jaesin (Mar 6, 2011)

You could check the gates at the IGBT's to be sure top and bottom aren't open at the same time or overlapping on one of the phases.

That would cause some serious heat and battery drain.


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> You could check the gates at the IGBT's to be sure top and bottom aren't open at the same time or overlapping on one of the phases.
> 
> That would cause some serious heat and battery drain.


I also wondered if something like that is happening due to a faulty Prius control board or something related to the way I am interfacing to it. There are only three control input lines to the Prius Inverter. The dead band, top and bottom IGBT control is all controlled by the Prius Inverter control board. The current waveforms look reasonable, but the effects of such events may not be apparent in the phase current waveforms. There are spikes seen in the current waveforms, but they appear to be noise not consistent or periodic. Its also possible the heat generation I am seeing is consistent with current levels being used. More investigation needed.


----------



## zaxxon (Jul 11, 2009)

Drove the car 2 miles today and in real traffic for the first time. Learned some good and bad things. 

Found using the finger controlled inverter enable switch located on the gear shift like a clutch works well. Up shifting is easy, and any unwanted regen braking caused by the closed loop to V/Hz mode transition just before stopping can be avoided by using the switch.

The car used around 800 WHs per mile in the 2 mile rout. The rout, including getting out of my driveway, has 5 starts and stops. This number is poor, more than 2.5 times the 300 WHs others quote. 

The two mile run took the pack to 100% DOD indicated by voltage dropping to 6 volts per module. We may have an issue with our battery pack or we are only charging it to 50% of its full capacity. I suppose its possible we can only get 50% out of it because we are discharging the pack at around 1.5C rate with peaks up to 8C. 

One thing is clear from this run. Getting the six mile round trip to work with this small battery pack is not possible.


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> I also wondered if something like that is happening due to a faulty Prius control board or something related to the way I am interfacing to it. There are only three control input lines to the Prius Inverter. The dead band, top and bottom IGBT control is all controlled by the Prius Inverter control board. The current waveforms look reasonable, but the effects of such events may not be apparent in the phase current waveforms. There are spikes seen in the current waveforms, but they appear to be noise not consistent or periodic. Its also possible the heat generation I am seeing is consistent with current levels being used. More investigation needed.


Zaxxon,
I haven't spent much time working on my control of my Prius inverter lately and I am no motor control expert.
But I seem to remember experimenting with different switching schemes in an attempt to reduce switching losses by having one of the phases at one of the battery rails and using it as a reference for my other phases during a phase modulation cycle.

This attempt didn't work exactly as I expected and I think it was due to the way I am driving the inverter inputs or something inside the Prius inverter gate drivers that is making the time to switch from highside to lowside different from going lowside to highside. This switching time imbalance was essentially causing out of phase voltage duty cycles causing enough current ripple to cause a shudder. I think this was happening but have not proven it. I simply went back to my original switching scheme that didn't have the problem.

In other words a 1% duty cycle did not look like the inverse of a 99% duty cycle.

Keep in mind that I am not using the same type of motor so my observations might not fit you.

I am wondering if your control method is truly producing the desired sinusoidal duty cycle of battery voltage on each phase and if not would it result in the current ripple you are seeing at certain speeds.

If the inverter gate drivers are reacting faster depending on the state transition direction, then it could be compensated for in software I would think.

Good Luck
Jeff


----------



## etischer (Jun 16, 2008)

Does your inverter maintain sync, or are you using flycatching to sync after re-enabling? Sounds like these were your first 2 miles using torque control? Congrats!

Also sounds like there is some room for efficiency improvements, which probably means performance will improve too. What kind of current readings are you seeing from the battery? Can you tell if the inefficiency is in the motor or the inverter? 

Could you program your inverter to automatically disable itself at low RPMs if throttle input is zero?



zaxxon said:


> Drove the car 2 miles today and in real traffic for the first time. Learned some good and bad things.
> 
> Found using the finger controlled inverter enable switch located on the gear shift like a clutch works well. Up shifting is easy, and any unwanted regen braking caused by the closed loop to V/Hz mode transition just before stopping can be avoided by using the switch.
> 
> ...


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Zaxxon,
> I haven't spent much time working on my control of my Prius inverter lately and I am no motor control expert.
> But I seem to remember experimenting with different switching schemes in an attempt to reduce switching losses by having one of the phases at one of the battery rails and using it as a reference for my other phases during a phase modulation cycle.
> 
> ...


I have been wondering about another observation I see that might be related to your observation. It can be seen in the first set of waveforms shown in post #92. Note the filtered Phase 1 PWM output (green). You can see there is some kind of minimum pulse width required before the Prius Inverted logic starts to output current. I thought this might be some form of digital filter for noise glitches or some hardware form of a low end frequency cutoff.

To lower the switching losses, I recently reduced the switching frequency from 10KHz to 5KHz. The wider pulse widths produced for the same input command, moved the start of current to the left. The lower switching frequency did reduce the temp rise a bit and helped the low rpm performance. 

Given yours and etischer’s previous comments on possible phase control and balance issues I need to investigate this further.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Does your inverter maintain sync, or are you using flycatching to sync after re-enabling? Sounds like these were your first 2 miles using torque control? Congrats!
> 
> Also sounds like there is some room for efficiency improvements, which probably means performance will improve too. What kind of current readings are you seeing from the battery? Can you tell if the inefficiency is in the motor or the inverter?
> 
> Could you program your inverter to automatically disable itself at low RPMs if throttle input is zero?


About the sync, I am not exactly sure how its doing it. I expected this would not work well because the speed estimator would not be getting any current information to base its estimations on and would get totally confused. I tried it in neutral first in the garage and found in closed-loop mode I could enable and disable the Prius inverter output, keeping the throttle constant and in come on and off without going crazy. I know the integrators have a wind up limiters, so its possible, the state outputs remain close enough to quickly re-sync or the algorithm is picking up quickly. 

I don’t have and amp-hr meter so my WH calculation are based on what I have to put back in the battery to get it back to the same cell voltage. I installed one of the Prius Battery current sensor on the battery line to inverter. Using the scope to measure its output. Having some issues getting good resolution on the scope because of its 2.5 volt offset. I don’t have all the variables needed instrumented well enough to capture all things together. Piecing different observations together indicate ~25 Adc @ ~300Vdc from the battery with a motor phase current of 90 Arms is needed to keep the car moving at low speeds 15 to 25 mph. 

I did alter the program to shut off the Microchip outputs when the peddle is below a certain point to get around the low end control issues. The problem using this to shift gears for me is that I am using a similar technique to switch back to V/Hz mode for launching after a stop. So if I let off the peddle, I believe (not tested for fear of the circumstances), it will switch back to V/Hz mode because the logically used speed reference switch point is lost.


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> I have been wondering about another observation I see that might be related to your observation. It can be seen in the first set of waveforms shown in post #92. Note the filtered Phase 1 PWM output (green). You can see there is some kind of minimum pulse width required before the Prius Inverted logic starts to output current. I thought this might be some form of digital filter for noise glitches or some hardware form of a low end frequency cutoff.
> 
> To lower the switching losses, I recently reduced the switching frequency from 10KHz to 5KHz. The wider pulse widths produced for the same input command, moved the start of current to the left. The lower switching frequency did reduce the temp rise a bit and helped the low rpm performance.
> 
> Given yours and etischer’s previous comments on possible phase control and balance issues I need to investigate this further.


I see what you mean about post #92. The minimum pulse width seemed to only occur in one direction on my inverter. I was trying to use a moving reference depending on my lowest or highest phase at the particular phase angle. This was a problem for me when I was referencing to one rail or the other and dealing with a minimum pulse width that depends on which rail I was referenced to. It was not producing the phase to phase duty cycle that I was commanding.

A quick fix for me was to put all three inputs to the inverter at a 50% duty cycle and at the same polarity. This would produce zero phase to phase voltage difference. I then modulated the duty cycle of each phase around this new 50% reference sinusoidally and 120 degrees out of phase to get the appropriate phase to phase duty cycle.

I think this method is similar to locked antiphase modulation that I read about with H-bridge drives.

In this scheme I don't have a minimum pulse width problem until I get up around 100 and 0% duty cycle.

I don't know if this could be causing any of your problems but it did seem to help me.

It is not the most efficient switching method since you are still switching at zero voltage but it was quick to implement.

Regards
Jeff


----------



## jddcircuit (Mar 18, 2010)

Zaxxon,
I'm not sure if I explained myself completely on my last post so let me see if I can confuse things more.

For example if I was wanting to apply 50% battery voltage peak to peak then each phase duty cycle would modulate between 25% and 75%.

At 10% battery voltage modulate between 45% and 55% min max duty cycles with the reference set to 50%.

Again this is only to get around the problem of minimum pulse width as observed on the Prius inverter.

Jeff


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Zaxxon,
> I'm not sure if I explained myself completely on my last post so let me see if I can confuse things more.
> 
> For example if I was wanting to apply 50% battery voltage peak to peak then each phase duty cycle would modulate between 25% and 75%.
> ...


I think I follow what your saying. I am not sure I understand the implications or possible effects in yours or my case. The MircoChip software is using center aligned PWM. I believe they start with a minimum pulse width and increase it. I need to think about this more. I did not investigate the minimum PWM because I had what seemed to be bigger issues and the current waveforms seemed ok at higher frequencies. Could this minimum pulse width cutoff effectively result in a continuous “DC brake” on effect? 

I measure all three phase currents today to see if there might be visible phasing issues. I only have a two channel scope so Phase 3 was not measured at the same time as Phase 2. The Phase 3 current is also being measured with a different current sensor. With the scope settings it has a slightly different gain. 

The waveforms are noisy and a little ratty looking, but the 120 degree phasing and amplitude balance look reasonable but I not an expert on this. If anyone sees issues with these waveforms please elaborate. 


Phase 1 to Phase 2 current













Phase 1 to Phase 3 current


----------



## jddcircuit (Mar 18, 2010)

Zaxxon,
The more I think about it the more I think this is causing some of your symptoms at low duty cycles/low speeds including the DC braking effect. It is worth a try. I believe that it will push the phase current start way to the left in your post #92. IMO, this is what is causing your braking effect because the transitors are not physically changing state and a persistent on high or low side switch will act as a DC brake.

I should of mentioned that this approach is with not using center aligned but could work with center aligned. With center aligned you would just get two differential states per duty cycle period on either side of a 50% pulse instead of one. It might even be better using center aligned now that I think about it since you are getting higher frequency pulses to the motor with less transistor switching.

I can make an excel spread sheet and graph show what I mean but this method worked much better with my Prius inverter than other switching schemes. It inherently avoids the small command pulses at low speeds.

It creates a small pulse by the difference between phase duty cycles. For example if one phase is 51% and the other is 49% then you have created a 2% pulse between them that you could not create with this inverter otherwise.

My original code that I hacked was more complicated than what I am using now. I removed the need for minimum pulse width and phase polarity by going to this method. I just have to be careful at around 100% duty cycle because small pulses will reappear.

I am using just one byte to set my duty cycle eventhough it has higher resolution. I just offset my command duty by 127 (255/2) and took out all the code that was managing the pulse polarity. Above 127 is positive and below 127 is negative with this new reference. So you can see that I will never command my controller pulse by very low or very high counts until I get around full on, so minimum pulse width is not needed at low speeds.

Regards
Jeff


----------



## etischer (Jun 16, 2008)

I would keep the switching frequency low to start, I still use 3khz, since going higher just increases the losses and heats up the IGBTs more. 

It would be interesting to measure the on-delay and off-delay for the IGBTs. 






zaxxon said:


> I have been wondering about another observation I see that might be related to your observation. It can be seen in the first set of waveforms shown in post #92. Note the filtered Phase 1 PWM output (green). You can see there is some kind of minimum pulse width required before the Prius Inverted logic starts to output current. I thought this might be some form of digital filter for noise glitches or some hardware form of a low end frequency cutoff.
> 
> To lower the switching losses, I recently reduced the switching frequency from 10KHz to 5KHz. The wider pulse widths produced for the same input command, moved the start of current to the left. The lower switching frequency did reduce the temp rise a bit and helped the low rpm performance.
> 
> Given yours and etischer’s previous comments on possible phase control and balance issues I need to investigate this further.


----------



## jddcircuit (Mar 18, 2010)

Zaxxon,
The other thing that I think I see in post #92 (green) plot is that the phase modulation starts out open loop happy and then at a point it becomes confused. I will assume that this is when the current control loop kicks in but it is not getting any phase current yet so it is confused and causing the oscillation on the green plot just before the yellow plot starts showing current.

I am betting this problem will also go away when you implement this alternative duty cycle control method because hopefully you will be getting phase current earlier.

If you want any help reviewing your code I would give it a shot but keep in mind I am learning right along with you.

Jeff


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Zaxxon,
> The other thing that I think I see in post #92 (green) plot is that the phase modulation starts out open loop happy and then at a point it becomes confused. I will assume that this is when the current control loop kicks in but it is not getting any phase current yet so it is confused and causing the oscillation on the green plot just before the yellow plot starts showing current.
> 
> I am betting this problem will also go away when you implement this alternative duty cycle control method because hopefully you will be getting phase current earlier.
> ...


The level of change you’re proposing is probably well beyond my capability even with your offer of help. Except for some minor logic changes the operating code I am using is still right out of the Microchip AN1206 application zip file. I suspect to implement your suggested modifications; the changes would be made in the file called SVGEN.S. The file is commented with C code structure, but is coded in assembly language which I have almost zero experience. 

Before trying to significantly alter the present code, I think at this time it might be better for me to just understand the actual impact of the delay and to make sure some portion of it is not caused by the quick and dirty zener diode level shifting approach I used to interface the inverter to the Microchip board.


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Zaxxon,
> The other thing that I think I see in post #92 (green) plot is that the phase modulation starts out open loop happy and then at a point it becomes confused. I will assume that this is when the current control loop kicks in but it is not getting any phase current yet so it is confused and causing the oscillation on the green plot just before the yellow plot starts showing current.
> 
> I am betting this problem will also go away when you implement this alternative duty cycle control method because hopefully you will be getting phase current earlier.
> ...


The plots in post #92 is in open-loop (V/Hz mode). I’ve been thinking about the question Jaesin asked. ‘If we had moved the inverter closer to the motor’. I am wondering if the ripple seen hear is the result of a voltage ripple/battery source impedance/resonance condition caused by the cable length and size of the Prius Inverter Link capacitor. 

The biggest problem I have at the switch over point is getting the frequency and current amplitude close enough to prevent a stall effect and still meet other constraints I can’t seem to find the handles to.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> I would keep the switching frequency low to start, I still use 3khz, since going higher just increases the losses and heats up the IGBTs more.
> 
> It would be interesting to measure the on-delay and off-delay for the IGBTs.


 
Yes, I need to do some bench testing to determine the amount of delay and switching speed.


----------



## jddcircuit (Mar 18, 2010)

zaxxon said:


> The level of change you’re proposing is probably well beyond my capability even with your offer of help. Except for some minor logic changes the operating code I am using is still right out of the Microchip AN1206 application zip file. I suspect to implement your suggested modifications; the changes would be made in the file called SVGEN.S. The file is commented with C code structure, but is coded in assembly language which I have almost zero experience.
> 
> Before trying to significantly alter the present code, I think at this time it might be better for me to just understand the actual impact of the delay and to make sure some portion of it is not caused by the quick and dirty zener diode level shifting approach I used to interface the inverter to the Microchip board.


Ok, I will be interested to see what you find. I want to eventually use my Prius inverter for induction motor control and will learn from what you find.

If you find out that the IGBT is not responding to small pulse widths on the inputs then this might be something to consider.

I think you will track it down. Good Luck.

Which micro are you using in the AN1206 zip folder? 

Jeff


----------



## aeroscott (Jan 5, 2008)

After rereading , I was thinking adjusting V/F relationship . Since it is on the menu , I'm thinking higher voltage . My thinking is , as the moving field is trying sink with the moving rotor it my need more field to hold on to it . If the pole slips off it (rotor)will get accelerated backwards to the next field , bouncing because of the speed of field convergence is accelerating , starting a harmonic bounce .


----------



## zaxxon (Jul 11, 2009)

jddcircuit said:


> Ok, I will be interested to see what you find. I want to eventually use my Prius inverter for induction motor control and will learn from what you find.
> 
> If you find out that the IGBT is not responding to small pulse widths on the inputs then this might be something to consider.
> 
> ...


AN1206 Source Code for dsPIC33FJ256MC710


----------



## zaxxon (Jul 11, 2009)

aeroscott said:


> After rereading , I was thinking adjusting V/F relationship . Since it is on the menu , I'm thinking higher voltage . My thinking is , as the moving field is trying sink with the moving rotor it my need more field to hold on to it . If the pole slips off it (rotor)will get accelerated backwards to the next field , bouncing because of the speed of field convergence is accelerating , starting a harmonic bounce .


Your explaination seems to explain current increases and shutter. I hope if we reslove some of the other issues this well go away.


----------



## zaxxon (Jul 11, 2009)

Took some more measurements tonight. Connected the inverter bridge supply input to 12 volt battery supply. Connected a 100 ohm load from Phase 1 output to battery ground. Compared the Microchip low side output drive signal (yellow) to the pulsed output across the 100 ohm resistor (green). 

Looks like 12 microseconds turn-on delay and about half that on the turn off. Looking at the time to turn off the top IGBT, one would speculate this is a programmed dead band to insure turn off the bottom IBGT before turning on the top again. You can see the spike where the bottom IGBT is turned on. Actually looks just a bit early. You can also see the small negative step where the bottom IGBT is commanded to go off about 6 microseconds before the top IGBT is commanded on. I think all of this seems reasonable for this generation of high voltage IGBTs. 











Also used a 10K and 1uF low pass filter on Phase 1 output to see if the filtered PWM signal had any significant discontinuities over the throttle range. Every thing looked good. 










Epanded view of open loop lower end frequency. Sinewave looks good.


----------



## zaxxon (Jul 11, 2009)

Below shows the center aligned MicroChip PWM 1H (yellow) and PWM 2H (green) outputs and their difference (red) at plus and minus phase points.


----------



## Jaesin (Mar 6, 2011)

Any progress lately?

Did you move the controller, get water cooling working, or switch to 1/0 AWG cable?


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> Any progress lately?
> 
> Did you move the controller, get water cooling working, or switch to 1/0 AWG cable?


My older son acquired an Azure Dynamics (Solectria) 445TF UMOC Controller and loaned it to me to test in the Mini. 

Constructed an interface circuit to convert the Ford Siemens Motor’s single ended encoder output to bipolar differential drive required by the controller. 
http://bmpenterprises.net/blog/wp-content/uploads/2011/10/IMG_1994.jpg










Fabricated connections out of some removable DB-25 pins.










http://bmpenterprises.net/blog/wp-content/uploads/2011/10/IMG_2006.jpg
http://bmpenterprises.net/blog/wp-content/uploads/2011/10/IMG_2004.jpg 
Constructed driver interface control box for UMOC Controller








http://bmpenterprises.net/blog/wp-content/uploads/2011/10/IMG_1996.jpg













Removed Prius Inverter , added Anderson Connectors to cables, and installed UMOC Controller
http://bmpenterprises.net/blog/wp-content/uploads/2011/10/IMG_2011.jpg









Made some laps with the UMOC. Runs smooth and quiet with no acceleration issues. 
>>>>First runs with UMOC Controller 
>>>>First runs with UMOC Controller 
>>>>First runs with UMOC Controller


----------



## Jaesin (Mar 6, 2011)

That's awesome. Thanks for sharing the videos. The car looks very sharp.

It's incredibly quiet as well.


----------



## zaxxon (Jul 11, 2009)

Some videos of the Mini with a DMOC 645 


Installation of DMOC 645 in dad's Mini Cooper 
https://www.youtube.com/watch?v=20LyxMJsdkA


Ford Siemens motor in Mini Cooper 
https://www.youtube.com/watch?v=_F7Wc8Q3I_E


In car tire spin 
https://www.youtube.com/watch?v=f7yGxbJ1neg


Wheel spin 
https://www.youtube.com/watch?v=4Esu9Jp7i7Y


Mini Cooper drive by 
https://www.youtube.com/watch?v=M-moPeVHyDE

Rolling wheel spin


https://www.youtube.com/watch?v=fWB3m61vztc


----------



## Jaesin (Mar 6, 2011)

That is great. Awesome job. I am putting a Siemens and DMOC645 combo in a Morris Minor Traveller for a buddy of mine.


----------



## etischer (Jun 16, 2008)

Nice work! Pretty impressive performance =)


----------



## zaxxon (Jul 11, 2009)

Jaesin said:


> That is great. Awesome job. I am putting a Siemens and DMOC645 combo in a Morris Minor Traveller for a buddy of mine.


I like the look of that vehicle. It should be a good match.


----------



## zaxxon (Jul 11, 2009)

etischer said:


> Nice work! Pretty impressive performance =)


Yes, finally feeling the real capability of the motor.


----------



## TheSGC (Nov 15, 2007)

How are the Prius batteries holding up?


----------



## Arlo (Dec 27, 2009)

What kind of power are you getting out of the motor would you say with the DMOC 645 That controller is huge!


----------



## zaxxon (Jul 11, 2009)

TheSGC said:


> How are the Prius batteries holding up?


The Prius Batteries are no longer in the Mini. Based on the 250 to 283 WH/mile I have measured running with the UMOC 445 and different batteries, I was not fully charging the Prius Batteries or there capacity is less than half their rating at the current level I was running. I only got about 5 miles. It makes me want to put them back in and see if I can charge them properly and get the expected miles. 

Last summer I purchased three of the A123 28s3p battery packs from China, Shenzhen Victpower Technology. Not a pleasant experience. I will never buy from them again. The batteries were not in good shape before they were shipped and were additionally damaged in shipment due to their poor crate packaging. http://www.endless-sphere.com/forums/viewtopic.php?f=14&t=38901&hilit=zaxxon&start=435#p581983

The Modules arrived significantly out of square and many dents and a few large dents. One of the significantly out of square modules had one corner of the black plastic top crushed and broken. The cell under the broken corner was crushed and some other cells had tops pushed in. This module read only 25.7 volts. The crushed corner had the corner cell shorted (this damage happened before the modules were shipped. The cells of this module mostly read between 0.5 and 1.0 volts. Second module read 92.5 volts. All its cells read very close to each other at 3.29 +/- 0.02 volts open circuit. The third module read 77.4 volts. 

I was able to slow charge all three modules up. Had to bypass the bad cell. I have not done extensive cell or pack capacity testing. The cells seem to be performing reasonable well given there history and abuse. 

Testing with DMOC 645 indicates they can still deliver 400+ amps.


----------



## zaxxon (Jul 11, 2009)

Arlo said:


> What kind of power are you getting out of the motor would you say with the DMOC 645 That controller is huge!


Unfortunately we did not log much. Took a log using the ccShell. The DMOC 645 reported the peak numbers shown below: 

ISR2MaxPowerOut (T_INT,C) [W] 121,000 
ISR2TorqueDesired (T_INT,C) [Nm] 441 
ISR2TorqueEst (T_INT,C) [Nm] 181

Pack voltage measured by DMOC showed a voltage droop from 276 to 251 under the peak estimated torque of 181 Nm.


----------



## Hollie Maea (Dec 9, 2009)

I have been toying with the idea of grabbing a DMOC645 to run my Ford/Siemens motor, but I wasn't sure if it would be compatible. It's good to see that it works.

On the other hand...that thing is enormous! I'm not too keen on the idea of filling my entire car with controller.


----------



## zaxxon (Jul 11, 2009)

Hollie Maea said:


> I have been toying with the idea of grabbing a DMOC645 to run my Ford/Siemens motor, but I wasn't sure if it would be compatible. It's good to see that it works.
> 
> On the other hand...that thing is enormous! I'm not too keen on the idea of filling my entire car with controller.


Yes, it works well. Lots of power. I do have some non-consistent acceleration behavior that needs further investigation. Some kind of limit factor getting triggered. 

I agree, the size of the DMOC645 is larger than desired. It’s actually shorter than the air cooled UMOC445 I had, a bit wider, but about 2x longer. I am considering gutting parts and repackaging, but I am not convinced it’s worth the added cost and effort for me at this point. 

When I eventually buy a welder/plasma cutter and get some free time, we will likely have cut down the height of the DMOC cover before it can be placed above the motor and under the Mini hood. It might be possible to locate it low, in front of the motor, and then bracket it to front bumper without modifying; but it will be in the way if I want to use the original coolant/AC radiators.


----------



## Hollie Maea (Dec 9, 2009)

Thanks for the feedback. I've enjoyed reading this thread--there aren't too many people who have gotten the Ford/Siemens motor up and running. I'll be taking a stab at the "Eric Tischer Coupler" shortly, and hopefully I'll have as much success as you did.


----------



## zaxxon (Jul 11, 2009)

*A123 28S3P Battery Module Repair*

I am going to attempt to repair two shorted sections in one of the A123 28S3P Battery Modules. I would like to get any thoughts or suggestions from anyone who may have disassembled or tried similar. 
https://www.youtube.com/watch?v=OSB1aCNV83w


----------



## _Basser_ (Sep 3, 2009)

zaxxon said:


> Yes, it works well. Lots of power. I do have some non-consistent acceleration behavior that needs further investigation. Some kind of limit factor getting triggered.
> 
> I agree, the size of the DMOC645 is larger than desired. It’s actually shorter than the air cooled UMOC445 I had, a bit wider, but about 2x longer. I am considering gutting parts and repackaging, but I am not convinced it’s worth the added cost and effort for me at this point.
> 
> When I eventually buy a welder/plasma cutter and get some free time, we will likely have cut down the height of the DMOC cover before it can be placed above the motor and under the Mini hood. It might be possible to locate it low, in front of the motor, and then bracket it to front bumper without modifying; but it will be in the way if I want to use the original coolant/AC radiators.


Did you ever figure out the non-consistent acceleration. I have a DMOC645 and the PV5133 and have the same problem. I determined that the DMOC is cutting power output due to motor rotor valves. I kind of wonder if the rotor resistance for the PV5133 is different than the PV5135 which the DMOC was programmed for. Any insight you could share would be most appreciated.


----------

