1. Attachments are working again! Check out this thread for more details and to report any other bugs.

PRIUS Simulator using Matlab <Help required>

Discussion in 'Gen 3 Prius Technical Discussion' started by ingenia, Feb 10, 2011.

  1. ingenia

    ingenia New Member

    Joined:
    Dec 15, 2010
    4
    1
    0
    Location:
    Pittsburgh PA
    Vehicle:
    2006 Prius
    Model:
    N/A
    Hello everyone,

    Currently I'm working on getting a simulator of the PRIUS that could be used for any of the 3 versions but as for now I'm only focused in the last. What I have developed by far is a way to get the power required to move a PRIUS, this is calculated from real GPS data. This part seems to be working fine but the next step consists in getting separately the power need by each MG1, MG2 and the ICE. I know this depends basically on the current speed of the PRIUS, battery level and driving mode, and I know also there are several phases which define what is going to be working (ICE, MG2,MG1). Now the problem I'm facing is how can I determine the power needed individually by every of the components of the PSD.

    Basically I have the power need to move the PRIUS how can I determine the power needed by ICE,MG1 and MG2??

    Also if there's anybody interested in the code I have in matlab to determine the power needed to move the PRIUS just send me a message I will send it to you by email.
     
    raildoc likes this.
  2. pakitt

    pakitt Senior Member

    Joined:
    Aug 10, 2009
    2,173
    1,311
    0
    Location:
    Colorado
    Vehicle:
    2021 Prius Prime
    Model:
    Limited
    Maybe you can get the power (Nm) curve of the 1.8L engine here in Priuschat - I have seen it posted someplace here. The torque of the MG2 is practically constant from 0rpm. The MG1 does not effectively provide torque for traction.
    Moreover, you might find helpful a simulation of the HSD to further improve the simulator here:
    Toyota Prius - Power Split Device
     
  3. kbeck

    kbeck Active Member

    Joined:
    Feb 10, 2010
    420
    274
    0
    Location:
    Metuchen, NJ
    Vehicle:
    2010 Prius
    Model:
    III
    Ingenia,

    You've got bigger problems than that, I think. There's a t least one extra degree of freedom in the equations: The battery. And along with that a second: Time variations.

    Say you're chugging along at 60 mph. OK, at a steady rate of speed the battery isn't charging or discharging, the ICE is putting out the power that, with losses, is going through MG1 and MG2 to the drive wheels.

    However, suppose you're moving along at 30 mph. Under "normal" conditions, on a flat surface, the car would favor running on battery, at least until the battery becomes discharged. The ICE would be turned off. If you continue to run at 30 mph until the battery becomes discharged, well, I'm not exactly sure what would happen, but it's likely the engine would run for a while, providing some of the torque to move the car while excess energy charges the battery - and then, back to battery power one would go.

    In fact, stopping and starting at stop lights when running below 40 mph or so is a form of pulse and glide: The ICE, when accelerating the car from a stop, has a fair amount of energy diverted to the battery so that when the car's speed levels off there's sufficient energy in the battery to take the car some distance. Result of all this: lots of miles per gallon, mainly because the engine isn't running!

    I imagine that the engineers at Toyota had a huge Matlab (or similar) simulation model for the car and motors, a bunch of "typical" driving scenarios, and a ton of different battery/motor/ICE on/off/charge/discharge algorithms that they threw at the driving scenarios, and then went for optimization. And took the results and threw truly random driving scenarios at it to make sure nothing else got broken.

    Which is why their tech gets sold to other companies: Junk like that take time, PHDs, and is likely a deep, dark, IP secret in the algorithms in the ECU and battery management software.

    So, if you assume that there's no energy going into or out of the traction battery, then you might get some very rough general numbers for efficiency which, for steady state at speeds over 40-45 or so, might match up roughly well with reality. But if the car's not at steady state, and if it's running below 40 or so, your numbers are going to be astoundingly off.

    Good luck!

    KBeck.
     
  4. 2k1Toaster

    2k1Toaster Brand New Prius Batteries

    Joined:
    Feb 14, 2010
    6,035
    3,854
    0
    Location:
    Rocky Mountains
    Vehicle:
    2006 Prius
    Model:
    Three
    The thread title alone was enough to tickle my geek bones. :)
     
  5. telmo744

    telmo744 HSD fanatic

    Joined:
    Apr 8, 2010
    2,169
    764
    0
    Location:
    Portugal
    Vehicle:
    2010 Prius
    Model:
    N/A
    I would try multiple trips with a scangauge, it has Amps from/to MG1/2. It's a pity some versions don't come with info recording.
    Then compare it with the modelling of efficiency charts to both MG1 and 2, which "translates" to power output.
     
  6. raildoc

    raildoc New Member

    Joined:
    Jul 29, 2013
    1
    0
    0
    Vehicle:
    2010 Prius
    Model:
    IV
    I'd like to see your code. Any updates since this Post?
     
  7. FrankTiger

    FrankTiger Member

    Joined:
    May 26, 2010
    63
    118
    0
    Location:
    Madrid, Spain
    Vehicle:
    2010 Prius
    Model:
    V
    Hi ingenia [​IMG]

    You may take a look at this post where I posted how to measure the power flow inside the 2010 Prius through the OBD port using known PIDS.

    The schematics is:

    [​IMG]

    For a 4% up slope and GPS speed of 70Km/h (44mph) the power flow in Watts is:

    [​IMG]

    Do the numbers match your simulator?

    Big hugs from Frank