Page 6 of 10

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 1:28 pm
by drprox
This is a great project, it has encouraged me to sign up and start planning my own which I will share!

It will be particularly interesting to see how the motor performs on longer test drives.
The main concern I can foresee is how the motor handles heat buildup in a pure EV duty cycle vs hybrid.

Looking at the LS600h analysis done here (which is pretty good btw): https://www.osti.gov/servlets/purl/947393
and comparing it with the leaf motor analysis here: https://www.energy.gov/sites/prod/files ... 2013_o.pdf
It appears that MG2 on its own does warm up quite quickly under load.

The leaf motor test concluded "Capable of operating at 80 kW continuously at 7,000 rpm with stator temperatures levelling out at about 135C".

Whilst the LS600h test results for MG2 found "50 kW operation at 5,000 rpm can be continued for 10:14 and 14:13 with stator temperature limits of 130ºC and 150ºC, respectively." The inverter appears to handle the power fine.

Unfortunately, they didn't test any voltages other than 650V as I am also interested to see what RPM the torque starts to fall off. I am trying to learn about motors but they are a complex beast. I understand that higher voltages are needed to overcome the back EMF as speed increases, but at low speeds will a higher voltage lower the current in the motor windings, or only on the DC side?

Thanks and keep up the good work.
Jason

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 5:28 pm
by slow67
The inverter is a buck converter. It can turn high voltage, low current to low voltage higher current. The low speed power/torque will not change until the back EMF reaches battery voltage.

There has been talk that the Lexus inverter doesn't do field weakening, so power would fall off quickly at that point. It seems Toyota used the DC to DC converter (plus the MG1 generated power) on the high side to generate the 650V instead. Damien said he is taking the Bexus to a chassis dyno, then we will know for sure!

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 6:00 pm
by philbrennan
Potentially gearbox oil cooling could help.. is there a water cooling circuits for the motors?

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 10:06 pm
by johu
drprox wrote: Sun Mar 08, 2020 1:28 pm The leaf motor test concluded "Capable of operating at 80 kW continuously at 7,000 rpm with stator temperatures levelling out at about 135C".

Whilst the LS600h test results for MG2 found "50 kW operation at 5,000 rpm can be continued for 10:14 and 14:13 with stator temperature limits of 130ºC and 150ºC, respectively." The inverter appears to handle the power fine.
For everyday use both figures sound plenty. You'd have commit some serious road range to continuously use 50 or even 80kW. German Autobahn (with soon to come speed limit?) and race tracks would be the exception. WLTP cycle has an average power use of less then 10kW.
I didn't have the time to read the report, did they simulate the air flow caused by driving?

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 10:16 pm
by Kevin Sharpe
Lots BEXUS test drives today :D
IMG-20200308-WA0023.jpg

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 08, 2020 11:10 pm
by xp677
philbrennan wrote: Sun Mar 08, 2020 6:00 pm Potentially gearbox oil cooling could help.. is there a water cooling circuits for the motors?
Yes, there is a water jacket around the motors.

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 09, 2020 3:15 pm
by slow67
johu wrote: Sun Mar 08, 2020 10:06 pm I didn't have the time to read the report, did they simulate the air flow caused by driving?
I don’t believe they did. For high load scenarios they used a coolant temp of 0C to try to keep the motor cool, but I don’t see mention airflow anywhere.

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 09, 2020 3:18 pm
by slow67
Also it appears (just as Damien said) that voltage won’t be an issue to run the full 10,230 rpms. Here are the back-EMF test results.

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 09, 2020 5:56 pm
by drprox
Ah, that's interesting, I missed that bit.

I can't understand why they bothered to run 650v in the actual car, it seems unnecessary.

Unless the high voltage actually for MG1 rather than MG2. I think in the Prius MG1 is very low torque but high RPM.

