Skip to content
/ vcu-gui Public

A cross-platform graphical tool for configuring the VCU

Notifications You must be signed in to change notification settings

sufst/vcu-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VCU GUI

A cross-platform graphical tool for configuring the parameters of the VCU.

Installing

Releases of this tool are pre-compiled for macOS and Windows as a standalone application. The latest release is available here, or use one of the links below for a direct download:

The program can also be compiled and run on Linux using cmake and make (see: build process).

Creating a Torque Profile

The torque profile defines the mapping between accelerator pedal pressure and requested torque.

Adding Points

The default torque profile is linear. Points can be added by clicking anywhere on the graph and existing points can be moved by clicking and dragging on them. To delete points, press backspace which will enter delete mode and change the cursor to ⌫ - any points you click on will be deleted until backspace is pressed again to exit delete mode. To reset the entire curve, press the escape key.

   

Tips for getting a good profile:

  • Make sure the curve is strictly increasing.
  • Make sure the curve doesn't exceed the axis bounds - this will cause clipping when the profile is exported.
  • Don't place points next to each other with a steep gradient between them - this causes poor interpolation.
  • Make sure no two points have the same input (x-axis) coordinate - you can't map one input to two different outputs. Interpolation algorithms also don't like this because the curve becomes discontinuous (or has an infinite gradient).
  • (Probably) use the C² spline interpolation algorithm.

A warning will be generated when exporting if there is a major issue with the generated curve.

Pedal 'Dead-Zone'

The blue region at the left of the curve defines the 'dead-zone' for the pedal. An input in this region will produce no output torque from the motor. A small dead-zone is required to guarantee that the car will not move when the pedal is fully released as slight mechanical misalignments or voltage measurement errors may still produce a small input to the VCU.

Interpolation Algorithms

Interpolation is used to work out the values of the torque curve between manually placed points. The choice of interpolation algorithm will affect the calculated response and change the way the curve behaves when you interact with it.

        

Four algorithms are available, which can be selected from the drop-down list:

  1. Linear (simplest)
  2. Cosine (occasionally useful)
  3. Spline (best in most cases)

Importing and Exporting Configurations

Configurations can be exported to an XML document by pressing the 'export profile' button and choosing a location on your computer to save the file. These files can be imported again and edited further by pressing the 'import profile' button, or by dragging the file into the graph area. The placed points the chosen interpolation method are stored in these documents, but not every point on the interpolated curve as these easily can be re-generated by importing the placed points. The deadzone is defined by the value of the first point and does not need to be stored separately.

Initial Setup and Build Process

Clone the repo:

git clone https://github.com/sufst/vcu-gui

Clone / update submodules:

git submodule init
git submodule update

The build process is managed by cmake which you will need to have installed, along with make (for macOS / Linux) or msbuild (for Windows). You will also need a C++ compiler (clang, gcc, or msvc). For instructions on setting up the compiler and development environment, see this document. Before building, create the build directory:

mkdir build

To create the build system for debug:

cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug

Similarly for release:

cd build
cmake .. -DCMAKE_BUILD_TYPE=Release

To actually build the program:

  • On macOS and Linux just run make in the build folder.
  • On Windows, run msbuild ./VCU-GUI.sln from the build folder.

Dependencies