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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 05-27-2015, 10:26 AM   #1861 (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
May 26, 10 pm

Now that I have it working again, time for some testing.

The text files are attached with a couple of spreadsheets to show the graphs. I don't see a bunch of difference in the graphs myself. The graphs may be a lot easier to read, or show much more change with the changing parameters, with a higher voltage pack.

When I tune a loop at work, the drill is:
- increase the gain (kp) until you see over-shoot and oscillation
- decrease the gain until you get about 10% overshoot
- raise the integral (ki) until the oscillation drops to 3 or 4. Initial overshoot is the first half-wave, smaller overshoot below, another smaller overshoot above, and then it hits target

I think I've been assuming too many things on this process. I need to stop thinking and just follow instructions .. but I'm an engineer and this is *DIFFICULT* for me!

If any of these numbers is acceptable, I'd like to get the motor to spin and see if the encoder signal is acceptable to the controller. Once I've got the 5 HP motor to spin and the controller is reading position, I am comfortable moving to the larger Siemens motor at a higher voltage (in the garage). That's where the interesting stuff is going to happen (I hope).

kp-id 2000
ki-id 0
run-pi-test
File 25

kp-id 2000
ki-id 2
run-pi-test
File 26

kp-id 2000
ki-id 4
run-pi-test
File 27

kp-id 2000
ki-id 6
run-pi-test
File 28

kp-id 2000
ki-id 10
run-pi-test
File 29

kp-id 2000
ki-id 15
run-pi-test
File 30

kp-id 2000
ki-id 20
run-pi-test
File 31

kp-id 2000
ki-id 30
run-pi-test
File 32

kp-id 2000
ki-id 50
run-pi-test
File 33

kp-id 2000
ki-id 75
run-pi-test
File 34

kp-id 2000
ki-id 100
run-pi-test
File 35

kp-id 2000
ki-id 200
run-pi-test
File 36

Attached Files
File Type: txt 25.txt (4.1 KB, 16 views)
File Type: xls 25.xls (84.5 KB, 21 views)
File Type: txt 26.txt (4.1 KB, 17 views)
File Type: xls 26.xls (84.5 KB, 38 views)
File Type: txt 27.txt (4.1 KB, 16 views)
File Type: xls 27.xls (84.5 KB, 34 views)
File Type: txt 28.txt (4.1 KB, 18 views)
File Type: txt 29.txt (4.1 KB, 20 views)
File Type: txt 30.txt (4.1 KB, 15 views)
File Type: txt 31.txt (4.1 KB, 23 views)
File Type: txt 32.txt (4.1 KB, 19 views)
File Type: txt 33.txt (4.1 KB, 19 views)
File Type: txt 34.txt (4.1 KB, 18 views)
File Type: txt 35.txt (4.1 KB, 26 views)
File Type: txt 36.txt (4.1 KB, 24 views)
File Type: xls 36.xls (84.5 KB, 28 views)
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 05-27-2015, 11:33 AM   #1862 (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
Maybe the 20amps is just too much at such a low voltage. What is the line to line resistance?
__________________
kits and boards
  Reply With Quote
Old 05-27-2015, 11:52 AM   #1863 (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
Maybe the 20amps is just too much at such a low voltage. What is the line to line resistance?
Will check when I get home.
  Reply With Quote
Old 05-27-2015, 12:39 PM   #1864 (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
I think I found why it wasn't working... My guess is the voltage is low enough that the following fault is happening:

Code:
	if (pi_Id.pwm > MAX_VD_VQ*1024L) {
		pi_Id.pwm = MAX_VD_VQ*1024L;
		faultBits |= PI_OVERFLOW_FAULT;
	}
	else if (pi_Id.pwm < -MAX_VD_VQ*1024L) {
		pi_Id.pwm = -MAX_VD_VQ*1024L;		
		faultBits |= PI_OVERFLOW_FAULT;
	}
	if (pi_Iq.pwm > MAX_VD_VQ*1024L) {
		pi_Iq.pwm = MAX_VD_VQ*1024L;
		faultBits |= PI_OVERFLOW_FAULT;
	}
	else if (pi_Iq.pwm < -MAX_VD_VQ*1024L) {
		pi_Iq.pwm = -MAX_VD_VQ*1024L;		
		faultBits |= PI_OVERFLOW_FAULT;
	}
You don't have enough voltage, so it is ramping up the pwm beyond what it should go to to vainly attempt to achieve 20amps on a line. Evidently, that 39 or 40v point is right on the edge. I should either reduce it to 10 amps for tuning the loop, or increase voltage. I can email you a 10amp version (that is hard wired into the code) if you want to go that route, but I think higher voltage would be better.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (05-27-2015)
Old 05-27-2015, 01:57 PM   #1865 (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
I can email you a 10amp version (that is hard wired into the code) if you want to go that route, but I think higher voltage would be better.
No need for a code change. 36V is what I had handy, but I can install more.

I can patch in the smaller 48V pack quite easily. 20A is already quite low compared to the 300A scale on the LEM.

And I'll check the line to line resistance anyway.
  Reply With Quote
Old 05-28-2015, 12:22 AM   #1866 (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
Will check when I get home.
Motor - 5 HP baldor 208/230 460V. full load amps 13.6A at 208

wiring
Motor phase Color Controller output
a = white = W
b = black = U
c = red = V

Phase measurements
ab 0.88 Ohms
ac 0.92 Ohms
bc 0.96 Ohms
  Reply With Quote
Old 05-28-2015, 12:32 AM   #1867 (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
No need for a code change. 36V is what I had handy, but I can install more.

