Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

The Mid Level Controller is based on the Raspberry Pi Zero W. It is part of the vehicle on-board electronics.

Its purposes are:

  • Provide a wireless network connection for the vehicle.
  • Provide a synchronized clock on the vehicle, via the Linux NTP implementation.
  • Provide a control system for accurate trajectory following of the vehicle. The control system runs locally on the vehicle to eliminate the network latency from the control loop.
  • Send vehicle state information and receive trajectory commands via the network.

The setup and software build for the Raspberry Pi is explained under Vehicle Raspberry Pi.

The following data-flow diagram shows the MLC architecture.

Trajectory Controller

A model predictive controller runs on-board on the Raspberry Pi. It can steer the vehicle to follow a given trajectory.

To see how to use it to control a vehicle, go to Vehicle Commands.

To see how it works, go to https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/master/matlab_scripts/vehicle_dynamics_identification_and_mpc/documentation/main.pdf

Localization

The localization combines the IPS vehicle observation with local vehicle sensor data to determine the vehicle pose. If the IPS vehicle observation is delayed or temporarily unavailable, the localization can continue to give accurate poses through dead reckoning. However, the dead reckoning will fail when driving aggressively, i.e. with high wheel slip.

TODO (software improvement) the dead reckoning does not account for the sideslip angle, and is thus slightly inconsistent with the IPS pose. cf. BA Johannes Rolf.

Sensor Calibration

The Low Level Controller provides its data as low-resolution integers. The LLC units are chosen to match the required value range and quantization error. The sensor calibration converts the LLC data to floating point values with SI units.

LED Identification

See Indoor Positioning System.


SPI

The MLC / Raspberry Pi is the SPI master. It exchanges data with the LLC / ATmega2560. The communication is synchronous, i.e. the LLC waits for the MLC to initiate the exchange. The data exchange repeats at 50 Hz. SPI is full duplex, the input and output data are exchanged simultaneously.

TODO explain CRC error checking and retransmission

https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/master/vehicle_raspberry_firmware/src/spi.c

https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/master/vehicle_atmega2560_firmware/vehicle_atmega2560_firmware/spi_packets.h

https://git.rwth-aachen.de/CPM/Project/Lab/software/blob/master/vehicle_atmega2560_firmware/vehicle_atmega2560_firmware/spi.c

Simulation Mode

TODO

  • No labels