Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Chassis CAN Logging To ASCII Text Plus Graphing

This site may earn commission on affiliate links.
[deleted and re-added to removed extra copies of graphs]
Here are a couple of graphs from my P85 (VIN 2298, A Pack) using Bill's logger. First run was a FF - lots of wheel spin. Fourth run was a slow feed in of the accelerator which eliminated wheel spin, but because recording didn't trigger until 75% throttle position it missed the first part of the run.
No idea why the torque appears to be bouncing so much. May be a data collection artifact, or something weird might be going on.
Data logger run 1.png

Data logger run 4.png
 
  • Like
Reactions: benjiejr
Ok, final set of graphs from range mode asks previously. Range mode at 65, 70, 80, 90mph then an attempt at comparison.

oh, sorry - forgot to add as it's implicit. Rear motor Torque was zero for the time I chose - bar the acceleration at 65mph it's mighty impressive how well torque sleep works...

Thanks for gathering the data on range mode and torque sleep. As you know, my interest is largely concerning when torque sleep --STOPS-- working, so I'd be interested in seeing comparisons to these at lower temperatures by others, or again by you, Mike, if you're out logging again some time when the temps are a lot cooler. Alternatively I'm wondering if rain would also increase the power requirement significantly, both due to rolling resistance and having to move through the rain. But of course you probably don't want to be cruising along at 80 or 90 in the rain!

I'm actually kind of surprised that even at 90 torque sleep was functioning. Part of this could be improvements in software, but if my theory is roughly correct, last winter (2014-2015) I'm guessing at 70 MPH torque sleep probably stopped working somewhere in the range of 20-25 degrees. That's a complete wild guess. But since I had that "feel" for it in my mind, I was surprised to see no rear motor torque at 52 degrees and 90 MPH. Very interesting!
 
Thanks for gathering the data on range mode and torque sleep. As you know, my interest is largely concerning when torque sleep --STOPS-- working, so I'd be interested in seeing comparisons to these at lower temperatures by others, or again by you, Mike, if you're out logging again some time when the temps are a lot cooler. Alternatively I'm wondering if rain would also increase the power requirement significantly, both due to rolling resistance and having to move through the rain. But of course you probably don't want to be cruising along at 80 or 90 in the rain!

I'm actually kind of surprised that even at 90 torque sleep was functioning. Part of this could be improvements in software, but if my theory is roughly correct, last winter (2014-2015) I'm guessing at 70 MPH torque sleep probably stopped working somewhere in the range of 20-25 degrees. That's a complete wild guess. But since I had that "feel" for it in my mind, I was surprised to see no rear motor torque at 52 degrees and 90 MPH. Very interesting!

Got some runs in at 48F last night, though temps aren't dropping that much anymore so this is me bowing out until next year now on the cold runs I believe (ie. no runs up to Alaska for me :))

Doesn't surprise me that the front motor is the primary. Everything we see so far leads me to believe that the front motor is geared higher than the rear and has less overhead in use. Makes a lot of logical sense and reinforces the whole "AWD Electric cars can be more efficient than ICE/mechanism AWD" as the weight overhead is far outweighed by the potential efficiency gains. For the purposes of this experiment have you chatted / looking at the BT CAN logger than @Turbo3 is working on based on @GaryGid's formats (TM-SPY)? I would hope they could pull Torque data from both motors pretty easily and that will show you, in realtime, how range mode is/is not working? Just a thought? :)

- - - Updated - - -

Guys, what a fantastic thread! I didn’t read it until this past weekend, but having done so now I think the collected data is fascinating. What I would love to do – although I’m not sure I have the competence to do it – is develop a dragstrip model/simulator that would predict how times would vary based on all the relevant variables. It would begin with electrical inputs, do some empirical fitting to estimate the conversion to mechanical power/thrust, then calculate (drag, rotational inertia of wheels & tires) or empirically fit (driveline friction, rolling resistance) factors accounting for retarding forces, and integrate acceleration runs with the goal of reproducing the recorded data. Then electrical and other parameters can be varied to see what it would take to do a 10.9 run. Or we could estimate what the P100D would run based on lower pack resistance. Or how the lower moment of inertia of carbon fiber wheels would affect our results.

