• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 04:19:43 PM

News:

World Racing Series beta14 available! :)


[Telemetry] How to detect & translate rear-wheel loss/low-side?

Started by D4rw1n, May 04, 2019, 02:59:47 PM

Previous topic - Next topic

D4rw1n

May 04, 2019, 02:59:47 PM Last Edit: May 06, 2019, 10:07:33 PM by D4rw1n Reason: Title update
Hi guys,

I'm currently working on my own rig (with a scaled version first, thanks 3D printing  :D ).

I'm going to skip the rig presentation for now as it's still in a very draft-ish state.
But basically I'd like to dedicate yaw axis for rear-wheel loss feeling, aka low side but also high-sides (in a limited way...).
For that I'm thinking to use some pinion & curved rack for rig's rear side.

Referring to official gpb_example.c, m_fYaw is the variable I was expecting to use.

Although pitch and roll data from telemetry can directly be used on the rig axis, unfortunately yaw axis data seems to be not that interesting for sensing the loss of grip on the rear wheel. Looks like this tells what is the relative orientation of our motorcycle chassis against the track map.
That actually makes sense of course, but I was thinking naively it could be used for my yaw effect purpose.

So I have tried to look at other variables from telemetry:
- rotation matrix: As explained in UDP Proxy thread, this seems to be just another shape for presenting yaw/pitch/roll data, so just an alternative to m_fYaw, m_fPitch & m_fRoll.
- m_fYawVelocity: Based on my personal understanding, this value seems to be the derivative of YAW position (i.e. m_fYaw).
When I put myself (voluntarily or not  ::) ) to lose the rear, I do see this value becoming higher than on a regular turn without losing grip.
However, how strong is the turn is also affecting this value without even losing the rear, and therefore I don't think I could use this as a "flag" or reference.
- m_afWheelSpeed: So far so good, this is the only variable where I consistently see a delta becoming greater when I lose the rear.
In normal condition (straight line or slight turn), I only have a delta of 1 or 2 at the max between front & rear wheel speed.
However when I start to feel I lose the rear, I can easily see in telemetry a gap/delta of ±8 between front & rear.
Again, it's not a consistent gap, just a greater one than usual.

- Eventually, maybe by crossing m_fPosX & m_fPosY and/or their velocity with m_fVelocityX & m_fVelocityY, against yaw velocity I could make a delta that express somehow the "instantaneous" yaw moment of the chassis, relatively to its center point on the track. Would that make sense?

Aside these paths, I'm a bit lost right now to know how to detect such "event" with a graduation scale.

Thanks in advance for anyone trying to provide some help :)

EDIT: Got a suggestion from poupou59890: he had a good idea of using steering angle as a trigger/reference to know whether rear side is sliding or not.
So far so good, I think this is the best option for now. I have quickly rechecked some in-game video footage + telemetry aside and that seems usable.
However one should add some linear/exponential/logarithmic factor that would moderate this effect when we run a low speed (hairpin bend turn).

However I'm still open to any advice, idea, suggestion, etc from anyone !

poupou59890

Hi D4rw1n, this week I will try to see some footage video with the processing results and check if I can find some ways to find a good variable for the rear loss (especialy under full braking load) we need to continue in this way. I will try to give a go to the sketchup module with simtools if I can find a way to make it works. because this will give us real time movement of the futur rig.
and that will be cool too :)


TimboC137

I've been testing for traction loss as well. m_fSteer seems to work well as rear traction. I think thats what the variable is called. pos = 153 in the processing sketch.

D4rw1n

Yep this is the variable I was talking about indeed ^^

I have been re-thinking this today.
If we put aside aforementioned factor to make a relation between steering angle & speed to set a "sliding" value, there is another issue: wheeling at high speed.

In that situation, we would have our front wheel touching the ground with potentially a positive or negative angle.
Although we can set an if statement based on Front wheel material (0= no contact so sliding factor calculation is paused), what would happen when the wheel touches the ground with a right/left angle? We would get a direct & fast slide that wouldn't have much sense actually.
However, this could be smoothed by postponing the recovery of our sliding factor by 1 second for instance, just enough time for the wheel to go back ~straight.

Assuming all of this is known, I don't see (for now) any other situation that would cause an issue with such way of calculating the slide factor.

HornetMaX

You're doing something wrong guys, m_fSteer is the steering angle ...

