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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 10-08-2014, 03:25 PM   #1181 (permalink)
EcoModding Apprentice
 
dave koller's Avatar
 
Join Date: Feb 2010
Location: Northern Wisconsin
Posts: 137
Thanks: 32
Thanked 35 Times in 21 Posts
Quote:
Originally Posted by MPaulHolmes View Post
From those two tests, you deduce like 15 different things.
LOL since you have Asperger's syndrome and I have similar and an immense case of A.D.D. - when I code I see the 500 hundred ways one line can go - so I write my algorithms backwards in my mind from the path of least trouble. I try to write code with the idea of what can go wrong of course will... and since a lot of my stuff is for the public to see if they can wreck it (tourist industry - exploratory s - museums ) I code with WAY too many Scenarios buzzing in my head...

__________________
Dave ...
  Reply With Quote
The Following User Says Thank You to dave koller For This Useful Post:
MPaulHolmes (10-08-2014)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 10-08-2014, 04:31 PM   #1182 (permalink)
Master EcoModder
 
freebeard's Avatar
 
Join Date: Aug 2012
Location: northwest of normal
Posts: 20,873
Thanks: 5,844
Thanked 6,820 Times in 5,516 Posts
Quote:
Originally Posted by MPaulHolmes
Freebeard, you can submit the code anywhere you want. I will even be happy to allow the irs to email me and download it. One concern I have is, are you depending on a boost section being done by me any time soon?
I started working in software development in 1980, by 2004 I had devolved into phone tech support (average call was 15 minutes or less). So I'm a little out of touch, no favors to call in, etc.