Of course the devil is in the details and I am not sure I will get very far at all: I am no engineer, my pre-retirement career was in financial services, and it’s been a long time since I was a physics major. What I have done so far is take Bill D’s 2016-03-01 run 1 spreadsheet – which I like because it’s a full quarter mile run – and import it into Mathematica 10. The first step is to understand the conversion from electrical power into mechanical power. Rather than divide one by the other to get percentage efficiency, I think it’s instructive to take the difference and look at the actual conversion dissipation in watts. Below, blue is electrical power (v*I), brown is mechanical power (summed torque in newton-meters times rear axle angular velocity in radians per second – all data converted to SI units) and green is the difference. All are in watts. I did not spend much time making the chart pretty.
I believe your Physics major is alive and well my friend... I have not seen much use of Mathematica out of research, though it's a genius idea. Huge potential time suck, though great for fitting and creating empirical models. I believe Bill (LolaChampCar, not D) was noodling on the idea of electrical to mechanical efficiency so hope he'll chime in.

Because I add the front and rear torques when calculating mechanical power I am assuming the two motors are turning at very close to the same speed, so the two motors are geared the same. The MS owners manual implies this when it claims a single final drive ratio of 9.73:1. I checked this for the rear by calculating the diameter of 245/35-21 tires and calculating MPH per rear motor RPM given 9.73:1. The result is interesting because the RRPM data fits the MPH data very closely after twelve seconds when the car is coasting. During the run, rear motor RPM was 3% too high about two seconds in, followed a curved descent to 1% too high at the end of the quarter mile. In other words, it shows the tire slippage one would expect under hard but decreasing acceleration, where slippage goes slightly the other way once decelerating. It raises the question of how MPH is measured. Personally, I suspect it’s integrated from an accelerometer, which is periodically calibrated against motor RPM when the car is cruising without accelerating.
I don't believe the assumption is correct. From what I know (and others feel free to correct as needed) the front wheels determine the measured speed and the front motor is geared higher than the rear. This might account for the imbalance between front/rear when coasting - > 65mph (iirc) the front motor is the one primarily adding energy and the rear motor is coasting (note not off, as it shows 0 torque though still high R_RPM). Would that make more sense?

Turning to the chart, note the 40 kW of static dissipation in launch mode. That’s a lot of heat into the alternator power semis, and the coils in the stator and rotor. There is a blip in dissipation just after launch but if you take out the blip there is a ramp from the pre-launch level up to roughly 7 seconds in where it levels off at 100 kW and stays flat until 12 seconds when the run ends. Notice how the leveling off in dissipation coincides with the knee in the blue electrical power curve, which results from a knee in current. My suspicion is that the current knee is programmed at that RPM so that heat dissipation is held to a 100kW limit, which is an awfully round and deliberate-looking number.
There's two things here I believe:
First is the launch blip. We've discussed this a few times and imo appears to be a programmed response. Bill believes this is loading the tire sidewalls to help the launch, and I believe this makes the most sense. Others that this is traction control. Even so, the net difference, in terms of acceleration, between launch mode and fast foot is minimal.
Second is the "power knee". This could well be due to hitting TDP limits of the motor or inverter. On p85D this starts at 6 seconds, on p85DL 6.5 seconds and p90DL appears to be closer to 7. Could this be thermal sensor limiting power?

One factor that might explain some of the blip after launch is that electrical power not only has to produce useful torque, it also has to spin-up the rotor itself, which is a hunk of metal turning 14,000 RPM at the end of the run. That takes a lot of power, and the angular acceleration is highest early in the run where the blip is. If any of you guys have a guess for the weights and diameters of the two rotors I could treat them as solid cylinders, calculate their moments of inertia, figure out how much power is needed to spin them up, subtract that from the dissipation to get the real dissipation as heat, and see how the result fits to motor torque and speed. Or at least that would work if the reported motor torque is at the output shaft, net of the torque needed to spin the rotor. If reported torque is a gross number based on power and phase between rotor and stator (and I am no expert on induction motors) I would have to add the rotor moments to the tire and wheel moments (axle moments are insignificant since the axles are narrow) instead. The effect of rotational moments of inertia is to increase the effective mass of the car, so they need to be taken into account.

