1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Electric Engine Discussion

Discussion in 'General Discussion' started by default0.0player, Jun 1, 2019.

  1. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    There are lots of electric motors, and the most widely used are induction motors. This thread mainly discuss about induction motor dynamics.
    Rotterdam_Ahoy_Europort_2011_smallJPG.jpg
    Induction motor is a machine that converts electricity to mechanical work via electromagnitic induction.
    The winding, which is in the stator, creates a rotating magnetic field. And the rotor, which mainly contains a squirrel cage that creates an electric current caused by the magnetic field. This leads to a mechanical torque.
    Asynchronmotor_animation.gif
    The motor power is controlled by a variable voltage variable frequency(VVVF) drive that does DC/AC conversion.

    If both the voltage and the frequency are constant, the output torque looks like this
    rEqbo.jpg
    In practice, the "unstable" region should never be used.
    In a closed control loop, the VVVF drive aquires the motor RPM and apply an appropriate frequency to make sure the motor is running at the stable region.
    inductionmotorthrottle.png
    Therefore if the throttle is at a given value, when RPM changes, the drive frequency change but the difference between them remains the same.In conclusion, the drive makes the torquecurve looks like pictures below, not above.
    VFcontrolledstso.jpg


    At low speeds, both the voltage and the frequency are lowered by the same ratio, so the torque remains constant, only the speed of the same torque changes
    At high speeds, the voltage is at the rated voltage that cannot be increased further, only the drive frequency changes, this will weaken the magnetic field, lowering the torque
    VFcontrolled.jpg
    In some applications, there's also a constant power region that between the constant torque and constant voltage.
    e98Erc.png

    Efficiency and energy losses.
    Three types: Mechanical loss, core loss and resistive loss.
    Mechanical losses are bearing friction, which is nearly constant, and cooling fan air drag that increase with RPM
    Core losses are eddy current loss and hysteresis loss, both increase with drive frequency and voltage.

    Resistive loss, two types. One is the winding resistance that increase with current. The other is the squirrel cage loss that increase with the frequency difference between drive frequency and RPM. If the drive RPM is 10000 and engine RPM is 9500, due to this loss the efficiency is ALWAYS lower than 95% even the core loss and the mechanical loss is zero. The eSBR does not simulate this.
    --- Post updated ---
    DC motors are a little bit different, the torque depends on the input voltage and the RPM

    When DC motor is spinning the winding is creating a back-EMF that is the opposite of the input voltage. So the current = (inputvolt-backEMF)/(winding resistance)

    An unregulated DC motor, which is a motor that connects directly to a DC voltage, curve looks like this
    performance-curve-01_zps32aec860.png
    As you can see, the best efficiency and the best power bands are quite narrow.
    Note that in this picture the resistance of the winding is only used in older or cheap low powered motors. If you put a modern motor used in an EV in the "max. output power" the efficiency is 50% the motor will destory in seconds.
    Also note that the effieciency is ALWAYS lower than (no load RPM)/(actual RPM)
    In an EV, the winding resistance is very very low, so the Torque-Speed Curve is very flat, So an EV motor needs to use a driver to regulate it.

    The driver regulates the input voltage to be above the back-EMF(the BEMF voltage is the input voltage when no load), the same goes.
    throttle_speed.jpg
    Speeds are theoretical no-load speed(correlates input voltage) and actural running speed(correlates back-EMF)
    So we can get this conclusion: If the input voltage is 100V, the BEMF is 95V, the efficiency is always less than 95%.
    Interestingly, this characteristic is very similiar to the "slip" of the induction motors.
    --- Post updated ---
    The "regulated" DC motor torque curve is at shown
    regulatedDC.png
     
    #1 default0.0player, Jun 1, 2019
    Last edited: Apr 15, 2022
    • Like Like x 7
    • Informative Informative x 7
  2. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    20210219 update:

    Modern EV ECU mapping IRL

    The problem
    : Why the eSBR does not simulate electric engine realistically. Partially fixed in 0.18

    To understand these phenomenons, we need to do some testings
    You might want to check out some older(pre0.16) EV mods, such as the Electric Sunburst, 200EX and the Ibishu Condensa.

    1. Start a time trial driving a eSBR, before start shift to D and floor it, check the energy consumtion and the output torque.
    2. Try to hold position at a uphill using only throttle
    3. Maintain a constant throttle input during a acceleration from standstill.

    1. The output torque maxed out but the energy consumption stays below 1kW
    BeamNGdrive-016038498-RELEASE-x642019_6_210_40_47.png
    2. Unable to do so, the torque skyrocket when approaching zero speed. (Fixed in 0.18)
    BeamNGdrive-016038498-RELEASE-x642019_6_210_56_43.png
    3. Just after the sudden acceleration at start, the torque decreases but the power kW remains constant (Fixed in 0.18)
    BeamNGdrive-016038498-RELEASE-x642019_6_210_28_11.png

    Conclusion. Two problems that prevent the eSBR from realistic eletric simulation.
    1. The controller in the eSBR is constant-power, if the rated power is 388kW, 2% throttle is 7.76kW, the torque=power/speed, if the speed approach zero the torque approaches infinity, only capped by the "torquecurve" (Fixed in 0.18)
    ethrotctrl.png
    2. The motor does not simulate "slip" energy consumption. The efficiency only takes account the "friction", "dynamicFriction" and the "electricalEfficiency". If the speed is zero the output power is zero so zero*loss=zero
    IRL it does not take nothing to create a rotating magnetic field.
    powah.png
    eSBR: Has regen braking. 0.18 update you can hold position at a uphill using only throttle
    Older mods: has "slip" energy consumtion. You can hold position at a uphill using only throttle
     
    #2 default0.0player, Jun 2, 2019
    Last edited: Feb 19, 2021
    • Informative Informative x 9
    • Agree Agree x 1
  3. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    This is really good, and goes over the problems with the current electric engine model pretty well. I assume the solution to the first problem would be to switch the electric engine model to use a constant torque controller instead, which shouldn't be too hard, and will fix most of the eSBRs touchiness without too much difficulty. The second problem is a fair bit trickier I imagine. The old solution of using a TC works, but it's not great, since the TC simulation is designed specifically to simulate 3 element converters being driven by a fluid, which could probably get close with tuning, but isn't great, and I feel @Diamondback wouldn't be satisfied with approximations either, based on his efforts in every other part of the engine system. Based on the fact almost every modern electric car uses Synchronous AC motors (Brushless DC), that's probably what the current model should simulate. The controller to calculate the target drive voltage, and then magnetic flux produced, motor saturation, and output torque can't be easy though, and would probably need a few more variables to make tuneable, and not just simulate an infinitely powerful motor hooked up to controllers with different target max torques.
     
    • Like Like x 1
    • Informative Informative x 1
  4. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    The BLAC motor is the most complex and it's a bit hard for me to understand it.
    A Brushed DC motor input DC, but inside the winding is Square-wave AC due to the commutator, the controller only regulates the voltage.
    A BLDC motor imput DC to the controller and the controller regulates voltage and do the "electric commutating" at the same time. The back-EMF cauculation works the same as brushed.
    However the BLDC can be driven as a Synchronous AC motors, aka PMSM. The PWSM does not "slip" as the induction motor. Instead there's a "phase lag" the magnet phase lags behind the electromagnetic field. The more the throttle the more "lead" the controller send to the motor winding. If the motor has zero RPM the winding RPM is also zero and the only energy consumtion is the winding resistance loss, even the core loss is zero at zero RPM because the magnetic field does not rotate.
    Modern electric motor inverters use FOC (field oriented control), which max the efficiency by keeping the lead angle at 90° and keeping the commutation synchronized, since the computational speeds of modern microcontrollers are way faster than engine RPM.

    EDIT: An "unregulated" BLDC, which is a BLDC contains only an electric commutator(a bunch of mosfet switches and a hall sensor, no MCU), works like a brushed DC motor.
    However, an "unregulated" Synchronous motor looks like this
    Characteristics-of-Synchronous-Motor-9.jpg
     
    #4 default0.0player, Jun 2, 2019
    Last edited: Feb 19, 2021
    • Informative Informative x 1
  5. Michaelflat

    Michaelflat
    Expand Collapse

    Joined:
    Jul 10, 2014
    Messages:
    1,543
    What an excellent post.. Also demonstrates the faults with the esbr at the moment..
    Hope we get a constant torque, then constant power region.. that would be awesome!
     
    • Agree Agree x 5
  6. ARES IV

    ARES IV
    Expand Collapse

    Joined:
    May 6, 2019
    Messages:
    605
    Very interesting. Thank you.
     
    • Like Like x 1
  7. ARES IV

    ARES IV
    Expand Collapse

    Joined:
    May 6, 2019
    Messages:
    605
    So.... you said that the fix is partial. What else would be needed?
     
  8. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    1,925
    Efficiency: The above said efficiency is still simplyfied, the core loss and the resistance loss are not calculated accurately. Using throttle to hill hold consume less than 1kW energy. Also note that regen is very inefficient in BeamNG, at around 45%, while IRL regen is about 75%~85% efficiency.

    Handling: The 0.18 update improves the handling a lot by making the throttle mapping linear, closed to IRL. However you have to carefully apply 3% throttle to maintain a 35mph cruise, a difficult job to do even using steering wheel and pedals. To make driving easier EVs IRL typically apply exponential throttle mapping, such as making 50% throttle 25% engine torque. One-pedal driving is also possible IRL by remapping the throttle, at higher speeds the 0%-20% is the coast regen range and 20%~100% is power range, making cruising at about 35mph easier by using 20%~23% throttle pedal.

    Note: The 0.18 update affect all EVs, not limited to eSBR.
     
    • Informative Informative x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice