# Ping-Pong (lateral stability) on Autopilot



## bwilson4web (Mar 4, 2019)

Hi,

I'm curious about "ping-pong" which is described as the car, oscillating on autopilot or after a road line changes or switching lanes. With instrumentation, I can quantify these 'rocking' events which means I can experiment with my car, a SR+ Model 3. This initial survey is to look for common elements (note: editing the poll question seems to have expired and the second question should be about 18" tires.)

There are a lot of papers about car driving dynamics. Here are a few to get us on the same page:

https://lib.dr.iastate.edu/cgi/view...le.com/&httpsredir=1&article=9484&context=rtd - layman introduction
https://en.wikipedia.org/wiki/Directional_stability - good old Wiki often right but sometimes 'grain of salt'
https://new.hindawi.com/journals/mpe/2016/3419108/ - highly technical model
*BACKGROUND*

My former 2003 Prius had slight lateral instability. You had to drive it all the time or it would head to the ditch either off to the left or right. Alignment had no effect and tire wear was normal. Using the EZshim system to adjust rear toe and camber as well as a front camber bolt change, there was no noticeable improvement. But looking at tire options, I replaced the front tires with one slightly larger diameter and 'stability improved.'








Going to the largest diameter tire gave the maximum stability. It was as if the front wheels were more effective gyroscopes keeping the car tracking true.

I don't find the gentle rocking motion a problem unless I'm fatigued or sleep deprived. But vehicle dynamics are an interest problem. Anyone else interested?

Bob Wilson


----------



## Mr. Spacely (Feb 28, 2019)

I don't understand some of your poll-- "Is it either Standard Range Model 3?" And what box do I check if I don't have ping ponging?


----------



## Klaus-rf (Mar 6, 2019)

bwilson4web said:


> Hi,
> 
> I'm curious about "ping-pong" which is described as the car, oscillating on autopilot or after a road line changes or switching lanes.


 In my experience there does not need to be ANY of the above conditions present: road line changes, switching lanes, etc.

For me it has not been dependent on traffic conditions, lane/line markings, lane selection, intersections, etc. It's just like a 12yo driving and not sure how to keep it steady. In my experience the early Sept 2019 release did not do ANY of this lane bouncing.


----------



## bwilson4web (Mar 4, 2019)

Mr. Spacely said:


> I don't understand some of your poll-- "Is it either Standard Range Model 3?" And what box do I check if I don't have ping ponging?


I was trying to get the poll questions in order when suddenly it posted the draft. I've sent a note to the moderators asking for help getting the poll questions fixed.

As for not having the ping pong, good, but I wasn't trying to find out how prevalent it is as much as about the configuration of those who have the symptom. Some of the logic behind my curiosity:

tire size - I've seen the Gen-1 Prius go from no stability to nice after increasing the front tire diameter
vehicle mass - the Std. Rng. Model 3 have the smallest vehicle mass which would affect dynamics
tire pressure - has a slight effect along with alignment
Again, sorry for the accidental post of my draft poll.

Bob Wilson


----------



## bwilson4web (Mar 4, 2019)

Klaus-rf said:


> In my experience there does not need to be ANY of the above conditions present: road line changes, switching lanes, etc.
> 
> For me it has not been dependent on traffic conditions, lane/line markings, lane selection, intersections, etc. It's just like a 12yo driving and not sure how to keep it steady. In my experience the early Sept 2019 release did not do ANY of this lane bouncing.


Does this go away without Autopilot engaged?

Do you have a smart phone or tablet with accelerometer recording capability? With three axis recording, we could use the later g-force record to quantify the effect. For example, start recording, enable autopilot and the oscillations, and turn off autopilot. Then download the data and annotate where it started and stopped. More details are better than less.

Thanks,
Bob Wilson


----------



## John (Apr 16, 2016)

Another question: if you do not have Autopilot engaged, but you let go of the wheel while driving, does the car pull to one side?


----------



## Klaus-rf (Mar 6, 2019)

John said:


> Another question: if you do not have Autopilot engaged, but you let go of the wheel while driving, does the car pull to one side?





bwilson4web said:


