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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 01-17-2017, 10:19 AM   #3001 (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
Quote:
Originally Posted by motorulf View Post
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, -35°C outside now.
I had to fetch some fire wood and try to heat up this place a bit. The cat was complaining hehe
Sorry for the delay, I missed this message.
run-rotor-test did nothing?! It does take a long time to run, but yes, you are looking for best acceleration. 50-60 sounds reasonable. There is a range of values that work best. Big motors tend to be in the 25-80 range. 50-60 is fine. There is a way to compute the rotor time constant involving the stator inductance/resistance and mutual inductance, but the true value is going to be in the range of 50-60 anyway. All this is doing is figuring out what causes the best acceleration, so the "true" value isn't going to be better. Also, the true value varies a little bit with temperature, so you could compute 55, but while driving it will vary some anyway.

Yikes, -35degC is ridiculous. I've never been in anything like that!

__________________
kits and boards
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 01-17-2017, 10:39 AM   #3002 (permalink)
Ale Madeo
 
ale0502's Avatar
 
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
Hi

Hello everyone, I have my controller finished to test, or at least I think. I have several questions for Paul:
What would be the steps to be performed for the first ignition?
I have a load of 3 resistors in star, not connected to a motor, so the encoder does not rotate.
How do you use the routines run-pi-test, runrotortest, etc?

Thank you very much
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
  Reply With Quote
The Following User Says Thank You to ale0502 For This Useful Post:
MPaulHolmes (01-17-2017)
Old 01-17-2017, 10:57 AM   #3003 (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
For the PI test, do you know your stator resistance? we can skip this test if you have that info. By stator resistance, I mean 0.5*resistance between any 2 of the 3 motor cables.

Did I solder this, or did you? If you did it, you will first have to verify that the PWM can make it to the output. Do you have it hooked up to IGBTs and a bus capacitor? Could you take a picture of it and post it here?
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
ale0502 (01-17-2017)
Old 01-17-2017, 11:10 AM   #3004 (permalink)
Ale Madeo
 
ale0502's Avatar
 
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
I can measure the stator resistance with multimeter, I have several motors to test, the idea is to start with a little brushless hobby, and then skip a small 3 phase induction, to finally test my big motor to control. My idea was to do this to test and advance little by little.
I solder it, is a mix of your controller in a pcb manufactured by me connected to a piece of three-phase UPS, now I do not have photos, but in a while I take them and upload them to show you.
I checked the 6 outputs pwm leave the dspic and reach the optocouplers, the IGBT are connected and are shooting, I also have a bus capacitor.
I can see with the oscilloscope at the output (with the resistive load) is rare, it would seem that it is generating a very low frequency, I see that pwm of different DCs is generated and they change every one second approximately.
I already checked the throttle potentiometer read and I think it's fine, just like the current sensors and the encoder.

thank you
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
  Reply With Quote
The Following 2 Users Say Thank You to ale0502 For This Useful Post:
MPaulHolmes (01-17-2017), thingstodo (01-17-2017)
Old 01-17-2017, 02:25 PM   #3005 (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
You can't do the PI test with a resistive load, because the P and I values are related to the inductance and resistance of the stator coil. I would get maybe 48v, and then do
run-pi-test

and see what happens. A better way is to measure the stator resistance, and then use the following formula:

ki = 2000*3.14159*STATOR_RESISTANCE*CURRENT_SENSOR*192* 1702/(BUS_VOLTAGE*2048*10000)

For "CURRENT_SENSOR", you would use 100 if you are using a LEM Hass 100-s. This number is how many amps per 0.625 volts change in the current sensor.
So, if you are using a LEM Hass 50-s, it would be 50, a LEM Hass 300-s, you would use 300, etc... Tamura is the same way. However many amps per 0.625v is what you use.

Then, you could try Kp = 62*Ki all the way up to Kp = 100*Ki. To see what works best, you would type:

run-pi-test2

