Calculation of Tire forces in tire frame

96 views
Skip to first unread message

Siyuan Yu

unread,
Feb 5, 2023, 4:07:26 PM2/5/23
to ProjectChrono
Hi Developers,

We would like to ask about the calculations of tire forces in tire frame of wheeled vehicle. The function ReportTireForce reports the tire forces in global frame and we want to examine it in local frame. Here are our calculations:

        WheelState state0 = vehicle.GetWheel(0, VehicleSide::LEFT)->GetState();
        ChVector<> wheel_normal0 = state0.rot.GetYaxis();
        ChVector<> contact_point = ChVector<>(state0.pos.x(), state0.pos.y(), terrain.GetHeight(state0.pos));
        ChVector<> Z_dir0 = terrain.GetNormal(contact_point);
        ChVector<> X_dir0 = Vcross(wheel_normal0, Z_dir0);
        X_dir0.Normalize();
        ChVector<> Y_dir0 = Vcross(Z_dir0, X_dir0);
        ChMatrix33<> rot0;
        rot0.Set_A_axis(X_dir0, Y_dir0, Z_dir0);
        ChMatrix33<> rot0inv = rot0.transpose();
        double alpha_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetSlipAngle();
        double kappa_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetLongitudinalSlip();
        ChVector<> F_fl = rot0inv * (vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).force);
        ChVector<> M_fl = rot0inv * (vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).moment);

This calculation meets our expectation to some extent. We reimplement the exact same Pacejka tire force as used in Project Chrono. And we use the exact tire force parameters. To make sure it's not the camber angle problem, we override the camber angle in ChPac02tire.cpp and make it 0 all the time. Our expectations are that they should behave the exactly the same. But the calculation shows that there's an offset when we are using our matlab calculation. 
tire_force.png
It is not a big deviation in terms of tire force, but it does matter when we are using this in yaw rate calculation.

The other one is to use the spindle's rotation to transform the tire forces. That result huge deviations, so we suspect we got it wrong somewhere. Here's the code:
        ChQuaternion<> rot0inv = vehicle.GetSpindleRot(0, VehicleSide::LEFT);
        double alpha_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetSlipAngle();
        double kappa_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetLongitudinalSlip();
        ChVector<> F_fl = rot0inv.Rotate((vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).force));
        ChVector<> M_fl = rot0inv.Rotate(vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).moment);

We are wondering what is the exact correct way to get the tire forces in tire frame.

Thanks in advance!
Siyuan



Radu Serban

unread,
Feb 21, 2023, 8:11:01 AM2/21/23
to ProjectChrono

Siyuan,

 

The differences you see between the Chrono and Matlab results could be possibly explained by a delay of 1 step between the calculation of tire-terrain geometry and calculation of tire forces (the reasons why this is happening in Chrono are subtle and beyond the scope of this discussion). Of course, there are many other possible sources for these discrepancies.

 

I just pushed code to also report the tire forces in a local tire frame. See https://github.com/projectchrono/chrono/blob/9c4ac1c4c1d5bd6a2cee16e6f7980e2520982204/src/chrono_vehicle/wheeled_vehicle/tire/ChForceElementTire.h#L42. Note that I only implemented this for classes derived from ChForceElementTire (so Pac89, Pac02, Fiala, and TMeasy) and didn’t test it.  Please let me know if this addresses your needs.

 

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Siyuan Yu
Sent: Sunday, 5 February 2023 22:07
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Calculation of Tire forces in tire frame

 

Hi Developers,

 

We would like to ask about the calculations of tire forces in tire frame of wheeled vehicle. The function ReportTireForce reports the tire forces in global frame and we want to examine it in local frame. Here are our calculations:

 

        WheelState state0 = vehicle.GetWheel(0, VehicleSide::LEFT)->GetState();
        ChVector<> wheel_normal0 = state0.rot.GetYaxis();
        ChVector<> contact_point = ChVector<>(state0.pos.x(), state0.pos.y(), terrain.GetHeight(state0.pos));
        ChVector<> Z_dir0 = terrain.GetNormal(contact_point);
        ChVector<> X_dir0 = Vcross(wheel_normal0, Z_dir0);
        X_dir0.Normalize();
        ChVector<> Y_dir0 = Vcross(Z_dir0, X_dir0);
        ChMatrix33<> rot0;
        rot0.Set_A_axis(X_dir0, Y_dir0, Z_dir0);
        ChMatrix33<> rot0inv = rot0.transpose();
        double alpha_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetSlipAngle();
        double kappa_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetLongitudinalSlip();
        ChVector<> F_fl = rot0inv * (vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).force);
        ChVector<> M_fl = rot0inv * (vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).moment);

 

This calculation meets our expectation to some extent. We reimplement the exact same Pacejka tire force as used in Project Chrono. And we use the exact tire force parameters. To make sure it's not the camber angle problem, we override the camber angle in ChPac02tire.cpp and make it 0 all the time. Our expectations are that they should behave the exactly the same. But the calculation shows that there's an offset when we are using our matlab calculation. 

It is not a big deviation in terms of tire force, but it does matter when we are using this in yaw rate calculation.

 

The other one is to use the spindle's rotation to transform the tire forces. That result huge deviations, so we suspect we got it wrong somewhere. Here's the code:

        ChQuaternion<> rot0inv = vehicle.GetSpindleRot(0, VehicleSide::LEFT);
        double alpha_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetSlipAngle();
        double kappa_fl = vehicle.GetTire(0, VehicleSide::LEFT)->GetLongitudinalSlip();
        ChVector<> F_fl = rot0inv.Rotate((vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).force));
        ChVector<> M_fl = rot0inv.Rotate(vehicle.GetTire(0, VehicleSide::LEFT)->ReportTireForce(&terrain).moment);

 

We are wondering what is the exact correct way to get the tire forces in tire frame.

 

Thanks in advance!

Siyuan

 

 

 

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/8f4acfa4-81a7-411c-9490-cff47d94f77bn%40googlegroups.com.

Siyuan Yu

unread,
Feb 21, 2023, 12:19:13 PM2/21/23
to ProjectChrono
Hi Radu,

Thanks for the reply and the update. This can be very helpful. The problem we found is that the tire frame is defined in ChPac02Tire.cpp is SAE frame so we need to make the slip angle negative and the negative back the lateral forces. By doing this, the error is less than 20N and that error could be result from camber angle or the problem you mentioned.

Thanks again for the answer and fix!

Siyuan

Siyuan Yu

unread,
Feb 21, 2023, 4:08:03 PM2/21/23
to ProjectChrono
Hi Radu,

I also got a question regarding the lock differential function in driveline. If it is true: I suppose it means locking the differential, the wheel speed should be the same on the axle that I specified right? Then intuitively, the longitudinal slip should be the similar (close to each other) instead of having large differences. Is my understanding correct? When using the polaris model, we found that locking the differential does not actually help making the two longitudinal slip the similar.

Thanks in advance,
Siyuan

Reply all
Reply to author
Forward
0 new messages