Technology

Kalman Filters, Sensor Fusion, Web Assembly, Velodromes

How does AeroStar calculate CdA?

Magic! Actually Math. Lots of math. Many matrices.

Magic?

Any sufficiently advanced technology is indistinguishable from magic.

Arthur C. Clarke

No it's not magic. But it is pretty close!

AeroStar is an energy-based method that uses Kalman Filters to calculate the unknown CdA & Crr parameters.

Kalman Filters (KF) are optimal observers for calculating the lowest noise output from a system with noisy measurements. In contrast to algorithms using integers or floating point, KF treats all variables as Gaussian statistical variables with a mean and a covariance. Covariance is the "probability" that the mean is accurate. With a dynamic model of a cyclist, KF calculates the position, speed and acceleration given noisy (Gaussian) measurements. Since both the model and measurements are Gaussian, KF can combine the model and measurement for an even more accurate result, and then update the model. Math proves that KF is the best linear observer. Magic!

KF can eliminate expensive sensors which is then often called a Soft Sensor or Virtual Sensor. AeroStar uses KF as an optimal observer to calculate time-varying CdA & Crr parameters for the best model fit. With more measurements the model is refined more and more, and KF can even report the accuracy of the parameter calculations. No expensive sensors -- Magic!

KF can combine different sensors which is then often called Sensor Fusion. For example you may want to measure road slope angle with an accelerometer. While the accelerometer is long-term accurate, unfortunately it has lots of noise resulting in a noisy slope angle. Using Sensor Fusion you can combine the accelerometer (good long-term accuracy, high short-term noise) with an integrated rate gyro (poor long-term accuracy, low short-term noise) to calculate a slope angle that is smooth, accurate, and low noise. Magic!

AeroStar is a generalization of the Virtual Elevation (VE) method which is an energy-based method to calculate your CdA popularized by Prof. Robert Chung. VE calculates the average CdA for a lap, while AeroStar calculates the instantaneous CdA for your entire ride. Magic!

KF has been called one of the greatest inventions of the 20th century. Interested in learning more about KF, CdA and Crr? Resources

KF literally put Apollo astronauts on the moon, and now KF is computing your aerodynamic drag!

Can AeroStar simultaneously calculate CdA & Crr?

AeroStar includes two separate algorithms:

AeroStar M2
KF to calculate instantaneous CdA. If your measurements come from a Notio device, then the CdA is updated every 0.25 second (4 Hz).
AeroStar M4
KF to calculate instantaneous CdA & Crr. It is tricky to get stable results with more degrees of freedom, so not all rides will give good results. Advanced control algorithms need persistance of excitation for accurate observations, and unfortunately a "normal" bike ride is often insufficient.
AeroStar suggests a particular protocol for accurate Crr estimation: flat oval path so you can concentrate on holding a single position, start from a standstill and accelerate to +10 m/s, ride +1000 meters, coast to a stop (no brakes), repeat. AeroStar includes a demo file of an ideal ride on an outdoor velodrome that shows how to compute the Cda & Crr.

Is AeroStar accurate?

Yes! AeroStar matches analytical (CdA, Crr) solutions

Coastdown velocity depends on both CdA & Crr enabling analytical validation with absolute accuracy. Loading a FIT file with analytical coastdown data shows that AeroStar M2 accurately calculates the CdA (given a Crr).

Loading a ride with analytical coastdown data shows that AeroStar M4 accurately calculates both CdA & Crr. The slope of an arbitrary road can be approximated as a set of piece-wise linear slopes.

The graphs show that AeroStar estimates both accurately initially match the true CdA & Crr values on constant slopes, and then accurately tracks true CdA & Crr values as slope changes.

Who else can demonstrate accurate CdA & Crr results? 🤔

Validation tests

AeroStar validates the CdA results by graphing the instantaneous Virtual Elevation, Velocity and Power.

The graphs show that AeroStar CdA virtual values closely match the measured values.

AeroStar Virtual Elevation/Velocity/Power

AeroStar virtual elevation, velocity, power and energy closely match measured values indicating that the AeroStar CdA is accurate.

Notio Virtual Elevation/Velocity/Power

Notio virtual elevation, velocity, power and energy DO NOT match measured values indicating that the Notio CdA is inaccurate. From the Virtual Elevation graph (bottom right) we can see that the Notio Virtual Elevation does NOT match the measured elevation. The VE graph shows that the Notio CdA is far too low resulting in a too-high virtual elevation (red) compared to the measured elevation (blue).

Banked Velodromes - In development

Compute your CdA on the straights & bends

AeroStar algorithms are being augmented to add support for banked velodromes. On a velodrome a rider rolls (leans) into the bends. Rolling changes their kinetic and potential energy since the wheels speed up following the black line while the center of gravity lowers. The velocity of the center of gravity is slower since it inside the black line. The tire normal force increases due to centripetal forces increasing rolling resistance. The steering angle is non-zero so tire scrubbing occurs increasing rolling resistance.

AeroStar computes the velocity of the center of gravity and the center of pressure to accurately calculate the CdA.

As you can see below, AeroStar accurately calculates the CdA on straights and bends. The CdA variation per lap is less than 0.001. The graphs show a pro riding 5 laps on a 250m velodrome displaying the wheel speed Vw, computed CdA, measured wheel power Pw, computed virtual power (VP), and computed virtual elevation (VE). Everything looks good!

The AeroStar calculated CdA result can be validated by inspecting the Virtual Power and Virtual Elevation and seeing if they match measured quantities. Note that the measured wheel power (Pw) and the calculated Virtual Power (VP) closely match. Similarly the elevation of the center of gravity (Zcg) and the computed Virtual Elevation (VE) closely match. This shows that multiple rearrangements of the Energy Balance are valid, and this is only true if the computed CdA is accurate.