I’ve made this post long in part to give a sense of some of the complications (devil in the details) necessary for a drag strip simulation. Any comments from the engineers among you are very welcome.

Eric


Edit ... Looking at photos of the large-motor rotor it's about 6" dia and a foot long, so 42 Kg at the specific gravity of Iron. Radius of gyration 0.053m. Moment of inertia 0.12 Kg m^2. Probably 0.2 for the two motors together. Recorded angular acceleration over the first second is 324 radians/s^2. Rotational kinetic energy is thus ~10,500 Joules after 1 second, so 10 kW of the difference between electric and mechanical power during the first second is spent spinning up the rotors. Explains about half of the roughly half of the 20 kW jump in the difference right at launch, which sustains given fairly constant angular acceleration in the first second. Or it might explain the whole jump if my eyeballing the rotor size is merely 15% low -- in scaling the cylinder proportionately, mass goes as the cube and moment as the 5th power. So it probably does account for the whole 20% jump in dissipation right at launch.
LOL - I need to dig out some physics text books for this. Electrical engineering is not my thing, though the premise sounds plausible :)
 
@MikeBur -- do you recall which file has the insane mode run 4 that you compare with your ludicrous run back in post 164? I have the file with the ludicrous run. My focus at this point is on exploring the relation between electrical power into the alternators and motors and mechanical power out. Comparing your car before and after the L upgrade would be interesting because the alternators and motors are physically the same -- only the electrical supply and software is upgraded. I might learn something by comparing power dissipation converting electrical to mechanical in the two cases.

Also, thanks for your 02-18-16-1600 Run 5, which is a long run up a hill with lots of throttle on and off. The acid test will be figuring out how to model the fluctuating relationship between electrical power in versus mechanical power out during that run. Once I can accurately model mechanical power (torque @ rpm) given electrical power (where current is the independent variable) I can move on to phase two, which is modeling the dynamics of the car.

You are right, this is a potential time suck. I'm focused on it today and yesterday because it allows me me procrastinate getting all my tax records together for the accountant (mustn't hold off for too long though). We'll see how far this project goes. I've kept my mathematica license up to date for 20 years, since version 3. I have no good reason to have it -- it's just that every year or so I use it in some crazy project for pure entertainment.
 
@MikeBur -- do you recall which file has the insane mode run 4 that you compare with your ludicrous run back in post 164? I have the file with the ludicrous run. My focus at this point is on exploring the relation between electrical power into the alternators and motors and mechanical power out. Comparing your car before and after the L upgrade would be interesting because the alternators and motors are physically the same -- only the electrical supply and software is upgraded. I might learn something by comparing power dissipation converting electrical to mechanical in the two cases.

Also, thanks for your 02-18-16-1600 Run 5, which is a long run up a hill with lots of throttle on and off. The acid test will be figuring out how to model the fluctuating relationship between electrical power in versus mechanical power out during that run. Once I can accurately model mechanical power (torque @ rpm) given electrical power (where current is the independent variable) I can move on to phase two, which is modeling the dynamics of the car.

You are right, this is a potential time suck. I'm focused on it today and yesterday because it allows me me procrastinate getting all my tax records together for the accountant (mustn't hold off for too long though). We'll see how far this project goes. I've kept my mathematica license up to date for 20 years, since version 3. I have no good reason to have it -- it's just that every year or so I use it in some crazy project for pure entertainment.

It was in the file "Mikebur 02-21-16-1100.xlsx" under tab 0-90, though to make this easier for you I've pulled this one, and another one I found interesting (higher SoC, though slighter lower batTemp enabling ~1290amps, over longer distance) into one file. This is 4sillydriver in my google drive subfolder. Sounds like you know where this is, though just in case not: https://drive.google.com/open?id=0BzwKZAn3p2LTeFJpSlp5OUc1X3M
Unfortunately, these were captured before R_RPM was captured.

Good luck and let us know anything else we can do to help. Like the experiment :)
 
Got some runs in at 48F last night, though temps aren't dropping that much anymore so this is me bowing out until next year now on the cold runs I believe (ie. no runs up to Alaska for me :))

