Analyzing Data

Important

WPILib standarizes on SI units, so its recommended that the Units option is set to Meters.

Once we have data from a characterization run, we can analyze it. To launch the data analyzer, click on the Launch Data Analyzer button.

Launching the data analyzer

Loading your Data File

Now it’s time to load the data file we saved from the logger tool. Click on Select Data File.

Selecting the existing data file

In the resulting file dialog, select the JSON file you want to analyze. If the file appears to be malformed, an error will be shown.

Running Feedforward Analysis

Once a data file has been selected, the Analyze Data button, Units entry, and Units per rotation entry become available in the Feedforward Analysis frame. We can now set the units of the analysis to match the units that our program will be using.

Now click the Analyze Data button.

Note

If you would like to change units, you will have to press the Analyze Data and the Calculate Optimal Controller Gains (if you’ve pressed it) buttons.

Analyzing data for feedforward

By default, the analysis will be run by combining all the data in the test. For a finer-grained analysis, the analysis may be limited to a specific subset of data using the subset dropdown menu.

Limiting analysis data by using the subset dropdown

The computed coefficients of the mechanism characterization will then be filled in, along with a goodness-of-fit measure (r-squared).

Analysis coefficient results