I'm depending on me being slower than you. I basically got sucked into this by reading about e*clipse's plan, and having a windfall from selling my VW bus. (That's what Steve Jobs did to bankroll Apple Computer) I'm trying to follow along behind him. e*clipse, not Jobs.

Quote:
Originally Posted by Astro
I watched the video freebeard linked. Well i got as far as the part where the presenter started talking about filters and using pictures of cars at which point my head decided to invert itself at high velocity. Up to that point it was all making a crazy sort of sense. Paul, you must have a skull of steel to keep all this in there.
Thanks for that. I was hoping to get a 2nd opinion. The next time I watch it, I'll take notes. So far I get that it's an interrupt-driven four step process, that uses forward and backward transforms to switch frames of reference. He could have used an art student's critique on his 'animations'.

Steve Wozniak famously held an entire floppy disk controller in his head at once. Talent like that needs to be protected and gently encouraged.

The sidebar also shows Teaching Old Motors New Tricks - Parts 1 & 2; another 3 hours from TI. I'll try to find the time...
  Reply With Quote
The Following User Says Thank You to freebeard For This Useful Post:
MPaulHolmes (10-08-2014)
Old 10-08-2014, 11:48 PM   #1183 (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
I think I figured out a way to not use a PI loop and have the convergence be just about perfect Optimum speed and zero overshoot. It will be influenced by temperature and variations in stator resistance, but maybe those could be corrected on the fly. Here's the train wreck formula I spent the last couple hours deriving:

Desired_V = Iref / (1/R - [1/R - I/V]*exp(loop_period/time_constant))

Where R is the line to line resistance,
I is current feedback
V is Vd (or Vq) in the FOC process
loop_period is 0.0001 second in our case
time_constant is 0.0077 for my motor. I think the stator time constant. Not hard to find. I found it today.

No guessing! Just bam! get your next voltage, and it's perfect or you got to as close to perfect as you could in one step. Sometimes it takes more than one step because you run out of voltage for causing the changes in current. Well, this is only if Iref is bigger than I. I need to do some figgerin' to find desired_V if you have to go the other way.

Note: none of this may work, but I think it makes sense, and will be fun trying it out.

Edit: Actually, I think the bus voltage is needed, not just the duty. Oh dang it. But you could still be close since a person would know their pack voltage. But a pack's voltage varies quite a bit... Now at least I have a reason to include the bus voltage monitor on the next revision.
Edit again: maybe you could use a conservative nominal voltage to still get really good convergence. I''ll try it.

edit again again!: This would work well for a locked rotor, but probably not in real life. haha
__________________
kits and boards

Last edited by MPaulHolmes; 10-09-2014 at 11:10 AM..
  Reply With Quote
Old 10-09-2014, 01:06 AM   #1184 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,479

ChargE (not yet running) - '92 Mazda MX6 LX
90 day: 33.89 mpg (US)

Ford Prefect - '18 Ford F150 XLT XTR
Thanks: 746
Thanked 543 Times in 438 Posts
Pulse Test

Quote:
Originally Posted by MPaulHolmes View Post
The books way of doing it was to run the motor unloaded for one test, and then locked rotor for another test. From those two tests, you deduce like 15 different things. One of those is the rotor resistance (like number 15 in that train wreck process.). We still need the rotor inductance. Then the time constant is L/R.
The Industrial VFDs that I use at work refer to 2 tests. One is a 'Static Tune', where the motor is coupled to a load. This is not as accurate but it gets you some numbers that are close. The test mentions something about a DC voltage applied, I'm guessing it's at least 3 DC voltages to involve all of the coils, but it's a short duration and somehow they measure inductance and resistance. The DC is sequenced so that it does not induce rotation.

The other is a 'Dynamic Tune', where the motor is decoupled from the load, motor only. The motor gets a series of pulses and rotates 1/4 to 1/2 a turn.

Each vendor appears to do it differently (slightly) and considers this part of their own 'secret sauce'. I can't find any documentation on how it's done. I'd like to try this method, since it is one of very few things that I've seen consistent from one VFD to another. But that's all the info I have so it's not much help.

On another topic, if you are open to it, I'd like a copy of the source. PM, or ftp, or whatever works for you.

I'll likely get lost trying to follow it .. but I may not.
  Reply With Quote
The Following 3 Users Say Thank You to thingstodo For This Useful Post:
e*clipse (10-10-2014), freebeard (10-09-2014), MPaulHolmes (10-09-2014)
Old 10-09-2014, 01:31 AM   #1185 (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
can you email me at paulandsabrinasevstuff@gmail.com? I'll send it to you. It's definitely in the midst of messing around with things. In fact, anybody that wants a copy can email me. Also, a guy from finland on here was going to post it to the wiki. I sent him an older copy already.
__________________
kits and boards
  Reply With Quote
Old 10-10-2014, 04:22 PM   #1186 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
I'll second that. Using PI or PID control is a very powerful technique. It's not exactly intuitive, as it was the basis for two mechanical engineering controls classes I took many moons ago. The diversity of the technique is amazing. I have a PID controller for my espresso machine to control the water temperature.

Perhaps I can dust off some of those old books and remind myself how it worked, but you'll probably figure it out faster.

I'd also like a copy of the code - so I can critique your style. Just kidding! I may be able to help a bit with integrating the resolver stuff....

- E*clipse


Quote:
Originally Posted by thingstodo View Post
The Industrial VFDs that I use at work refer to 2 tests. One is a 'Static Tune', where the motor is coupled to a load. This is not as accurate but it gets you some numbers that are close. The test mentions something about a DC voltage applied, I'm guessing it's at least 3 DC voltages to involve all of the coils, but it's a short duration and somehow they measure inductance and resistance. The DC is sequenced so that it does not induce rotation.

The other is a 'Dynamic Tune', where the motor is decoupled from the load, motor only. The motor gets a series of pulses and rotates 1/4 to 1/2 a turn.

Each vendor appears to do it differently (slightly) and considers this part of their own 'secret sauce'. I can't find any documentation on how it's done. I'd like to try this method, since it is one of very few things that I've seen consistent from one VFD to another. But that's all the info I have so it's not much help.

On another topic, if you are open to it, I'd like a copy of the source. PM, or ftp, or whatever works for you.

I'll likely get lost trying to follow it .. but I may not.
  Reply With Quote
Old 10-10-2014, 04:28 PM   #1187 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
I looked into the temp sensor for the MGR.

It looks like it's merely a 50kOhm NTC thermistor, electrically isolated from the motor and case.

In that case, it looks like it would be pretty easy to drive it with the 5V controller supply and a 50kOhm 1% resistor in series. The microcontroller's AtoD converter would see about 2.5V at 25C. I would use the "QEI Index" pin and add this to the resolver driver board. That way all the MGR feedback information could run through this adapter.

Thoughts? Suggestions?

- E*clipse

Last edited by e*clipse; 10-10-2014 at 04:32 PM.. Reason: more info
  Reply With Quote
The Following 3 Users Say Thank You to e*clipse For This Useful Post:
KenC (06-14-2019), MPaulHolmes (10-11-2014), thingstodo (10-11-2014)
Old 10-10-2014, 06:03 PM   #1188 (permalink)
Scandinavian creature
 
Join Date: Jun 2012
Location: Finland
Posts: 146

Golf ball - '94 Volkswagen Golf III
90 day: 28.46 mpg (US)
Thanks: 4
Thanked 25 Times in 21 Posts
Quote:
Originally Posted by MPaulHolmes View Post
can you email me at paulandsabrinasevstuff@gmail.com? I'll send it to you. It's definitely in the midst of messing around with things. In fact, anybody that wants a copy can email me. Also, a guy from finland on here was going to post it to the wiki. I sent him an older copy already.
I've been busy this week. I forgot to say that i did put it in the wiki.
Open ReVolt/PCB Schematics - EcoModder
__________________

Brrrmm
Now selling preassembled MPGuino's!
http://www.mthtek.net/mpguino/
  Reply With Quote
The Following User Says Thank You to Quezacotl For This Useful Post:
MPaulHolmes (10-11-2014)
Old 10-10-2014, 06:22 PM   #1189 (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
I fixed the PI loop! and got it tuned crazy fast. There was a mistake in the code

I was doing

newVd = newVd + Kp*error + Ki*sumOfErrors

When it should have been

newVd = Kp*error + Ki*sumOfErrors.

It converges crazy fast and no overshoot. Now I'm finding the optimum rotor time constant. How do I post to the wiki? Then I can update the code. That other code that's on it was so last tuesday. haha

I should add: I don't mind people who critique me kindly. I just had some very bad experiences on the AVR Freaks forum a couple years ago where I was told I was basically an idiot and shouldn't ever try to make things that would go in a moving vehicle. haha.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (10-13-2014)
Old 10-11-2014, 09:52 AM   #1190 (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
Quote:
Originally Posted by e*clipse View Post
I looked into the temp sensor for the MGR.

It looks like it's merely a 50kOhm NTC thermistor, electrically isolated from the motor and case.

In that case, it looks like it would be pretty easy to drive it with the 5V controller supply and a 50kOhm 1% resistor in series. The microcontroller's AtoD converter would see about 2.5V at 25C. I would use the "QEI Index" pin and add this to the resolver driver board. That way all the MGR feedback information could run through this adapter.

Thoughts? Suggestions?

- E*clipse
That sounds good. We will need to figure out the best arrangement for the A/D conversions. Current1, current2, sin (), cos (), throttle, temp1, temp2. we could always do currents and angles simultaneously, and maybe every 32 times we do current1, throttle, temp1, temp2.

__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (10-11-2014)
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