Doesn't surprise me that the front motor is the primary. Everything we see so far leads me to believe that the front motor is geared higher than the rear and has less overhead in use. Makes a lot of logical sense and reinforces the whole "AWD Electric cars can be more efficient than ICE/mechanism AWD" as the weight overhead is far outweighed by the potential efficiency gains. For the purposes of this experiment have you chatted / looking at the BT CAN logger than @Turbo3 is working on based on @GaryGid's formats (TM-SPY)? I would hope they could pull Torque data from both motors pretty easily and that will show you, in realtime, how range mode is/is not working? Just a thought? :)

I'm not surprised that the front motor is primary. I'm surprised that the car can and does do 90 MPH in 52 degree weather, still not using the rear motor at all.

I am following that thread. That is an interesting thought about getting real-time data on both motors at the same time.
 
I'm not surprised that the front motor is primary. I'm surprised that the car can and does do 90 MPH in 52 degree weather, still not using the rear motor at all..

I was testing some code last weekend (prototype dashboard) and from what I can tell, unless under very heavy load, my car stays in front-wheel-drive mode most of the time in range mode. I drove in -20C weather (-5F) at around 55-60mph and it was front motor only.
 
Thanx for the graphs Mike. If you take suggestions: we know SpC offers a higher power and current than ChaDeMo, so obviously it will charge faster. Maybe a good comparison would be SoC on the x-axis vs. charging power (V*I since this is DC) for both SpC and SoC? Altentatively (or in addition to) you could put Vbat on the x axis instead of SoC (I wonder whether SoC is derrived purely from Vbat open circuit, if it is, graphs should be identical shape). :)

sure, it will be later tomorrow before I can get to this though sounds like an interesting alternative. These charts are on the Google drive if you want to play with them before then. Power is already on the chart, and I purposely left I and V separately there as for other ways to rep this :)


Pretty compelling graph showing significantly higher current at ~same voltage. Note the similarity of the tapering
Same as before dotted = CHAdeMO; translucent line = SpC. SoC on X-axis vs. Power (and current and Voltage).
(over SoC) MikeBur P85DL CHAdeMO vs Supercharger charging 02-29-2016.PNG


Zooming in to the tapering in the last 15mins:
(over SoC - Zoomed) MikeBur P85DL CHAdeMO vs Supercharger charging 02-29-2016.PNG


It's almost like I can hear your voice at this point - just power only, we need to see how close it is just for power... well, here you go. Like I said.. real close. Looks like TM has same tapering technique and algorithm for both CHAdeMO as Supercharging:
(over SoC kW Only - Zoomed) MikeBur P85DL CHAdeMO vs Supercharger charging 02-29-2016.PNG


Second, additional request - having BattV as x-axis I'm less sure about... in particular, the seeming current fluctuations on Supercharger session could well be just a measurement artifact as it takes (iirc) 3 seconds to complete data fetch. That 3 seconds is a larger %age of time for SpC than CHAdeMO, though tell me if this is what you were thinking...
(over BattV) MikeBur P85DL CHAdeMO vs Supercharger charging 02-29-2016.PNG


Hope this helps, Mike
 
It was in the file "Mikebur 02-21-16-1100.xlsx" under tab 0-90, though to make this easier for you I've pulled this one, and another one I found interesting (higher SoC, though slighter lower batTemp enabling ~1290amps, over longer distance) into one file. This is 4sillydriver in my google drive subfolder. Sounds like you know where this is, though just in case not: https://drive.google.com/open?id=0BzwKZAn3p2LTeFJpSlp5OUc1X3M
Unfortunately, these were captured before R_RPM was captured.

Good luck and let us know anything else we can do to help. Like the experiment :)

Got it. Thanks for putting this together.
 
@sillydriver, you're welcome. I also did some other charts for folk.

For those wishing to generate their own charts, I just took another run at a template. If runs a lot smarter now (and after debugging vlookup I killed its use) and use instructions are on, um, the Instructions tab.

In the new templates folder

Hope this helps,

Cheers, Mike
 
Eric - Hat's off to you on your ambitious plan. With good data and thoughtful analysis, it will be fun to explore the many unanswered questions in how these amazing cars work. Here's a couple of my thoughts on your post:

