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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 09-16-2014, 05:14 PM   #1111 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
LOL!

I was going to bed thinking about this issue; I had succeeded in getting a "kinda" sine wave with the faster op-amp. It was more realistically a triangle wave with rounded corners. The amplitude was fine, close to 3V p-p.

This brought up a thought - you asked whether it had to be a sine wave. In this case, we're just talking about the carrier wave. Remember that basically the real output of the resolver is made of the peaks of the carrier wave. In other words, what happens in the middle doesn't really matter. So whether it's nicely rounded like a sine wave or straight like a triangle wave doesn't affect the output.

All that might really matter is that the inductor is happy. Remember that the resolver is made of coils - inductors - and inductors do everything they can to resist changes in current. So maybe those rounded triangle waves are ok, in that that the resolver coils will respond resonably well anyway. It seems worth a try.

Thoughts?

Quote:
Originally Posted by MPaulHolmes View Post
Rule number 1: Things never work like you want them to (especially at first).
Rule number 2: Just when you get used to rule number 1, gosh darn it, something works. haha.

It sounds like you are getting REALLY CLOSE!!!

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 09-16-2014, 05:18 PM   #1112 (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
Definitely sounds like it's worth trying. Remember. I don't even need 2 sine waves 90 degrees out of phase. I need 2 steaming piles of crap.

EDIT: I typed that too fast. I forgot what I mean to type. hahaha.

What I meant to say was, I don't need sine and cos. They can be any shape as long as it's periodic. So, from one I can do the inverse "pile of crap 1", and figure out which of 2 possible angles is the right one, using the info from "pile of crap 2".
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
e*clipse (09-16-2014)
Old 09-16-2014, 05:48 PM   #1113 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
That's actually extremely helpful!

I suppose the look-up table will need to be composed of these steaming piles of crap?? So maybe if it's fairly close to a sine wave, it will make the look-up table stuff easier?

Actually, what will be getting to the processor should be pretty sine-cos waveish, because it was produced by hardware (the Tamagawa resolver) that was designed to make it so.


Edit - Oh yeah, in the SVM calcs do you use sine functions other than sin(theta) or cos(theta) ?
- E*clipse
  Reply With Quote
Old 09-16-2014, 06:25 PM   #1114 (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 would take maybe a day of getting a good resolution graph from the waveform, and building a lookup table, where the index of where to look in the table is the A/D value, and the content of the table is the angle. But that would only get you angles where the function is one to one. So, for sine, it would only work from -pi/2 to pi/2. Then, the other table can have just -, 0, + for the other function (is it negative, 0, or positive). From that, you can know the angle, since sin is positive and cos is positive in Q1, sin is positive and cos is negative in Q2, sin and cos are negative in Q3, and cos is positive and sin is negative in Q4.

The SVM doesn't make use of sin and cos at all. It just has Va, Vb, and Vc, which are the voltages along 0 degrees, 120 degrees, and 240 degrees.
__________________
kits and boards
  Reply With Quote
Old 09-16-2014, 10:08 PM   #1115 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
Sorry about my confusion

Regarding FOC,
You're assuming you've already worked out Valpha and Vbeta, that intermediate axis that's crucial for the process? I think that's done with the inverse Park transform, correct?

Thanks for letting me know how those lookup tables work. Since you can't make a chart that covers everything, you average the rest?

Thanks,

E*clipse


Quote:
Originally Posted by MPaulHolmes View Post
It would take maybe a day of getting a good resolution graph from the waveform, and building a lookup table, where the index of where to look in the table is the A/D value, and the content of the table is the angle. But that would only get you angles where the function is one to one. So, for sine, it would only work from -pi/2 to pi/2. Then, the other table can have just -, 0, + for the other function (is it negative, 0, or positive). From that, you can know the angle, since sin is positive and cos is positive in Q1, sin is positive and cos is negative in Q2, sin and cos are negative in Q3, and cos is positive and sin is negative in Q4.

The SVM doesn't make use of sin and cos at all. It just has Va, Vb, and Vc, which are the voltages along 0 degrees, 120 degrees, and 240 degrees.
  Reply With Quote
Old 09-16-2014, 10:33 PM   #1116 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
Cool

Ok, I've got the new version working. It's actually getting simpler!
I've been able to get rid of one level of filtering by optimising the first filter. So now, I'm down to 4 IC's to drive the resolver, instead of 5. The final circuit will use two.

