Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-27-2015, 12:45 AM   #1891 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Update for Aug 26

I finally got back into the garage and set up properly with the AC controller, battery pack, motor and laptop.

I have some video and some pictures of the setup. When I get it edited and posted it should be detailed enough to remind me how to set it up. If anyone stays awake until the end, and it's not detailed enough for you to follow, let me know

New results for Paul with Kp-id 2000, Ki-id starting at 0 and going through 2,4,6,8,10,15,20,30,40,50,75,100,125,150,175,200

Log files start at 110 and go up to 127. Looks like I should have stepped Kp-id up from 10 to 20 in increments of 1 instead of increments of 5?

Pack is about 126V, so the controller sagging below 40VDC during the test should no longer be a problem.

The updates should be coming regularly again.

https://youtu.be/jWgh7qwtRy8

Attached Files
File Type: txt 110.txt (4.1 KB, 20 views)
File Type: xls 110.xls (27.5 KB, 22 views)
File Type: txt 111.txt (4.2 KB, 14 views)
File Type: xls 111.xls (27.5 KB, 12 views)
File Type: txt 112.txt (4.1 KB, 17 views)
File Type: xls 112.xls (27.5 KB, 16 views)
File Type: txt 113.txt (4.2 KB, 12 views)
File Type: xls 113.xls (27.5 KB, 47 views)
File Type: txt 114.txt (4.1 KB, 16 views)
File Type: xls 114.xls (27.5 KB, 18 views)
File Type: txt 115.txt (4.1 KB, 24 views)
File Type: xls 115.xls (27.5 KB, 39 views)
File Type: txt 116.txt (4.2 KB, 18 views)
File Type: xls 116.xls (27.5 KB, 17 views)
File Type: txt 117.txt (8.3 KB, 18 views)
File Type: xls 117.xls (47.5 KB, 13 views)
File Type: txt 118.txt (8.3 KB, 18 views)
File Type: xls 118.xls (47.5 KB, 12 views)
File Type: txt 119.txt (4.1 KB, 13 views)
File Type: xls 119.xls (27.5 KB, 24 views)
File Type: txt 120.txt (4.2 KB, 12 views)
File Type: xls 120.xls (27.5 KB, 17 views)
File Type: txt 121.txt (4.2 KB, 12 views)
File Type: xls 121.xls (27.5 KB, 12 views)
File Type: txt 122.txt (4.2 KB, 13 views)
File Type: xls 122.xls (27.5 KB, 15 views)
File Type: txt 123.txt (4.2 KB, 14 views)
File Type: xls 123.xls (27.5 KB, 17 views)
File Type: txt 124.txt (4.2 KB, 15 views)
File Type: xls 124.xls (27.5 KB, 17 views)
File Type: txt 125.txt (4.2 KB, 22 views)
File Type: xls 125.xls (27.5 KB, 34 views)
File Type: txt 126.txt (4.2 KB, 18 views)
File Type: xls 126.xls (27.5 KB, 13 views)
File Type: txt 127.txt (4.2 KB, 20 views)
File Type: xls 127.xls (27.5 KB, 14 views)

Last edited by thingstodo; 09-09-2015 at 01:28 AM.. Reason: Added video link
  Reply With Quote
The Following 2 Users Say Thank You to thingstodo For This Useful Post:
Astro (08-27-2015), MPaulHolmes (08-27-2015)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-27-2015, 08:06 AM   #1892 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
My thinking is that KP-ID 2000 is too big. Notice the first graph of Kp = 2000, Ki = 0, the error VERY QUICKLY goes to zero, but then zooms past and slowly goes to zero from the negative side. That overshoot of zero means Kp is too aggressive. My understanding is, when you double the voltage with PI loop tuning, that you have to cut Kp and Ki in half to get the same response time. And with a different, very large motor, maybe the current can change very fast due to very low resistance in the 3 stator coils? Try this:

Kp = 100 Ki = 0
Kp = 200 Ki = 0
Kp = 300 Ki = 0
...
And see if you get ZERO overshoot, meaning the error numbers don't zoom from + to - like this sample:
+0259
+0259
+0179
+0179
+0099
-0109
-0285
-0349
-0285
-0253
-0205
-0173
-0173
-0253
-0301
-0269
-0269
-0221
-0189