> Does this go away without Autopilot engaged?
> 
> Do you have a smart phone or tablet with accelerometer recording capability? With three axis recording, we could use the later g-force record to quantify the effect. For example, start recording, enable autopilot and the oscillations, and turn off autopilot. Then download the data and annotate where it started and stopped. More details are better than less.
> 
> ...


 Its is ONLY present with autopilot engaged It is clearly the AP function that is wandering around.

I do have several kinds of devices that could be used for that measurement function but I don't see that point. We [end users] aren't able to fix this - Tesla must do it..



John said:


> Another question: if you do not have Autopilot engaged, but you let go of the wheel while driving, does the car pull to one side?


 No. Still straight (except in heavily rutted roads, of course).

I will posit a theory here: The newer firmware flavors have focused more on detecting if a driver is present and attached to the steering wheel and - perhaps - these undesirable oscillations are the result of bouncing the steering wheel back and forth to detect how much counterforce is being applied.

For the record: I've not noticed any detectable difference in the wandering with or without my gripping the wheel. The newer firmware flavors are DEFINITELY more nappy about hand-holding though.


----------



## garsh (Apr 4, 2016)

Klaus-rf said:


> It is ONLY present with autopilot engaged It is clearly the AP function that is wandering around.


I concur. If I'm performing the steering, it's smooth as butter.


----------



## bwilson4web (Mar 4, 2019)

Klaus-rf said:


> Its is ONLY present with autopilot engaged It is clearly the AP function that is wandering around.


I suspect AP is coupled with the oscillations.


Klaus-rf said:


> I do have several kinds of devices that could be used for that measurement function but I don't see that point. We [end users] aren't able to fix this - Tesla must do it..


I have no problem with Tesla fixing it but while we're 'waiting for Godot'. <grins>

Tesla may have fixed it in the software that asks about wheels found in 'track mode'(?). It may have an effect on the PID constants. PID - proportional-integral-derivative (PID) controller.


Klaus-rf said:


> . . .
> For the record: I've not noticed any detectable difference in the wandering with or without my gripping the wheel. . . .


That makes some sense. Autopilot has its own control laws and 'hands on wheel' is just an alert mechanism, not a control law input. But if you kick it out of autopilot and take your hands off the wheel (_within reason_) do the oscillations go away?

Bob Wilson


----------



## SAronian (Apr 4, 2019)

Side-to-side oscillations only occur with Autopilot engaged. For me it started with v10.0 (2019.32.11.1 d39e85a) and never before, so I assumed it was related to the software change that was nudging the car slightly away from adjacent vehicles. On an open road with nothing adjacent, there is still a slight left-right movement within the lane. But not so obvious that I notice without focusing on the event.

Outside of Autopilot LR RWD with stock 18" wheels and tires tracks straight.


----------



## Klaus-rf (Mar 6, 2019)

bwilson4web said:


> But if you kick it out of autopilot and take your hands off the wheel (_within reason_) do the oscillations go away?
> 
> Bob Wilson


 Abba-LOOT-ly.
( in my best Stallone )


----------



## Frully (Aug 30, 2018)

Confused by the poll, so until it's fixed - I have very infrequent pingpong, and it's only when autopilot can't find the lane lines, because they completely disappear in our snow-covered roads. When the car can clearly see the lines and doesn't have to hunt for the geometric center, it doesn't have any stability issues on or off autopilot.


----------



## Needsdecaf (Dec 27, 2018)

Ping-ponging is not anything related to the wheels and tires, at least in my case. THe car tracks straight and true when not on autopilot. The steering corrections are clearly a result of the "computer driving" and deciding to avoid trucks, center in the lane, etc.


----------



## bwilson4web (Mar 4, 2019)

Needsdecaf said:


> Ping-ponging is not anything related to the wheels and tires, at least in my case. THe car tracks straight and true when not on autopilot. The steering corrections are clearly a result of the "computer driving" and deciding to avoid trucks, center in the lane, etc.


Auto steer is not doing it alone and I _suspect_ there are PID constants involved that couple with the car mechanical dynamics. For example, there is one report that a 'calibration' exercise eliminated (or reduced) the oscillations to no longer noticeable. It remains a phenomena that has not been fully diagnosed so we have to do it ourselves ... or curse the darkness. As a retired engineer, these are the kinds of puzzles that I enjoy solving.

