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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 01-05-2017, 03:28 PM   #2991 (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,119 Times in 734 Posts

__________________
kits and boards
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 01-05-2017, 03:29 PM   #2992 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Hahaha!!!

By the way, this is the motor at zero throttle. in the dead zone.

video
The video suffers from VVS (vertical video syndrom) sorry...
  Reply With Quote
Old 01-05-2017, 03:30 PM   #2993 (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,119 Times in 734 Posts
The kp and Ki are actually tracking pretty well, but are probably too small. While at zero throttle, I would try
run-pi-test2
(while using those 3333, 50)
and graph the result to see how fast the convergence is.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
motorulf (01-05-2017)
Old 01-05-2017, 03:40 PM   #2994 (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,119 Times in 734 Posts
It's controlling torque rather than rpm, and since the current range is like -400amp to 400amp max using a lem Hass 200-s, it can only really hold at like +/- 4 amps (1%). Can you hold it still with your hand?

It always has a little funny behavior when the intent is to control torque in a 2000 pound vehicle, but is unloaded.
__________________
kits and boards

Last edited by MPaulHolmes; 01-05-2017 at 03:47 PM.. Reason: Cause I felt like editing it! Back off, computer! Or so help me I will punch you.
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
motorulf (01-05-2017)
Old 01-05-2017, 03:52 PM   #2995 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Yes i can hold it with my hand, it is very weak.

I ran pi-test2
i got these results:
Code:
+0030,+0529,+0529,+0499,+0463,+0510,+0482,+0482,+0522,+0510,+0493,+0510,+0569,+0510,
+0493,+0563,+0510,+0493,+0504,+0475,+0493,+0533,+0463,+0493,+0475,+0493,+0464,+0483,
+0475,+0475,+0475,+0493,+0466,+0467,+0467,+0468,+0445,+0488,+0488,+0453,+0493,+0472,
+0469,+0477,+0455,+0475,+0478,+0476,+0477,+0462,+0479,+0464,+0495,+0481,+0496,+0494,
+0494,+0481,+0481,+0482,+0470,+0471,+0468,+0483,+0473,+0475,+0475,+0463,+0477,+0473,
+0461,+0474,+0481,+0487,+0476,+0476,+0477,+0477,+0470,+0471,+0477,+0472,+0471,+0463,
+0465,+0474,+0465,+0466,+0466,+0466,+0450,+0469,+0459,+0463,+0453,+0468,+0456,+0462,
+0462,+0469,+0451,+06,+0447,+0452,+0453,+0454,+0440,+040410,+0393,+0395,+0377,+0416,
+0362,+0382,+0402,+0364,+0376,+0378,+0410,+0369,+0382,+0360,+0324,+0363,+0347,+0366,
+0399,+0337,+030,+0330,+0327,+0347,+0330,+0332,5,+0267,+0248,+0249,+0236,+0255,+0256
,+0243,+0230,+0233,+0237,+00198,+0202,+0205,+0193,+0195,+019,+0192,+0160,+0156,+0211
,+0252,+0166,+0180,
I am not sure how to graph these though, also i think my terminal emulator is messing up the line endings, or adding line endings maybe.
  Reply With Quote
The Following User Says Thank You to motorulf For This Useful Post:
MPaulHolmes (01-05-2017)
Old 01-05-2017, 03:59 PM   #2996 (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,119 Times in 734 Posts
Oh you don't need to graph it. I wasn't thinking. Just notice that it REALLY SLOWLY approaches zero. Zero means Id and Iq have officially converged to their commanded values. Your PI values are too small. Would it be practical to do the testing with like 50 volts instead of 25v? Now that it's being a little better behaved it might be safe. Either way, I'd try maybe doubling both Kp and Ki and run
run-pi-test2 again. The goal is to get the numbers to race to zero in maybe 20 or 30 or whatever iterations. like this:

511, 490, 400, ..., 50, 0, -50, 0, 20, (hurray, it converged!)
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
motorulf (01-05-2017)
Old 01-05-2017, 08:44 PM   #2997 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
I connected 75V.
I tried to manually tune the kp and ki. i am not very good at it.
I ran pi-test, and pi-test 2. Looks like this:
Code:
run-pi-test
The test was a success.  If you are staying with this bus voltage, type 'save':
If you change your bus voltage, you should rerun the command 'run-pi-test'.

config
motor-type=1
kp=17422 ki=00281
current-sensor-amps-per-volt=0320
max-regen-position=0360
min-regen-position=0420
min-throttle-position=0500
max-throttle-position=0600
fault-throttle-position=0020
max-battery-amps=0015 amps
max-battery-amps-regen=0015 amps
max-motor-amps=025 aps
max-motor-amps-regen=025 amps
precharge-time=0050 tenths of a sec
rotor-time-constant=030 ms
pole-pairs=002
max-rpm=06000 rev/min
throttle-type=0
encoder-ticks=0256 ticks/rev
pi-ratio=062
raw-throttle=0479