If you see it go from + to -, that's a sign that your Kp (or Ki or both) number is too big. We may have to increase the resolution of Kp and Ki in the software too. Your motor is a very interesting test case. I've never tried tuning the loop on such a big AC motor.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (08-27-2015)
Old 08-27-2015, 10:06 AM   #1893 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by MPaulHolmes View Post
My thinking is that KP-ID 2000 is too big. Notice the first graph of Kp = 2000, Ki = 0, the error VERY QUICKLY goes to zero, but then zooms past and slowly goes to zero from the negative side. That overshoot of zero means Kp is too aggressive. My understanding is, when you double the voltage with PI loop tuning, that you have to cut Kp and Ki in half to get the same response time. And with a different, very large motor, maybe the current can change very fast due to very low resistance in the 3 stator coils? Try this:

Kp = 100 Ki = 0
Kp = 200 Ki = 0
Kp = 300 Ki = 0
...
And see if you get ZERO overshoot, meaning the error numbers don't zoom from + to - like this sample:
+0259
+0259
+0179
+0179
+0099
-0109
-0285
-0349
-0285
-0253
-0205
-0173
-0173
-0253
-0301
-0269
-0269
-0221
-0189

If you see it go from + to -, that's a sign that your Kp (or Ki or both) number is too big. We may have to increase the resolution of Kp and Ki in the software too. Your motor is a very interesting test case. I've never tried tuning the loop on such a big AC motor.
Good - we're getting to "rules of thumb" and being able to recognize good data and bad data. I like this kind of stuff

Starting at Kp-id=2000 was too high .. OK. Being me, I'll likely do the double/half thing and try 1000, then 500, then 250 until we get no overshoot, then go back up until we get just a bit of overshoot. That's what we do to tune a loop at work ... does that apply here?

So at that point I begin to raise the Ki-id from 0 to converge as quickly as possible, getting rid of the overshoot (perhaps allowing maybe 1% overshoot for the first half cycle?)

My testing will be done with 125VDC, since I can run both the DC motor controller and the AC motor controller at this voltage, off the same pack. When my stepson puts the Siemens motor into his RX8 (in maybe 2 years?) I expect that it will be running with at least 250VDC ... more if he can fit the batteries in. So a complete re-tune would be required, right?
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
MPaulHolmes (08-27-2015)
Old 08-27-2015, 10:22 AM   #1894 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
No retune will be needed at the higher voltage. I tried it out with my motor at 48v. It was tuned, and then I tested it at 96v, and cut the Kp and Ki values in half and sure enough, I got the exact same convergence curve. I think your tuning idea of half/double rather than linear increase sounds much better. It's probably a lot faster to do it that way.

By the way, It's OK if the PI loop doesn't converge to zero with Kp = xxx, and Ki = 0. You just don't want it going negative. It should level off to some fixed value close to zero though. Then, slowly increment Ki 1 at a time to get it to converge to zero. And I think a 1 or 2% overshoot wouldn't be a big deal. Also, There's going to be some noise, so if it's going +27, -35, +13, -12, -40, +31, that wouldn't count as overshoot. It's just noise.

We are concerned about going from positive to negative, where it is more negative than say, -60.

-Paul
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (08-27-2015)
Old 08-27-2015, 02:31 PM   #1895 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
I have a couple of questions; I'm trying to catch up here.

Is the PI loop for overall motor control or specifically for induction motor control, IE controlling the slip?

Also, thingstodo: Does your stepson need a Siemens motor? I've got one. It's practically brand new - first it sat in Brammo's shop, where they were going to do a 4 motor AWD racecar. Then I got it and it sat in my shop. (I've decided to go with the Toyota MGR).

- E*clipse
  Reply With Quote
The Following 2 Users Say Thank You to e*clipse For This Useful Post:
MPaulHolmes (08-27-2015), thingstodo (08-27-2015)
Old 08-27-2015, 02:38 PM   #1896 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
The PI loop is so you can command Id and Iq to be whatever you want (and they will listen! haha). They are the 2 "dc" components that are responsible for field strength and torque. It's the same thing with brushless DC. But when you have the magnets, you normally want Id to be 0, since there's already a field from the magnets. But when you want to weaken the magnets, you command Id to be negative to fight the magnet strength. For the MGR, you will also command Id and Iq to be various things, but I think the ideal Id and Iq changes as the RPM and load changes. But you still need to command Id and Iq, so even for the MGR, you would go through this process.