I estimated that with the input shaft locked in the GS450h transmission, MG1 should be running in the region of 2.5x the speed of MG2 due to the planetary.

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 09, 2020 6:35 pm
by slow67
MG1 is turning exactly 2.6:1 when the input shaft is locked.
78 teeth of ring gear, 30 teeth on the sun gear, so:
(78 + 30)Tc = 78Tr + 30Ts
Tc = turns of the planet carrier
Tr = turns of ring gear
Ts = turns of the sun gear
We know Tc = 0 with the input locked
78Tr = -30Ts
78/-30 = -2.6

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 09, 2020 7:35 pm
by Kevin Sharpe
this is a project thread guys... please post your generic comments elsewhere!

Re: The SuperYacht BMW E65 7 Series

Posted: Tue Mar 10, 2020 5:54 pm
by Jack Bauer
Gen 3 charger woke up today. Very happy with that as its the first time I have used a gen3 charger in a build. We could only push 10kw due to limitiations in the charge point. Should be able to go full power tomorrow. Also picked up a 730d diff with a 2.81 ratio (3.6 currently) so this coupled with shifting the gears should give a nice acceleration / top end balance without high voltages. Going for nct test in about 10 days so road testing very soon:)

Re: The SuperYacht BMW E65 7 Series

Posted: Sun Mar 15, 2020 9:58 am
by Kevin Sharpe
Jack Bauer wrote: Fri Feb 21, 2020 7:44 am Had a hell of a time finding these.
Just found these in the Zero EV shop 8-)

https://zero-ev.co.uk/product/dowe-sm30 ... off-brass/
sm30-m8-red-insulated-standoff-brass.jpg

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 16, 2020 2:16 pm
by Jack Bauer
In order to keep the dsc system happy message ids 0xA8,0xA9 and 0xBA must appear on the pt canbus. They have some sneaky counters/muxes in them but I think I have them working. Will post up on the github for the vcu once I get the bugs out. Then just need to work out what messages to listen for from the dsc in order to trigger torque reduction.

Re: The SuperYacht BMW E65 7 Series

Posted: Tue Mar 17, 2020 3:48 am
by mdrobnak
Assuming this is following BN2000 stuff, which I think it is...

The entire style of code is much more irritating - they are taking two long words (64 bits or.. 8 bytes) and just messing with them.

0xBA is something to do with gearbox control, but it should be the "Automated Manual Transmission" type - AMT. Maybe it's reused for auto gearboxes on 7 series.
0xA8 is..busy. Even with IDA's decompiling there's a lot going on here. I'm going to cut out some unneeded stuff here..

Code: Select all

 v1 = a1;
  lv_im_bls = (word_30607E >> 15) & 1;
  v2 = lv_im_bls; // Brake light switch
  lv_im_bts = (word_306066 >> 15) & 1;
  v3 = lv_im_bts; // Brake light test switch (has opposite logic value of normal)
  if ( tcc_can_ecu1 >= 14 )
    v4 = 0;
  else
    v4 = tcc_can_ecu1 + 1;
  tcc_can_ecu1 = v4; // Free running alive counter
  
  bn_can_send_temp_byte6 = v4 & 0xF | bn_can_send_temp_byte6 & 0xF0;
  v5 = tq_av >> 4; // Torque "actual value" - With external CAN interventions - This is where you tell ABS / gearbox / etc that you've lowered the torque value
  bn_can_send_temp_byte5 = (v5 & 0xFF0) >> 4;
  bn_can_send_temp_byte6 = 16 * (v5 & 0xF) & 0xF0 | bn_can_send_temp_byte6 & 0xF;
  if ( lv_at )
  {
    LOBYTE(v6) = 3;
  }
  else
  {
    lv_im_cs_pn = (word_306100 >> 11) & 1;
    v6 = lv_im_cs_pn; // Clutch switch status.
  }
    bn_can_send_temp_byte2 = v6 & 3 | bn_can_send_temp_byte2 & 0xFC;
    
  // I'm assuming the car doesn't have, or we're just gonna ignore, distance cruise control for now.
  byte_3FE89E = 3;
  bn_can_send_temp_byte1 = byte_3FE89E & 3 | bn_can_send_temp_byte1 & 0xFC;
  // Assuming no anti-roll-stabalization either
  byte_3FE89F = 3;