...During the run, rear motor RPM was 3% too high about two seconds in, followed a curved descent to 1% too high at the end of the quarter mile. In other words, it shows the tire slippage one would expect under hard but decreasing acceleration, where slippage goes slightly the other way once decelerating. It raises the question of how MPH is measured. Personally, I suspect it’s integrated from an accelerometer, which is periodically calibrated against motor RPM when the car is cruising without accelerating....
There's no doubt that big gaps between the rear RPM line and the MPH line indicate tire slip, but I would also love to know the source of the MPH number. I have pondered the paradox of MPH being generating from wheel speed and then using that MPH data for AWD traction control. Duh!

I thought this paradox could only be solved by getting MPH from something other than the wheels. But your theory on wheel speed sensors is very interesting - that MPH is integrated from an accelerator and periodically calibrated against wheel speed when the car is cruising without accelerating.

However, I tend to agree with Mike, that MPH is probably from the front wheels. This works if the power applied to the front wheels is always low enough that they don't slip. The graphs show that when the rear wheels slip, the TC reduces power to all wheels assuming the front wheels might also be slipping. In heavy spin, it even cuts front torque to zero.

Getting data from the chassis CAN bus may lead to more info on this.

...One factor that might explain some of the blip after launch is that electrical power not only has to produce useful torque, it also has to spin-up the rotor itself, which is a hunk of metal turning 14,000 RPM at the end of the run....
I suspect the blip is initial rear tire spin quickly reduced by the TC, closely followed by weight transfer onto the rear wheels giving more bite, after which no more TC is needed unless the wheels slip. I found the best ET predictor and measure of tire slip is the flat top on the torque curve. It dips down every time the TC reduces power.
 
Thanks Mike!

Pretty compelling graph showing significantly higher current at ~same voltage.
Well, not quite the same voltage. :) That small difference really does push that much more current into the battery. The voltage difference between Vapplied and Vopen_circuit is what determines the current into the battery.

One thing that this confirms is that the car controls the charging V (and therefore I) rather than let the ChaDeMo charger decide. ChaDeMo is pretty much the same as a current limited SpC. It's also nice to know that the SpC drops to ChaDeMo levels at ~78% (on an 85KWh battery).
 
Because I add the front and rear torques when calculating mechanical power I am assuming the two motors are turning at very close to the same speed, so the two motors are geared the same. The MS owners manual implies this when it claims a single final drive ratio of 9.73:1. I checked this for the rear by calculating the diameter of 245/35-21 tires and calculating MPH per rear motor RPM given 9.73:1. The result is interesting because the RRPM data fits the MPH data very closely after twelve seconds when the car is coasting. During the run, rear motor RPM was 3% too high about two seconds in, followed a curved descent to 1% too high at the end of the quarter mile. In other words, it shows the tire slippage one would expect under hard but decreasing acceleration, where slippage goes slightly the other way once decelerating. It raises the question of how MPH is measured. Personally, I suspect it’s integrated from an accelerometer, which is periodically calibrated against motor RPM when the car is cruising without accelerating.

There's no doubt that big gaps between the rear RPM line and the MPH line indicate tire slip, but I would also love to know the source of the MPH number. I have pondered the paradox of MPH being generating from wheel speed and then using that MPH data for AWD traction control. Duh!

I thought this paradox could only be solved by getting MPH from something other than the wheels. But your theory on wheel speed sensors is very interesting - that MPH is integrated from an accelerator and periodically calibrated against wheel speed when the car is cruising without accelerating.

However, I tend to agree with Mike, that MPH is probably from the front wheels. This works if the power applied to the front wheels is always low enough that they don't slip. The graphs show that when the rear wheels slip, the TC reduces power to all wheels assuming the front wheels might also be slipping. In heavy spin, it even cuts front torque to zero.

Getting data from the chassis CAN bus may lead to more info on this.

I ask for your forgiveness in advance but I’m going to torture you all with some tribology – the physics of friction – as it applies to tires and cars. Of course a tire spins when its grip is overwhelmed by torque, but even when a tire is hooked up and appears to be rolling synchronously with the road there is still some slip whenever torque is being transmitted to the road as either a driving or a breaking force. The slip is only a few percent of the speed of the tire over the ground, but it is still measurable. Here is an interesting academic paper I found on the subject.