run-pi-test2
+0019,+0539,+0520,+0492,+0465,+0373,+0253,+0151,+0177,+0209,+0235,+0248,+0223,+0203,
+0184,+0128,+0096,+0055,+0168,+0188,+0145,+0117,+0067,+0128,+0115,+0088,+0091,+0104,
+0087,+0056,+0065,+0064,+0058,+0066,+0071,+0076,+0090,+0083,+0080,+0057,+0056,+0082,
+0074,+0036,+0060,+0067,+0062,+0017,+0020,+0028,-0022,+0038,+0029,+0034,+0059,+0103,
+0089,+0037,+0022,+0030,+0077,+0021,+0012,+0033,+0039,+0038,+0026,+0008,+0006,+0012,
-0018,-0006,+0033,+0062,+0063,-0007,-0034,+0023,+0024,+0039,+0016,+0003,+0032,+0070,
+0016,+0004,+0020,-0018,+0003,+0015,+000+0025,+0018,+0043,-0002,-0034,-0018,+0048,+0
018,-0014,+0003,-0056,-0072,-0027,+0010,+0040,+0042,+0061,+0025,-0022,+0001,+0015,+0
005,+0006,+0005,+0001,-0009,-0006,-0008,-0036,-0044,-0004,+0017,+0045,-0016,-0022,-0
021,-0006,+0033,+0032,+0002,-0003,-0006,-0010,-0003,-0021,-0012,+0004,+0023,+0027,+0
022,+0011,-0001,-0002,+0002,+0002,+0011,+0013,-0023,-0056,-0086,-0042,-0019,+0023,+0
049,+0017,+0022,+0008,+0000,-0011,-0005,-0012,-0022,-0040,-0020,-0016,-0006,+0028,+0
013,-0007,-0041,-0034,-0035,-0014,+0041,+0052,+0012,-0034,-0082,-0018,+0001,-0002,+0
024,+0014,-0009,-0004,-0018,-0035,-0005,+0026,-0034,-0062,-00017,+0020,-0018,-0054,-
0038,+0033,,-0007,-0016,-18,-0015,-0016,-0007,-0058,-0033,-0049,-0053,+0020,+0078,+0
032,-0041,-0019,-0013,-0017,-0017,-0025,-0049,-0035,-0023,+0027,+0027,+0011,-0067,-0
085,
Then i was trying to do the rotor-test.
It never does anything. no humming, no movement.
So i tried altering the rotor-time-constant myself. I find that hard too.
After much testing i decided that somewhere around 50-60 gives the fastest acceleration.
Is that what to look for?
And does the ki and kp look resonable?
How do i calculate the rotor-time-constant if i have resistance and inductance?
I have an old scope so i guess i can calculate the inductance of the motor.

My testing had to be put on hold for a while, -35C outside now.
I had to fetch some fire wood and try to heat up this place a bit. The cat was complaining hehe
  Reply With Quote
Old 01-06-2017, 07:15 PM   #2998 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
I hade some success with the reverse.
Now there is full power going backwards too, but thats just thrilling
Not quite ready for public release yet, but soon.

I made a small adapter that connects to the ICSP.
Thats because in the newest source code it looked like all other pins are in use.
The negative side of that is that you can no longer debug the code.
I took the LED output and had it show when the reverse is enabled or not.
So you can see that it will not let it change into reverse unless it is rotating really slow.

In the video the throttle is setup with clockwise=accelerate, anticlockwise=regen.


Last edited by motorulf; 01-06-2017 at 07:29 PM..
  Reply With Quote
The Following 2 Users Say Thank You to motorulf For This Useful Post:
dave koller (01-06-2017), MPaulHolmes (01-06-2017)
Old 01-06-2017, 09:11 PM   #2999 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
What about having a momentary switch for the reverse. Then we could also use it for cruise control

Like this:
Motor is not rotating and the brake is applied, you push the button, it switches between forward and reverse. Still with a LED indicating the choice.
Motor is rotating, you push the button, the cruise control is enabled (maybe not while reversing).
You apply brakes, cruise control is disabled.
You apply a lot of throttle, or a fast rise, cruise control is disabled.

Good or bad idea?
  Reply With Quote
The Following User Says Thank You to motorulf For This Useful Post:
MPaulHolmes (01-06-2017)
Old 01-06-2017, 09:27 PM   #3000 (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,119 Times in 734 Posts
Sounds like a real cruise control to me!

__________________
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 7350 07-28-2021 06:32 AM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Contest! Name Paul & Sabrina's controller MetroMPG Forum News & Feedback 120 10-22-2011 02:59 PM



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