{"id":2904,"date":"2026-10-31T21:36:20","date_gmt":"2026-10-31T21:36:20","guid":{"rendered":"https:\/\/raynovtechnology.com\/hil-test-bench-architecture\/"},"modified":"2026-11-01T10:29:54","modified_gmt":"2026-11-01T10:29:54","slug":"hil-test-bench-architecture","status":"publish","type":"post","link":"https:\/\/raynovtechnology.com\/fr\/hil-test-bench-architecture\/","title":{"rendered":"Bancs HIL : architecture, composants et mise en \u0153uvre"},"content":{"rendered":"<p>The software team has run thousands of simulations, the model is green, and the first time the real ECU is plugged into the bench its input reads 0.3 V too low and the control loop oscillates. Nothing was wrong with the model. The problem lived in the part that is not in the model: the harness, the conditioning, the ground return and the timing of the I\/O. Hardware-in-the-loop (HIL) testing exists precisely to put that real hardware in the loop early, while the rest of the system is still simulated.<\/p>\n<p>This guide walks through the architecture of a HIL bench, the role of each block, the timing constraints, and the steps that take a bench from concept to a tool the test team can trust.<\/p>\n<h2>1. What &#8220;in the loop&#8221; really means<\/h2>\n<p>In a HIL bench, the <strong>real ECU<\/strong> runs its production (or near-production) software. Everything the ECU would normally see around it, such as the plant, sensors, actuators and other ECUs, is replaced by a <strong>real-time simulation<\/strong> connected through real electrical interfaces. The ECU reads simulated sensor signals, computes, and drives outputs that the simulation reads back to update the plant. The loop is closed through physical wires.<\/p>\n<h3>1.1 HIL vs SIL: where the hardware starts<\/h3>\n<ul>\n<li><strong>SIL (software-in-the-loop)<\/strong>: the ECU software is compiled and run on a PC, together with the plant model. No ECU hardware, no electrical interface. Fast to iterate, good for logic and algorithms.<\/li>\n<li><strong>HIL (hardware-in-the-loop)<\/strong>: the ECU hardware is real; the plant is simulated in real time. It reveals what SIL cannot: input thresholds, filtering, drivers, diagnostics, start-up behaviour, timing.<\/li>\n<\/ul>\n<p>The two are complementary. Upstream, <strong>co-simulation<\/strong> using the FMI standard (Functional Mock-up Interface) lets models from different tools exchange data as FMUs in SIL; the same models can later be reused, after checking real-time feasibility, on the HIL target.<\/p>\n<h2>2. The reference chain, block by block<\/h2>\n<h3>2.1 Principle diagram (described)<\/h3>\n<p>From the simulation to the ECU, a typical HIL chain looks like this:<\/p>\n<ol>\n<li><strong>Real-time target<\/strong> running the plant model at a fixed step.<\/li>\n<li><strong>I\/O boards<\/strong>: analog outputs and inputs, digital I\/O, PWM generation and capture, and communication interfaces (CAN, CAN FD, LIN, Ethernet as needed).<\/li>\n<li><strong>Signal conditioning<\/strong>: level shifting, amplification, protection, and sometimes sensor emulation (resistive sensors, current loops).<\/li>\n<li><strong>Loads<\/strong>: real loads (the actual actuator, a valve, a motor) or simulated\/equivalent loads (resistors, electronic loads) so the ECU drivers see a realistic current.<\/li>\n<li><strong>Breakout and fault injection<\/strong>: access to each signal and the ability to disturb it.<\/li>\n<li><strong>Harness<\/strong>: the bench harness, ideally close to the vehicle harness in connectors and routing.<\/li>\n<li><strong>ECU under test<\/strong>, with its power supply and, when needed, a programmable supply to reproduce cranking or voltage drops.<\/li>\n<li><strong>Host PC<\/strong> for configuration, test automation, diagnostics and reporting.<\/li>\n<\/ol>\n<h3>2.2 Real or simulated loads?<\/h3>\n<p>Real loads give realistic electrical behaviour (inductance, inrush current, back-EMF) but cost space, heat and sometimes safety measures. Equivalent loads are compact and repeatable but must reproduce what the driver diagnostics check. A common compromise: real loads where the ECU diagnoses the load dynamically, resistive equivalents elsewhere.<\/p>\n<h3>2.3 Breakout and fault injection as building blocks<\/h3>\n<p>A <a href=\"https:\/\/raynovtechnology.com\/product-category\/breakout-boxes\/\">breakout box<\/a> between the harness and the ECU gives measurement access to every pin without cutting wires. A fault-injection matrix in the same position lets you create open circuits, shorts and resistive faults under sequencer control (<a href=\"\/fault-injection-harness-ecu\/\">Fault injection on harnesses and ECUs<\/a>). Designing both into the bench from the start avoids re-cabling later.<\/p>\n<h2>3. Real-time constraints<\/h2>\n<h3>3.1 Why a desktop OS cannot close the loop<\/h3>\n<p>A desktop operating system schedules tasks according to its own priorities. It can be pre-empted by updates, drivers or other software, so the time between two loop iterations is not guaranteed. For a control loop, that variation (jitter) is equivalent to a varying delay in the plant, which can change stability and results from one run to the next. The model loop must therefore run on a <strong>deterministic real-time target<\/strong>, and the PC is used for configuration and supervision only. The details of where a time base should live are covered in <a href=\"\/acquisition-timing-jitter-windows\/\">Acquisition timing and jitter<\/a>.<\/p>\n<h3>3.2 Worked example: choosing the model step (illustrative values)<\/h3>\n<p><em>Example:<\/em> the ECU reads a sensor every 1 ms and the plant has a dominant time constant of 20 ms. A model step of 1 ms gives 20 steps per time constant, which is usually enough for a first-order plant with a fixed-step solver (stiff or fast electrical models need a smaller step or FPGA-based simulation), and matches the ECU&#8217;s sampling. If the ECU must see a PWM signal at 10 kHz, the 1 ms model step is far too slow to generate it in software: the PWM must be produced or captured by <strong>dedicated hardware<\/strong> (timer or FPGA-based I\/O), with the model only updating the duty cycle.<\/p>\n<p><em>Example:<\/em> total loop latency = I\/O input conversion + model step + I\/O output update + conditioning delay. With an assumed 50 \u00b5s + 1 ms + 50 \u00b5s + 10 \u00b5s, the latency is about 1.11 ms. Compare this with the timing margin of the function under test before trusting the result.<\/p>\n<h2>4. Electrical points that make or break a bench<\/h2>\n<ul>\n<li><strong>Grounding<\/strong>: define a single reference strategy. The ECU&#8217;s sensor grounds, power ground and the I\/O board grounds must not create loops that shift low-level signals.<\/li>\n<li><strong>Voltage drop in the harness<\/strong>: <em>Example:<\/em> 3 m of 0.5 mm\u00b2 copper (about 36 m\u03a9\/m, so about 0.11 \u03a9 per conductor, 0.22 \u03a9 go and return) carrying 5 A drops about 1.1 V. If the ECU&#8217;s supply sense line is not routed like the vehicle&#8217;s, the ECU sees a different voltage than intended.<\/li>\n<li><strong>Signal ranges<\/strong>: I\/O boards often work at 0\u201310 V or \u00b110 V; vehicle signals do not. Conditioning must be designed per signal, not per board.<\/li>\n<li><strong>Protection<\/strong>: an ECU output connected directly to a bench input must not be able to damage it, including in fault-injection states.<\/li>\n<\/ul>\n<h2>5. Implementation steps<\/h2>\n<ol>\n<li><strong>Specification<\/strong>: list of ECU pins, signal types, ranges, loads, buses, test cases to run, and required timing.<\/li>\n<li><strong>Architecture<\/strong>: choose the real-time target, I\/O, conditioning, loads, breakout and fault-injection strategy.<\/li>\n<li><strong>Design and review<\/strong>: electrical schematics, harness drawings, mechanical layout, software structure.<\/li>\n<li><strong>Manufacturing and integration<\/strong>: cabinet, harness, conditioning, software.<\/li>\n<li><strong>Bench validation (before any campaign)<\/strong>: see section 6.<\/li>\n<li><strong>Acceptance<\/strong>: factory acceptance, then site acceptance and training (<a href=\"\/test-bench-qualification-fat-sat\/\">Qualifying a test bench before production (FAT\/SAT)<\/a>).<\/li>\n<li><strong>Maintenance<\/strong>: calibration of instruments, spare parts, software updates.<\/li>\n<\/ol>\n<p>This is the same sequence RAYNOV follows for its <a href=\"https:\/\/raynovtechnology.com\/custom-validation-system-delivery\/\">custom validation systems<\/a>: specification, architecture, design review, manufacturing, FAT, delivery with SAT and training, then maintenance.<\/p>\n<h2>6. Validate the bench before you validate the ECU<\/h2>\n<p>A HIL bench is itself a measuring instrument. Before the first campaign, prove that:<\/p>\n<ul>\n<li>every channel is wired to the right pin (pinout check, harness continuity);<\/li>\n<li>each analog output delivers the commanded value within the agreed tolerance at the ECU connector, not only at the board;<\/li>\n<li>each input measures correctly with a reference source;<\/li>\n<li>the loop runs at the specified step with no overruns over a long run;<\/li>\n<li>fault-injection states behave as designed and the neutral state is transparent;<\/li>\n<li>the instruments are calibrated, with valid certificates (RAYNOV works with accredited partner laboratories).<\/li>\n<\/ul>\n<p>Write these checks as an acceptance procedure with pass\/fail criteria. The difference between acceptance and qualification testing is explained in our article <a href=\"https:\/\/raynovtechnology.com\/atp-vs-qtp\/\">ATP vs QTP<\/a>, and our approach is described on the <a href=\"https:\/\/raynovtechnology.com\/atp-methodology\/\">ATP methodology<\/a> page.<\/p>\n<h2>7. Common mistakes<\/h2>\n<ul>\n<li>Running the model loop on a desktop OS &#8220;because it is fast enough&#8221;.<\/li>\n<li>Sizing I\/O by board count rather than by signal-by-signal conditioning.<\/li>\n<li>Using equivalent loads that do not satisfy the ECU&#8217;s open-load or short diagnostics, so the ECU raises faults on the bench that do not exist in the vehicle.<\/li>\n<li>Ignoring harness voltage drop and ground strategy.<\/li>\n<li>Adding breakout and fault injection after the bench is built.<\/li>\n<li>Starting test campaigns before the bench itself has been accepted.<\/li>\n<\/ul>\n<h2>8. Checklist<\/h2>\n<ul>\n<li>[ ] Pin list with signal type, range and load for every ECU pin<\/li>\n<li>[ ] Real-time target and model step justified against the fastest function<\/li>\n<li>[ ] Hardware I\/O for fast signals (PWM, encoders, buses)<\/li>\n<li>[ ] Conditioning and protection per signal<\/li>\n<li>[ ] Ground and supply sense strategy documented<\/li>\n<li>[ ] Breakout and fault injection designed in<\/li>\n<li>[ ] Bench acceptance procedure written and passed<\/li>\n<li>[ ] Calibration status of instruments recorded<\/li>\n<\/ul>\n<h2>Further reading<\/h2>\n<ul>\n<li>Modelica Association, <a href=\"https:\/\/fmi-standard.org\/\">FMI standard<\/a>: specification and tool support for co-simulation and model exchange.<\/li>\n<li>Wikipedia, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hardware-in-the-loop_simulation\">Hardware-in-the-loop simulation<\/a>: a neutral overview of the HIL principle.<\/li>\n<\/ul>\n<hr \/>\n<p><strong>Defining a HIL bench for your ECU?<\/strong> <a href=\"https:\/\/raynovtechnology.com\/contact\/\">Contact our engineering team<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The software team has run thousands of simulations, the model is green, and the first time the real ECU is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2937,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"normal-width-container","site-content-style":"unboxed","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[],"class_list":["post-2904","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-testing-guides"],"uagb_featured_image_src":{"full":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2.png",1200,675,false],"thumbnail":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2-150x150.png",150,150,true],"medium":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2-300x169.png",300,169,true],"medium_large":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2-768x432.png",768,432,true],"large":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2-1024x576.png",1024,576,true],"1536x1536":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2.png",1200,675,false],"2048x2048":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2.png",1200,675,false],"trp-custom-language-flag":["https:\/\/raynovtechnology.com\/wp-content\/uploads\/2026\/10\/G2-featured-v2-18x10.png",18,10,true]},"uagb_author_info":{"display_name":"Sphie-bot","author_link":"https:\/\/raynovtechnology.com\/fr\/author\/sphie-bot\/"},"uagb_comment_info":0,"uagb_excerpt":"The software team has run thousands of simulations, the model is green, and the first time the real ECU is [&hellip;]","_links":{"self":[{"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/posts\/2904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/comments?post=2904"}],"version-history":[{"count":1,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/posts\/2904\/revisions"}],"predecessor-version":[{"id":2918,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/posts\/2904\/revisions\/2918"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/media\/2937"}],"wp:attachment":[{"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/media?parent=2904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/categories?post=2904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raynovtechnology.com\/fr\/wp-json\/wp\/v2\/tags?post=2904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}