I already tuned a brushless DC motor too, and the code for running that motor was basically identical to the code for the induction motor, except for how to know the rotor flux angle. But in each case you still need the PI loop to be able to command Id and Iq.
__________________
kits and boards
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
e*clipse (08-27-2015), thingstodo (08-27-2015)
Old 08-27-2015, 07:40 PM   #1897 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by e*clipse View Post
Also, thingstodo: Does your stepson need a Siemens motor? I've got one. It's practically brand new - first it sat in Brammo's shop, where they were going to do a 4 motor AWD racecar. Then I got it and it sat in my shop. (I've decided to go with the Toyota MGR
Andrew has a siemens motor, from EVTV, along with the adapter plate to make it fit netgain motor/transmission adapter plates.

I, on the other hand, could use a Siemens motor.

But looking at this holistically, it would be better for both of us if you could find someone local to purchase it .. the shipping to Canada will be nasty .. it was nasty from EVTV .. and the forms to get it through customs are not pleasant to fill out.

I think I'm dreaming of using a TESLA drivetrain (motor/gearbox/controller) with an EVTV CAN interface (to feed the controller the codes that it wants) for my next build. But that assumes that I can find someone to solve the problems of mating a TESLA rear-end to the axles and suspension of a one ton truck. I'm not really a car guy .. I like trucks. And if I'm going to do a conversion, it may as well be able to haul my boat. It just doesn't need to do that at 130 mph (if I don't increase the tire size ... maybe 160 mph if I do)

This, of course, assumes that I finish:
1 - my Mazda build (DC netgain 11, maybe P&S controller)
2 - my grandson's go-cart-like vehicle (48V, Curtis controller),
3 - a side-by-side quad that is based on the WIKISPEED open source design

... so any new project, including the truck, is a ways into the future!
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
MPaulHolmes (08-27-2015)
Old 08-27-2015, 09:50 PM   #1898 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Update for Aug 27

I captured run-pi-test for Kp-id =
1000, 500, 250, 125, 64, 32, 16, 8,4,2 and finally 1.

I can't get any lower than 1 ... and there is still some MEAN overshoot ... so how bad does using decimals mess up your code, Paul?

Here's the data, for posterity
Attached Files
File Type: txt 130.txt (4.2 KB, 14 views)
File Type: xls 130.xls (93.0 KB, 18 views)
File Type: txt 131.txt (4.1 KB, 16 views)
File Type: xls 131.xls (96.0 KB, 14 views)
File Type: txt 132.txt (4.2 KB, 15 views)
File Type: xls 132.xls (96.0 KB, 13 views)
File Type: txt 133.txt (4.2 KB, 31 views)
File Type: xls 133.xls (83.5 KB, 13 views)
File Type: txt 134.txt (4.2 KB, 17 views)
File Type: xls 134.xls (96.0 KB, 18 views)
File Type: txt 135.txt (4.2 KB, 13 views)
File Type: xls 135.xls (96.0 KB, 13 views)
File Type: txt 136.txt (4.2 KB, 18 views)
File Type: xls 136.xls (96.0 KB, 24 views)
File Type: txt 137.txt (4.1 KB, 15 views)
File Type: xls 137.xls (96.0 KB, 16 views)
File Type: txt 138.txt (4.1 KB, 17 views)
File Type: xls 138.xls (96.0 KB, 13 views)
File Type: txt 139.txt (4.1 KB, 16 views)
File Type: xls 139.xls (96.0 KB, 12 views)
File Type: txt 140.txt (4.1 KB, 15 views)
File Type: xls 140.xls (96.0 KB, 17 views)
  Reply With Quote
Old 08-27-2015, 11:54 PM   #1899 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by thingstodo View Post
I can't get any lower than 1 ... and there is still some MEAN overshoot ... so how bad does using decimals mess up your code, Paul?
Umm ... dumb question ...

Can you test for a larger (much larger) current instead of the target 20 amps (I think that's what you said the target was)?

Like .. maybe .. 200 amps? Or 2000 amps? That's sorta like having on decimal place (200) or 2 decimal places (2000) on Kp and Ki, right?

The motor is rated for 400 amps continuous, so pushing 200 amps is no problem. 2000 may be a bit more of a challenge, depending on how much energy is stored in that big ring-cap .. instead of messing with your math code.

Let me know!
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
MPaulHolmes (08-28-2015)
Old 08-28-2015, 01:27 AM   #1900 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
It should be pretty easy to increase the resolution, so that 1 would become 10000. I'll do that some time tomorrow. we could also up the current some for better resolution. I'll do that too.

__________________
kits and boards
  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul & Sabrina's cheap DIY 144v motor controller MPaulHolmes Open ReVolt: open source DC motor controller 7381 08-02-2023 10:55 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 PM
Contest! Name Paul & Sabrina's controller MetroMPG Forum News & Feedback 120 10-22-2011 01:59 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com