Sensor emulation is the HIL methodology of generating simulated sensor signals from a real-time plant model and outputting them as physical electrical signals to the input pins of the device under test (DUT). This allows an embedded controller, like a robot's main computer, to interact with a virtual environment as if it were receiving data from real encoders, inertial measurement units (IMUs), LIDAR, or cameras. The technique is fundamental for closed-loop validation before physical hardware integration.
Glossary
Sensor Emulation

What is Sensor Emulation?
Sensor emulation is a core Hardware-in-the-Loop (HIL) testing technique for validating robotic and embedded systems.
The process relies on a real-time simulator executing a high-fidelity digital twin of the physical world. This model calculates expected sensor readings, which a specialized I/O board converts into precise analog voltages, Pulse-Width Modulation (PWM) waves, or digital pulses. This enables exhaustive testing of perception algorithms and control logic against millions of simulated scenarios, including fault injection and edge cases, in a safe, repeatable, and automated laboratory setting.
Key Components of a Sensor Emulation System
A sensor emulation system generates physical electrical signals from a real-time simulation to test embedded hardware. It comprises specialized hardware and deterministic software that work in concert.
Real-Time Simulator & Plant Model
The computational core that executes a high-fidelity, physics-based model of the system (the "plant") in hard real-time. This model calculates the expected sensor readings (e.g., position, velocity, pressure) based on actuator commands from the Device Under Test (DUT). Its deterministic execution, often on a multi-core processor with a Real-Time Operating System (RTOS), is non-negotiable to maintain synchronization with the physical world.
- Example: Simulating the dynamics of a robotic arm to calculate joint encoder counts.
- Key Output: A stream of floating-point values representing the ideal sensor measurements at each time step.
I/O Interface Hardware
Specialized electronic boards that perform the critical digital-to-analog (DAC) and digital signal generation conversion. They translate the numerical sensor values from the real-time model into the precise electrical signals required by the DUT's input pins.
- Analog Output Channels: Generate voltage or current signals (e.g., 0-5V for a temperature sensor).
- Digital/PWM Output Channels: Generate pulse-width modulation (PWM) signals, quadrature encoder pulses (A/B/Z channels), or discrete digital signals.
- Communication Protocol Interfaces: Emulate sensor buses like I2C, SPI, or CAN, transmitting pre-defined data frames.
Signal Conditioning & Breakout
Electronic circuitry and physical fixtures that ensure signal integrity and provide accessible test points between the I/O hardware and the DUT.
- Signal Conditioning: Amplifies, filters, or isolates raw signals from the I/O board to match the DUT's electrical specifications (voltage levels, impedance, noise immunity).
- Breakout Box / Terminal Panel: A passive interface with labeled connectors, fuses, and test points. It allows engineers to easily probe signals, inject faults, or reroute connections without manipulating the core HIL wiring harness.
Latency Management & Synchronization
The system of techniques that ensures temporal accuracy, compensating for the inherent delays in computation and signal conversion to maintain a valid closed-loop test.
- Deterministic Execution: The plant model must complete its calculation within a fixed, sub-millisecond time step.
- Latency Compensation: Algorithms (e.g., prediction) that account for the group delay through the DAC and wiring, aligning the emulated sensor signal in time with the DUT's expectation.
- Time Synchronization: Uses protocols like IEEE 1588 (PTP) to align clocks across distributed I/O nodes and the main simulator for coherent data logging.
Test Automation & Scenario Software
The software layer that orchestrates tests, injects faults, and validates responses. It defines what sensor signals are emulated and under what conditions.
- Test Sequencer: Automates the execution of test cases, applying time-varying input scenarios (e.g., a simulated vehicle driving over rough terrain).
- Fault Injection: Programmatically introduces sensor failures like signal dropout, saturation, noise, or stuck-at values to test DUT diagnostics and robustness.
- Data Logging & Analysis: Captures all emulated outputs and DUT responses for post-test analysis and requirement verification.
Hardware Abstraction & Configuration
Middleware that decouples the high-level sensor model from the low-level hardware details, enabling portability and simpler configuration.
- Hardware Abstraction Layer (HAL): Provides a uniform software interface to different I/O boards from vendors like National Instruments or dSPACE. A model configured to output "encoder pulses" doesn't need rewriting if the hardware changes.
- Configuration Tools: Graphical utilities (e.g., NI VeriStand, dSPACE ConfigurationDesk) that map model variables to specific physical I/O channels, set scaling (engineering units to volts), and define sample rates.
How Sensor Emulation Works in HIL Testing
Sensor emulation is a core Hardware-in-the-Loop (HIL) technique that replaces physical sensors with simulated, electrically accurate signals to test embedded controllers.
Sensor emulation is the HIL process where a real-time simulation generates virtual sensor data from a plant model and outputs it as physical electrical signals to the device under test (DUT). This involves converting digital simulation values into precise analog voltages, PWM waves, or digital pulses that match the exact electrical characteristics expected by the DUT's input pins. The technique allows for exhaustive testing of sensor fusion algorithms and fault handling without the cost and variability of physical sensors.
The implementation requires deterministic execution on a real-time simulator with specialized I/O boards for digital-to-analog conversion (DAC). Signal conditioning circuits ensure voltage and current levels are correct. A key challenge is latency compensation to account for processing and conversion delays, ensuring the closed-loop system's temporal fidelity. This enables validation of the controller's response to simulated edge cases, failures, and dynamic scenarios that are difficult or dangerous to replicate with real hardware.
Common Sensor Signals Emulated
Sensor emulation in HIL testing involves generating physical electrical signals that mimic the output of real-world sensors. These signals are derived from a real-time plant model and injected into the input pins of the device under test (DUT) to validate its perception and control algorithms.
Pulse-Width Modulation (PWM)
PWM is a digital signal emulated to represent sensors like rotary encoders, RPM sensors, or duty-cycle controlled actuators. The real-time simulator generates a square wave where the pulse width encodes information.
- Frequency and Duty Cycle: The simulator controls the signal's frequency (e.g., 1 kHz to 100 kHz) and the ratio of high-time to period.
- Quadrature Encoder Emulation: Two PWM channels are generated 90 degrees out of phase to simulate direction and position for motor feedback.
- Application: Testing motor controllers, reading simulated speed from a virtual drivetrain model.
Analog Voltage & Current
These are continuous signals representing sensors such as temperature probes, pressure transducers, potentiometers, and current shunts. The HIL system's analog output channels generate precise voltage (e.g., 0-5V, ±10V) or current (4-20 mA) loops.
- High-Resolution DACs: Use 16-bit or 18-bit Digital-to-Analog Converters for fine-grained signal control.
- Sensor Scaling & Linearization: The plant model calculates the physical value (e.g., 150°C), which is then scaled to the correct voltage using the sensor's transfer function, including non-linear corrections.
- Application: Validating an Engine Control Unit's (ECU) reading of manifold pressure or coolant temperature.
Digital I/O & Frequency Signals
Digital signals represent limit switches, proximity sensors, or Hall effect sensors. Frequency-based signals emulate sensors like variable reluctance sensors (VRS) for gear tooth detection.
- Digital Lines: Simple TTL-level (0-5V) signals indicate ON/OFF states, triggered by discrete events in the simulation (e.g., a virtual door closing).
- Frequency Generation: The simulator outputs a signal whose frequency is proportional to a simulated speed. For VRS emulation, the signal amplitude may also vary with frequency to mimic magnetic sensor characteristics.
- Application: Testing anti-lock braking system (ABS) wheel speed sensors or gearbox control units.
Communication Bus Signals
Modern sensors communicate via serial protocols. HIL systems emulate the entire bus traffic, generating the electrical waveforms of the protocol.
- Controller Area Network (CAN): The HIL simulator acts as multiple virtual sensor nodes, broadcasting CAN frames (e.g., 0x100: Engine_Speed) with simulated data onto a physical CAN bus connected to the DUT.
- Serial Peripheral Interface (SPI) / I²C: The simulator emulates the master or slave device, generating clock and data line signals for digital sensors like inertial measurement units (IMUs).
- Ethernet-Based Sensors: For sensors using EtherCAT or TCP/IP, the simulator generates the appropriate Ethernet packets with sensor payloads.
- Application: Testing an ADAS controller that receives object list data from a simulated radar sensor via CAN.
Resolver & Synchro Signals
These are specialized, high-fidelity analog signals used to emulate precise angular position sensors in aerospace, robotics, and high-performance motor control.
- Resolver Format: The HIL system generates two analog signals: a sine and a cosine (e.g., 2 Vrms, 400 Hz carrier) where the phase shift between them encodes the absolute shaft angle.
- Synchro Format: Emulates three-wire synchros (S1, S2, S3) with 115V, 400Hz carrier signals where the relative amplitudes define the angle.
- High Accuracy Requirement: Requires specialized I/O cards with low distortion and precise phase control to avoid introducing error in the DUT's RDC (Resolver-to-Digital Converter).
- Application: Validating flight control actuators or robotic joint controllers.
Strain Gauge & Bridge Sensors
Emulates sensors that measure force, torque, or weight using a Wheatstone bridge configuration. The HIL system must generate the small, differential voltage changes across the bridge.
- Millivolt-Level Signals: A full-scale output is often only a few millivolts per volt of excitation (e.g., 2 mV/V).
- Excitation Voltage Simulation: The HIL system may also provide the simulated bridge excitation voltage (e.g., 5V or 10V).
- Multi-Channel Synchronization: For multi-axis force/torque sensors, multiple bridge signals must be generated in perfect synchrony.
- Application: Testing load cell inputs on industrial weighing systems or torque feedback in electric power steering systems.
Sensor Emulation vs. Related Simulation Techniques
A comparison of sensor emulation with other simulation-based validation techniques, highlighting the integration point of physical hardware and the type of signals exchanged.
| Characteristic | Sensor Emulation (HIL) | Software-in-the-Loop (SIL) | Model-in-the-Loop (MIL) | Digital Twin |
|---|---|---|---|---|
Primary Objective | Validate sensor hardware interfaces & signal integrity with real electrical I/O | Verify algorithmic correctness of production source code | Validate control logic and system model behavior | Provide a virtual replica for design, monitoring, or predictive analytics |
Hardware Under Test (HUT) | Physical sensor or ECU input circuitry | Software executable (e.g., .exe, .so) on host PC | Pure algorithmic model (e.g., Simulink block diagram) | Not typically a 'test'; the twin is the virtual asset used for analysis |
Simulation Environment | Real-time simulator with physical I/O boards | Non-real-time host machine (e.g., Windows/Linux PC) | Non-real-time simulation software (e.g., MATLAB/Simulink) | Can range from non-real-time to real-time, depending on use case |
Signal Interface | Physical electrical signals (analog voltage, PWM, digital pulses) | Software function calls or data passed in memory | Mathematical variables within the simulation tool | API/data stream connection to physical asset (if live) |
Real-Time Determinism Required | ||||
Tests Electrical Characteristics | ||||
Fault Injection Capability | Physical (short/open) & protocol-level | Protocol & data value corruption only | Data value corruption only | Simulated fault conditions in the virtual model |
Typical Use Phase | Late-stage validation before system integration | Mid-stage software unit/integration testing | Early-stage algorithm design & requirements testing | Entire lifecycle (design, operation, maintenance) |
Latency & Timing Validation |
Frequently Asked Questions
Sensor emulation is a critical Hardware-in-the-Loop (HIL) technique for validating robotic and embedded systems. These questions address its core mechanisms, applications, and implementation details.
Sensor emulation is a Hardware-in-the-Loop (HIL) testing technique where a real-time simulation generates synthetic sensor data and outputs it as physical electrical signals to the input pins of a Device Under Test (DUT). It works by executing a high-fidelity plant model (e.g., of a robot's dynamics and environment) on a real-time simulator. This model calculates what a physical sensor would measure. The simulator's I/O boards then convert these digital values into precise analog voltages, PWM signals, encoder pulse trains, or digital communication frames (like CAN or SPI) that are electrically identical to those from a real sensor. This creates a closed-loop where the DUT's controller reacts to the emulated signals as if it were connected to real hardware.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Sensor emulation is a core technique within Hardware-in-the-Loop (HIL) validation. These related concepts define the broader ecosystem of tools, methods, and components required to build a complete, deterministic testing environment.
I/O Board & Signal Conditioning
An I/O (Input/Output) board is the critical hardware interface that bridges the digital real-time simulator with the analog world of the device under test (DUT). Signal conditioning circuits prepare these electrical signals for accurate exchange.
- I/O Board Functions: Provides channels for analog voltage (±10V), digital I/O, PWM, encoder inputs, and communication protocols (CAN, EtherCAT).
- Signal Conditioning Tasks:
- Amplification: Boosts low-voltage sensor signals (e.g., from mV to V range).
- Filtering: Removes high-frequency noise from signals.
- Isolation: Protects the simulator from voltage spikes or ground loops from the DUT.
- Linearization: Converts non-linear sensor outputs (e.g., from thermocouples).
Actuator Interface
An actuator interface is the complementary component to sensor emulation in a closed-loop HIL system. It measures the real-world command signals (outputs) from the device under test and feeds them back into the simulation as inputs.
- Primary Role: Closes the control loop. The simulator reads the DUT's commands to calculate the next state of the virtual plant.
- Measured Signals: Typically includes motor currents, PWM duty cycles, solenoid drive voltages, and digital command states.
- Example: A robotic controller commands a 12V, 2A signal to a virtual motor. The actuator interface measures this current, and the real-time simulation uses it to calculate the motor's new torque and position, which is then fed back via sensor emulation.
Fault Injection
Fault injection is a critical testing technique where deliberate, realistic faults are introduced into the HIL system to validate the robustness and diagnostic capabilities of the device under test. Sensor emulation hardware and software are key enablers of this.
- Types of Injected Faults:
- Sensor Faults: Short to ground/battery, open circuit, signal stuck at a value, excessive noise.
- Actuator Faults: Simulated motor stall, solenoid failure.
- Communication Faults: CAN bus errors, dropped Ethernet packets, corrupted messages.
- Objective: Verify that the embedded software correctly detects, reports, and enters a safe operational state (e.g., limp-home mode) when sensors fail.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us