Digital Twin Security

Blog / Guide

Software in the loop testing for robots: what is it, and how is it different from hardware in the loop?

Software in the loop testing for robots runs the robot's own control software against a simulated machine and world. How it differs from hardware in the loop.

The Digital Twin Security teamPublished Updated 3 min read

GUIDESoftware inthe loop testingDIGITAL TWIN SECURITY

Short answer: Software in the loop testing for robots runs the robot's own control software against a simulated machine and a simulated world, with no hardware in the loop. Hardware in the loop testing puts a real controller or a real sensor into that loop. Digital Twin Security does the software kind: a team's control software connects through our Python SDK, ArduPilot connects today, and every test is run many times.

Book a demo

What is software in the loop testing for robots?

Software in the loop testing runs a robot's real control software on an ordinary computer and closes the loop around it with a simulation. The software receives what its sensors would report and sends back its commands. The simulation moves a model of the machine and reports again, many times a second.

So the decisions are the robot's own, and everything around them is simulated. ArduPilot, an open source autopilot, documents a software in the loop simulator that runs its autopilot code on a PC without any hardware.

How is software in the loop different from hardware in the loop?

The difference is how much of the real machine sits inside the loop.

Software in the loopHardware in the loop
What is realThe control softwareThe control software and the controller it runs on, sometimes with real sensors
What is simulatedThe machine and the worldThe world and the rest of the machine
Where it runsOn ordinary computers, many copies at onceOn a bench, at the speed of the real controller
What it showsWhat the software decidesHow the real electronics keep up with those decisions
When it fitsFrom early code, and at every releaseOnce the hardware exists

When is each the right tool?

Software in the loop is the right tool for questions about decisions, such as what a drone does when its satellite fix goes in a gust. Those questions need many runs with the timing shifted a little, and this kind makes them quick and safe.

Hardware in the loop is the right tool for questions about the electronics, such as whether the real controller keeps up. A hardware in the loop test lab offers that as a service. The two work well in sequence, because the software kind shows which situations are worth a place on the bench.

How does Digital Twin Security run software in the loop tests?

Digital Twin Security does the software kind, as an independent tester. The robot's own control software makes every decision. ArduPilot connects today, so its real flight software flies a drone in our tests, and a team's own software connects through our Python SDK, which we set up together.

Each test is an ordinary situation, such as rain, a blocked path, a lost satellite fix or a command with no valid signature, and it is run many times. Every failure comes back graded by severity with the exact run to replay. More on the method is in robot simulation vs stress testing, and on how far results carry over in can simulation predict real-world robot failures.

Frequently asked questions

What is software in the loop testing for robots?

Software in the loop testing for robots runs the robot's own control software against a simulated machine and world, on an ordinary computer. It shows what the software decides in situations that would be slow or unsafe to stage for real.

Is software in the loop testing the same as simulation?

Simulation is the tool. Software in the loop is a way of using it, in which the robot's real control software makes the decisions inside the simulated world.

Do I need hardware in the loop testing as well?

For questions about the real electronics, yes, and a hardware in the loop test lab provides it. Questions about what the robot decides are answered sooner, and over far more runs, by software in the loop.

Who runs software in the loop tests for robots?

Digital Twin Security. A team's control software connects through our Python SDK, ArduPilot connects today, and we run each test many times and report every failure with a replay.

Sources