LABEL_26:
  bn_can_send_temp_byte1 = 4 * byte_3FE89F & 0xC | bn_can_send_temp_byte1 & 0xF3;
 
   
   byte_3FE8A0 = 0; // Equipped with Traction Control
   bn_can_send_temp_byte1 = 16 * byte_3FE8A0 & 0x30 | bn_can_send_temp_byte1 & 0xCF;
   
  byte_3FE8A1 = 3; // Shift state? We're gonna say not automatic, not AMT. If wanting to set auto, try 0.
LABEL_53:
  bn_can_send_temp_byte1 = (byte_3FE8A1 << 6) & 0xC0 | bn_can_send_temp_byte1 & 0x3F;
  
  bn_can_send_temp_byte4 = sf_tqd & 0xF | bn_can_send_temp_byte4 & 0xF0;
  tq_maf = add_r3_r4_min_neg_32768_max_7fff(tqi_maf, tq_loss);
  if ( tq_maf >= tq_asr_fast_dec_bn )
    v11 = tq_asr_fast_dec_bn;
  else
    v11 = tq_maf;
  v12 = v11 >> 4;
  bn_can_send_temp_byte4 = 16 * (v12 & 0xF) & 0xF0 | bn_can_send_temp_byte4 & 0xF;
  bn_can_send_temp_byte3 = (v12 & 0xFF0) >> 4;
  
  // Brake light switch logic:
  
    if ( lv_err_bls_plaus )
  {
    v13 = 7;
LABEL_66:
    v15 = v13;
    goto LABEL_67;
  }
  if ( !v3 )
  {
    if ( !v2 )
    {
      v13 = 0;
      goto LABEL_66;
    }
    v14 = 1;
    goto LABEL_64;
  }
  if ( v2 )
  {
    v14 = 3;
LABEL_64:
    v15 = v14;
    goto LABEL_67;
  }
  v15 = 2;
  
LABEL_67:
  bn_can_send_temp_byte0 = 32 * v15 & 0xE0 | bn_can_send_temp_byte0 & 0x1F;
  bn_can_send_temp_byte0 = state_diag_gs & 0x1F | bn_can_send_temp_byte0 & 0xE0;
  bn_can_send_temp_byte7 = 0;
  result = can_checksum_calc(v1, &bn_can_send_temp_byte7, 8, 1);
  cks_clc_ecu1 = result;
  bn_can_send_temp_byte7 = result;
  return result;
}
0xA9 is not as bad, but still bad:

Code: Select all

int __fastcall can_send_0xa9_bn_ecu_2(int a1)
{
  int v1; // r30@1
  char v2; // r4@1
  char v3; // r4@6
  int v4; // r5@8
  int v5; // r3@8
  int v6; // r3@8
  int result; // r3@8

  v1 = a1;
  v2 = lv_puc; // lv_puc = trailing throttle fuel cutoff
  if ( !lv_puc && lv_tq_dcc_inc_req && tqi_dcc_fast_inc < tqi_ref_iga_min_lamb )
    v2 = 2; // If not trailing fuel cutoff, and there's a torque increase request from the distance cruise control, and the amount it's asking for is less than the reference torque * minimum spark * lambda efficiency...
  bn_can_send_temp_byte6 = (v2 << 6) & 0xC0 | bn_can_send_temp_byte6 & 0x3F;
  if ( tcc_can_ecu2 >= 14 )
    v3 = 0;
  else
    v3 = tcc_can_ecu2 + 1;
  tcc_can_ecu2 = v3;// Free running alive counter
  bn_can_send_temp_byte6 = v3 & 0xF | bn_can_send_temp_byte6 & 0xF0;  
  lv_level_is = n_sp_is <= c_n_sp_is_thd_can; // Logical variable Idle Speed Level? Something about the Engine Idle Setpoint is less than..something that's 0 in this ECU. So that's probably going to be 0?
  bn_can_send_temp_byte6 = 16 * lv_level_is & 0x30 | bn_can_send_temp_byte6 & 0xCF;
  
  bn_can_send_temp_byte5 = tq_loss >> 4;
  bn_can_send_temp_byte4 = (((tq_loss >> 4) & 0xF00) >> 8) & 0xF | bn_can_send_temp_byte4 & 0xF0;
  
  v4 = tq_max_clu >> 4; // Max clutch torque
  bn_can_send_temp_byte4 = 16 * (v4 & 0xF) & 0xF0 | bn_can_send_temp_byte4 & 0xF;
  bn_can_send_temp_byte3 = (v4 & 0xFF0) >> 4;
  
  v5 = add_r3_r4_min_neg_32768_max_7fff(tqi_ref_iga_min_lamb, tq_loss) >> 4;
  bn_can_send_temp_byte2 = v5; // tq_min I assume.
  bn_can_send_temp_byte1 = ((v5 & 0xF00) >> 8) & 0xF | bn_can_send_temp_byte1 & 0xF0;
  
  v6 = tq_maf >> 4; // Torque from airflow
  bn_can_send_temp_byte1 = 16 * (v6 & 0xF) & 0xF0 | bn_can_send_temp_byte1 & 0xF;
  bn_can_send_temp_byte0 = (v6 & 0xFF0) >> 4;
  bn_can_send_temp_byte7 = 0;
  result = can_checksum_calc(v1, &bn_can_send_temp_byte7, 8, 1);
  cks_clc_ecu2 = result;
  bn_can_send_temp_byte7 = result;
  return result;
}
Traction control: 0xB6 - EDIT - Not 0xB9 - B9 is power steering

