Skip to content
Igor FerreiraBack to the lab

GNSS/RTK anti-collision for stockyard machines

I am responsible for the software and the field tests of a GNSS/RTK anti-collision system for bulk stockyard machines, as part of a team. The rule is to test before installing: a GNSS signal simulator, a virtual environment that replicates the field computers, and acceptance and failure tests, such as signal loss and reconnection.

Video excerpt, muted
Role
Automation assistant, in a team
Period
2026 – present
Status
in progress
  • Industrial automation
  • GNSS/RTK
  • NMEA
  • Modbus TCP
  • PROFIBUS DP
  • Linux
  • .NET
  • simulação

Plain explanation

The problem

In a bulk materials yard, huge machines travel on rails and swing long booms, close to one another. A collision between them, or with the stockpiles, breaks equipment, stops the operation and puts people at risk.

To prevent this, the anti-collision system needs to know at all times where each machine and each boom are. But the position along the track was further off the more the machine traveled toward one side of the yard. And each test to find the error required a stopped machine, a team in the yard and a precision signal, sometimes a whole day.

What it does

  1. Reads the satellite precisely

    Two antennas on each machine receive the satellite signal with the correction from a fixed base, which brings it down to centimeters.

  2. Calculates where the machine is

    A program inside the machine turns that signal into the position, the heading and the point along the track, and delivers it all to the plant's control system.

  3. Tests on the computer before the yard

    A 3D yard and a copy of the machine's computer make it possible to test each new version without stopping any machine.

  4. Comes back on its own when the signal drops

    If the receiver drops, the program reconnects on its own, instead of staying frozen until someone goes out there to restart it.

What changes

Before
10.8 m
After
1.9 m
The mean error of the position along the track, on the machine with the largest error, before and after the fix.

The position the anti-collision system uses became more than five times more accurate, and 9 defects of the original version were fixed and validated before reaching the field.

Each new version is now tested on the computer, as many times as needed, and the trip to the yard becomes the confirmation, not the first test.

And the same approach can serve any large equipment that depends on satellite positioning: less machine downtime for testing and more confidence in what goes to the field.

Technical explanation

Problem, improvement and result

Problem
The positioning software of each stockyard machine, stackers and reclaimers on rails, reads a dual-antenna GNSS receiver with RTK correction and publishes the position to the plant's control system, which handles the anti-collision. The position along the track got worse on one side of the yard: the reference scale was a straight line calibrated from two points about 92 m apart and stretched over more than 1 km, and it came out 1.87% too long and 0.35° skewed. Validating each fix required a released machine, a team in the field and RTK.
Improvement
The installed software was rebuilt and each version came to be validated on the PC, in three layers: a bench that reimplements the calculation and checks it against the real executable; a 3D yard simulator, mapped from satellite imagery, that injects NMEA into the antennas and reads the Modbus; and a replica of the machine computer in a Linux VM. Each machine reads GGA and HDT over TCP from the two antennas, on the machine body and on the boom, and publishes 16 registers over Modbus TCP; the software is .NET on Linux. The scale became one per track, with three parameters per machine.
Result
Scale error from 10.8 to 1.9 m and reconnection in 14 of 14 drops, with the method in the evidence. Without going to the field: 628 of 628 writes equal to the model in the Linux replica, 12 runs without failure in the live simulator, 143 executions without a crash, 2 h of endurance with 24 injected faults and 1,008 unit tests in the latest version. The installation kit dropped from 437 MB to 43 MB. The 3D calibration was ready on the day it was requested, and the live simulator in about 2.5 h. Measured between September and October 2026.

Evidence

  • Track position error from 10.8 to 1.9 m

    Out-of-sample RMS error on the machine with the largest error, with the new per-track scale; under 2 m on all of them. On the real program, 10,174 of 10,180 writes equal to the model. September and October 2026.

    Measured.

  • Reconnection in 14 of 14 receiver drops

    The installed version did not come back in any of 8 drops, and the position stayed frozen until someone restarted the service; the fixed one came back in all 14, in 0.3 to 14 s.

    Measured.

  • 9 defects of the original version fixed before the field

    Each fix validated on the bench, in the 3D yard simulator and in the Linux replica of the machine computer, before installation.

    Measured.

The version line

  • A: the version installed at the start of the work.
  • B: calculation fixes: the heading stuck at 327.67°, the lateral offset of the boom antenna and the disabled boom that crashed the program.
  • C: automatic reconnection when the receiver drops.
  • C2: only accepts a position with an RTK fix and checks the GGA checksum.
  • C3 and C4: the quality of the published GGA and the optional dual antenna on the boom. Done in one field day, with a technician.
  • C5: the status with the RTK fix and dual antenna bits, checked afterwards in the Linux replica.

The defects came from the code analysis, the tests and the field; the bench, the simulator and the replica validated each fix before installation.

Limits

  • The simulator's reference is the modeled yard: it validates the calculation and the communication, and field accuracy is confirmed at installation.
  • The next step is to close the sections of the scale that are still provisional, with new field readings.
Next project on the tour3D Bulk Stockyard Simulator