Orientation Subsystem

Orientation

The Orientation sub-system employs BLE Beacons and a Dipole Antenna Array (DAA) to perform Angle of Arrival (AoA) measurements on each Beacon's signal. The diagram to the left represents the use of two Beacons and the DAA inside the Groomba to measure the angle 'a2', the angle of the signal from 'Beacon 1', which can be used to determine the orientation of the Groomba.

The DAA is a Printed Circuit Board (PCB) which, primarily, measures the BLE signal from the Beacon with one antenna and then measures the same signal with a second antenna. The two antennas will measure almost-identical sinusoidal signals, the key difference being the phase of the signal. This phase is used to measure the angle of the Signal being received. 

Angle of Heading

Previously we stablished the method and technologies that allow the measurement of the angle from a BLE signal. The angle measured, however is not the entire picture, we first must do some trigonometry to get the correct angle. But before we do that, its important that we understand why we must do math on the angle of the BLE signal.

The issue that I came across when designing the orientation subsystem, is that both the Scanner and the DAA are inside the Groomba. This means that as the Groomba changes position the angle of the BLE signal changes. In addition, when the Groomba rotates left or right, the angle of the BLE signal also changes. This makes the angle of the signal depend in two parameters that are constantly changing, meaning this angle alone is an unreliable means to determine the orientation of the Groomba.

If we look at the diagram on the left, the top angle of 24.1 degrees, is the angle of the BLE signal from Beacon 'B1'. The blue dotted lines represent standard directions like Forward (90), Backwards (270), Left (180), Right (0/360). My solution involves the comparison between the angle of the BLE signal from 'B1' and one of the four standard directions mentioned before. Which standard direction will give us the correct angle is determined by the sign of the angle from 'B1' and 'B2' (more on this later).

The image to the left provides an example for this kind of calculation. In this case, I used the standard direction Forward (90). By subtracting the BLE angle from 'B1' from the standard direction angle, we get the angle of heading or the angle that the Groomba is facing in respect to the area to be groomed. 


Standard Directions

Let's use the diagrams on the left to better explains the use of the standard direction angles mentioned above. The idea is to determine which offset should be applied to the angle of the BLE signal from the Beacons 'B1' and 'B2'.

If we take a look at the first diagram, the Beacons are to the right of the Groomba. If the Groomba is facing forward (90) as indicated by the red arrow, then the angle measured from 'B1' will be 24.1, no offset (or offset of 360) and the angle from 'B2' will be 360 - 56.5 = 303.5 , again no offset. 

Now let's look at the second diagram, note the Groomba's and Beacon's positions are the same as the previous scenario, only the orientation of the Groomba has changed. The Groomba is now facing Backwards (270). The angle from 'B1' is now 180 + 24.1 = 204.1 and the angle from 'B2' is now 180 - 56.5 = 123.5 Note how the offset is now 180 degrees, after the Groomba rotated 180 degrees.

This is the essence of the standard direction angles, by creating a coordinate system and some references, we can determine the appropriate offset to accurately estimate the angle of the orientation of the Groomba inside of the grooming area.