Code: Select all

  if ( !result && !v3 )
  {
    result = 0;
    state_tcs_intv = (v1[4] >> 4) & 3;
    lv_tcs_lih_can = 0; // Logical Variable TCS Limp Home
    lv_tq_asr_req = 0; // Logi.. Anti-Skid request (tq reduction)
    lv_tq_msr_req = 0; // MSR Request (torque add)
    switch ( state_tcs_intv )
    {
      case 1:
        lv_tq_msr_req = 1;
        break;
      case 2:
        lv_tq_asr_req = 1;
        break;
      case 3:
        lv_tcs_lih_can = 1;
        break;
    }
    v5 = 16 * v1[2];
    v6 = 16 * ((v1[1] >> 4) | v5);
    tq_tcs_fast_bn = v6;
    if ( !lv_tq_msr_req ) // If I remember right, one of these values is just a counter unless there is an MSR request..
      v6 = 16 * (v1[3] | ((v1[4] & 0xF) << 8));
    tq_tcs_slow_bn = v6;
  }
  return result;
  
Processor is PPC in Big-Endian mode.. Sorry for this not being as clean as the other stuff, but I have zero experience with this chassis. Hopefully this at least helps move things along.

EDIT: Cleaned up this a bit, should be a little more straightforward now. (And corrected - 0xB6 != 0xB9 Oops!)

Re: The SuperYacht BMW E65 7 Series

Posted: Tue Mar 17, 2020 1:57 pm
by Jack Bauer
Invaluable help. Thanks so much:)

Re: The SuperYacht BMW E65 7 Series

Posted: Thu Mar 19, 2020 11:08 am
by Jack Bauer
Would anyone know the message used to control the reversing lights in an E65? :)

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 1:10 pm
by Kevin Sharpe
Lots work on BEXUS this week... the diesel diff is installed and car will have it's NCT test next week. Only known issue is the reversing lights :(
Jack Bauer wrote: Tue Mar 10, 2020 5:54 pm Also picked up a 730d diff with a 2.81 ratio (3.6 currently) so this coupled with shifting the gears should give a nice acceleration / top end balance without high voltages. Going for nct test in about 10 days so road testing very soon:)

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 3:10 pm
by mdrobnak
On every other car I've dealt with that's not fiber optic network equipped it's always been a simple connection from the transmission to turn on the lights when reverse is engaged. So perhaps it's a wire that's missing? Do you have the service manual?