Detecting accurately lateral slipping from telemetry data is not easy. This is why traction control systems (real ones) have only recently integrated the ability to deal with lateral slipping (I think there're only a few top notch road bikes with this kind of TC systems available today).

The trivial approach is to use m_fYaw/YawVelocity and some filtering: the yaw varies when you follow the track, but if your bike starts to lose the rear in a turn, the yaw will vary quickly. Depending on the detection precision you need, filtering could be enough or totally not enough.
If it's not enough you'd have to go ballistic with something way more complex, like a simplified model of the entire bike & tyres to predict a yaw and see when the measured one diverges.

If GPB outputs in the telemetry the tyres (rear and front) sideslip angles then it would probably be easier to do something, but it's unlikely this will happen give that GPB outputs are the outputs one could reasonably expect to see in a real bike (onboard) telemetry system.

Chris_Beeves

Quote from: HornetMaX on May 07, 2019, 07:40:29 AMThe trivial approach is to use m_fYaw/YawVelocity and some filtering: the yaw varies when you follow the track, but if your bike starts to lose the rear in a turn, the yaw will vary quickly. Depending on the detection precision you need, filtering could be enough or totally not enough.
If it's not enough you'd have to go ballistic with something way more complex, like a simplified model of the entire bike & tyres to predict a yaw and see when the measured one diverges.

If GPB outputs in the telemetry the tyres (rear and front) sideslip angles then it would probably be easier to do something, but it's unlikely this will happen give that GPB outputs are the outputs one could reasonably expect to see in a real bike (onboard) telemetry system.

This is a bit over my level, but I'm curious. The derivative (within a quite small time span) of YawVelocity should be interesting for this, right?

How does it read when leaning in a turn? Is it relative to the bike or the ground?
If bike, not interesting, if ground, possibly usable?
I had to try..

poupou59890

Intersting post :) Yes the steering angle is the steering of the handle bars but as the axis of handlebars is the only pivot, it gave also the angle  of the rear tyre compare to the front tyre, So in certain case we can know the value of the slide by this variable but it is not "real" but maybe can give a good feeling I did not test it yet but trying to think about all possible way to have yaw movement under heavy braking or or power slide in turn...

We will have more solutions in more brains.

HornetMaX

Quote from: poupou59890 on May 07, 2019, 08:47:38 AMIntersting post :) Yes the steering angle is the steering of the handle bars but as the axis of handlebars is the only pivot, it gave also the angle  of the rear tyre compare to the front tyre, So in certain case we can know the value of the slide by this variable but it is not "real" but maybe can give a good feeling I did not test it yet but trying to think about all possible way to have yaw movement under heavy braking or or power slide in turn...
Hmm no. The fact you have some steering (so front and rear are not aligned) doesn't imply you're losing the rear.
How would you compute the "value of the slide" from the steering angle ?

Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMThe derivative (within a quite small time span) of YawVelocity should be interesting for this, right?
In principle, yes. In practice you'll likely need to be smarter than a plain derivative. You'll have to play with some sort of high-pass filter to see if this is feasible, on the Yaw or on the Yaw velocity.
To be honest, I expect that won't be enough but it depends on what you really want to do with the "Hey I'm losing the rear" signal.

The tricky thing is that a low-side happens pretty fast ...

Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMHow does it read when leaning in a turn? Is it relative to the bike or the ground?
If bike, not interesting, if ground, possibly usable?
I guess you're aware of the Telemetry tool I've made for GPB, right ?
Inspecting the evolution of the angles over a lap can help understand what they are.

They yaw is the "bike direction": imagine a line along the bike frame, project it in the 2d X-Y (horizontal) plane and measure the angle between that projection and a given fixed direction (the "north") and you get the yaw angle.
If there's no lateral sliding (rear or front), then it's the same as the heading, the direction you're moving in.

Not sure what you mean with "relative to the bike or ground".

Chris_Beeves

Quote from: HornetMaX on May 07, 2019, 12:15:54 PM
Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMThe derivative (within a quite small time span) of YawVelocity should be interesting for this, right?
In principle, yes. In practice you'll likely need to be smarter than a plain derivative. You'll have to play with some sort of high-pass filter to see if this is feasible, on the Yaw or on the Yaw velocity.
To be honest, I expect that won't be enough but it depends on what you really want to do with the "Hey I'm losing the rear" signal.