Bob Wilson


----------



## bwilson4web (Mar 4, 2019)

Returning home, I ran low on charge and reduced my speed to ~55 mph. In Oklahoma where the merge lanes lack a short line segment, at the slower speed, the former "split the difference" came back. When the merge lane came to an end, the car would return to the lane with a 2-3, decreasing amplitude oscillation. No lane violations but if not prepared, it could upset the normal, smooth driving. At faster speeds, ~70 mph, the car is too fast to "split the difference."

Downloading the next software version prior to repeating the Mississippi segment.

Bob Wilson


----------



## GDN (Oct 30, 2017)

bwilson4web said:


> Auto steer is not doing it alone and I _suspect_ there are PID constants involved that couple with the car mechanical dynamics. For example, there is one report that a 'calibration' exercise eliminated (or reduced) the oscillations to no longer noticeable. It remains a phenomena that has not been fully diagnosed so we have to do it ourselves ... or curse the darkness. As a retired engineer, these are the kinds of puzzles that I enjoy solving.
> 
> Bob Wilson


Help me understand what "PID constant" is and why you think this is isn't just a SW issue. Over 400,000 Model 3's on the road. No issue with Ping Pong until late last summer they added a feature where the car would crowd the line opposite a big truck or other vehicle. Then late last year almost everyone reported this new "ping pong" phenomena where the car won't stay perfectly centered as it did at one time.

One or two reports of some sort of calibration may have fixed another issue with this car, but then with more than one report now this morning afer a SW update that "ping pong" is reduced or maybe fixed for some, how is that not a SW issue?


----------



## bwilson4web (Mar 4, 2019)

A proportional-integral-derivative controller (PID) has three coefficients which are described in greater detail:
https://en.wikipedia.org/wiki/PID_controller

_Term P is proportional to the current value of the SP − PV error e(t). For example, if the error is large and positive, the control output will be proportionately large and positive, taking into account the gain factor "K". Using proportional control alone will result in an error between the setpoint and the actual process value, because it requires an error to generate the proportional response. If there is no error, there is no corrective response._
_Term I accounts for past values of the SP − PV error and integrates them over time to produce the I term. For example, if there is a residual SP − PV error after the application of proportional control, the integral term seeks to eliminate the residual error by adding a control effect due to the historic cumulative value of the error. When the error is eliminated, the integral term will cease to grow. This will result in the proportional effect diminishing as the error decreases, but this is compensated for by the growing integral effect._
_Term D is a best estimate of the future trend of the SP − PV error, based on its current rate of change. It is sometimes called "anticipatory control", as it is effectively seeking to reduce the effect of the SP − PV error by exerting a control influence generated by the rate of error change. The more rapid the change, the greater the controlling or dampening effect._
In my best lay terms:

P - the ratio of the current steering and the desired direction state. But the controller would over control when it reaches the value and over shoot the target. Then it reverse the control direction and soon you have an oscillation that can go divergent.
I - this looks at how fast the steering controller is approaching the desired direction so it doesn't overshoot but there can be a cumulative error
D - corrects the 'zero' control steering input to handle changing driving environments like a low tire or slanted road.
But these three coefficients have to be tuned to match the vehicle and this is not trivial (see Wiki article.)

Bob Wilson


----------



## Long Ranger (Jun 1, 2018)

bwilson4web said:


> I - this looks at how fast the steering controller is approaching the desired direction so it doesn't overshoot but there can be a cumulative error


Bob, sorry to nitpick, but I think you described this part wrong in your lay terms. D is how fast the steering controller is approaching the desired direction. I is the cumulative error.

In any case, I agree that there could be something in the mechanical dynamics of the vehicle that is contributing to the oscillations. It is definitely a SW problem, but it's possible that a recent SW change isn't modeling some specific mechanical dynamics correctly. However, from what I've seen reported so far, the problem doesn't seem to track with a specific vehicle type, wheel/tire spec, or steering mode setting.


----------



## bwilson4web (Mar 4, 2019)

Long Ranger said:


