Documentation Home Page ARTEMiS Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Real-Time Simulation with ARTEMiS and RT-LAB

  • Once the model has run offline successfully, the next step is to modify the model to run it in real-time in RT-LAB.
  • The first step to convert this model to RT-LAB and exploit the parallel simulation capability of RT-LAB to convert the standard SPS Distributed Parameter Line to an ARTEMiS Distributed Parameter Line (DPL).
    • Both DPL models have the same underlying equations but the latter is designed to be used inside RT-LAB.
    • The ARTEMiS DPL model can be found in the ARTEMiS library under the ARTEMiS group.
    • When this DPL model is used, the resulting electric model is effectively decoupled into 2 different state-space systems containing topologically connected elements (RED and BLUE groups of the figure below).
  • RT-LAB will then compute these state-space systems in different cores/CPUs during real-time simulation.

Step by step:

  • Select all blocks located in the subnetwork 1 in the figure above and press Ctrl-G to create a new subsystem.
  • Move the ARTEMiS block inside the subsystem.
  • Rename this subsystem to SM_Subnetwork_1. The following figure displays the content of the SS_Subnetwork_1 subsystem.

  • Select all blocks located in the subnetwork 2 and press Ctrl-G to create a new subsystem.
  • Add an ARTEMiS Guide block inside the subsystem.
  • Rename this subsystem to SS_Subnetwork_2. The following figure illustrates the content of the SS_Subnetwork_2 subsystem.

  • Select the 3 remaining blocks, normally the two scopes blocks and the Mux1 block and press Ctrl-G to create a new subsystem.
  • Rename this subsystem to SC_Console.
  • Add the RT-LAB opcomm block between the inport blocks and the content of the subsystem. Don’t forget to set the number of inports of the opcomm blocks to 3. Refer to the RT-LAB user guide for more help.
  • The following figure illustrates the content of the SC_Console subsystem after applying the aforementioned modifications.

  • Modify the solver parameters of the model; select one of the fixed-step solvers, such as ode3, and change the fixed-step size to 50e-6.
  • Organize the top-level blocks according to the following figure. IMPORTANT: the powerGUI block MUST be at the top level and each subsystem MUST contain an ARTEMiS block


  • Save your model. 
  • Your model is now ready to be compiled with RT-LAB. Refer to the RT-LAB User Guide for more help. If you have set your model's sample time with a variable set in the workspace (ex: Ts), you should set the model initialization function with <Ts=50e-6;> in File->Model Properties→Callbacks→InitFcn



IMPORTANT NOTE: A single ARTEMiS block can also be put in the top-level of the RT-LAB ready model. At compilation time, RT-LAB will make a copy of this block with identical parameters in all separated subsystems.









OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323