1. Do you need support for Assetto Corsa Competizione? Please use the proper forum below and ALWAYS zip and attach the WHOLE "Logs" folder in your c:\users\*youruser*\AppData\Local\AC2\Saved. The "AppData" folder is hidden by default, check "Hidden items" in your Windows view properties. If you report a crash, ALWAYS zip and attach the WHOLE "Crashes" folder in the same directory.
  2. FOR ASSETTO CORSA COMPETIZIONE: If you report issues with saved games, please always zip and attach your entire User/Documents/Assetto Corsa Competizione/Savegame folder!
  3. If your game executable is missing, please add your entire Steam directory to the exceptions in your antivirus software, then run a Steam integrity check or reinstall the game altogether.

MoTeC, a Journey: Getting The Most From Data Analysis

Discussion in 'ACC General Discussions' started by Manic_Driver, Sep 6, 2021.

  1. Manic_Driver

    Manic_Driver Gamer

    In this first series of posts, I want to demonstrate to you some new ways of using MoTeC to speed up our data analysis and getting more valuable insights into our performance. The beauty of this software is that it really lets us pull apart the data in a variety of ways and then display them in ways that make sense to us. Though some of the techniques I present will require a bit of setting up and diving into math channels, the time you save on the other end will be worth it! But first…

    Philosophy On Data Analysis For ACC

    MoTeC is a powerful tool but can be easily overwhelming. Even though there is much value to be found in using MoTeC to its full capabilities, getting there can be very time consuming and might not deliver immediate results, taking precious time away from track experience. As such, my guiding philosophy for using data analysis software is:

    ● Easy to read and understand
    ● Can be used for short stints or endurance races
    ● Useful for drivers of all skill levels
    Deliver Actionable Insights
    ● All within 10 minutes (give or take)
    ● Does not require constantly inputting static vehicle values (like ride height) so the user can use all channels regardless of what car or track they are on

    No busy worksheets, minimal trace analysis, just a quick look that answers the question of where the problem is. I operate under the assumption that almost all ACC drivers are their own engineer, so the easier and quicker the information is presented, the better. And one of the fastest way that I know of to get these insights comes from taking apart the VARIANCE channel.

    Multiple Ways To Look At Variance

    (Credit goes to this blog author for demonstrating the value of section delta variance)

    [​IMG]
    Cumulative variance - the basis for comparative analysis

    The greatest value that any data analysis software can give you is comparative analysis. With a quick press of the F3 button, MoTeC gives you access to the variance channel, also known as lap delta, time slip, and so on. Very simply it subtracts the time from the currently selected main lap (M) to the reference lap (O). MoTeC by default selects the fastest lap when you open a log file. To select a reference/overlay lap, mouse over the data tab on the left side of the screen and click on a box in the second column. A white O should appear. You can select additional reference laps by checking the box in the third column, but this can sometimes make the screen busy, eat CPU cycles, and is inefficient for our purposes. Pressing the N or P key will cycle through the laps in your outing log file and is useful for quick comparisons in your race session. You can select any lap from any opened log files, which will be important when comparing setups from previous sessions, for instance. Be sure to toggle on the overlay button in the toolbar for the variance channels to display.

    [​IMG]
    Data tab showing main (red) and overlay (O)

    Which lap you choose as your main and reference lap does make a small but important distinction. Typically you would choose your fastest lap as your reference lap and use N/P to cycle through the session - this asks the question, “How did my session laps compare with my fastest lap?” Your variance graph will show you when you are going faster than your fastest lap (trace goes up) or when you are going slower (trace goes down). The moments the graph goes up are worth investigating to see how you can improve on your best lap. When it goes down, especially for multiple laps, then these are places where consistency can be improved. If you choose your fastest lap as your main lap and your reference lap to be any other lap, the analysis flips, and this view can be useful for identifying problem sections in your fastest lap. How you choose to analyze is up to you, but consistency is important, so whichever way you choose to look at variance, stick with it.

    It is also VERY important that if you use any variance channel, that you ensure the time/distance graph is being measured by DISTANCE! There is a button on the toolbar that toggles between time and distance for your measurement (you can see the values change at the bottom of the graph). If you do not do it this way, trying to make comparisons between laps will not be valuable as differences in driving inputs will not line up correctly, assuming you will be comparing your variance channel to other data traces.

    [​IMG]
    The clock button will toggle between time/distance graphs, choose distance for comparison analysis

    The other bit is to always have your speed trace on every worksheet. Even without the variance channel, overlaying speed traces shows you so much of what’s happening. You can estimate gains and losses just by looking at the area between the main and reference speed traces (this is what variance channels measure). Primarily you will be using your speed trace to measure differences in brake and throttle application, top speeds, and minimum corner speeds. You will use those numbers to act as reference points when you go back on track so you can more easily gauge the speeds you need to be at for each corner. For steering application, we actually will need to use another trace - corner radius/curvature - to figure out our turn-in points, but that will be for another post. In the meantime, you can just use the lateral G channel/steering angle channel to check where and when you turn-in/unwind.

    [​IMG]
    Speed trace is crucial for comparisons. You can see variance just by estimating how much time each trace spends being faster than the other.

    Lastly, you will have to turn on ‘Calc Lap Time’ and ‘Calc Outing Time’ in the options menu (can be found under ‘Corrected Speed and Distance…’ in the Tools menu option). These create additional channels that will be used in our variance channels, and a variety of other channels as well.

    [​IMG]
    Corrected Speed And Distance menu should look like this

    Creating Math/Maths Channels

    Though I will provide a file for import, learning how to create your own math channels can be very useful if you hope to get the most out of MoTeC. Start with pressing the calculator button in the toolbar. This is the math editor where we can create various math channels. If we press the “add expression…” button then we can name and create the channels I list here. Even having a basic understanding of Excel functions means that you will be able to start creating your own channels if you want! For the following channels, however, all we need to do is name the channel correctly and enter in the math expressions I have here. This is very important as some these expressions build upon previous ones, so pay attention to naming conventions. For decimals, choosing the default of 2 is more than enough for variance analysis, as we really are just looking for gains in tenths to start.

    Cumulative Variance

    Math expression:
    ● Press the F3 key, OR
    Code:
    variance_dist(‘Calc Lap Time’ [s])
    Cumulative variance is the only variance channel in MoTeC that does not require its own math channel. This is also what you see in the top left corner of ACC’s hud. Cumulative variance maintains the time difference as the trace goes along, and moves up or down as time is gained or lost. As such, it will show you very clearly how long you maintained an advantage/disadvantage throughout a lap. To find out how much time was gained or lost in a specific section, you can use the datum cursor (spacebar) to specify a point in the lap to compare the main cursor to.

    You will quickly learn the benefits and drawbacks of this channel. First, It is easy to access - just press F3! Most of the time you can see where you gained or lost the most time just by how steep the trace goes up or down. You can use the datum cursor to quickly find differences in time.

    However, this isn’t always the best way to extract insight. For one, you can’t move this channel around in your worksheet. Every trace looks different and depending on how big or small the changes are, you have to scale the trace each time for each page. And if you are interested in just one section, then you have to use the datum cursor each time to find out what the differences are. If you are looking at multiple sections, this can get very time consuming very quickly. In my opinion, the cumulative variance channel is the least useful of the variance channels I will be presenting here. The only advantage here is the ability to use the datum cursor, but we will find a way around that.

    Instantaneous Variance

    [​IMG]

    Math expression:
    [*]
    Code:
    derivative(variance_dist(‘Calc Outing Time’[s]), 101)
    So instead of just subtracting the times, what if we had a graph that can show us by what magnitude we are gaining or losing time, so that we can instantly see within a lap how we performed? This is where instantaneous variance comes into play. What this channel shows is like a ‘speed/velocity’ trace - so the trace goes up or down only when actual gain or loss is happening. The graph is no longer cumulative (For you calculus nerds, this channel takes the derivative and gives us the slope of the cumulative variance channel).

    What we can tell from this is, immediately, where in the lap the most time is gained or lost. So if we wanted to see the difference between corner entry and corner exit performance, we can see the effects quickly. The benefit of this view is that now these events are simplified - no longer are the differences vague or hidden within the cumulative trace, we can see in an instant what our performance is.

    This is particularly useful for looking at aerodynamic setup changes. If we make a change in ride height for instance, or if we need to see the effects of wind or ambient temperature, we can check instantaneous variance at the end of a long straight to see how the change may have impacted our time, or in long sweeping high-speed corners. We could also pinpoint precisely where in the lap the greatest losses were made, and start focusing on the reasons why.

    While greater clarity is given, we do lose out on a few things. First off, the resultant values are somewhat arbitrary and “gaining 0.2sec/sec” is only useful as an average for a given distance. Filtering is needed as the trace would look insane otherwise. We also lose the ability to use the datum cursor to derive any sectional values - this is unfortunate as it means we won’t even be able to use this for things like quick averages or differences, and track heat maps. Still, this channel is instructive, we can set a default range for it and use it in whatever worksheet we put it into. It is also the basis for other variance channels that will give us the best of both worlds.

    Delta Section Variance (Credit)

    [​IMG]

    Math expression:
    Code:
    integrate(‘Instantaneous Variance’ [s], 1, range_change(“Outings:Laps:Track Sections:Default”)) 
    *Make sure you have a math channel already named INSTANTANEOUS VARIANCE with the correct math.

    *Please note that this channel does require that you set up custom track sections to be of most use. I will explain later in the article how to do this, and while this does take a little time, once you set it up it will make a world of difference compared to the default sections that motec creates. If you do not set up track sections, the benefit of doing any section analysis can be limited and could lead to false conclusions.

    What this channel does is chop up cumulative variance so that we can see how delta changes throughout the lap. This has the advantage of giving us the best of both worlds - we now have values that are easy to understand (seconds), and we can see more clearly where in the lap we are gaining and losing the most time (magnitude). It also has the benefit of developing a set of predictable ‘shapes’ that tells us something about the nature of each section. You can see where each section starts and ends as indicated by the section bars at the top of your time/distance graph. The link above has an explanation for these shapes, but I wanted to further expand upon them:

    ● Shallow slopes/triangles: Typically found in long straights and long sweepers. This is going to tell you how much time you actually gain from your corner exits, how much is lost in reduction in top speeds from aero changes, and setup changes that affect lateral grip. The changes here tend to be small, but for long endurance races, it is important to take note of these small changes, as even a 0.1sec/lap loss can be an issue. If you are hunting for faster setups, it is in these areas you will probably be looking at so you can see where the time losses occur. But also remember when making setup changes that a gain in one place can result in loss somewhere else, so understanding car dynamics will help you hunt for where those gains/losses may occur.
    ● Steep slopes: Almost always brake or acceleration differences. Want to know how much time is lost if you brake earlier, or accelerate sooner? This will show you immediately those effects. It will also show you the trade-offs: Very often, an early braking phase result in earlier acceleration moment (as shown in the speed trace) so you can see how those dynamics work in a particular corner. Seeing these differences can lead to some interesting insights about the benefit/non-benefit of oft-heard sayings like “brake later” and “throttle earlier”. Judge for yourself by measuring their effects in this channel.
    ● Sine waves: Shows trade-offs between corner entry, mid-corner, and corner exit performance, and also chicanes depending on how you divide sections. These can be difficult to parse. Often will require looking at corner radius/curvature channels or replays to check what apex you should be taking. The pay-offs here can be great, so spend some time going more in-depth with these corners if you can.

    This variance channel really inspired me to seek out other ways to look at variance, so I really love what you can do with this channel. Visually, it’s immediately apparent which parts of the lap are your fastest and slowest, you can use the channel for closer analysis, and being able to have predictable shapes gives you the ability to start recognizing patterns in your driving. This does take a little while to get used to, but it is a much faster way to analyze your performance than using MoTeC’s default variance channel.

    For endurance race situations, how do you know which laps to be looking at? This is where the limits of looking at data traces rears its ugly head. If you have even 5+ laps to look at, staring at traces can be nightmarish, so using channel reports, metrics, and section time reports are really going to be necessary to start narrowing down which laps to be examining. I will provide a method for choosing corners at the end of this article.

    Variance Gain vs. Loss

    [​IMG]

    Math expression:

    Variance Gain:
    Code:
     integrate('Instantaneous Variance' [s], 'Instantaneous Variance' [s] > 0, range_change(“Outings:Laps:Track Sections:Default”)) 
    Variance Loss:
    Code:
    integrate(‘Instantaneous Variance’ [s], ‘Instantaneous Variance’ [s] < 0, range_change(“Outings:Laps:Track Sections:Default”))
    These two channels, when put into the same group on the graph, will show you within a section the total time gained and lost throughout the whole section. In essence, we are filtering out gain and loss into their own channels. This is just another way to view variance that, to me, better represents the trade-offs. Here I can better quantify corner entry vs. corner exit for instance. Often the delta-by-section trace tells the whole story already, but sometimes if I am not finding the answer I want, I will use this trace for closer analysis.

    Setting Up Track Sections

    [​IMG]
    Use the track editor to get the most out of variance channels

    As mentioned previously, if we are going to look at our laps more closely, we need to make sure we have track sections set up correctly. MoTeC’s default corners are typically not sufficient if we want to do proper analysis. There are three methods I outline that have their own advantages and disadvantages.

    The first way is to break up the track by splits. This breaks up the track into a low number of sections, usually three or four. Sections are often split in the middle of a straight so as not to upset mid-corner analysis. This has the advantage when looking at section times that you get more accurate eclectic/rolling minimum numbers. The reason for this is larger sections will account for trade-offs in certain sequences whereas multiple track sections might not take these into account. Chicanes, for example, should be viewed as a single sequence - if you set up each chicane corner as its own, you end up ignoring how the first corner influences the second. This is also why you want your splits to end in places like a straight, typically a place where gains and losses even out at least until the end of the straight. Setting up track sections this way is fairly easy and quick as you only have to deal with a few sections and does not require checking the start of brake points and the like.

    The immediate problem with this method is it tempers the benefits of delta section variance. The long sections can make the delta section variance graph resemble the cumulative variance channel. Still, if you use this with instantaneous variance, it can still be a helpful way to view a track. For rally stages in DR2.0, for instance, this was preferable to sectioning every corner.

    The second way is to divide the track up according to established section names. This starts to divide the track up in a way that makes our delta section variance trace useful, as we get more granular with our track analysis. By utilizing these popular labels, it is easy to identify and talk about sections known to other drivers. It is, however, not very efficient. If you are not familiar with these section names, it can be very confusing trying to remember what is what. They also do not have much rhyme or reason to them if you are looking to establish a consistent method to deciding sections. There’s also a lot of names, so you add a lot of sections to your track that can affect how you see trade-offs. There is a way to do this more sensibly, and since you can name each section to whatever you like, you can utilize this to label specific sections instead of using every single one.

    The third way (and my preferred method outlined in this blog) is a simple numbering system paired with specific conditions for setting up a section. Each turn gets a number, and so does every straight. If there’s a chicane or sequence of turns, I will include them as a single section. Every corner section starts at the first brake point. Long straights get their own section, but a short straight I will just include with the previous corner up to the next corner brake point.

    This method makes it more sensible for section analysis, and includes enough of each sequence to account for trade-offs. This does take a little bit more time to set up, but the benefits are well worth it. We also make best use of our delta section variance trace this way. We may still get some inaccuracy due to the higher section count, but it will be much improved over MoTeC’s default section.

    Section Times Report


    [​IMG]

    As mentioned previously, overlays and variance analysis can be very cumbersome if you are looking at an entire race weekend. As such, we need a way to quickly determine our performance and consistency while looking at multiple laps. Channel reports are often the best way to do this, and MoTeC include a section time report to help with this.

    Thankfully, most of everything is already set up when you create this report. Here you will see each lap with the times in each section. Blue boxes indicate minimum times. There are highlighted green boxes which indicate how close a particular lap’s section was to the fastest section. MoTeC’s default is within 1% (light green) and 2% (dark green). I find this to be visually distracting, so I will remove the 2% highlighting as it is too big a time difference. A section with many green boxes indicates good consistency, but a lack of green boxes means an opportunity for analysis and practice. Better consistency also helps with judging how accurate your setup changes are, as the more consistent you drive, the more accurate data you will receive.

    There’s also two additional columns, eclectic and rolling minimum. Eclectic time keeps a record of the fastest time for each section. If we have sufficiently set up our track sections, this should be fairly accurate. More sections or poor section markers can drastically alter this figure. Rolling minimum is MoTeC’s algorithm for finding out what your consistent lap time would be. So this figure can vary from your fastest lap depending on whatever variables are measured, but unfortunately this information is not publicly available.

    So how do we use this graph? There are several ways. The easiest way is to choose a section or two that we want to work on, and look for the lap that has the fastest time (blue box) on that section compared to our fastest lap. From there we can look at the variance graph and start figuring out why this particular section was so fast. Often what you want to be doing is analyzing the corners/sequences that take the longest time within a lap, as they tend to be the most technical parts of the track and ripe for improvement. First chicane at Monza is a perfect example of this, especially since it opens up into a long acceleration section, so improvements here can be carried through that long straight.

    With endurance race analysis however, we have to be very careful how we use this report. Analyzing trends over a large period of time like tire wear and car balance can have significant effects on lap times and driver performance, so your best drive might not actually show up in your lap times. So utilizing metric reports lets you have a zoomed out view of the race and will help you better judge your overall consistency. This will be the topic of another post.

    Useful Keyboard & Mouse Shortcuts

    Double-click: Select horizontal zoom region

    W: Default horizontal zoom (main lap)

    F2: zoom out to full outing

    Alt + Double-click: Select vertical zoom region (very useful to see small differences!)

    Double-click on vertical units axis: default vertical zoom (very useful!)

    Spacebar: Place datum cursor (useful to measure distance/time between main/overlay laps)

    Variance Channel XML File for import

    Download here
     

  2. Similar Threads
    Forum Title Date
    ACC Physics problem geting bumpstops porsche gt4 on motec May 20, 2021
    ACC Physics (SOLVED) Motec log file empty (was, most of it still is though) Apr 4, 2021
    ACC Physics MoTeC Question: adjusting offsets of corner/section of different laps Mar 8, 2021
    ACC Physics Motec behaves strangely Feb 21, 2021
    ACC Physics Motec data file output incorrect Feb 17, 2021
    Troubleshooting - Workarounds Motec files incorrect lap information Feb 15, 2021
    ACC Physics Would someone be willing to share a Motec file? Oct 26, 2020
    ACC Physics Alien Motec Data? Oct 9, 2020
    ACC Physics ACC Motec Wrong Data Sep 17, 2020
    ACC Physics ACC Motec log file driver name Sep 9, 2020
    ACC PS4 - XB1 General Discussions How to Motec Aug 30, 2020
    ACC Physics MoTeC: Ambient Parameters Jul 16, 2020
    ACC PS4 - XB1 General Discussions Export for MoTeC Jul 8, 2020
    ACC Physics MoTeC lap samples Jul 3, 2020
    ACC Physics MoTeC: Track width and Center of gravify height calculation? Jun 28, 2020

  3. Tundra

    Tundra Hardcore Simmer

    Appreciated this post, Aris also share some videos about telemetry analysis.
     
    Manic_Driver likes this.
  4. Rudski

    Rudski Alien

    Awesome post. I know it won't happen but this should be a sticky!

    On a side note, this should be posted in the ACC Tools section.
     
    Manic_Driver likes this.
  5. Radfahrer

    Radfahrer Hardcore Simmer

    Cool stuff, thanks for the work !
    <3
     
    Manic_Driver likes this.
  6. Manic_Driver

    Manic_Driver Gamer

    Thank you all! Very much appreciate your thanks. I hope that you all will find this useful whatever skill level you are at.

    Thank you! I did watch all of Aris' videos and I do appreciate them very much. I very much agree with his statement of "more track time, less motec". I think that is very sound advice. This is why I have a guiding philosophy with telemetry to help drivers with that goal of spending more time on track.
     
  7. Manic_Driver

    Manic_Driver Gamer

    Fixing Laps Using The Lap Editor

    So this post qualifies as more of a life hack but can be useful to extract better information from your outings.

    What is the problem we are trying to solve? The problem, in this case, is MoTeC does not know which laps are TRUSTED or UNTRUSTED laps unless we tell it.

    What is a trusted/untrusted lap? A trusted lap is any lap that we want to use for analysis. In general, this means a lap that has few driver errors, does not include any pit stops, and contains telemetry data that we want to use for analysis. An untrusted lap can be any out/in lap, any lap where the tires are still trying to warm up, or a lap that had lots of traffic or where we got shunted, etc. MoTeC will highlight untrusted laps as orange, and trusted laps will be white.

    [​IMG]
    Untrusted laps labeled here as out lap and In lap

    This can be annoying because sometimes, depending on how many laps we chose to record in-game, the telemetry file will designate a trusted lap as untrusted, and you cannot change that in the lap editor! I consider this a bug that MoTeC should fix, but I digress. This results in channel reports that exclude trusted laps. We can uncheck “exclude untrusted laps” in the report properties menu, but the problem with this is sometimes we WANT to exclude untrusted laps, so that we don’t end up with highlighted min/max numbers from untrusted laps, which can result in inaccurate or misleading conclusions.

    [​IMG]
    These laps are trusted, but do not include untrusted laps.

    The other reason is to try and maintain continuity when we review previous races. If you use ACC results companion (and you should), you will notice sometimes there are discrepancies in motec lap times, so using the lap editor can help us fix any major errors, which I classify as any lap with a discrepancy of more than a hundredth of a second (some errors are in the thousandths and I ignore them).

    [​IMG]
    Using ACC results companion to double-check lap times in motec.

    So let’s fix the problem! First thing we should do is go into the options menu and set up the circuit tab menu to look like this:

    [​IMG]

    Generating In/Out laps can help keep the lap numbers consistent with ACC Results, provided that you record every lap in your outing.

    The next thing we need to do is add some beacons. Typically a beacon is the point on a track where the start/finish line is and indicates to MoTeC when to generate a new lap. In our case, adding beacons will create a null lap to trick MoTeC into turning our untrusted laps into trusted ones. Go to any Time/Distance graph, SWITCH OVER TO TIME GRAPH, and press F2:

    [​IMG]
    Full Outing Zoom

    This is the full outing of your session zoomed out. Notice the red dotted lines that indicate the beacon markers. Next thing we do is to add a beacon at the beginning of the outing, so press the ‘Home’ key to bring your cursor to the start of the outing. Now press SHIFT + F7. This should create a lap with a time of 0:00.000. Now Press the ‘End’ key, and press SHIFT + F7 again. Now, if we look in the data tab, we should have our laps, properly labeled:

    [​IMG]

    Beautiful, isn’t it? Now our laps are properly labeled! Sometimes your first recorded lap is already your Out lap, in which case you do not have to add a beacon at the beginning.

    Now, there are times when this doesn’t work out. Sometimes you’ll have an out lap with 0:00.012 or something ridiculous like that and your cursor doesn’t want to cooperate, or you want to exclude pitting laps, so we have to go into the lap editor to fix this.

    [​IMG]

    In the laps tab, we can select any of the green check mark laps (trusted laps) and de-check them, making them untrusted. Do this for any pit lap, crashed lap, or whatever lap you do not want included in your reports. Just double click on the lap and de-select the ‘trust for auto-scale…’ box.

    [​IMG]

    This is the beacons tab. Here we can edit beacon times that we included, which are the ones that are not greyed out. Unfortunately we cannot edit the recorded lap times in the event that they do not line up with ACCRC, but we can at least edit the added beacons. Simply double-click on the beacon and adjust the time so that it results in a 0:00.000 null lap.

    Now we have all of the laps we wish to analyze correctly labeled and still excluding all the laps we do not want!

    [​IMG]
    OCD bliss…
     
    Thomas Fun and chksix like this.
  8. Manic_Driver

    Manic_Driver Gamer

    Curvature: Driving Line Analysis

    "Straights are for fast cars, turns are for fast drivers." - Colin McRae

    At some point during your driving journey you may find yourself wondering where to find more time on track. Regardless if you have been driving for years or just last month, optimizing the racing line is a skill that every driver needs to understand in order to become faster. A lot of driving line analysis can be accomplished by looking at replays and real-life onboard videos of professional drivers, but by incorporating MoTeC data into our analysis, we can really start getting into the weeds with our own driving performance.

    What is the racing line?

    The racing line/driving line/etc can be defined as the fastest way around a corner for a given set of conditions. There are plenty of track guides on YouTube giving detailed descriptions about where to brake, what apex to hit, and so on, but they are often caveated at the end that your car/the weather/tire wear/etc will ultimately determine what racing line to take. But how do we determine that? And where did these drivers discover what the correct line is?

    To find that out let’s get a little bit more specific. Let’s take a look at this diagram:

    [​IMG]

    This diagram demonstrates corner radius, which is the distance of any curved shape. We can see it is simply just a part of a circle. Bigger circle, bigger radius. Smaller circle, smaller radius. Simple.

    When we introduce a racing line, however, things get complicated, rather quickly. The driver must now look at the track as a whole to determine where to go to maximize the speed through a corner. The car’s ability to accelerate out of a corner plays a large role in deciding whether to carry momentum or use the car’s power to overcome its cornering deficits, such as in the case of hairpins. And this is all before the mention of kerbs, rain, bumps, banking, and your opponents! Hopefully this demonstrates why racing line analysis is critically important to improving lap times.

    The corner radius of a car, then, can be determined by examining the relationship between its lateral acceleration and the speed of the car (Velocity^2/G Lateral). So we get this math channel defined in meters:

    Code:
    sqrt(sqr(sqr(‘SPEED’ [m/s])/’G_LAT’ [m/s/s]))
    Which gets us a trace that looks like this:

    [​IMG]

    Here we can see the car’s corner radius changing as it goes around corners. As stated earlier, the smaller the radius, the sharper the turning. So the smallest values will correspond to the point where the car is turning the MOST during a corner. So why does the graph dip down like this? Well, if you are traveling in a straight line on an infinite flat plane, you will never turn and thus the circle radius shoots off into infinity. This looks crazy and is not useful for us, so we will flip the equation (G lateral/Velocity^2) and take a look at the inverse corner radius, or curvature.

    [​IMG]

    Much nicer! Here’s the equation:
    Code:
    choose('Corr Speed' [km/h] > 10,  (1 / ‘Corner Radius’ [m]) * 100, invalid())
    (A few things about this math channel - It is gated to avoid values when the car is stopped because of divide by 0 infinities, and I multiplied the whole graph by 100 as kind of a poor man’s scientific notation, so that our values aren’t all just a series of 0s. We will also be using a lot of vertical zooming, so get ready to use Alt+Double-Click a lot)

    Looking at curvature, we can immediately see which corner is the slowest (Melbourne Hairpin at Donington). No longer do we have infinities, and there are a couple of properties that we can now observe to help us see what’s going on. Let’s take a closer look at one of these corners:

    [​IMG]

    So first, let’s introduce a new math channel, the filtered curvature channel:

    Code:
    smooth(‘Curvature’, 0.5)
    Sometimes the curvature channel can look a little chaotic, so we can use some filtering to better see our corner radius trace. In this case, we place both channels on top of each other so we can see what was filtered. As we can see labeled here, the trace is showing us where we turned in, how quickly the car is turning in (because of/in spite of our driving inputs), the point of maximum rotation (different from the track apex), and the car straightening out once again. In this example, which was from turn 11/melbourne hairpin at Donington during some hot lapping, we took a traditional apex, a racing line that we are all familiar with. Looking at this trace, immediately I can see that we have some driver steering issues - rather than a smooth curve, we have a significant drop off in steering on entry, which causes the car to go straighter for a little bit, thereby reducing the corner radius, before we readjust. What we can derive from this is, that our turn-in was probably too early. So let’s see what this corner looked like on-track:



    So, similar observations - we turned in way too early as evidenced by us clipping the track apex too much, so it would benefit us to go deeper into the hairpin before we turn and try to carry more speed around the hairpin. We could even start to experiment with taking a late apex. The replay here is quite helpful as the one limitation to MoTeC is that we can’t see our racing line mapped onto a GPS track, though this is because Kunos/Aris removed GPS coordinates from the log files. Still, we can still find some conclusions and use the replay to find a turn-in reference point. Let’s look at some other apexes and what they look like in MoTeC.

    Late Apex

    [​IMG]

    Here is an example of a late apex line. As you can see, lateral forces build quickly so that we arrive at maximum rotation early, before we start accelerating out.

    Early Apex

    [​IMG]

    Here is an example of early apexing, where we slowly build lateral forces and wait until corner exit to rotate the most. In this instance, we drove quite clumsily, as evidenced by the constantly shifting trace here, and an early apex can certainly be a symptom of that. Still, in more complex sequences on a track, there are times where you want to be early apexing, so it is important to recognize where those moments occur.

    Double Apex, Multi Apex, Chicanes, etc.

    [​IMG]

    As tracks have a wide variety of corner shapes and sequences, so do your apexes through those sections. These apexes give an indication of how quickly we are able to build lateral forces in either direction. These can be very tricky to unpack, so have a track map handy.

    Curvature Comparisons

    Now that we understand something about the shape of these traces, we can start comparing them to other laps. Let’s look at two laps overlaid:

    [​IMG]

    So here we can see how we approached this corner differently. The white trace turns-in earlier and then much quicker, resulting in the driver taking the car deeper into the corner. The pink trace turns-in later and is able to maintain a smoother approach to the point of max rotation. The white trace goes deep, and rotates quickly, allowing the driver to accelerate quicker out of the cornering phase. The pink trace is spending more time in the mid-corner phase at a higher speed (given its lower peak), but isn’t able to exit the corner as quickly as the white trace.

    The curvature, as we can see, tells us something about the trade-offs we are making while cornering. Though it does not specifically tell us anything about our braking phase, it gives us a lot of info about everything afterwards. We can answer questions like how smooth was my turn-in, what kind of apex did I take, is it worth it to sacrifice mid-corner speed for the sake of a faster exit? What kind of apex should I be taking?

    Much like the speed trace, we determine the ideal line by the area underneath each trace i.e. the average curvature value. Less area means either spending less time turning or faster mid-corner speeds, which gives us more time to accelerate out.

    [​IMG]

    Average curvature values can tell us something about our driving performance when put into a channel report like this. Lower curvature averages show how well we did in the cornering phase, and we can observe trends over the course of a session this way.

    We can even look at individual corners to really derive some useful information about how we took a corner:

    [​IMG]

    Here we have a driver during their qualifying sessions, looking specifically at turn 11. Donington melbourne hairpin is one of the sharpest and slowest corners in the game so it is worth it to spend some time looking at it. Using some fancy gating techniques, we can look at how fast we entered the corner, the mid-corner minimum speed, corner exit speed, and max/avg curvature values. This is going to tell us some interesting things about which part of the corner really matters the most in terms of getting the best times.

    If we REALLY want to up our game, we can create graphs to plot these metrics for comparison purposes. Take this, for example:

    [​IMG]

    Here I have plotted out corner entry speeds against section times. Scatter plots are great for this kind of analysis, as we can observe trends and variability this way. We can also observe how different drivers perform, as I have illustrated here. We can tell from looking at this graph that we have quite a wide range of corner entry speeds, but our trend line here shows us that there’s a strong relationship between faster entry and better section times. The slope of each line will tell us for each given unit of speed (km/h) how much time we stand to gain (for the blue driver about 1.5 tenths, for the red driver about 2.5 tenths) We can look at the R-squared figure as a percentage, to tell us how predictable the line is (69.4% in the case of the blue driver, but the red driver is more unpredictable at %47.2). These are not hard and fast numbers but merely to show if there’s any trend or something we should consider on approaching this particular corner. Let’s look at another graph:

    [​IMG]

    So here’s our mid-corner speed graph. Here we have a lot of noise and it’s less clear if there’s any relationship. The blue driver looks a little bit more consistent with higher speeds here, with the occasional dip/mistake. The red driver might be having more trouble staying consistent. However, it doesn’t seem that mid-corner speed has a big effect on section time - red driver managed to score some fast times at lower speeds than even blue. This might suggest that this corner would be better approached with a late/early apex as opposed to a more traditional line.

    [​IMG]

    Corner exit speed, again, shows us a lot of noise as well. Red driver seems to do better with faster corner exit, but blue driver seems to better with a slower exit? Knowing what we know about the entry and mid-corner, it might be that an early apex line is worth experimenting, as it would allow us to really maximize our corner entry. This all depends on how much time we lose on the straight, so using the variance channel can be handy in this case (you don't lose as much time on the straights as you think you do, thanks to aero drag). But, let’s look at curvature values first.

    [​IMG]

    So now this gets interesting - both our drivers definitely prefer carrying more speed around this hairpin (lower curvature = higher mid-corner speeds and less turning), but the curvature averages suggest that a larger curvature might result in faster section times! So it seems that maybe for this corner we want to be sacrificing some mid-corner speed for more entry/exit depending on which apex we take? Or it could mean nothing, but we won't know unless we try.

    [​IMG]

    Finally we have the curvature max value, which tells us the peakiness of our driving line. Red driver goes deeper more often than blue, and it seems to pay off. Blue is more consistent more of the time, but the line blue is taking should maybe not focus on mid-corner speed as much for this car and setup (Ferrari evo).

    One does not need to do this with every corner or section of a track, sometimes it is best to just focus on the hardest parts of the track and work up from there. Some sections can be particularly tricky to analyze, such as chicanes. Still, by looking at our speeds at various phases of the corner, it gives us a guide as to which part is the most important and where we should be channeling our energy into.
     
  9. Barry Meyer

    Barry Meyer Rookie

    Great post, thanks!

    Do you maybe have any idea on math channels to derive a heading and more precisely, GPS coordinates from Speed, G_Lat, distance and time. I am having trouble making my expressions work, and this is moslty due to not being able to build or find an expression for a "cumsum" (matlab expression) within motec, so that I can derive a heading. I have managed to get as far as plotting the Ïx Ïy but when these are added up and plotted on a XY plot, it produces a single heading, thus I need a heading so that when calculating X and Y directions it would inverse the calculation when the heading changes n(degrees)


    I am sure this is a stab in the dark, but hopefully you can see where I am going with this?
     
  10. Manic_Driver

    Manic_Driver Gamer


    Sorry mate, I'm not familiar with mat lab. You can get at best the kinematic steering angle (wheel base/corner radius). It'll give you the angle in radians that the car is moving in, but that's pretty much it. You can combine it with steering angle to get a measure of understeer/oversteer, but that's for another post.
     
  11. Barry Meyer

    Barry Meyer Rookie

    MATLAB is the basis that MOTEC is written in.

    how do you get the corner radius expression?

    from GLAT and Speed I can plot this, thats ascari to last corner on monza... its wonky because my speed formula is incorrect still. But its almost there. upload_2021-10-8_10-0-10.png
     
  12. Manic_Driver

    Manic_Driver Gamer

    I have the math expression posted in my corner analysis post. I have to be honest, I'm not exactly sure what you are looking for. I only know that MoTeC uses that data to create track maps but that's really it.
     
  13. Barry Meyer

    Barry Meyer Rookie

    Thanks, will have a look, I am trying to plot the co-ordinates from GLat and Speed. ACC does not provide X and Y coordinates. Similarly, to you post, you are mapping the corner trajectory, but in a similar fashion, I am trying to plot every lap for the whole track. And not just to create a Map of the track. whether this is usefull is not my aim. Merely an exercise in math.
     
  14. Tzanido

    Tzanido Rookie

    Great write up! Would you be able to add the math expressions for understeer angle, corner entry speed and corner exit speed? Thanks very much in advance.
     
  15. Manic_Driver

    Manic_Driver Gamer

    Sorry for the late reply! This actually opens up something I wanted to write about, which is gating.

    Gating Math Channels

    Often we will want to gate our data so that we can look at the only the parts that we want to. This is quite simple to do and just requires a few logic operators here and there. But first, it’s easier if we list out how we want to define our gated channel.

    Take corner entry speed, for instance. What are the parameters that we want? There’s a few different approaches to this but this is the one I use and I will explain:

    Code:
    choose(abs(‘G_LAT’) < 1 AND ‘Throttle’ [%] < 5, ‘Corr Speed’ [km/h], invalid())
    So here we use the choose() function, which is MoTeC’s IF statement. I have chosen the absolute value of lateral G to be less than 1 in this case, with basically no throttle. The function when true returns the Speed Trace. When false, it returns nothing thanks to the invalid() function. Invalid() is EXTREMELY useful, as it simply removes data that does not fit our criteria. It will get us better averaging results, return correct values for min/max stat functions, and so on. The gated channel will return to me a trace that looks like this:

    [​IMG]

    The dark pink trace gets me close to where I want to be. There is a specific problem with this approach, though. For one, this does not measure speed at a given spot on the track. If you have designated a turn-in point on-track, you cannot use this channel. This channel instead tells me when the car has rotated enough to develop a certain amount of cornering forces. This will not be consistent across all laps and sections so you just have to keep that in mind. But it gives us some insight into whether we are turning the car too soon or too late, when we pair it with other related data or observations.

    I can find the minimum value if I go into channel reports - I will select the Corner Entry Speed channel and select MIN for my chosen report.

    [​IMG]

    You can also see here I have organized my channel report to look at corner sections only. This lets me look at each section individually while also removing straights sections. This will come in handy once I export all this to a spreadsheet to make some fancy graphs to better visualize all this data.

    Here is corner exit speed channel:

    Code:
    choose(abs(‘G_LAT’) < 0.75
    AND 'Throttle' [%] > 99
    AND ‘Curvature Filtered’ < 0.50
    AND 'Calc Section Time' [s] > 1
    ,’Corr Speed’ [km/h],
     invalid())
    
    As you can see, their is a lot more gating on this channel. There isn’t a particularly easy way to define corner exit per se - every section is different so I was not able to simply choose a generic distance. This would give me speed at end of section, which I could do simply by going into channel reports and selecting the END box for speed. In any case, I chose the values above so that I could control for things like a nasty kerb kicking the G lateral channel beyond the gate. This can happen a lot given how noisy the G lateral channel is, so I also included the curvature filtered gate to control for that. More importantly, the point of doing all this is to again get a sense of how fast we are going at the moment the car seems to be leaving the cornering phase and entering straight line acceleration. Just keep in mind that you have to consider the kind of apex you are taking, so a late apex turn will generally have lower corner exit speeds but higher section exit speeds, and you don’t see the benefit/trade-offs without looking at how it affects the following section. This is what it looks like:

    [​IMG]

    Again, in channel reports, we select the MIN speed value. We also ignore any straights section as typically there aren't any corners there we care about all that much.

    How useful this is depends a lot on feedback from the driver, so be careful about how far down the rabbit hole you go with this. The benefits of a late apex don’t show up in a given section time, but rather in the following section. Also, sometimes you won’t even get a number if you use too many gates - sometimes corner exit won’t really appear until the following section, so make sure you have your track sections set up properly.

    Finally, as for understeer angle, that’s going to be a bit more complicated so I will prepare that all in a future post.
     
    grrdabrr, Tzanido and chksix like this.
  16. Manic_Driver

    Manic_Driver Gamer

    The MoTeC Run Chart Spreadsheets: “Moneyball” For Racing

    I am very pleased to introduce the MoTeC run chart spreadsheet! I have been working on this project for a while now and am excited to share this with you all. But first, what is a run chart and why is it important?

    A run chart is very simply data plotted over time in order to analyze certain trends or patterns. A run chart is a valuable tool for endurance sim racers like ACC because ideally we want to be examining our consistency over a long period of time rather than always analyzing every little mistake on a given lap. For instance, how does our driving style change as the tires start to wear, or what is happening to our tire pressure and roll balance as the temperature dips or as the car burns through its fuel? Run charts will give you an answer very quickly.

    Now, MoTeC has a very basic run chart feature in it, which is fine if we are only looking at a few channels at a time, but to really get the most out of our run charts, we are going to have to use a spreadsheet. Let’s take a look at what a run chart looks like:

    [​IMG]

    This is a very simple graph using data exported from MoTeC, showing us lap numbers along the x-axis (independent variable), and lap times on the y-axis (dependent variable). The colored lines represent what’s called a ‘moving average’, which averages the lap times every 3 times in this instance, and is a representation of how consistent each driver is in this case. We keep the dots to show us the amount of variance in our chart.

    But we can do some more interesting things with run charts. See here:

    [​IMG]

    In this graph we have minimum corner speeds along the x-axis and cornering grip (avg lateral G forces) along the y-axis. This data is also location and driver specific, taking this data from Turn 11 at Donington (Melbourne hairpin). Again, we can get an idea as to who is producing the most cornering grip in this section, and we also get a general idea of how much actual lateral grip is produced depending on our minimum speed.

    Usually producing a graph like this is a huge pain especially in a free spreadsheet program like Google Sheets, BUT I have created a template that can do almost all of this automatically!

    Lap Report v0.1:
    https://docs.google.com/spreadsheets/d/1_KXNqDnlAbV65e6FhxC8OzNysOdrXehxbxZzzarOE1I/edit?usp=sharing

    Corner Report v0.1:
    https://docs.google.com/spreadsheets/d/1s_qsOGGxECoeiLHpNvYpNrYQGclvUJl95Rb7mXtIDks/edit?usp=sharing

    These spreadsheets are still very rough around the edges, but they work and I will explain how to set it up. If you copy these to your account you can start manipulating and playing around with it, as I have included data for you to see how it works.

    First thing we will want to do if we are using our own data, is to prepare the data in MoTeC. Both spreadsheets will pull data from Channel reports page, which is very easy to setup. Create a new worksheet and add the ‘Channel Report’ page. The first thing that pops up is the ‘properties’ menu, so we will have to set this up first.

    For the lap report spreadsheet, we want our properties menu to look like this:

    [​IMG]

    This is for the corner report spreadsheet (We chose to include only Corner sections but there’s no reason you cannot include all sections if you so desire):

    [​IMG]

    (Please refer to my previous post about untrusted laps if you need to fix your log files). This will load EVERY log file you have in your data tab, so be sure you are only using the log files you want to use, otherwise select the ‘selected outings’ option.

    The grouping here is important so make sure that is correct. Also take note of the first two channels for the report - make sure Calc Outing Time and Corr Speed are your FIRST channels, along with the selected boxes. This will be necessary when we start applying filters in the spreadsheet. Whatever other channels you want to add after that is completely up to you.

    Now, the way the spreadsheet is organized, it is very helpful that you have a descriptive ‘Driver’ heading, as this will be the label used in the spreadsheet graph. After we load all our log files, we can press the ‘Details…’ button and it will open up the log file editor:

    [​IMG]

    Here we can edit each field to our heart’s content. Whatever you choose to put in the driver field will end up as the main descriptor in our data labels. So if you wanted to compare different setups, for instance, here we can put ‘Setup 1’ or ‘Setup 2’ to designate which log file is which. We can also edit this field when we get to the spreadsheet but it is easier to do it here.

    After we have that all setup then we can export our channel report data to the clipboard. Right-click on our channel report and select ‘Export…’ and then ‘To Clipboard’.

    [​IMG]

    This copies all our data for import to our spreadsheet. Now we can go to the first tab in our template, the ‘Data Dump’ tab, delete everything there, and copy our new data there. I have the rest of the instructions posted in the first cell of the second tab, the ‘Data’ tab.

    So from here, what we can do is go the ‘Driver Lap Report’ tab. In the top row there is a selection of drop down menus that give us several options for our graph.

    [​IMG]

    Select any one thing from the drop down menu and it will only include the data from that filter. Most important is which data we want to put in our graph. Selecting Lap Time for our y-axis is a good one to start with as we go through the data we want to look at. But choose whatever you want.

    The next tab will display our graph:

    [​IMG]

    First thing you will notice is that your graph might look like this. Unfortunately there’s no way to automate this part, so you will need to adjust the boundaries of your graph to see the data that you want to. Luckily, it’s fairly simple in Google Sheets as we can just double click on any part of the graph to manipulate it:

    [​IMG]

    Much nicer! This graph shows us the relationship between average lap speed (x-axis) and lap time (y-axis). No surprise, there’s an iron clad relationship between the two.

    In the corners spreadsheet, I have included an additional set of reports/graphs. Because of a quirk of how graphs/query functions work in google sheets, the first set organizes the data sets as [Driver/Section] while the second set is [Section] only. The reason for this is cosmetic mostly. For instance, if we used the index no. (alternative to using lap numbers) to plot every point for every driver and section, the graph looks like this:

    [​IMG]

    Due to the way google sheets colors these labels, it is hard to tell what section is which and which driver is who. Normally if we are only working with one driver or using a section filter this isn’t a problem, but sometimes we want to look at the big picture and this isn’t a great way to do that. So by only looking at [section] we can make our graph look like this:

    [​IMG]

    Gone are the driver labels so we can look at each section as a whole. In this case it is pretty easy to delineate between the different drivers, but it’s a lot easier on our eyes to compare how each driver did per section.

    In future posts we will be looking at what metrics we can use in our run charts, but I guarantee that using these spreadsheets will elevate how you look at your data.
     
  17. I just fell in love with you
     
    Last edited: Oct 25, 2021 at 8:31 PM
    chksix and Manic_Driver like this.
  18. Tzanido

    Tzanido Rookie

    Really loving this. I'm always looking for ways to improve my data analysis and workbook. Would love to see a section on roll/pitch gradients and damper analysis.
     
    Manic_Driver likes this.
  19. Manic_Driver

    Manic_Driver Gamer

    Thanks! Those topics are in the pipeline. Dampers will be a while, that particular topic is quite a difficult one to tackle.
     
  20. I have noticed we have some dark FFT charts and I have found some info on the internet about the possibility to identify and evaluate the various modes in which the suspensions work (heave, pitch, etc).
    Does anyone know what info we can derive from that? And how?
    Is it possible to derive the optimal wheel rate with these FFT, PSD FRF stuff? Maybe in combo with damper histograms and time domain analysis? If not, is there any other way?

    I ask because, for instance in Monza, I randomly got a combination of settings that gave me 4kmh just by adjusting wheel rates!
    I know a few rules of thumb like if you need a more "pitchy" damper histo, you gotta stiff the suspension. Are there such hints also for wheel rate?
    For instance, let's say my rear mm/s are always way higher than the fronts from 1dB to 10 dB. Does it mean I should make it stiffer to have it neutral?
    Or am I just throwing bs considered the hour???

    Thank you guys for sharing your wisdom.
     
    Last edited: Oct 26, 2021 at 1:43 AM

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice