Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-14-2017, 03:06 PM   #7201 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,759

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,343
Thanked 1,067 Times in 698 Posts
It's always fun to read all these updates when I've been away! Here's my understanding for the losses with the IGBTs. There are switching losses, and conduction losses. The DC controller switches at like 7-12kHz (spread spectrum) so it averages maybe 9.5KHz or something like that. Each time the IGBT turns on and off, that's one of the 9500 per second. So, if the turn-on energy is 50mJ (for example) and the turnoff is 50mJ, then the off/on cycle is 0.1Joule, or 0.1Joule/cycle * 9500cycle/sec = 950 watts. JUST FROM TURNING IT OFF AND ON!!! AAHH!! But notice that their numbers for switching energy are at the absolute worst case. Like 600v and 300amp or whatever. If the current or voltage is less, the switching energy falls dramatically. Sometimes they don't include the full range of switching energy vs current, but sometimes they do.

Then there's the conduction losses, like 1.75v while on. Then if you are at, say, 50% PWM, then it would be current * 1.75v * 0.50 for the waste heat from conduction losses.

__________________
The D.I.A.R.R.H.E.A. Available soon!
kits and boards

Last edited by MPaulHolmes; 08-14-2017 at 05:54 PM..
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-15-2017, 08:46 AM   #7202 (permalink)
EcoModding Lurker
 
Join Date: Jul 2017
Location: Croatia
Posts: 23
Thanks: 0
Thanked 2 Times in 1 Post
tnx
will those work with your logic ?
FUJI 1MBI600U4B-120

Last edited by mfox; 08-15-2017 at 04:51 PM..
  Reply With Quote
Old 09-10-2017, 01:48 PM   #7203 (permalink)
EcoModding Lurker
 
Join Date: Sep 2017
Location: Cracow
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Hello.
I'm trying to write soft for Field Oriented Control of induction motor. I have finished 3ph 3kW inverter, controled by STM32F4, and V/F open loop algorithm to control ACIM - it works. Now I'm trying to implement FOC algorithm rewriting code from this project using float variables.
CortexM4 have FPU so operations on floating points numbers take same time (cycles) as operating on integers.
Here is part of code:

Code:
void ClarkPark(float L1_curr, float L2_curr)
{
    vector.Ialpha = L1_curr;
    vector.Ibeta = (L1_curr + 2.0*L2_curr) / 1.732;
    //Id =  Ialpha*cos(Angle) + Ibeta*sin(Angle)
    vector.Id = vector.Ialpha*cos(vector.AngleFluxDeg) + vector.Ibeta*sin(vector.AngleFluxDeg);
    // Iq = -Ialpha*sin(Angle) + Ibeta*cos(Angle)
    vector.Iq = (-1.0)*vector.Ialpha*sin(vector.AngleFluxDeg) + vector.Ibeta*cos(vector.AngleFluxDeg);
}


//qdImag = qdImag + qKcur * (qId - qdImag)      ;; magnetizing current
void curModel(void)
{
    //qdImag = qdImag + qKcur * (qId - qdImag)      ;; magnetizing current
    vector.Imag = vector.Imag + (LOOP_PERIOD / ROTOR_TIME_CONST) * (vector.Id - vector.Imag);
    if(vector.Imag == 0) {
        return;
    }
    // VelSlipRPS = (1/fRotorTmConst) * Iq/Imag / (2.0*pi)
    vector.VelSlipsRPS  = (1 / ROTOR_TIME_CONST ) * (vector.Iq / vector.Imag) / (2.0*PI);
    //VelFluxRPS = iPoles * VelMechRPS + VelSlipRPS
    vector.VelFluxRPS = 2.0 * speed.perSec + vector.VelSlipsRPS;
    //AngFlux = AngFlux + fLoopPeriod * 2.0 * pi * VelFluxRPS
    vector.AngleFluxRad = vector.AngleFluxRad + LOOP_PERIOD * 2.0 * PI * vector.VelFluxRPS;
    vector.AngleFluxDeg = vector.AngleFluxRad * (180.0 / PI);
}
Please tell me If I'm wrong:
I have to keep an eye on vector.AngleFluxDeg variable to be value between 0 - 360 degree? (back to 0 if 360 overflowed).
It will be correct?

Thanks for any reply.

Last edited by fasset; 09-10-2017 at 02:15 PM..
  Reply With Quote
Old 09-13-2017, 06:08 PM   #7204 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,172

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

WinterTransport - '07 hyundai Sante Fe SE
Thanks: 665
Thanked 427 Times in 340 Posts
??

Quote:
Originally Posted by fasset View Post
I'm trying to write soft for Field Oriented Control of induction motor. I have finished 3ph 3kW inverter, controled by STM32F4, and V/F open loop algorithm to control ACIM - it works. Now I'm trying to implement FOC algorithm rewriting code from this project using float variables.
I think that maybe this should be moved to the AC controller thread? Do you need to be a moderator to do that?

As for the translation of the code, you should be able to run the code as Paul wrote it. The floating point variables should work as written. It appears to be ansi standard C with no goofy library calls.

If you want to optimize the math to make better use of your floating point math library, I'd suggest doing that after you have Paul's math running. Just my opinion. That way you can run through a test set for your math before your changes and after your changes to make sure it still works!

As for the range on degrees, you should be able to use the modulo or mod() function on your angle to bring it back to the range 0 - 360. It won't matter for the intermediate calculations. Sin(0) = sin(360) = sin(720). It is only convention that shows the angle between 0 and 360 degrees.

Hope this helps

__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul and Sabrina's Cheap 3 Phase Inverter (AC Controller) with Field Oriented Control MPaulHolmes Fossil Fuel Free 3159 08-30-2017 01:14 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 09:09 PM
Three Dirt Cheap DIY Electric Cars - Part 5 SVOboy EcoModder Blog Discussion 0 12-12-2008 04:10 PM



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