There isn't as much gain as the previous version, it now puts out 8.5V p-p. This is due to my limited selection of resistors. I suppose by spending a bit more time I could improve that by combining resistors.

I tested it, and it works fine with the resolver; the power amp seemed to run a little bit cooler, I have no idea why.

One problem I've noticed is the resolver puts out a bunch of noise during the 0 crossovers. This can be reduced by changing the carrier frequency.

One neat feature of my 'scope is that is has a spectrum analyzer. Especially when you are dealing with sine waves or square waves - ESPECIALLY square waves - there will be certain frequencies that have resonant characteristics. This is the EMI noise that can wreak all sorts of havok. This circuit, when combined with the resolver, showed an especially good characteristic at 62.5kHz and 83kHz. There was the primary (desired) frequency peak and almost no others. It was one of the cleanest plots I've seen!

Is there any easy way we can put in 62.5kHz, rather than 50kHz? I'm going to try to figure out why this happened, so maybe I can tune this feature for 50kHz... Otherwise, I may have to add another level of filtering to eliminate the higher than 75kHz noise. Adding another set of op-amps is really NBD. However, you always compromise phase or have to add more gain later.

E*clipse
  Reply With Quote
The Following User Says Thank You to e*clipse For This Useful Post:
MPaulHolmes (09-17-2014)
Old 09-16-2014, 10:47 PM   #1117 (permalink)
Master EcoModder
 
freebeard's Avatar
 
Join Date: Aug 2012
Location: northwest of normal
Posts: 20,813
Thanks: 5,825
Thanked 6,792 Times in 5,491 Posts
MPaulHolmes @#1110 -- "The difference between theory and practice is greater in practice than in theory."
  Reply With Quote
The Following 2 Users Say Thank You to freebeard For This Useful Post:
e*clipse (09-17-2014), MPaulHolmes (09-16-2014)
Old 09-17-2014, 09:37 AM   #1118 (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 might be possible. I'd have to check the "NOP" graininess to see what sort of resolution the output square frequency can be. If it doesn't work out, you could add an attiny on your board for $1, and include a crystal, to bump the frequency to 16MHz, which would give a lot more resolution for possible square wave frequencies at 50% duty.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
e*clipse (09-17-2014)
Old 09-17-2014, 07:53 PM   #1119 (permalink)
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 296 Times in 213 Posts
Thanks for the tip - it might be the cleanest solution. I'll look into the attiny this eve.
This kind-of raises a question:
The QEI interface has 3 inputs - quadA, quadB, and an "index" I can see the importance of "index" for an incremental encoder: Without an "index" there is no real place to start counting.

If you have a 2 sine-waves per motor revolution and a complementary 2 cosine-waves per revolution, how critical is the "index"?

It seems to me, at worst you would be off by 180 degrees, and that should be pretty easy to detect.

The implications of this are there would be no need for the "index" pin; it could be used for something else. Also, since a zero (or 0, 180) position are absolute with the resolver, then I really don't need to tie to the microcontroller's pulsing **at all**. This would make the whole external pulse generator easy AND I wouldn't need to isolate the pulses - like using the transformers, etc.

Thoughts?

On another note, I really need to look into the sources of those noise pulses closer. For example, I'm doing all this on a solderless breadboard. These are known to be the worst noisiest option out there. Simply using a proper PC board with a ground plane and well designed circuitry could get rid of most of the other spikes. I would like to use through hole components so anyone could assemble them, but surface mount components do have EMI advantages. I've soldered a lot of surface-mount components in my toaster oven.

- E*clipse

P.S. - e-mail coming

Quote:
Originally Posted by MPaulHolmes View Post
It might be possible. I'd have to check the "NOP" graininess to see what sort of resolution the output square frequency can be. If it doesn't work out, you could add an attiny on your board for $1, and include a crystal, to bump the frequency to 16MHz, which would give a lot more resolution for possible square wave frequencies at 50% duty.
  Reply With Quote
Old 09-17-2014, 08:03 PM   #1120 (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
Index is worthless for AC controllers. And for a resolver, where we are getting sine and cos values, index would also be worthless! So yes! Index officially becomes available.

I think you are right. As long as the microcontroller is receiving 2 voltages that correspond to sin and cos (or some distortion thereof) it's all good. And you are also right about those breadboards at high frequency, with edges. Absolute worst case scenario. That's actually another reason why I think it would be good to keep the high frequency pulses contained to your board. If it has to travel far along a pair of wires, that's going to have inductance, and then spikes as a result.

__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
e*clipse (09-17-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