-Matt

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 5:49 pm
by Kevin Sharpe
mdrobnak wrote: Sat Mar 21, 2020 3:10 pm On every other car I've dealt with that's not fiber optic network equipped it's always been a simple connection from the transmission to turn on the lights when reverse is engaged. So perhaps it's a wire that's missing?
It uses multiple signals and CAN... remember it was working before it had brain surgery :)
mdrobnak wrote: Sat Mar 21, 2020 3:10 pm Do you have the service manual?
I suspect Damien could write a BMW service manual :D

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 6:32 pm
by mdrobnak
Kevin Sharpe wrote: Sat Mar 21, 2020 5:49 pm
mdrobnak wrote: Sat Mar 21, 2020 3:10 pm On every other car I've dealt with that's not fiber optic network equipped it's always been a simple connection from the transmission to turn on the lights when reverse is engaged. So perhaps it's a wire that's missing?
It uses multiple signals and CAN... remember it was working before it had brain surgery :)
mdrobnak wrote: Sat Mar 21, 2020 3:10 pm Do you have the service manual?
I suspect Damien could write a BMW service manual :D
According to the diagnostics page:
"No reversing lights - Transmission_gear_status - EGS"

So my guess here is while the correct thing is showing up correctly on the dash, whatever other module reads that in.

https://www.pss-autosoft.net/diagrams/bmw/ is your friend. :)

I'll try and dig up some more info on the auto-gearbox stuff momentarily.

-Matt

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 7:25 pm
by Jack Bauer
Oh yay WDS is back:) I've been on newtis for ages now. https://www.newtis.info/tisv2/a/en/

Yeah on the E65 the EGS sends a can message to the LKM to tell it to turn on the reverse lights. While I know the messages the EGS sends I don't know the format the LKM is expecting...

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 7:58 pm
by mdrobnak
Ok from what I've been reading, you're going to need to transmit 0xBA:

This is the incoming decode, so transmit is going to be reverse, obviously.

I would say transmitting "2" for reverse, (1 or 3)? for park, and 8 for 4th gear should be sufficient for forward.

Code: Select all

    switch ( bn_can_temp_byte7 & 0xF )
  {
    case 2:
      v0 = 7;
      break;
    case 5:
      v0 = 1;
      break;
    case 6:
      v0 = 2;
      break;
    case 7:
      v0 = 3;
      break;
    case 8:
      v0 = 4;
      break;
    case 9:
      v0 = 5;
      break;
    case 0xA:
      v0 = 6;
      break;
    default:
      v0 = 0;
      break;
  }
  gear_info = v0;
  if ( lv_at )
  {
    state_cc = bn_can_temp_byte7 >> 6;
    state_mod_gb = (bn_can_temp_byte1 >> 4) & 7;
  }
  if ( lv_var_amt )
    lv_pump_amt_on = (bn_can_temp_byte0 & 3) == 1;
}
Ok, looking at the data:
Again, byte0 referenced:
byte0 = always 0
byte1 bottom nibble - counter 0-E
byte1 top nibble - always 8.
byte2 - checksum
byte3 - 0
byte 4 - 0
byte 5 - 0x0F
byte 6 - 0xFF
byte 7 - Gear according to that odd mapping above.


Looks like 1D2 is the item only used for display, not for consumption by the rest of the vehicle.

Also, my IDA Pro was not set up right, I'll edit the ECU send data, I should have a much cleaner decompile now.

As an aside, looks like the CAN logs are in little endian order, so all the bytes were flipped - I was super confused as to why things weren't lining up. :)
What's also confusing is the CAN logs show a length of 7, but the code references 8 bytes. I'd try sending what I've got here and seeing what happens.

Re: The SuperYacht BMW E65 7 Series

Posted: Sat Mar 21, 2020 8:32 pm
by Jack Bauer
Brilliant thanks. Yes I'm sending 0x1da for the cluster display. So lower nibble of 0xba byte 7 looks like where I need to be aiming.

Re: The SuperYacht BMW E65 7 Series

Posted: Mon Mar 23, 2020 3:49 pm
by Jack Bauer
Do you know how the byte 2 checksum is calculated?