Academic Projects

Rear Parking Aid

An embedded rear-parking-assist system built around ultrasonic range sensing and a microcontroller feedback loop.

Rear parking aid project

Subject

Design and validate the architecture of a rear parking aid, as found on most cars, covering two parts:

PDF Specification note French · 80 KB

Work Done

PDF Full report French · 2.8 MB

System modeling

System model

Communication system

Communication protocol stack diagram

The top layer, "Liaison," transmits a message from the producer and waits to receive and acknowledge it before handing it to the consumer. If a NACK is returned, or the timeout period is exceeded, "EmissionLiaison" re-sends the message (up to 3 times).

The layer beneath, "Framing/Deframing," wraps the message with a Start-of-Text (STX) and End-of-Text (ETX) character, plus a checksum before ETX — three characters added to the message, letting "Deframing" find the message bounds and verify its content via the checksum. Any error returns a NACK.

The bottom layer, "Character Transmission," decomposes and reconstructs each character as a binary sequence with a sign bit for validity checking, immediately above the transmission channel itself, where noise can enter the stream.

MATLAB modeling

The ultrasound transmitter/receiver is modeled with a second-order transfer function:

Second-order transfer function

We apply a bilinear transform (Tustin's method):

Bilinear transform

Which yields:

Resulting transfer function

Using MATLAB's filter function, with delay added in proportion to distance, a square-wave input produces:

Simulated square-wave response

For digital signal processing, this transfer function converts to a recurrence relation:

Recurrence relation

With the following coefficients:

Recurrence relation coefficients

Accounting for delay and attenuation proportional to distance, simulation gives:

Simulated burst and echo signals

Platform & code

Electronic hardware platform
CPP main.cpp NUCLEO-L152RE H UART_Radar.h CPP UART_Radar.cpp H buzzer.h C main.c MCB STM32F400