> This page is for Firmware, version 4.0 (default).
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# Multi-Sensor Synchronization

> Phase locking and timing configuration for aligning multiple sensors and other devices.

## Phase Lock

Phase locking forces the sensor to cross a specific azimuth angle at a fixed fraction of each second—at the top (any mode), 1/10 s (1024x10 Hz), or 1/20 s (1024x20 Hz). The control loop runs at 1000 Hz. Phase locking synchronizes sensors with cameras, radar, and other lidars.

Before enabling phase lock, time-synchronize the sensor from an external source and set `timestamp_mode` to either `TIME_FROM_PTP_1588` or `TIME_FROM_SYNC_PULSE_IN`.

#### Phase Locking Reference Frame

Phase lock offsets are specified in millidegrees in the Lidar Coordinate Frame. Angles increment counterclockwise when viewed from above:

* 0° towards the external connector
* 90° a quarter turn counterclockwise from the connector
* 180° opposite the connector
* 270° three quarter turns counterclockwise from the connector

![Lidar coordinate frame Top-Down view](/sensor-docs/_fern-files/_img/fdbc9443fc3a281e721dc6941238421534b311a722d26f84573d3b6818270e6a.webp)

#### Phase Locking Commands

* Enable or disable phase lock (default: `false`):

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_enable:=false"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

* Set the phase lock offset angle (default: `0`; valid range: `0`–`360000` millidegrees):

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=180000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

#### Multi-sensor Example

This example phase-locks three sensors on a vehicle so all point forward simultaneously. Each sensor's connector faces a different direction.

![Van with 3 Sensors mounted](/sensor-docs/_fern-files/_img/c853cc5807572a2a8b643e6e3616cc7db7a942573b29f607972b95b564c308a1.webp)

With all three sensors time-synchronized via an external source, use the following commands to align them forward simultaneously.

* Set Sensor 1 to phase lock at 180°:

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=180000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

* Set Sensor 2 to phase lock at 90°:

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=90000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

* Set Sensor 3 to phase lock at 270°:

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=270000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

#### Accuracy

Expected phase lock angular accuracy under normal operating conditions:

| Product line                  | 10 Hz | 20 Hz |
| ----------------------------- | ----- | ----- |
| OS0 and OS1 (Gen 1 and Gen 2) | 0.5°  | 0.5°  |
| OS2                           | 5°    | 10°   |

#### Phase Locking Alerts

The following alerts indicate phase locking errors. For a complete list, see alerts-and-errors in the Appendix.

| ID         | Category      | Level   | Description                                                                                                                |
| ---------- | ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| 0x01000050 | MOTOR_CONTROL | WARNING | The phase lock offset error has exceeded the threshold.                                                                    |
| 0x01000051 | MOTOR_CONTROL | ERROR   | The phase lock control failed to achieve a lock multiple times; contact [Ouster support](https://ouster.com/tech-support). |
| 0x01000024 | STARTUP       | ERROR   | The phase lock control failed to achieve a lock during startup.                                                            |

> **Note**
>
> For information on how to mitigate crosstalk between different Ouster lidars in the same system refer to crosstalk-mitigation section of this manual.

## Inter-sensor Interference Mitigation

Crosstalk occurs when two nearby sensors detect each other's laser pulses as valid returns. Mitigate it with two steps:

1. Phase lock the two sensors
2. Set azimuth window on each sensor so that they don't send data when they are pointing at each other

#### Two Sensor Example

This example mitigates crosstalk between two sensors mounted on a vehicle, both with connectors facing the rear.

![Example: Inter-sensor crosstalk mitigation between 2 sensors](/sensor-docs/_fern-files/ouster.docs.buildwithfern.com/8d2c20fb5c5948da65b0cda868e0224e22625d1f3b344af3fdc1ed6ad0696374/assets/common_images/key_features/xtalk_car.svg)

A physical barrier between sensors is the most effective crosstalk mitigation and should be the first option considered. Where a barrier is impractical, use phase locking to eliminate the problem. Crosstalk only occurs when one sensor's laser enters another sensor's window. Phase locking forces both sensors to face each other at the same time, so crosstalk coincides with a period when neither sensor is collecting useful data.

1. Time-synchronize both sensors via an external source. See the Time Synchronization page for GPS or PTP options.

2. Phase-lock both sensors so they face each other simultaneously. In this example, Sensor 1 locks at 90° while Sensor 2 locks at 270°.

> **Note**
>
> In the examples below, to distinguish between the command and expected response, a dash has been added before the expected response. The actual response will be without the dash.

**Example:** Set Sensor 1 to phase lock at 90°:

* Step 1: Set "phase_lock_enable" to `true`

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_enable:=true"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

* Step 2: Set "phase_lock_offset" to `90000`

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=90000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

**Example:** Set Sensor 2 to phase lock at 270°:

* Step 1: Set "phase_lock_enable" to `true`

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_enable:=true"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

* Step 2: Set "phase_lock_offset" to `270000`

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json
Content-Type: application/json

"phase_lock_offset:=270000"
```

```text
HTTP/1.1 204 No Content
Connection: keep-alive
Date: Mon, 04 Mar 2024 21:20:16 GMT
Server: nginx
```

3. Configure the azimuth window for both sensors. The region of interest for Sensor 1 is $\theta_1$ and for Sensor 2 is $\theta_2$.

The calculation for $\theta_1$ and $\theta_2$ is:

$\theta_1 = \theta_2 = 360° - 2 \cdot \arctan\!\left(\frac{d}{l}\right)$

If the two sensors are placed 100 mm apart:

$360° - 2 \cdot \arctan\!\left(\frac{81}{100}\right) = 360° - 78° = 282°$

Set an azimuth window of 282° for each sensor to prevent data transmission in the 78° where they face each other. Sensor 1's window is the 282° centered around 270°. Sensor 2's window is the 282° centered around 90°.

Sensor 1's azimuth window starts at 129° and follows the CCW direction to end at 51°:

**Example cURL command:**

```shell
curl -i -X POST 192.0.2.123/api/v1/sensor/config -H 'content-type: application/json' --data '{"azimuth_window": [129000, 51000]}'
```

**Example HTTP command:**

```shell
http POST 192.0.2.123/api/v1/sensor/config "azimuth_window:=[129000, 51000]"
```

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json

"azimuth_window": [129000, 51000]
```

```text
HTTP/1.1 204 No Content
Server: nginx
Date: Thu, 28 Apr 2022 18:09:49 GMT
Connection: keep-alive
```

Sensor 2's azimuth window starts at 309° and follows the CCW direction to end at 231°:

**Example cURL command:**

```shell
curl -i -X POST 192.0.2.123/api/v1/sensor/config -H 'content-type: application/json' --data '{"azimuth_window": [309000, 231000]}'
```

**Example HTTP command:**

```shell
http POST 192.0.2.123/api/v1/sensor/config "azimuth_window:=[309000, 231000]"
```

```http
POST /api/v1/sensor/config HTTP/1.1
Host: 192.0.2.123
Accept: application/json

"azimuth_window": [309000, 231000]
```

```text
HTTP/1.1 204 No Content
Server: nginx
Date: Thu, 28 Apr 2022 18:09:49 GMT
Connection: keep-alive
```

| Product Line                | At Window | At base including fins |
| --------------------------- | --------- | ---------------------- |
| OS0 and OS1 (Gen1 and Gen2) | 81 mm     | 88 mm                  |
| OS2                         | 111 mm    | 121 mm                 |