arbitration Arbitration

The arbitration algorithm is explained in detail in the Arbitration section of te 4x PDI Builder user manual.

Arbitration

MEX is able to send PWMs using arbitration in the same way Veronte Autopilot 4x does. This functionality requires to be enabled in the Enable checkbox.

../../_images/arbitration.png

Arbitration panel

Master arbitration RX CAN Id is exclusive for MEX when it is used alongside a Veronte Autopilot 4x. If enabled, when an arbitration message is received from the Arbiter of the Autopilot 4x (with the CAN Id configured here), the selected autopilot will be updated according to the data received.

Config

In this tab the parameters of the arbiter algorithm are set.

../../_images/arbitration_config.png

Configuration panel

  • Preferred: The preferred autopilot will be chosen in case of a score draw. Fixed while ok mode will always select this autopilot first.

  • Method: The method of arbitration can be chosen by the user. The available options are:

    • Always best: It chooses always the best autopilot.

    • Change if worst: The arbiter will only switch if the currently selected autopilot has the worst score. In that case, it will switch to the one with the best score.

    • Round robin control: Using the Holding CAP time parameter, the arbiter will periodically switch between autopilots. This mode is meant for testing purposes only.

    • Fixed: Arbitration is disabled and one autopilot is selected. In this mode Autopilot 4x will behave as an Autopilot 1x.

      • Fixed 1: Autopilot 1 is selected.

      • Fixed 2: Autopilot 2 is selected.

      • Fixed 3: Autopilot 3 is selected.

    • Fixed while ok: This mode does not take into account scores. In this mode, the Preferred autopilot will be selected by default. A switch will only happen if the current autopilot is considered Dead.

  • Holding CAP time: Amount of time needed from last switch in order to allow a new switch.

  • Hysteresis: When comparing scores, the difference between them needs to be bigger than this proportional value, in order to assess scores. The difference is proportional to the score of the selected autopilot.

    i.e: If current selected autopilot is the number 1, arbitration mode is Always best, hysteresis is 0.5 and score for AP 1 is 0.3, AP 2 will need a score lower than 0.15 in order to be selected.

  • Enable arbitration of external autopilot.

  • Variable - Max error: Arbitration maximum error for each variable.

  • Variable - Weight: Arbitration weight for each variable.

  • Variable - Absolute: If it is enabled, it will indicate that it is an absolute variable. The value set here will be used to compare the variables in order to choose the best autopilot.

Click on plus to add variables and minus to delete them. Currently, the maximum amount of arbitration variables supported is 32.

CAN Setup

This menu allows to configure the receiving CAN Ids for each of the 3 possible Veronte Autopilots 1x that are sending data to MEX. Therefore, to send data from any of them to MEX, these Ids must be specified.

Note

If arbitration is not enabled, only the configuration for Autopilot 1 will be used.

../../_images/arbitration_can_setup.png

CAN Setup panel

  • Send status and Period: The user can enable status message sending and set its period.

    Note

    The Send status Period must be set to 0.2 s, otherwise the arbitration algorithm will force the selection of autopilot 1.

  • Send score and Period: Users can enable the score message and define its period.

  • Status message ID: CAN ID to which Status and Score messages are sent when there is no External Arbitration and therefore MEX works as arbiter.

    • Extended: If enabled, the frame format will be ‘Extended’ (with a 29-bit identifier). Otherwise, the frame format ‘Standard’ (with a 11-bit identifier) is set by default.

  • Autopilot 1-3: CAN IDs used for the reception of autopilot 4x arbitration messages for each autopilot.

    • Extended: If enabled, the frame format will be ‘Extended’ (with a 29-bit identifier). Otherwise, the frame format ‘Standard’ (with a 11-bit identifier) is set by default.