Nissan Leaf Motor test with DIY controller

Status
Not open for further replies.

MPaulHolmes

10 mW
Joined
Jan 16, 2016
Messages
24
Hello, I finally got my Nissan Leaf motor working with my homemade controller:
https://www.youtube.com/watch?v=qzlLh8xxx1g
I'm just so happy I wanted to share. haha

The software is field oriented control. I can't wait to get this thing in a car.
 
MPaulHolmes said:
Hello, I finally got my Nissan Leaf motor working with my homemade controller:
https://www.youtube.com/watch?v=qzlLh8xxx1g
I'm just so happy I wanted to share. haha

The software is field oriented control. I can't wait to get this thing in a car.

What software? Your own code?
If so, can your code support an IPM motor properly?
 
Cool and congrats.
 
This is great, thanks for sharing!

-JD
 
Nice capacitor choice.

Do you have a design phase current?
 
Ya, it's my own code. I did it from scratch. I was tempted to look at the microchip FOC code, but wanted a personal challenge just by starting with the formulas. I didn't know it was an interior permanent magnet motor until a few days ago. It's not a big deal to modify Id and Iq to account for that. I'll probably do it this weekend. I made a really fast square root based from Andre Lamothe's tricks of the game programming gurus, and is accurate to +/- 0.0001 or so, so it won't take very many extra cycles to do the IPM modification.

I'm hoping for short periods of 400ampRMS per phase with the 600v 600amp powerex IGBTs. I made my own liquid cooling, so hopefully this will be practical. I think it will be OK. I've done a DC controller with an identical power section, and one guy tested his with the peak motor amps set to 515 per IGBT (each IGBT had its own hardware overcurrent protection and desaturation detection and current monitoring. It would of course be about the same for all 3, but I was just being paranoid)
Here's AC the code:
https://github.com/MPaulHolmes/AC-Controller

Here's the instructable:
http://www.instructables.com/id/200kW-AC-Motor-Controller-for-Electric-Car/

Just yesterday I finally fixed case where you need the initial index pulse to know the absolute position of the motor. I haven't uploaded the update though. I'll do that tonight I think.
 
Here's a test of the controller on an AC induction motor. He has it doing battle against a DC motor. The DC motor spins the AC motor, and then you "regen" to fight against the DC spin. The phase current gets up to 360amp.
https://youtu.be/GR2rcev1Mlo
 
MPaulHolmes said:
Here's a test of the controller on an AC induction motor. He has it doing battle against a DC motor. The DC motor spins the AC motor, and then you "regen" to fight against the DC spin. The phase current gets up to 360amp.
https://youtu.be/GR2rcev1Mlo
Did you test your IPM code yet on the Leaf motor? Notice any difference? :)
 
I did get part way with my own code a few years back I am definitely interested in spending more time on the code now.
 
I'll hopefully get another video tomorrow. The software has been updated quite a bit, and now is a lot smoother when it hits zero. No more sudden jerky stops due to the magnets. I finished a controller and sent it to someone who has a Leaf motor. They are going to put it in a home made dune buggy sort of thing. He's the type that doesn't mind destructive tests, and will probably test some accelerations with the phase current set to around 550 or 600amp peak. It's liquid cooled, so it might not mind that for short periods.

I also finished a couple of the AC boards and sent them today to someone else who has some Tesla motors and battery packs that they are going to experiment with! I'll let him talk about that though if he wants to. I don't want to volunteer too much info.

I also just sent in some new boards including a resolver to encoder board that has a built in pot so you can quickly figure out the specs of an unknown resolver. The car companies are TERRIBLE about telling the necessary information. I couldn't get anything out of the company that makes the resolver for the Leaf. But now all their secrets have been laid bare. haha.

I also just sent in a new AC control/driver board that is (almost) all surface mount and one sided, so assembly will be a TON easier:
http://i419.photobucket.com/albums/pp280/MPaulHolmes/NewACController.png

It also has the resolver to encoder on board so you can do any old motor interface type. I also added CANbus and voltage monitoring and a 2nd temperature monitor and a brake input, so you can regen without having to use the throttle in a wig wag configuration (wig wag: positive throttle is "go forward", negative throttle is regen, or go in reverse when you run out of regen).
 