View attachment SlmillerGerdesACC.pdf

The topic here is longitudinal slip under torque. There is also lateral slip in a turn, where a car loaded with lateral g forces doesn’t exactly track the angle at which the tires are pointing, even when the tires are not sliding, so the car is not drifting. I bet lolachapcar is familiar with this, since he has experience with racing.

Force v Slip.jpg


This chart from the attached paper shows how tires slip up to a few percent. Once force increases over the hump of the curve, additional slip provides less traction and the tire breaks free and spins. The point of the paper is to measure slip under acceleration and deceleration, comparing tire speed from its rotation (the speedometer) to car speed from GPS. Here is their chart. When velocity ramps up there is slip one way, when velocity decreases there is slip the other way over a total of about a 3% range of slip.

Speeds and Slip.jpg

Now here is my chart for rear wheel slip, which I mentioned in my earlier post. This is the same run, where the first 12 seconds are under hard acceleration followed by coasting. There is about a 3% range of slip. The dots going off the chart in the first two seconds are where the tires are sliding or spinning (not yet hooked up) rather than slipping.

Slip from data.jpg


Compare with the left half from the chart in the paper. The zero slip axis is about 1% lower than it should be, but that's because I calculated the non-slip rotational velocity based on MPH from the CAN bus, my calculation of tire diameter, and the 9.73:1 gear ratio in the manual. The comparison is with rear motor RPM. The tire calculation in particular is probably the source of the error. The fact that this works at all proves that 9.73:1 is the correct ratio for the rear motor. I wish I could confirm that was correct for the front too: I agree there is room for doubt.

The point of this exercise is that even though the FRONT tires never spin because there is not enough torque, they will still slip by a percent or so during hard acceleration thanks to the torque of the front motor. Thus they do not give an accurate measure of MPH while accelerating. That's why I think the MPH numbers come from integrating an accelerometer rather than measuring any of the tire rotations, which are all slipping while accelerating. And after reading the paper, where the researchers use GPS to measure vehicle speed, I suspect the calibration of the accelerometer integration might also be by GPS. They couldn't just use GPS for speed because there isn't always a good signal. Also (half tongue in cheek) integrating accelerometers and gyroscopes is how you guide rockets (SpaceX) so there might be some experience there.
 
I'm not surprised that the front motor is primary. I'm surprised that the car can and does do 90 MPH in 52 degree weather, still not using the rear motor at all.

I am following that thread. That is an interesting thought about getting real-time data on both motors at the same time.

I just took my 19 inch wheels off and put 21s on. The wear was perfectly even on all 4 AND the same amount of tread depth was also left on all 4. Whatever they did, they sure hit on a combination of front wheel and rear wheel drive that eats up the tires evenly. My car has been in 3 times and each time they tell me my tires don't need to be rotated. I stupidly didn't keep track of which tire came off of which so if I wanted to rotate them when I put them back on, I won't know what positions they were in in the first place. I guess it doesn't really matter though.

This is one of the COOLEST threads ever.

Lola, will your data logger work on a Model X? If so, can you try and draft someone on the X side with a X P90DL? I think X is putting out more power than the the S P90DL base on the screen grab of the power meter I posted previously.
 
Sorka I just made the same tire swap and had the same observation. I have staggered wheels. Seems like I recall reading somewhere the staggered 21's require a suspension adjustment. Anyone know if my mind is playing games on me?
 
Sorka I just made the same tire swap and had the same observation. I have staggered wheels. Seems like I recall reading somewhere the staggered 21's require a suspension adjustment. Anyone know if my mind is playing games on me?

Interesting. I can't imagine why. They have the same wheel diameter within a few hundredths of an inch.

When you say adjustment, do you mean alignment or some other geometry component that can't be adjusted without replacement?

Many here on the forum have 21" summer tires and 19" wheels with winter tires that they swap back and fourth and the option to change form 19 to 21 and visa versa is in the TPMS reset menu and it doesn't warn about needing to do anything else.
 
I've probably dreamed this but I thought I read several months ago the suspension in the rear needed an adjustment. My service center knew I was going to do the swap myself and didn't mention it so most likely it doesn't require any change. Just checking.