> Bob, sorry to nitpick, but I think you described this part wrong in your lay terms. D is how fast the steering controller is approaching the desired direction. I is the cumulative error.


I agree ... (*NOTE TO SELF*: don't post when tired.) Here is a better description:










BTW, there are other controllers with different response characteristics. Just a PID is a common starting point. The challenge for steering is we have multiple errors:

driver side lane line - tends to be better direction indicator.
passenger side lane line - interrupted by merge lanes and cross street gaps.
road bank/slope - this determines if the car is too fast or slow for the road.
The good news is Tesla auto-steering is a software controller that is handling an electro-mechanical problem.

LATE THOUGHT: I can find a straight road with good lane lines and little or no traffic. I can steer the car close or ON each lane line while recording the steering and accelerometer metrics. If there is an asymmetrical response, it should be evident in the data. Then do three different speeds which should map out what is going on. It might be enough to make a 'passible' spreadsheet model.

Bob Wilson


----------



## GDN (Oct 30, 2017)

Here is what I can say - I put over 400 miles on my car this past weekend. 150 or so was on I-35 running AP, didn't use NOA. My car would center and drive as nice and straight as it ever would when I was not around traffic. You get around other cars and it would move back and forth in the lane. No traffic around and it moved very little within the lane.


----------



## bwilson4web (Mar 4, 2019)

Between last Friday, Jan 24, and last night, Thursday, Jan 29, we put 1,980 miles on our SR+ Model 3

Huntsville AL -> Little Rock AR -> Richardson TX -> Oklahoma -> Coffeyville KS -> Oklahoma -> Arkansas -> home
~1,400 mi on 2019.40.50.7
~600 mi on 2020.4.1
No significant changes from my earlier post. Some oscillations when an on-ramp merges without leading lane marker. At slower speeds, ~55 mph, the "split the difference" was obvious and latent oscillations.

Bob Wilson


----------



## Bigriver (Jan 26, 2018)

I have experienced the ping-pong effect on both my model X and model 3. With the model 3, it was always something that I could attribute to over-reaction to vehicles around me or a lane issue. A little annoying, but not bad enough to make me turn off autopilot. With the model X, it was awful. It was also on straight roads with no one around me. I reviewed some dash cam clips and found ones from October when it was extremely stable, then mid-December the weaving started. Not crossing lines or anything, but strong and rhythmic enough to be almost nauseating at times.

So I had a mobile ranger appointment yesterday to see if he could re-calibrate whatever. Unfortunately, in our 28 mile test drive, the stupid model X behaved perfectly. ARGH!! What I did learn, though, was that yes he could theoretically do some recalibration, but he said it’s very sensitive and wasn’t something he felt he could accurately do in the field. He said that if I continue to have the issue, to schedule an appointment at the SC to have them do the re-calibration.

Also installed 2020.4.1 yesterday in the X and have driven 100 miles today. No ping-pong at all!!


----------



## BW984 (Nov 30, 2018)

I’m still getting ping pong on 2020.4.1 2019.40 is where this went downhill for my car. In addition to the ping pong I feel as though the car is lazier on curves than it used to be at highway speed, frequently under steering for the severity of the curve after steering late at the beginning of the curve. 

I love how butter smooth acceleration and de acceleration are now with AP, let’s keep that and give us back our V9 stoic center of lane keeping steering algorithm and we’ll be good to go!

Is there anyone here that has the ping pong and has the FSD computer? There is a theory over on reddit that the ping pong is limited to HW2.5 on these newest software releases. GreenTheOnly was also saying that Tesla is no longer looking at data from HW2.5 cars as they tweak their algorithm.


----------



## SAronian (Apr 4, 2019)

BW984 said:


> Is there anyone here that has the ping pong and has the FSD computer?


Up until a few weeks ago my lane centering issue had gotten really noticeable and started to have difficulty with long sweeping curves as well. Instead turning the curve into a series of straight-line vector nodes. After upgrading from HW2.5 to the Full-Self Driving Computer the issue is gone. Lane centering is stable and accurate, curves are smooth. Following the installation firmware upgraded to 2020.12.1, but still haven't received 2020.12.5


----------

