Marco, I'm glad to see the progress of your work. And how did you make the slip angle debug in the graph above? If it's not difficult to share a link to the resource, where it shows how it's done. Thank you =)
Hi Ivan, thanks! Likewise, following your latest progresses. Really cool! For the debug charts I have used the free Kantan Charts, available form the UE4 Marketplace here: www.unrealengine.com/marketplace/kantan-charts Happy to share more if useful.
If you are using Pacejka there is a specific formula for the lateral force which uses the slip angle. It’s a bit tricky at low speed when Vx goes to zero but otherwise that is what you need. Another way to calculate the lateral force is to use Vy (lateral speed): -Vy * Cy and clamp between -Fz * mu and Fz * mu. Cy is the coefficient of lateral stiffness which needs to be set by trials and errors. Fz is the vertical load on the tire (suspension force).
Hi Marco, I have a small RC car.. I would like to find coeffiecient for those RC car. Could you please help me how can I find the coefficient? What are the required things for that.. Thank you!
Do you mean the Pacejka coefficients? These are derived from lab tests and mathematical fitting of the lab results to the Pacejka equations. I am afraid it is not that easy to "find" the coefficients because most of them have no physical meaning. If you need to adapt a tire model to your RC car better to use one that can be fit more easily like TMEasy or LuGre.
Hi! How do you handle numerical stability? with what integration method do you advance the physics steps? do you use higher order integrators like RK4? your slip angles/ratios look really stable, they converge nicely. What does the trick for you?
Hayeduce This is pure Euler's integration. The trick is to apply a correction to ensure stability for Vlong --> 0. Look up the Matlab / Simulink docs for their tire modeling, iirc it is also described there.
@@marcoghislanzoni thanks for your answer, tho i was not reffering specifically to the vlong=0 case. In any case, be it even high speed driving the slip ratios oscillate between lets say 5.4..% to 5.6...% when it should converge to 5.5. this effect of course intensifies the lower the speed, or the higher the gear i am in. This oscillation is not nearly as problematic nor noticable with the eye as the vlong~=0 problem, but as soon as you add engine sound, u could hear the jittering :/
Hayeduce you need to understand where the oscillations are coming from, whether it is the speed or the suspensions. I like to plot the key quantities using something like Kantan Charts so you can more easily see where they come from. I had cases where the oscillations were ultimately coming from the suspension code. Fixed that, they disappeared.
@@marcoghislanzoni i don't use UE4, so debugging like this is a bit harder, also, i dont have suspension yet, so it might be coming from the engine/clutch/gearbox/differential. Anyway some kind of oscillation will inevitably remain in the system by the nature of the slip curve models in games, because they are stiff equations. They can be dampened with low integration steps, but will never be perfect. Here is a good read from Todd Wasson, a guy who "figured it out" appearently, he explains this phenomena very well. Its an interesting and short read, i highly recommend it. www.sim-racing.co.uk/sim-racing/Sim-Racing-Thoughts-on-Brian-Beckmans-comments-relating-to-low-speed-behavior.html
Hayeduce you can always write your telemetry to a CSV file and plot it later with Excel. Thanks for the link, I am pretty familiar with stiff ODE's. In that case you can follow an "energy" approach (make sure your system always dissipates a bit of energy) and reduce the time step. Not sure what are you using for your simulation but it is anyways possible to simulate the physics at higher frequency than the visuals/animations. Typically at 400Hz or higher. Some simracing games claim to be using 1000Hz or higher, which may be a bit of overkill. It also depends on which HW you are running on and what else goes on in your simulation.
That's awesome dude! I'm currently trying to do the same thing and if you don't mind, I was wondering if you could point me to some of the resources you used while making this?
Ah yes. I found that one too. In your video I only see the slip angles being displayed and I notice you say in the description that you use this for pure slip. In that guide, would that mean you are only using the formula for the lateral forces only and handle the longitude forces differently?
Yes, that is correct. Traditionally Pacejka calculates pure lateral and longitudinal forces, then they need to be combined using the friction circle. That's why they are called "pure". In my example above (WIP) I am using the pure lateral slip. The longitudinal forces (slip ratio) are not taken into account.
@@marcoghislanzoni I would greatly appreciate if it is possible for you to check through your old files. It is some great work which I hope you will share with the rest of us. Thank you.
No, despite sharing the same first name, I am not the author. I am very familiar with that write-up though, as probably is everyone else who has been working on car physics simulation at a certain point. Mind the fact that, while it is very good introduction, it misses on some critical aspects in my humble opinion.
Marco please help me. I don't know the vehicle dynamics and I don't understand the pacejka formula. You can say that I am a totally naive in the car physics. Can you help and give me some advice how I can learn the vehicle physics? How can I implement those in my game? How did you learn vehicle physics? Please help me. What should I learn for realistic vehicle physics?
Vehicle Dynamics is not an easy topic and I never found one single place where someone explains everything you need to know from A to Z. You need to research it in multiple places and bring the pieces together. A good starting point is the "old" but still good Vehicle Physics Tutorial by Marco Monster. Google it and you will find it. Another reference are some of the open source simracing games like Torcs, vDrift, Vamos etc. The racer.nl site still has some good articles as well. You can also consult the documentation for Matlab/Simulink automotive blocks. Usually the contain a good explanation of the math behind the simulation. Just don't give up!
great visual understanding. thank you Mr. Marco
Marco, I'm glad to see the progress of your work. And how did you make the slip angle debug in the graph above? If it's not difficult to share a link to the resource, where it shows how it's done. Thank you =)
Hi Ivan, thanks! Likewise, following your latest progresses. Really cool!
For the debug charts I have used the free Kantan Charts, available form the UE4 Marketplace here: www.unrealengine.com/marketplace/kantan-charts
Happy to share more if useful.
Great, thanks ! =)
Hi, could you please tell me how you did the lateral force?
Did you use the weight of the car generated in the springs for the lateral force?
If you are using Pacejka there is a specific formula for the lateral force which uses the slip angle. It’s a bit tricky at low speed when Vx goes to zero but otherwise that is what you need. Another way to calculate the lateral force is to use Vy (lateral speed): -Vy * Cy and clamp between -Fz * mu and Fz * mu. Cy is the coefficient of lateral stiffness which needs to be set by trials and errors. Fz is the vertical load on the tire (suspension force).
Hi Marco, I have a small RC car.. I would like to find coeffiecient for those RC car. Could you please help me how can I find the coefficient? What are the required things for that.. Thank you!
Do you mean the Pacejka coefficients? These are derived from lab tests and mathematical fitting of the lab results to the Pacejka equations. I am afraid it is not that easy to "find" the coefficients because most of them have no physical meaning. If you need to adapt a tire model to your RC car better to use one that can be fit more easily like TMEasy or LuGre.
Hi! How do you handle numerical stability? with what integration method do you advance the physics steps? do you use higher order integrators like RK4? your slip angles/ratios look really stable, they converge nicely. What does the trick for you?
Hayeduce This is pure Euler's integration. The trick is to apply a correction to ensure stability for Vlong --> 0. Look up the Matlab / Simulink docs for their tire modeling, iirc it is also described there.
@@marcoghislanzoni thanks for your answer, tho i was not reffering specifically to the vlong=0 case. In any case, be it even high speed driving the slip ratios oscillate between lets say 5.4..% to 5.6...% when it should converge to 5.5. this effect of course intensifies the lower the speed, or the higher the gear i am in. This oscillation is not nearly as problematic nor noticable with the eye as the vlong~=0 problem, but as soon as you add engine sound, u could hear the jittering :/
Hayeduce you need to understand where the oscillations are coming from, whether it is the speed or the suspensions. I like to plot the key quantities using something like Kantan Charts so you can more easily see where they come from. I had cases where the oscillations were ultimately coming from the suspension code. Fixed that, they disappeared.
@@marcoghislanzoni i don't use UE4, so debugging like this is a bit harder, also, i dont have suspension yet, so it might be coming from the engine/clutch/gearbox/differential. Anyway some kind of oscillation will inevitably remain in the system by the nature of the slip curve models in games, because they are stiff equations. They can be dampened with low integration steps, but will never be perfect.
Here is a good read from Todd Wasson, a guy who "figured it out" appearently, he explains this phenomena very well. Its an interesting and short read, i highly recommend it.
www.sim-racing.co.uk/sim-racing/Sim-Racing-Thoughts-on-Brian-Beckmans-comments-relating-to-low-speed-behavior.html
Hayeduce you can always write your telemetry to a CSV file and plot it later with Excel. Thanks for the link, I am pretty familiar with stiff ODE's. In that case you can follow an "energy" approach (make sure your system always dissipates a bit of energy) and reduce the time step. Not sure what are you using for your simulation but it is anyways possible to simulate the physics at higher frequency than the visuals/animations. Typically at 400Hz or higher. Some simracing games claim to be using 1000Hz or higher, which may be a bit of overkill. It also depends on which HW you are running on and what else goes on in your simulation.
That's awesome dude! I'm currently trying to do the same thing and if you don't mind, I was wondering if you could point me to some of the resources you used while making this?
You should definitely start with this one: www.edy.es/dev/docs/pacejka-94-parameters-explained-a-comprehensive-guide/
Ah yes. I found that one too. In your video I only see the slip angles being displayed and I notice you say in the description that you use this for pure slip. In that guide, would that mean you are only using the formula for the lateral forces only and handle the longitude forces differently?
Yes, that is correct. Traditionally Pacejka calculates pure lateral and longitudinal forces, then they need to be combined using the friction circle. That's why they are called "pure". In my example above (WIP) I am using the pure lateral slip. The longitudinal forces (slip ratio) are not taken into account.
Aha! I've had my hunches but couldn't confirm it until now. Thank you so much for replying! I'm looking forward to seeing your future content!
Is this project/Blue Prints publicly available anywhere?
Sorry it is not. This is an old project of mine, I am not even sure I still have it somewhere.
@@marcoghislanzoni I would greatly appreciate if it is possible for you to check through your old files. It is some great work which I hope you will share with the rest of us. Thank you.
Were you the author of marco monster car physics?
No, despite sharing the same first name, I am not the author. I am very familiar with that write-up though, as probably is everyone else who has been working on car physics simulation at a certain point. Mind the fact that, while it is very good introduction, it misses on some critical aspects in my humble opinion.
Marco please help me. I don't know the vehicle dynamics and I don't understand the pacejka formula. You can say that I am a totally naive in the car physics. Can you help and give me some advice how I can learn the vehicle physics? How can I implement those in my game? How did you learn vehicle physics? Please help me. What should I learn for realistic vehicle physics?
Vehicle Dynamics is not an easy topic and I never found one single place where someone explains everything you need to know from A to Z. You need to research it in multiple places and bring the pieces together. A good starting point is the "old" but still good Vehicle Physics Tutorial by Marco Monster. Google it and you will find it. Another reference are some of the open source simracing games like Torcs, vDrift, Vamos etc. The racer.nl site still has some good articles as well. You can also consult the documentation for Matlab/Simulink automotive blocks. Usually the contain a good explanation of the math behind the simulation. Just don't give up!
Cutee