The tricky thing is that a low-side happens pretty fast ...

Yeah, that makes sense.
As you said, it depends on what's good enough..

To actually replicate a "near crash" experience as an aid for the driver is a lot of work since most of the time you just crash anyway ;)

Quote from: HornetMaX on May 07, 2019, 12:15:54 PM
Quote from: Chris_Beeves on May 07, 2019, 07:54:48 AMHow does it read when leaning in a turn? Is it relative to the bike or the ground?
If bike, not interesting, if ground, possibly usable?
I guess you're aware of the Telemetry tool I've made for GPB, right ?
Inspecting the evolution of the angles over a lap can help understand what they are.

They yaw is the "bike direction": imagine a line along the bike frame, project it in the 2d X-Y (horizontal) plane and measure the angle between that projection and a given fixed direction (the "north") and you get the yaw angle.
If there's no lateral sliding (rear or front), then it's the same as the heading, the direction you're moving in.

Not sure what you mean with "relative to the bike or ground".

Maxhud? Haven't tried it yet. Will though.

I get what you mean, but my ambition to describe what I mean in three dimensions clearly outweighed my linguistic talent, so we'll just leave it there!
I had to try..

HornetMaX

Quote from: Chris_Beeves on May 07, 2019, 12:40:19 PM
Quote from: HornetMaX on May 07, 2019, 12:15:54 PMI guess you're aware of the Telemetry tool I've made for GPB, right ?
Inspecting the evolution of the angles over a lap can help understand what they are.

Maxhud? Haven't tried it yet. Will though.
No, MaxTM

TimboC137

Quote from: HornetMaX on May 07, 2019, 07:40:29 AMYou're doing something wrong guys, m_fSteer is the steering angle ...

You're the expert, and I'm glad you chimed in, but how are our observations wrong? That variable seems to respond exactly as the rear slide would. It doesn't matter what it's supposed to represent. The variable stays at 0 degrees most of time and only fluctuates approximately 4 degrees(usually  less then 4) in turns depending on braking and acceleration. When the rear loses traction, that variable seems to go to a maximum angle of 25 degrees in either direction before the bike crashes. Why does this need to be more complicated?

D4rw1n

Quote from: TimboC137 on May 08, 2019, 10:54:23 AM
Quote from: HornetMaX on May 07, 2019, 07:40:29 AMYou're doing something wrong guys, m_fSteer is the steering angle ...

You're the expert, and I'm glad you chimed in, but how are our observations wrong? That variable seems to respond exactly as the rear slide would. It doesn't matter what it's supposed to represent. The variable stays at 0 degrees most of time and only fluctuates approximately 4 degrees(usually  less then 4) in turns depending on braking and acceleration. When the rear loses traction, that variable seems to go to a maximum angle of 25 degrees in either direction before the bike crashes. Why does this need to be more complicated?

+1
While I agree and understand that reflecting *exactly* the real behaviour of the bike should take much more variables and use a more complex calculation than just using steering angle as the trigger, eventually I personally aim to get the feeling the rear is sliding, not necessarily get the perfect scale of the slide.
Depending we play with 1 or more LCD screens or a VR headset, scale of the move can even be less than expected.

I have gathered some studies/papers from IEEE, Springer and ACM digital libraries talking about the subject, I'll try to dive in later this week and gather some data that could be used to improve a bit the detection model, while trying to keep it understandable though.

HornetMaX

Quote from: TimboC137 on May 08, 2019, 10:54:23 AMYou're the expert, and I'm glad you chimed in, but how are our observations wrong? That variable seems to respond exactly as the rear slide would. It doesn't matter what it's supposed to represent. The variable stays at 0 degrees most of time and only fluctuates approximately 4 degrees(usually  less then 4) in turns depending on braking and acceleration. When the rear loses traction, that variable seems to go to a maximum angle of 25 degrees in either direction before the bike crashes. Why does this need to be more complicated?
The steering will go to max angle not only when you lose the rear: it will go to max angle in any other occasion the bike crashes (e.g. when you lose the front) and maybe even when wheeling hard. I thought you wanted to detect *only* a rear slide.

D4rw1n

Hence the idea of using iCrashed variable to disable slide effect of the rear when going into a wheeling. + some smooth effect when wheel comes back on the ground.

TimboC137

Thats the logical solution, D4rw1n, but HornetMax is right. Losing the front will be an issue.