Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of questions #2

Open
storerjeremy opened this issue Oct 25, 2016 · 3 comments
Open

A couple of questions #2

storerjeremy opened this issue Oct 25, 2016 · 3 comments

Comments

@storerjeremy
Copy link

Hi,

I am trying to use your CTRV code to calculate an accurate course of a car to compare to a heading obtained from an imu that has sensor fusion on board in order to calculate slip angle for a car drifting application. I just have a few questions as I can't seem to get it to work correctly.

In your raw data file "2014-03-26-000-Data.csv" are the units for yawrate degrees per second, positive for clockwise and negative for anti clockwise? and are the units for ax m/s^2, positive for acceleration and negative for deceleration?

Also can you explain why you offset the course "course = (-course + 90.0)"?

Thanks

@balzer82
Copy link
Owner

Hi,
first of all: You will not get a side slip angle. The IMU is using accelerations (g pointing down to earth), turn rates and maybe magnetometer to get an orientation in 3D space. You want to compare this to the heading of the CTRV heading. But if the car is drifting, you have yawrate, which turns your CTRV model as well as the heading of the IMU. Both doing the same calculations.

The units are:

  • Lat/Lon in decimal degree (from GPS)
  • speed in km/h (from GPS)
  • course in degree (from GPS)
  • roll/pitch/yaw in degree (from IMU)
  • roll-/pitch-/yawrate in degrees/second (from IMU)
  • acclerations in m/s² (from IMU)

The coordinate system is as in DIN70000:

fahrzeug-koordinatensystem-din70000-940x469

Course offset is necessary because the output of the GPS sensor is 0 degree in north direction and then positive clockwise, the math for the CTRV model needs the heading 0 in east direction and positive counter-clockwise.

@storerjeremy
Copy link
Author

Hi,

Thanks for your quick response. That makes sense.

The IMU chip I am using is a Bosch BNO055 which does sensor fusion in the hardware and outputs Euler Angles either relative to the chip or absolute to magnetic north and other sensor fused values such as linear acceleration minus gravity and quaternions. The Euler Angle yaw value is in degrees 0 to 359 and will give me the heading/angle of the car at any point in time.

What I was hoping to do was to compare the Euler yaw value I get from the IMU +- a static offset that can be calculated when the car is not drifting to a corrected gps course over ground value using the CTRA or CTRV method. So when the car is not drifting the Euler yaw value +- the offset should equal the corrected gps course over ground and when the car is drifting the difference between the Euler yaw and gps course will be the drift angle.

My question would be can the CTRA or CTRV model be adjusted to still produce an accurate corrected latitude, longitude and gps course even when a car is drifting or at a large slip angle?

I have run some data through the CTRA model of a car turning a corner without drifting and with drifting see below.

Without drifting this is what it looks like, which looks good.
without-drifting

With drifting this is what is looks like, which doesn't look good but makes sense as there are higher gyro rates when drifting which throws the model out therefore making the corrected line further into the middle of the corner.
with-drifting

So is it possible to adjust the CTRA or CTRV model to make the "with drifting" corrected line look more like the "without drifting" line? or would it need a different model all together?

Thanks

@balzer82
Copy link
Owner

I supervised a bachelor thesis some years ago, where we tried this, but had no luck. The drift angle (sideslip angle) is the angle between the direction of the car and the direction of the velocity vector of the center of mass. You can just calculate some noisy error differences between two filters but no real drift angle.

Solutions:

  • one GPS, one IMU, different Kalman Filter then proposed here
  • two GPS antennas, one in the front, one in the back
  • optical ground sensor

Take a look at this paper: Integrating INS Sensors With GPS Measurements for Continuous Estimation of Vehicle Sideslip, Roll, and Tire Cornering Stiffness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants