{"id":285,"date":"2021-03-21T10:32:00","date_gmt":"2021-03-21T10:32:00","guid":{"rendered":"https:\/\/imperix.com\/doc\/?p=285"},"modified":"2026-05-05T07:34:33","modified_gmt":"2026-05-05T07:34:33","slug":"simulation-essentials-plecs","status":"publish","type":"post","link":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs","title":{"rendered":"Simulation essentials with PLECS"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 ez-toc-wrap-right-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Offline-simulation-overview\" >Offline simulation overview<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Fundamental-concepts\" >Fundamental concepts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Control-modeling\" >Control modeling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Plant-modeling\" >Plant modeling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Solver-configuration\" >Solver configuration<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Working-principle-of-the-main-blocks\" >Working principle of the main blocks<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#1-Configuration-block-CONFIG\" >1) Configuration block (CONFIG)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#2-Control-Task-Trigger-and-interrupt-frequency\" >2) Control Task Trigger and interrupt frequency<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#3-Analog-to-digital-converter-input-ADC\" >3) Analog-to-digital converter input (ADC)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#4-Pulse-width-modulators-xx-PWM\" >4) Pulse-width modulators (xx-PWM)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\/#Further-readings\" >Further readings<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">This note provides in-depth content for an accurate and efficient offline simulation of an imperix controller and the corresponding plant model using&nbsp;<a href=\"https:\/\/imperix.com\/software\/acg-sdk\/\">ACG SDK<\/a>&nbsp;on PLECS. Because the underlying mechanisms are identical to those used in real-time operation, this content is also valuable for understanding the controller\u2019s behavior during real-time execution. While run-time behavior and hardware-level functioning are detailed in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\" type=\"link\" id=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">PN259<\/a>, the current page focuses specifically on the simulation mode.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Recommended articles related to the ACG workflow are shown below. A series of video tutorials is also available with similar content, illustrating the Simulink workflow.<\/p>\n\n\n\n<style>\n  .tech-table {\n    border-collapse: collapse;\n    width: 100%;\n    max-width: 800px;\n    color: #000;\n  }\n\n  .tech-table th {\n    text-align: left;\n    font-weight: bold;\n    padding: 6px;\n    font-size: 18px;\n  }\n\n  \/* The first column header is empty in the image *\/\n  .tech-table th:f<style>\n  .tech-table {\n    border-collapse: collapse;\n    width: 100%;\n    max-width: 800px;\n    color: #000;\n  }\n\n  .tech-table th {\n    text-align: left;\n    font-weight: bold;\n    font-style: italic;\n    padding: 6px;\n    font-size: 18px;\n  }\n\n  .tech-table th:first-child {\n    width: 20%;\n  }\n\n  .tech-table td {\n    background-color: #f2f2f2;\n    padding: 8px;\n    vertical-align: top;\n    border: 4px solid white;\n  }\n\n  \/* UPDATED PN styling *\/\n  .pn-code {\n    color: #d32f2f;\n    display: inline;\n    margin-left: 6px;\n    font-weight: normal;\n    white-space: nowrap;\n  }\n\n  \/* UPDATED Video styling *\/\n  .video-code {\n    color: #d32f2f;\n    display: inline;\n    margin-left: 6px;\n    font-weight: normal;\n    white-space: nowrap;\n  }\n  .video-code::before {\n  content: \"\ud83c\udfac \";\n  }\n\n.cell-highlight {\n  outline: 3px solid #d32f2f;\n  outline-offset: -4px;\n}\n<\/style>\n\n<table class=\"tech-table\">\n  <thead>\n    <tr>\n      <th>Step<\/th>\n      <th>Documentation<\/th>\n      <th><\/th>\n      <th>Videos<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>1. Software installation<\/td>\n      <td colspan=\"2\">\n        Installation guide for the ACG SDK\n        <a href=\"https:\/\/imperix.com\/doc\/help\/installation-guide-acg-sdk\" class=\"pn-code\">PN133<\/a>      <\/td>\n      <td>\n        N\/A\n      <\/td>\n    <\/tr>\n\n    <tr>\n      <td>2. Getting started<\/td>\n      <td colspan=\"2\">\n        Getting started with the ACG SDK\n        <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-acg-sdk\" class=\"pn-code\">PN134<\/a> \n      <td>\n        Create the model\n        <a href=\"https:\/\/www.youtube.com\/watch?v=8TBpIigcN2w\" class=\"video-code\">Video 1<\/a>\n      <\/td>\n    <\/tr>\n\n    <tr>\n      <td>3. Running simulations<\/td>\n      <td>\n        Simulation essentials with Simulink\n        <a href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-simulink\" class=\"pn-code\">PN135<\/a> \n      <\/td>\n      <td class=\"cell-highlight\">\n        Simulation essentials with PLECS\n        <a href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\" class=\"pn-code\">PN137<\/a>       \n      <td>\n        Simulate it\n        <a href=\"https:\/\/www.youtube.com\/watch?v=HklMDtAADUU\" class=\"video-code\">Video 2<\/a>\n      <\/td>\n    <\/tr>\n\n    <tr>\n      <td>4. Device programming<\/td>\n      <td colspan=\"2\">\n        Programming and operating imperix controllers\n        <a href=\"https:\/\/imperix.com\/doc\/help\/programming-imperix-controllers\" class=\"pn-code\">PN138<\/a> \n      <\/td>\n      <td rowspan=\"2\">\n        Generate code\n        <a href=\"https:\/\/www.youtube.com\/watch?v=6dGeExgX-rE\" class=\"video-code\">Video 3<\/a>\n      <\/td>\n    <\/tr>\n\n    <tr>\n      <td>5. Monitoring<\/td>\n      <td colspan=\"2\">\n        Cockpit user guide\n        <a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide\" class=\"pn-code\">PN300<\/a>\n      <\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Offline-simulation-overview\"><\/span>Offline simulation overview<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As explained in <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-acg-sdk\">PN134<\/a>, offline simulation is an optional but highly valuable step in control code development that enables the validation of control logic directly on a PC before deployment. This process relies on simulation models of both the <strong>controller<\/strong> and the <strong>plant <\/strong>that faithfully reproduce real-world behavior using specialized blocks from the <strong>Control<\/strong> and <strong>Power<\/strong> libraries included in the <strong>ACG SDK<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same PLECS model serves both simulation and code generation purposes, with the following differences, as further explained in <a href=\"https:\/\/imperix.com\/doc\/help\/programming-imperix-controllers\" type=\"post\" id=\"13383\">PN138<\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In <strong>offline simulation<\/strong>, both the Control and Plant subsystems are simulated.<\/li>\n\n\n\n<li>In <strong>code generation<\/strong> mode (Build process), only the Control subsystem is compiled, and the Plant subsystem is ignored.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"691\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Overall_model.png\" alt=\"\" class=\"wp-image-43664\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Overall_model.png 973w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Overall_model-300x213.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Overall_model-768x545.png 768w\" sizes=\"auto, (max-width: 973px) 100vw, 973px\" \/><figcaption class=\"wp-element-caption\">Usual structure of a PLECS model with (left) control implementation and (right) plant simulation model<\/figcaption><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"258\" height=\"291\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Library-browser.png\" alt=\"\" class=\"wp-image-43668\"\/><figcaption class=\"wp-element-caption\">PLECS Library Browser showing imperix Control and Power libraries<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Fundamental-concepts\"><\/span>Fundamental concepts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To model control and plant variables, the following fundamental concepts are used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Plant modeling (continuous domain)<\/strong>: <span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">Plant quantities are generally modeled with\u00a0<strong>continuous\u00a0signals<\/strong>, as it is usually more efficient to simulate physical systems with wide-ranging dynamics.<\/span> To support this, the model must be simulated using a <strong>variable-step solver<\/strong>.<\/li>\n\n\n\n<li><strong>Control modeling (discrete domain)<\/strong>: The&nbsp;<strong>control&nbsp;<\/strong>algorithm is modeled using <strong>discrete&nbsp;signals<\/strong>, sampled at the hardware's interrupt frequency and shifted by the sampling phase.\n<ul class=\"wp-block-list\">\n<li>The Controller subsystem must therefore be configured as an <em>Atomic subsystem<\/em>, as this ensures its entire content executes as a single block at a common sample time (the interrupt period). The sample time configuration is explained later on this page.<\/li>\n\n\n\n<li>While this typically requires an algorithm implemented in the discrete domain (\\(z\\) domain), PLECS can automatically discretize continuous transfer functions. Consequently, both \\(z\\) and \\(s\\) domains can be used (and even coexist within the same controller subsystem). For instance, the following two models have strictly identical behaviors:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"177\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-36.png\" alt=\"Continuous control blocks\" class=\"wp-image-293\" title=\"Product notes &gt; PN137: Simulation essentials with PLECS &gt; PLECS_continuous.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-36.png 397w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-36-300x134.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><figcaption class=\"wp-element-caption\">Use of a continuous transfer function, which is automatically discretized.<\/figcaption><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"177\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-37.png\" alt=\"Discrete control blocks\" class=\"wp-image-294\" title=\"Product notes &gt; PN137: Simulation essentials with PLECS &gt; PLECS_discrete.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-37.png 400w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-37-300x133.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption class=\"wp-element-caption\">Use of a discrete transfer function.<\/figcaption><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Control-modeling\"><\/span>Control modeling<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An accurate representation of the physical controller is ensured through careful modeling of the parameters integrated into the simulation models of the peripheral blocks, as presented in the <a href=\"#h-working-principle-of-the-main-blocks\" type=\"internal\" id=\"#h-working-principle-of-the-main-blocks\">next section<\/a>. These parameters include the interrupt frequency, sampling phases, execution delays, and driver latencies. Specifically, the following features are modeled:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sampling<\/strong> (CONFIG and ADC blocks): Both the sampling frequency and the sampling phases are accounted for. These parameters are defined in the CONFIG block. The sampling phase is imposed by the <em>Control Task Trigger<\/em> block, as detailed <a href=\"#h-2-control-task-trigger\" type=\"internal\" id=\"#h-2-control-task-trigger\">later<\/a>.<\/li>\n\n\n\n<li><strong>Algorithm execution<\/strong> (CONFIG block): The delay induced by the execution of the control algorithm is modeled, ensuring that the overall controller delay is correctly represented. This value can be specified in the <em>Cycle delay<\/em> parameter of the CONFIG block. To determine the actual execution time of a specific algorithm, the code should be executed on a controller; the execution time corresponds to the <em>Cycle delay<\/em> displayed in the <a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide#target-timings\">Timings tab<\/a> of Cockpit.<\/li>\n\n\n\n<li><strong>PWM generation<\/strong> (PWM block): The frequency, phase, and shape of the PWM carrier are accurately modeled, along with the update instants for duty-cycle and phase parameters (occurring at the carrier\u2019s zero and\/or maximum). Optionally, dead-time can also be simulated.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"400\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/control-library.png\" alt=\"\" class=\"wp-image-43699\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/control-library.png 728w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/control-library-300x165.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><figcaption class=\"wp-element-caption\">Main blocks of the imperix Control library on PLECS<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Plant-modeling\"><\/span>Plant modeling<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To test the developed control logic during offline simulation, a simulation model of the controlled plant is required. This model can be built using any PLECS circuit. To assist customers in deriving a model of their imperix power hardware, the <strong>Power library<\/strong> provides simulation models for all imperix power products. More information about that library is given in <a href=\"https:\/\/imperix.com\/doc\/help\/getting-started-with-imperix-power-library\">Getting started with Imperix Power library<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"297\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/power-library.png\" alt=\"\" class=\"wp-image-43698\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/power-library.png 532w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/power-library-300x167.png 300w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><figcaption class=\"wp-element-caption\">Blocks of the imperix Power library on PLECS<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Solver-configuration\"><\/span>Solver configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The variable-step solver used to run the offline simulation of both the Controller and Plant subsystems can be configured to manage time-step calculations and simulation accuracy. These parameters are accessible via the Simulation Parameters dialog (Ctrl+E).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"509\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/solver-configuration.png\" alt=\"\" class=\"wp-image-43700\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/solver-configuration.png 492w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/solver-configuration-290x300.png 290w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><figcaption class=\"wp-element-caption\">Solver configuration options on the Simulation Parameters window<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">In most cases, the default settings are sufficient to simulate the model accurately. Specifically, the automatic solver selection (stiff vs. non-stiff) is typically the best choice, as it is efficient for non-stiff systems, but switches automatically to a stiff solver if the system becomes stiff during simulation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In most cases, the default values are sufficient. However, in some rare scenarios, manual adjustments may be necessary for the following reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Capturing fast transients: If rapid switching events are missed, lowering the <em>Relative tolerance<\/em> or the <em>Max step size<\/em> will force the solver to use higher precision and reduce the step size.<\/li>\n\n\n\n<li>Optimizing simulation speed: For long-duration simulations where high precision is less critical, increasing the <em>Relative tolerance<\/em> allows the solver to take larger steps, thereby reducing total simulation time. Obviously, this must be made carefully, since it may cause the solver to skip over critical high-frequency dynamics (e.g., PWM switching instants), resulting in significant inaccuracies in the simulated behavior.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-working-principle-of-the-main-blocks\"><span class=\"ez-toc-section\" id=\"Working-principle-of-the-main-blocks\"><\/span>Working principle of the main blocks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The four fundamental blocks are the 1) CONFIF, 2) Control Task Trigger, 3) ADC, and 4) PWM blocks. Most control implementations require only these four blocks, as in the standard configuration shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"359\" height=\"139\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-345.png\" alt=\"\" class=\"wp-image-43703\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-345.png 359w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-345-300x116.png 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><figcaption class=\"wp-element-caption\">The four fundamental library blocks for control implementation<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-configuration-block-config\"><span class=\"ez-toc-section\" id=\"1-Configuration-block-CONFIG\"><\/span>1) Configuration block (CONFIG)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/imperix.com\/doc\/software\/config-control-task-configuration\" type=\"post\" id=\"1564\"><strong>CONFIG block<\/strong><\/a> defines the frequency of the main clock source (\\(F_{\\text{CLK0}}\\)) and manages the sampling and interrupt execution. This clock source \\(F_{\\text{CLK0}}\\) serves as the master time reference for various peripherals, such as the ADC or PWM modules, as further explained in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\" type=\"link\" id=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">PN259<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Specifically, the CONFIG block is used to configure the following parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Base clock frequency <\/strong>(\\(F_{\\text{CLK0}}\\)): The primary timing reference for the system.<\/li>\n\n\n\n<li><strong>Sampling phase (\\(\\phi_s\\)):<\/strong> Shifts the sampling instant within the \\(F_{\\text{CLK0}}\\) period.<\/li>\n\n\n\n<li><strong>Interrupt postscaler (\\(k_{\\text{post}}\\)):<\/strong> Optionally decimates the interrupt execution frequency.<\/li>\n\n\n\n<li><strong>Cycle delay:<\/strong> Represents the specific computation time required by the control algorithm.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The resulting hardware-level operational parameters are defined as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sampling clock:<\/strong> Operates at frequency \\(F_{\\text{SCLK}} = F_{\\text{CLK0}}\\) with a sampling phase of \\(\\phi_s\\).<\/li>\n\n\n\n<li><strong>CPU interrupt:<\/strong> Triggered at frequency \\(F_{\\text{CPU}} = F_{\\text{CLK0}}\/k_{\\text{post}}\\) with a phase of \\(\\phi_s\\).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In the simulation environment, these hardware parameters are modeled with the following configuration signals (brown dashed wires):<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Base clock CLK0<\/strong> (label \u2461): Modeled using a sawtooth generator. This signal is output via the PWM port and wired to the PWM modulators.<\/li>\n\n\n\n<li><strong>Sampling clock <\/strong>(label \u2462): Generated from CLK0, shifted by the sampling phase parameter. This output is intended to be connected to ADC blocks to specify the exact sampling instants.<\/li>\n\n\n\n<li><strong>Control task trigger signal <\/strong>(label \u2460): Generated from the sampling clock and delayed by the <em>Cycle delay<\/em> parameter. This signal represents the \"end of interrupt\" and must be connected to the <strong>Control Task Trigger<\/strong>. Including the <em>Cycle delay<\/em> allows the simulation to accurately model latencies caused by interrupt execution time and various read\/write delays, as explained in the following section.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"173\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/config-block-content-1.png\" alt=\"\" class=\"wp-image-43706\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/config-block-content-1.png 620w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/config-block-content-1-300x84.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><figcaption class=\"wp-element-caption\">Simulation model of the CONFIG block<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"360\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_block_signals-2.jpg\" alt=\"\" class=\"wp-image-43759\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_block_signals-2.jpg 398w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_block_signals-2-300x271.jpg 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><figcaption class=\"wp-element-caption\">Signals generated by the CONFIG block in simulation mode<\/figcaption><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-total-cycle-delay\">Cycle delay<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>Cycle delay<\/em> specified in the CONFIG block dialog is a parameter used only for simulation. It is introduced to simulate the delay from the moment the ADCs are sampled to the moment the calculated duty-cycles are propagated to the FPGA PWM management. It takes into account the ADC sampling time (e.g. 2 \u00b5s on a B-Box RCP), the control algorithm execution time, and the FPGA read and write transfer time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The total cycle delay is displayed in the <a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide#target-timings\">Timings tab<\/a> of Cockpit when a code is running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-control-task-trigger\"><span class=\"ez-toc-section\" id=\"2-Control-Task-Trigger-and-interrupt-frequency\"><\/span>2) Control Task Trigger and interrupt frequency<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Control Task Trigger is a mandatory block that must be connected to the Task output of the CONFIG block. It defines when the control task starts and therefore ensures that the sampling and interrupt phases are modeled correctly.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"198\" height=\"94\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-346.png\" alt=\"\" class=\"wp-image-43787\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The discretization period (i.e., the interrupt frequency) is defined in the <em>Scheduling tab<\/em> of the <em>Coder Options<\/em> dialog. For correct modeling of the interrupt execution, this parameter must match the parameters defined in the CONFIG block, as there is no automatic transfer of configuration parameters between them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure that the configuration remains consistent, it is recommended to use model variables defined in the <em>Initialization <\/em>tab of the <em>Simulation Parameters<\/em> dialog, as shown below. This approach is used in the template file provided at: <code>C:\\imperix\\BB3_ACG_SDK\\plecs\\imperix_template.plecs<\/code>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"394\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/variable_init.png\" alt=\"\" class=\"wp-image-43786\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/variable_init.png 446w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/variable_init-300x265.png 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><figcaption class=\"wp-element-caption\">Initialization commands of the model defining model-level variables<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">These variables are then referenced both in the <strong>CONFIG<\/strong> block and in the <strong>Coder Options<\/strong> dialog, as illustrated below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"402\" height=\"436\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_dialog.png\" alt=\"\" class=\"wp-image-43730\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_dialog.png 402w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Config_dialog-277x300.png 277w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><figcaption class=\"wp-element-caption\">Configuration dialog of the CONFIG block setting CLK0 frequency and postcaler parameters<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"288\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Coder-dialog.png\" alt=\"\" class=\"wp-image-43731\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Coder-dialog.png 639w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Coder-dialog-300x135.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><figcaption class=\"wp-element-caption\">Coder Options dialog setting the discretization step size of the \"Controller\" subsystem<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Finally, setting the Sample time of the Controller atomic subsystem to auto ensures that the subsystem runs at the rate specified in the Coder Options dialog.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"342\" height=\"330\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Atomic-dialog.png\" alt=\"\" class=\"wp-image-43732\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Atomic-dialog.png 342w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/Atomic-dialog-300x289.png 300w\" sizes=\"auto, (max-width: 342px) 100vw, 342px\" \/><figcaption class=\"wp-element-caption\">Configuration dialog of the \"Controller\" atomic subsystem<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-analog-to-digital-converter-input-adc\"><span class=\"ez-toc-section\" id=\"3-Analog-to-digital-converter-input-ADC\"><\/span>3) Analog-to-digital converter input (ADC)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/imperix.com\/doc\/software\/analog-data-acquisition\" type=\"post\" id=\"1577\">ADC block<\/a> retrieves the sampled value of a given ADC channel and converts it to its value in physical units. In simulation mode, the input signal is typically a continuous signal from the plant model representing a measurement value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The simulation model of the ADC block simply sample-and-holds the input signal on the rising edges of the ADC trigger input. If <em>Simulate sensor(s) sensitivity(ies)<\/em> is enabled, the sampled signal is scaled according to the sensor sensitivity parameter to obtain its value in physical units.<\/p>\n\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"474\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-38-1024x474.png\" alt=\"ADC block content\" class=\"wp-image-295\" style=\"aspect-ratio:2.1604186325812815;width:423px;height:auto\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-38-1024x474.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-38-300x139.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-38-768x355.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-38.png 1265w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Simulation model of the ADC block<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Regarding the scaling of measurements in the Plant and their acquisition in the Controller, there are two approaches:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Sensor sensitivity is not modeled<\/strong>: the sensor in the Plant outputs the measurement in its physical unit (e.g., V or A). In this case, the ADC block does not need to apply any scaling to retrieve the measured value, and the <em>Simulate sensor(s) sensitivity(ies)<\/em> option should be disabled. This approach is simpler and is useful for algorithm development or early-stage testing.<\/li>\n\n\n\n<li><strong>Sensor sensitivity is modeled<\/strong>: the sensor in the Plant outputs the measurement scaled by its sensitivity. In this case, the ADC block must apply the same scaling to retrieve the measured value, and the <em>Simulate sensor(s) sensitivity(ies)<\/em> option should be enabled. This approach is useful, for example, to validate that measurements remain within the controller's analog input range, and is particularly important for offline validation in HIL testing to ensure that the analog signal scaling is correct.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-pulse-width-modulators-xx-pwm\"><span class=\"ez-toc-section\" id=\"4-Pulse-width-modulators-xx-PWM\"><\/span>4) Pulse-width modulators (xx-PWM)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Various types of pulse-width modulators exist within the Imperix control library. Among them, the carrier-based PWM (<a href=\"https:\/\/imperix.com\/doc\/software\/carrier-based-pwm\" type=\"post\" id=\"1609\">CB-PWM<\/a>) block is the most commonly used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The CB-PWM block configures the corresponding FPGA peripheral and generates PWM signals according to the duty-cycle and carrier phase parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the simulation model, the clock signal \u2460 connected to the clock input serves as a time reference to generate the carrier signal \u2461. In parallel, the duty-cycle value \u2462 is sampled once or twice per switching period (depending on the update-rate parameter), giving the signal \u2463 that is compared with the carrier to produce the output PWM signal \u2464. If <em>Simulate dead time<\/em> is selected in the <em>Dead time simulation<\/em> mask parameter, a dead time is inserted between the complementary signals.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"394\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new-1024x394.png\" alt=\"\" class=\"wp-image-43788\" style=\"aspect-ratio:2.599102120852469;width:562px;height:auto\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new-1024x394.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new-300x115.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new-768x295.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new-1536x590.png 1536w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/pwm_new.png 1897w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Simulation model of the CB-PWM block<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"869\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-40-1024x869.png\" alt=\"PWM modulator signals\" class=\"wp-image-297\" style=\"aspect-ratio:1.1783917834499216;width:409px;height:auto\" title=\"Product notes &gt; PN137: Simulation essentials with PLECS &gt; image-20200710-121303.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-40-1024x869.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-40-300x255.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-40-768x652.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-40.png 1267w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Main signals of the CB-PWM block<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Further-readings\"><\/span>Further readings<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/programming-imperix-controllers\">Programming and operating imperix controllers (PN138)<\/a> is a guide for deploying code onto imperix controllers<\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/cockpit-user-guide\">Cockpit user guide (PN300)<\/a> gives an overview of the tools provided by Cockpit and how to use them<\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/doc\/help\/going-further-with-acg-sdk\/speeding-up-simulink-simulation\">Speeding up simulation with Simulink (PN131)<\/a> gives practical tips and tricks to speed up Simulink simulation<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This note provides in-depth content for an accurate and efficient offline simulation of an imperix controller and the corresponding plant model using&nbsp;ACG SDK&nbsp;on PLECS. Because&#8230;<\/p>\n","protected":false},"author":7,"featured_media":3008,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[12,3],"tags":[],"software-environments":[104],"provided-results":[],"related-products":[50,31,32,92,166],"guidedreadings":[],"tutorials":[],"user-manuals":[177],"coauthors":[71],"class_list":["post-285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-getting-started-acg-sdk","category-help","software-environments-plecs","related-products-acg-sdk","related-products-b-board-pro","related-products-b-box-rcp","related-products-b-box-micro","related-products-b-box-rcp-3-0","user-manuals-getting-started-with-acg-sdk"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Simulation essentials with PLECS - imperix<\/title>\n<meta name=\"description\" content=\"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simulation essentials with PLECS - imperix\" \/>\n<meta property=\"og:description\" content=\"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs\" \/>\n<meta property=\"og:site_name\" content=\"imperix\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-21T10:32:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-05T07:34:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png\" \/>\n\t<meta property=\"og:image:width\" content=\"450\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Lovejoy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Lovejoy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs\"},\"author\":{\"name\":\"St\u00e9phane Lovejoy\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/97bde5cc1c65c92e731d67c17b8c50ae\"},\"headline\":\"Simulation essentials with PLECS\",\"datePublished\":\"2021-03-21T10:32:00+00:00\",\"dateModified\":\"2026-05-05T07:34:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs\"},\"wordCount\":2077,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN137.png\",\"articleSection\":[\"Getting started with ACG SDK\",\"Product notes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs\",\"name\":\"Simulation essentials with PLECS - imperix\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN137.png\",\"datePublished\":\"2021-03-21T10:32:00+00:00\",\"dateModified\":\"2026-05-05T07:34:33+00:00\",\"description\":\"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#primaryimage\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN137.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN137.png\",\"width\":450,\"height\":300,\"caption\":\"PWM modulator block content\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/simulation-essentials-plecs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge base\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product notes\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/category\\\/help\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Simulation essentials with PLECS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"name\":\"imperix\",\"description\":\"power electronics\",\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/imperix.com\\\/doc\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\",\"name\":\"imperix\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"width\":350,\"height\":120,\"caption\":\"imperix\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/97bde5cc1c65c92e731d67c17b8c50ae\",\"name\":\"St\u00e9phane Lovejoy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=gb2ee28b23ed78deae9c8f90757fee6d3\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=g\",\"caption\":\"St\u00e9phane Lovejoy\"},\"description\":\"St\u00e9phane is a senior software development engineer at imperix. He authored and co-authored numerous software reference articles and documentation, notably related to Cockpit.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/st\u00e9phane-lovejoy-40721794\\\/\"],\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/author\\\/lovejoy\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Simulation essentials with PLECS - imperix","description":"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs","og_locale":"en_US","og_type":"article","og_title":"Simulation essentials with PLECS - imperix","og_description":"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.","og_url":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs","og_site_name":"imperix","article_published_time":"2021-03-21T10:32:00+00:00","article_modified_time":"2026-05-05T07:34:33+00:00","og_image":[{"width":450,"height":300,"url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png","type":"image\/png"}],"author":"St\u00e9phane Lovejoy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Lovejoy","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#article","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs"},"author":{"name":"St\u00e9phane Lovejoy","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/97bde5cc1c65c92e731d67c17b8c50ae"},"headline":"Simulation essentials with PLECS","datePublished":"2021-03-21T10:32:00+00:00","dateModified":"2026-05-05T07:34:33+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs"},"wordCount":2077,"commentCount":0,"publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png","articleSection":["Getting started with ACG SDK","Product notes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs","url":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs","name":"Simulation essentials with PLECS - imperix","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#primaryimage"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png","datePublished":"2021-03-21T10:32:00+00:00","dateModified":"2026-05-05T07:34:33+00:00","description":"This notes describes the main principles of the simulation models included inside the ACG SDK library for PLECS.","breadcrumb":{"@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#primaryimage","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN137.png","width":450,"height":300,"caption":"PWM modulator block content"},{"@type":"BreadcrumbList","@id":"https:\/\/imperix.com\/doc\/help\/simulation-essentials-plecs#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge base","item":"https:\/\/imperix.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Product notes","item":"https:\/\/imperix.com\/doc\/category\/help"},{"@type":"ListItem","position":3,"name":"Simulation essentials with PLECS"}]},{"@type":"WebSite","@id":"https:\/\/imperix.com\/doc\/#website","url":"https:\/\/imperix.com\/doc\/","name":"imperix","description":"power electronics","publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/imperix.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/imperix.com\/doc\/#organization","name":"imperix","url":"https:\/\/imperix.com\/doc\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","width":350,"height":120,"caption":"imperix"},"image":{"@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/97bde5cc1c65c92e731d67c17b8c50ae","name":"St\u00e9phane Lovejoy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=gb2ee28b23ed78deae9c8f90757fee6d3","url":"https:\/\/secure.gravatar.com\/avatar\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4f3db3acdae30f99346e7c5cb547260bcc5e9ff874422520d317e376c001a000?s=96&d=mm&r=g","caption":"St\u00e9phane Lovejoy"},"description":"St\u00e9phane is a senior software development engineer at imperix. He authored and co-authored numerous software reference articles and documentation, notably related to Cockpit.","sameAs":["https:\/\/www.linkedin.com\/in\/st\u00e9phane-lovejoy-40721794\/"],"url":"https:\/\/imperix.com\/doc\/author\/lovejoy"}]}},"_links":{"self":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":57,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":45496,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/285\/revisions\/45496"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media\/3008"}],"wp:attachment":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tags?post=285"},{"taxonomy":"software-environments","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/software-environments?post=285"},{"taxonomy":"provided-results","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/provided-results?post=285"},{"taxonomy":"related-products","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/related-products?post=285"},{"taxonomy":"guidedreadings","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/guidedreadings?post=285"},{"taxonomy":"tutorials","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tutorials?post=285"},{"taxonomy":"user-manuals","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/user-manuals?post=285"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/coauthors?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}