I just got the field oriented control "interior permanent magnet" correction working with the leaf motor. Basically, with a high "saliency" motor, you use Id = 0, Iq = current magnitude. But for buried magnets, , there's also some of the torque from reluctance torque. I guess that's the stator pulling toward the steel laminations between the magnets (I think that's how it works). At any rate, to get the best torque per amp, you start with a current magnitude, and break it up into Id and Iq, where Id is negative. The formula, found here
at around the 22 minute mark:
https://www.youtube.com/watch?v=bZwLFpXhFbI

But instead of all that crap I think you can just run through all Id from 0 down to -sqrt(currentMagnitude). The goal was to find the best torque for the fixed magnitude. To quantify best torque (because who the heck has a torque measuring thing), I started the motor at 0 rpm, and checked what caused the motor to accelerate until the motor ran out of voltage in the shortest time (so, during that whole time, currentMagnitude was constant).

Then, I tried again with a fixed magnitude of 23amp, and found that the ideal Id was about half of the ideal Id for 12amp. Here's a video:
https://www.youtube.com/watch?v=VTn4fKNVbGc
 
MPaulHolmes said:
I just got the field oriented control "interior permanent magnet" correction working with the leaf motor. Basically, with a high "saliency" motor, you use Id = 0, Iq = current magnitude. But for buried magnets, , there's also some of the torque from reluctance torque. I guess that's the stator pulling toward the steel laminations between the magnets (I think that's how it works). At any rate, to get the best torque per amp, you start with a current magnitude, and break it up into Id and Iq, where Id is negative. The formula, found here
at around the 22 minute mark:
https://www.youtube.com/watch?v=bZwLFpXhFbI

But instead of all that crap I think you can just run through all Id from 0 down to -sqrt(currentMagnitude). The goal was to find the best torque for the fixed magnitude. To quantify best torque (because who the heck has a torque measuring thing), I started the motor at 0 rpm, and checked what caused the motor to accelerate until the motor ran out of voltage in the shortest time (so, during that whole time, currentMagnitude was constant).

Then, I tried again with a fixed magnitude of 23amp, and found that the ideal Id was about half of the ideal Id for 12amp. Here's a video:
https://www.youtube.com/watch?v=VTn4fKNVbGc

I think the terminology is NO saliency = Id = 0
salieicy (ie IPM) then you have ID |=0

clearly you understand how it works , just poking at your vocabulary :-D
 
haha! Oops. It's just that the K is super big when Id = 0, so I thought that meant "super duper saliency". I got a 1.2 gpa in high school, so I missed a lot of the vocabulary. LOL. I guess I could have googled saliency. Another way to look at it is, if I can hold the line and stay consistent with my wrong usage of the word, and it catches on, maybe in 500 years it really will mean what I thought.
 
Any updates Paul? Any feedback from the beta testers? How many Amps can be shoved into the leaf motor?
 
Bowser330 said:
How many Amps can be shoved into the leaf motor?
Lots.

My measurements show 10 mohm and ~230uH phase to phase.
 
Arlo1 said:
Bowser330 said:
How many Amps can be shoved into the leaf motor?
Lots.

My measurements show 10 mohm and ~230uH phase to phase.
Did you post 0.0008 H before? That's what I had in my spreadsheet for cap sizing.
 
okashira said:
Arlo1 said:
Bowser330 said:
How many Amps can be shoved into the leaf motor?
Lots.

My measurements show 10 mohm and ~230uH phase to phase.
Did you post 0.0008 H before? That's what I had in my spreadsheet for cap sizing.

Colossus is 8uH the leaf motor is 230-240uH
You might have mixed the 2 up.
Colossus is wound for 50v the leaf motor is wound for 360v
 
Damn, you made me go find it.

https://endless-sphere.com/forums/viewtopic.php?f=30&t=35387&p=863407&hilit=+leaf+inductance#p863407

I am sure you posted elsewhere it's 800 uH too
 
okashira said:
Damn, you made me go find it.

https://endless-sphere.com/forums/viewtopic.php?f=30&t=35387&p=863407&hilit=+leaf+inductance#p863407

I am sure you posted elsewhere it's 800 uH too
Sorry post corrected. That was a bad measurement with the rusty phase wires attached that go to the inverter.

Look at the motor data spread sheet from miles. https://endless-sphere.com/forums/viewtopic.php?f=30&t=65757

I keep all info I can updated there.
 
Arlo1 said:
okashira said:
Damn, you made me go find it.

https://endless-sphere.com/forums/viewtopic.php?f=30&t=35387&p=863407&hilit=+leaf+inductance#p863407

I am sure you posted elsewhere it's 800 uH too
Sorry post corrected. That was a bad measurement with the rusty phase wires attached that go to the inverter.

Look at the motor data spread sheet from miles. https://endless-sphere.com/forums/viewtopic.php?f=30&t=65757

I keep all info I can updated there.

Cool, thanks.
I need to get measuring the spark ev motor. I am afraid how low it might be
 
okashira said:
Cool, thanks.
I need to get measuring the spark ev motor. I am afraid how low it might be
What voltage does it run?

I would not worry :)
 
Status
Not open for further replies.
Back
Top