I can patch in the smaller 48V pack quite easily. 20A is already quite low compared to the 300A scale on the LEM.
Voltage - 84V, 40.1V from 3 x 12V lead, 44V from 4 x 12V gel cells

Kp-id 2000
Ki-id 0
run-pi-test
file 40

Kp-id 2000
Ki-id 2
run-pi-test
file 41

It seems to me like:
- my little 48V gel cell pack can't supply enough current
- the test goes OK for a short time and then it can't sustain the current
- the PWM algorithmn gives up
Attached Files
File Type: txt 40.txt (4.2 KB, 16 views)
File Type: xls 40.xls (84.5 KB, 29 views)
File Type: txt 41.txt (4.1 KB, 30 views)
File Type: xls 41.xls (84.5 KB, 37 views)
  Reply With Quote
Old 05-28-2015, 12:48 AM   #1868 (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
Plan B

Get a glass mat 12V battery out of my sprayer, remove the 48V gel cell pack, add the glass mat into the pack (with a charger on it since it is likely a bit low). 4 x 12V lead, 40.1V plus the new battery (on a charger - 14.1V)

Battery pack voltage is 54.2V

Hopefully one of these sets of parameters is 'close enuf' and I can use the settings to spin the motor soon. I don't understand what Paul is looking for in the response graph, so I've posted all of the tests.

Sorry about the span of the tests - I get impatient when I'm running tests and end up doubling instead of going up 2 at a time

Kp-id 2000
Ki-id 0
run-pi-test
file 50

Kp-id 2000
Ki-id 2
run-pi-test
file 51

Kp-id 2000
Ki-id 4
run-pi-test
file 52

Kp-id 2000
Ki-id 10
run-pi-test
file 53

Kp-id 2000
Ki-id 20
run-pi-test
file 54

Kp-id 2000
Ki-id 40
run-pi-test
file 55

Kp-id 2000
Ki-id 80
run-pi-test
file 56

Kp-id 2000
Ki-id 160
run-pi-test
file 57

Kp-id 2000
Ki-id 320
run-pi-test
file 58
Attached Files
File Type: txt 50.txt (4.2 KB, 17 views)
File Type: xls 50.xls (84.5 KB, 24 views)
File Type: txt 51.txt (4.2 KB, 16 views)
File Type: xls 51.xls (84.5 KB, 19 views)
File Type: txt 52.txt (4.1 KB, 19 views)
File Type: xls 52.xls (84.5 KB, 20 views)
File Type: txt 53.txt (4.1 KB, 16 views)
File Type: xls 53.xls (84.5 KB, 27 views)
File Type: txt 54.txt (4.1 KB, 19 views)
File Type: xls 54.xls (84.5 KB, 24 views)
File Type: txt 55.txt (4.1 KB, 21 views)
File Type: xls 55.xls (84.5 KB, 24 views)
File Type: txt 56.txt (4.1 KB, 16 views)
File Type: xls 56.xls (84.5 KB, 20 views)
File Type: txt 57.txt (4.1 KB, 18 views)
File Type: xls 57.xls (84.5 KB, 26 views)
File Type: txt 58.txt (4.1 KB, 19 views)
File Type: xls 58.xls (84.5 KB, 26 views)
  Reply With Quote
Old 05-29-2015, 12:30 AM   #1869 (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
Plan B revisited

I added two older batteries (I think they came from a floor sweeper about 5 years ago) to the pack. That brings the voltage to 79.1V. A charger on the weakest ... by the end of the testing the voltage was up to 79.3V

I re-ran the pi-test with the same parameters as yesterday, but with the larger pack (higher voltage).

The results look *VERY* much different. I guess the voltage was just too low for the Kp and Ki values to make a lot of difference!

I think the Kp-id=2000, Ki-id=320 looks like the best fit from me.
Attached Files
File Type: txt 60.txt (4.2 KB, 13 views)
File Type: xls 60.xls (84.5 KB, 17 views)
File Type: txt 61.txt (4.1 KB, 16 views)
File Type: xls 61.xls (84.5 KB, 41 views)
File Type: txt 62.txt (4.2 KB, 17 views)
File Type: xls 62.xls (84.5 KB, 33 views)
File Type: txt 63.txt (4.1 KB, 15 views)
File Type: xls 63.xls (84.5 KB, 22 views)
File Type: txt 64.txt (4.2 KB, 15 views)
File Type: xls 64.xls (84.5 KB, 13 views)
File Type: txt 65.txt (4.1 KB, 17 views)
File Type: xls 65.xls (84.5 KB, 22 views)
File Type: txt 66.txt (4.1 KB, 19 views)
File Type: xls 66.xls (84.5 KB, 14 views)
File Type: txt 67.txt (4.1 KB, 13 views)
File Type: xls 67.xls (84.5 KB, 21 views)
File Type: txt 68.txt (4.2 KB, 16 views)
File Type: xls 68.xls (84.5 KB, 19 views)
File Type: txt 69.txt (4.1 KB, 13 views)
File Type: xls 69.xls (84.5 KB, 30 views)
File Type: txt 70.txt (4.2 KB, 19 views)
File Type: xls 70.xls (84.5 KB, 33 views)
  Reply With Quote
The Following User Says Thank You to thingstodo For This Useful Post:
MPaulHolmes (05-29-2015)
Old 05-29-2015, 01:03 PM   #1870 (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
That is looking good. You should now try maybe 3000 or 4000 (or more?) for kp, and gradually increase ki in that situation too (starting small). haha. I bet you can get even faster convergence.

__________________
kits and boards
  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