Each lap takes ~20 seconds, so the cyclist spends about 5 sec in each bend and 5 sec on each straight. And AeroStar accurately tracks the Virtual Power and Virtual Elevation even with these fast changes! BTW Notio averages the CdA over 60 sec -- about 3 laps -- so it can't track the energy changes in the bends.

Run123 (CdA,Crr) - In development More Info

Compute your (CdA,Crr)

Run123 computes your average CdA & Crr over a test section. Ride three ~100m runs consisting of 1 fast downhill run, 1 slow downhill run, and 1 medium uphill run. Coast or pedal thru the test section.

Quick & Easy -- collect the data for the 3 runs in about 3 minutes.

Run123 algorithms are patent pending.

Ultra Accurate

A recreational rider on a road bike made a series of eight ~100m coastdown runs (1 fast downhill, 2 slow downhill, 5 medium uphill) on a bike path with about a -0.7% slope.

The 8 runs can be combined into 10 unique combinations (1 fast downhill + 1 slow downhill + 1 medium uphill).

The standard deviation of the measured CdA was 0.001.

The standard deviation of the measured Crr was 0.0001.

Better results than a windtunnel -- you get both CdA & Crr.

Test Positions & Equipment

High precision makes AB testing easy! Compare CdA of different helmets and subtle positon changes. How does tire pressure change your Crr? Easy to find out!

Demonstrates consistent results in this AAAAAAAAAA test.

Fast & accurate field testing

How does Run123 work?

The exact analytical (CdA,Crr) can be found on a constant inclined plane, but that hardly describes a real-world road :( Instead Run123 builds a detailed mathematical model of the vehicle and path.

Heavy vehicles often use split coastdown runs with multiple speed ranges since they need such a long distance to slow from high speed to low speed. Run123 expands on this idea using 1 short fast run (emphasizing CdA), 1 short slow run (a mix of CdA & Crr), and 1 short medium run in the opposite direction (to distinguish Crr from slope). Since so many measurements are available, Run123 creates a very accurate model of the pedaling energy Einput, the aerodynamic dissipation energy Eaero, the rolling resistance energy Eroll, the potential energy Epe and the kinetic energy Eke.

For validation the energy graphs of the Einput, Eaero, Eroll, Epe and Eke are all plotted. From the energy balance we expect that the input energy Einput is equal to the dissipation energy plus conservative energy Esum=Eaero+Eroll+Epe+Eke. The energy graphs shows that Einput~Esum so that the model is self-consistent which only happens when the Eaero and Eroll are correct. In other words, the CdA and Crr coefficients are accurate.

Repeated runs show that the Run123 protocol is robust since it calculates similar results everytime! Check out how close the 10 estimates of the CdA and Crr are!

RoadStar Live Crr - In development More Info

Compute your live Crr on different road surfaces

The road's micro- and macrotexture surface is uneven. Your bike is rolling over this uneven surface resulting in vertical vibrations. The energy of the vibrations is lost, so the vibrations increase your effective rolling resistance.

How does RoadStar work?

To show how RoadStar works we first create a synthetic road with varying road roughness, then let RoadStar estimate the road surface that vibrates the bike, and from that estimate the total rolling resistance.

The ISO8608 road surface is modeled as a random walk of colored noise. The "true" road is plotted. To make things interesting, the road quality starts off as Class D, then improves to class A, then degrades to D again.

The motion of the bike and rider are simulated riding over the road. The position, velocity, and acceleration of the bike are plotted. The vertical acceleration would be measured with an accelerometer on the bike.

Now RoadStar is ready to start its calculations! After measuring the acceleration riding over the road, RoadStar solves the inverse dynamics problem to calculate the unknown disturbing road surface using a high-speed Kalman Filter.

RoadStar has now estimated all the dynamics of the system -- the road surface, and the bikes position, velocity and acceleration.

RoadStar calculates the power of the road vibrations, and then an equivalent dynamic Crr with the same power is computed. The total Crr is the sum of the static and dynamic Crr.

Since the road surface was estimated, RoadStar can also calculate the ISO8608 classification where Class A is a good smooth asphalt road, B acceptable, C poor etc ... all the way to a really poor Class H.

The ISO class graph shows that RoadStar accurately estimated the ISO8608 classifications for D-C-B-A-B-C-D. This validates that all the estimated values of the model are self-consistent and accurate!

Do I need any special sensors?

If you have a Notio sensor, then you are all set!

If you only have a FIT file, then you'll need to manually enter the missing data (total mass, assumed Crr, air density, air speed, elevation).

AeroStar reads Notio JSON files or Garmin FIT files.

There are several components needed to calculate your CdA including:

Computer
A Notio device or Garmin computer to record the ANT+ measurements.
Power
Any ANT+ powermeter. It's been tested with SRM, Garmin pedals and PowerTap.
Ground Speed
Any ANT+ speedometer (Magnetic speedometers are strongly prefered since accelerometer-based speedometers are noisier.)
Elevation
The elevation for the entire path is needed (e.g. barometric altimeter, digital elevation model).
Optional Air Speed
The dynamic pressure can be measured. If not available then ground speed can be used.
Optional Air density
Density can be calculated from temperature, humidity and pressure. Sensors can measure these, or you can enter approximate values.

Browser-based Web Assembly

No downloads, No installs, Always up to date, Safe

We compile the AeroStar C++ code to WASM enabling the app to run in a modern browser. This has several advantages allowing apps with complex logic to be instantly accessible. You are always using an app that is up to date.

Essentially any full-featured desktop app can now run in the browser.

All web apps run in their own "sandbox" inside a browser, and can only access information in the sandbox. This makes web apps significantly safer than "normal" apps which can access everything on your computer.