Yaw Rate Chart

Any discussion on using LapTimer. Please use this forum in case you need guidance on how to use LapTimer or perform a certain operation
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Yaw Rate Chart

Post by gplracerx » Mon Nov 25, 2013 8:54 pm

I think there's a problem with calculating yaw rate. I calculated yaw rate by dividing the lateral acceleration converted to m/sec^2 by the velocity in m/sec and converted from radians to degrees. My plot looks only vaguely like the plot generated by HLT. The HLT plot looks to be shifted significantly compared to the course. HLT gets peak yaw rate not in the center of the corner but on the straight following the corner. I think you may be filtering too much and causing a phase shift.ImageImage
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: Yaw Rate Chart

Post by gplracerx » Mon Nov 25, 2013 9:38 pm

Another obvious problem with the HLT yaw rate plot is the long stretch with only negative values of yaw rate. If I integrate my calculated yaw rate data to get heading, I find I have to add a constant to the lateral acceleration data to get close to the GPS heading. I assume that means the axis calibration is off. I'm going to try an angle shift around the z axis as well because I suspect I'm getting mixing of lateral and lineal acceleration as well as with gravity.
User avatar
Harry
Site Admin
Site Admin
Posts: 9583
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Yaw Rate Chart

Post by Harry » Mon Nov 25, 2013 10:14 pm

I have added that to my list. The shift on the time line is due to the (old) moving average I apply for smoothing. Maybe I can use the new smoothing capabilities introduced for lateral acceleration and GPS plots...

- Harry
Image Image Image Image
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: Yaw Rate Chart

Post by gplracerx » Mon Nov 25, 2013 11:26 pm

Since you're not doing it in real time, I don't see why not. I believe that the cubic spline filter is acausal, i.e. it doesn't shift phase like a moving average can. The only filtering in my plot is whatever you use for the accelerometer readings and whatever the GPS uses for the velocity data. I have the accelerometer acquisition rate set to maximum. Correcting the axis calibration does improve the fit for the integrated yaw rate vs the GPS heading and the integrated lineal acceleration vs the GPS velocity. The static roll error appears to be ~5 degrees, pitch -0.8 degrees and yaw 3.5 degrees. The difference in the corrected accelerometer readings is small, but it makes a big difference when integrating to get velocity or heading angle. If I included vertical velocity and pitch because the course wasn't flat, it would probably be even better.
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: Yaw Rate Chart

Post by gplracerx » Thu Jan 30, 2014 10:18 pm

I've updated the calculated yaw rate plot with the yaw rate calculated from the uncorrected accelerometer data. It's a trivial calculation: lateral acceleration in m/sec2 divided by speed in m/sec times 180 degrees divided by pi radians. If the accelerometer and speed data are good, there is no need for any smoothing. This is far and away better than what you're doing now. There is no need to differentiate the heading data at all. If you want better accuracy, integrate the yaw rate and at each time step compare with the heading data. Feed back a fraction of the difference to the calculated yaw rate, step forward to the next reading and repeat. It's basically a proportional integral control algorithm.
User avatar
Harry
Site Admin
Site Admin
Posts: 9583
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Yaw Rate Chart

Post by Harry » Thu Jan 30, 2014 10:28 pm

Hi,

I do not disagree, but I have no room to go after this currently. ;-)

- Harry
Image Image Image Image
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: Yaw Rate Chart

Post by gplracerx » Thu Jan 30, 2014 10:52 pm

Then I recommend that you eliminate the yaw rate chart until you have the time to fix it. Bad data is worse than no data.
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: Yaw Rate Chart

Post by gplracerx » Tue May 12, 2015 10:38 pm

I see the yaw rate plot is still over filtered in version 19, at least for autocross yaw rates of 40 degrees/second or more. It looks like the filter time constant is about 2 seconds when it needs to be less than 0.5 seconds.
User avatar
Harry
Site Admin
Site Admin
Posts: 9583
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Yaw Rate Chart

Post by Harry » Wed May 13, 2015 7:27 am

Yes, still unchanged.
Image Image Image Image
User avatar
Harry
Site Admin
Site Admin
Posts: 9583
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Yaw Rate Chart

Post by Harry » Thu Jan 21, 2016 9:29 pm

gplracerx wrote:I've updated the calculated yaw rate plot with the yaw rate calculated from the uncorrected accelerometer data. It's a trivial calculation: lateral acceleration in m/sec2 divided by speed in m/sec times 180 degrees divided by pi radians. If the accelerometer and speed data are good, there is no need for any smoothing. This is far and away better than what you're doing now. There is no need to differentiate the heading data at all. If you want better accuracy, integrate the yaw rate and at each time step compare with the heading data. Feed back a fraction of the difference to the calculated yaw rate, step forward to the next reading and repeat. It's basically a proportional integral control algorithm.
Hi,

I assume the formula is the one shown in http://www.vehicular.isy.liu.se/Publica ... 818_AW.pdf (Model 4, page 23)?

- Harry
Image Image Image Image
Post Reply