To see the actual convergence.
__________________
kits and boards
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
ale0502 (01-17-2017), cont (06-02-2019)
Old 01-20-2017, 05:13 PM   #3006 (permalink)
Ale Madeo
 
ale0502's Avatar
 
Join Date: Jan 2016
Location: Bariloche Patagonia Argentina
Posts: 32
Thanks: 22
Thanked 7 Times in 5 Posts
Hi, what is promised is due, so here is an image of my staff.



Back to the equation of ki, my brushless motor has 0,6ohm of resistance and my little induction motor has 50ohm os resistance, when I calculated ki values, give me 1002 and 83000 respectly, there are numbers too big.

ki = 2000*3.14159*STATOR_RESISTANCE*CURRENT_SENSOR*192* 1702/(BUS_VOLTAGE*2048*10000)

STATOR_RESISTANCIA = 0,6 or 50
CURRENT_SENSOR = 200
BUS_VOLTAGE = 12
__________________
Los que dicen que es imposible, no deberían molestar a los que lo están intentando...
  Reply With Quote
The Following 2 Users Say Thank You to ale0502 For This Useful Post:
kalidasbala (01-21-2017), motorulf (01-21-2017)
Old 01-20-2017, 06:16 PM   #3007 (permalink)
EcoModding Lurker
 
Join Date: Jan 2017
Location: Ireland
Posts: 12
Thanks: 0
Thanked 2 Times in 2 Posts
Dia duit ale
That sure is something to achieve and build at the end could you post a video of your controller in action on the bench driving the induction 3 phase motor mine is around 10 HP would that work for me?
  Reply With Quote
Old 01-21-2017, 01:53 AM   #3008 (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
You can make the Kp and Ki values smaller if you increase the DC voltage. They should be below around 20,000, so I would increase the DC voltage to maybe 48 or 60v. Also, the LEM Hass 200-s has a resolution of -400 to 400 amp, but that wire would probably only carry maybe a few amps, so you won't get good resolution. You can wrap the wire several times through the current sensor window to increase the sensitivity. Another loop through makes it behave like a 100amp current sensor, with a range of -200 to 200. 4 passes through the current sensor windows make the range -100 to 100. etc... I would do that before attempting any PI testing.
__________________
kits and boards
  Reply With Quote
Old 01-21-2017, 03:49 AM   #3009 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Quote:
Originally Posted by MPaulHolmes View Post
Sorry for the delay, I missed this message.
run-rotor-test did nothing?! It does take a long time to run, but yes, you are looking for best acceleration. 50-60 sounds reasonable. There is a range of values that work best. Big motors tend to be in the 25-80 range. 50-60 is fine. There is a way to compute the rotor time constant involving the stator inductance/resistance and mutual inductance, but the true value is going to be in the range of 50-60 anyway. All this is doing is figuring out what causes the best acceleration, so the "true" value isn't going to be better. Also, the true value varies a little bit with temperature, so you could compute 55, but while driving it will vary some anyway.

Yikes, -35degC is ridiculous. I've never been in anything like that!

Yes, i was waiting for it for 10 minutes, I could not notice it doing anything. I tried a couple of times.

Now i am working again, will be on tour for 4 months, no time to play with my electric car.

If any one is interested in the reverse function. I will try the diff utility in MPLABX and post the result.
  Reply With Quote
The Following User Says Thank You to motorulf For This Useful Post:
kalidasbala (01-21-2017)
Old 01-21-2017, 08:55 AM   #3010 (permalink)
EcoModding Lurker
 
Join Date: Oct 2016
Location: INDIA
Posts: 11
Thanks: 26
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by motorulf View Post

If any one is interested in the reverse function. I will try the diff utility in MPLABX and post the result.
I think many will be interested. Atleast I am interested to get the reverse functionality done - software controlled.

Btw, is there a formula to calculate the precharge resistor value? Also can I use an automotive relay (12v).

  Reply With Quote
Reply  Post New Thread




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