# CM4SL

**URL:** https://forums.ipg-automotive.com/c/coding-integration/cm4sl/6.md

[Latest](https://forums.ipg-automotive.com/latest.md) · [Categories](https://forums.ipg-automotive.com/categories.md) · [Tags](https://forums.ipg-automotive.com/tags.md)

---

## [About the CM4SL category](https://forums.ipg-automotive.com/t/about-the-cm4sl-category/12)

<div class="topic-metadata">

**Author:** [@david.barry](https://forums.ipg-automotive.com/u/david.barry)\
**Replies:** 0

</div>

A place to discuss CarMaker for Simulink

---

## [Issues with OpenDRIVE file in CarMaker (broken connections & jitter)](https://forums.ipg-automotive.com/t/issues-with-opendrive-file-in-carmaker-broken-connections-jitter/2103)

<div class="topic-metadata">

**Author:** [@ShawnHuang](https://forums.ipg-automotive.com/u/ShawnHuang)\
**Replies:** 0\
**Last updated:** [14 July 2026 10:10 UTC](https://forums.ipg-automotive.com/t/issues-with-opendrive-file-in-carmaker-broken-connections-jitter/2103 "2026-07-14T10:10:35Z")

</div>

Hello, NW.xodr(two links with junction) jitter.video I am currently working on converting map data into the OpenDRIVE format. The files have successfully passed validation using both Agility3’s validator and qc‑opendr…

---

## [Python API with CM4SL model](https://forums.ipg-automotive.com/t/python-api-with-cm4sl-model/2015)

<div class="topic-metadata">

**Author:** [@Dekka](https://forums.ipg-automotive.com/u/Dekka)\
**Replies:** 2\
**Last updated:** [2 March 2026 12:25 UTC](https://forums.ipg-automotive.com/t/python-api-with-cm4sl-model/2015 "2026-03-02T12:25:31Z")

</div>

Hello! I have a simulink model for a power train system, and I am trying to automate my simulations by using the python API provided. There is a SimControlBatchCM4SL, so I would imagine it would be possible to run this m…

---

## [Matlab automated testing](https://forums.ipg-automotive.com/t/matlab-automated-testing/2025)

<div class="topic-metadata">

**Author:** [@Gabriele](https://forums.ipg-automotive.com/u/Gabriele)\
**Replies:** 1\
**Last updated:** [4 February 2026 16:29 UTC](https://forums.ipg-automotive.com/t/matlab-automated-testing/2025 "2026-02-04T16:29:33Z")

</div>

Hello guys, I’m trying to setup a matlab script that automatically load, run and stop the CM4S simulation. After reading the ProgrammersGuide, i think that all can be done with the following few line of code: %% Init …

---

## [Custom battery on Simulink](https://forums.ipg-automotive.com/t/custom-battery-on-simulink/89)

<div class="topic-metadata">

**Author:** [@IMSother](https://forums.ipg-automotive.com/u/IMSother)\
**Replies:** 4\
**Last updated:** [24 June 2025 15:06 UTC](https://forums.ipg-automotive.com/t/custom-battery-on-simulink/89 "2025-06-24T15:06:45Z")

</div>

Hi, I would like to use a custom battery model on my CM4SM project, but i dont know where is the right place to put it. I tried just put it on simulink and use a CM Write Dict block to replace the values from CM but that…

---

## [Using cm4sl with CMRosIF](https://forums.ipg-automotive.com/t/using-cm4sl-with-cmrosif/1753)

<div class="topic-metadata">

**Author:** [@geantae](https://forums.ipg-automotive.com/u/geantae)\
**Replies:** 1\
**Last updated:** [5 April 2025 16:10 UTC](https://forums.ipg-automotive.com/t/using-cm4sl-with-cmrosif/1753 "2025-04-05T16:10:05Z")

</div>

Hi all, I am using ROS2 Humble, CarMaker 14.0, and MATLAB 2023b. I want to use CarMaker with Simulink through cm4sl while also utilizing CarMaker with CMRosIF functionality. However, I am facing many issues and have not…

---

## [Passing LiDAR and Camera RSI data to ROS framework over CM4SL](https://forums.ipg-automotive.com/t/passing-lidar-and-camera-rsi-data-to-ros-framework-over-cm4sl/1677)

<div class="topic-metadata">

**Author:** [@MFEdriverless](https://forums.ipg-automotive.com/u/MFEdriverless)\
**Replies:** 0\
**Last updated:** [27 February 2025 21:48 UTC](https://forums.ipg-automotive.com/t/passing-lidar-and-camera-rsi-data-to-ros-framework-over-cm4sl/1677 "2025-02-27T21:48:55Z")

</div>

Hello! We’re looking to use CM4SL to simulate an autonomous car’s perception and control pipelines. Our hope is to pass our RSI data from our CM4SL node over to the rest of our ROS2 framework using the included sensor l…

---

## [Error upon running unmodified TorqueVect.mdl - Formula Carmaker](https://forums.ipg-automotive.com/t/error-upon-running-unmodified-torquevect-mdl-formula-carmaker/1214)

<div class="topic-metadata">

**Author:** [@egywc1](https://forums.ipg-automotive.com/u/egywc1)\
**Replies:** 0\
**Last updated:** [25 November 2024 18:03 UTC](https://forums.ipg-automotive.com/t/error-upon-running-unmodified-torquevect-mdl-formula-carmaker/1214 "2024-11-25T18:03:50Z")

</div>

I’ve been looking into integrating our Torque Vectoring model into IPG to run some lap time simulations, and I initially decided I would try to use the OpenXWD format and Simulink. Upon further reading, it seems like I …

---

## [Using OpenXWD causes the car to not pitch at all during acceleration](https://forums.ipg-automotive.com/t/using-openxwd-causes-the-car-to-not-pitch-at-all-during-acceleration/1159)

<div class="topic-metadata">

**Author:** [@JacekJagosz](https://forums.ipg-automotive.com/u/JacekJagosz)\
**Replies:** 2\
**Last updated:** [24 October 2024 23:06 UTC](https://forums.ipg-automotive.com/t/using-openxwd-causes-the-car-to-not-pitch-at-all-during-acceleration/1159 "2024-10-24T23:06:08Z")

</div>

The OpenXWD example vehicle included in Formula Carmaker doesn’t change its pitch at all during acceleration, it stays completely flat, while it does pitch forwards just fine under braking. I managed to trace it back to…

---

## [CM4SL numerical time integration settings](https://forums.ipg-automotive.com/t/cm4sl-numerical-time-integration-settings/1164)

<div class="topic-metadata">

**Author:** [@dimosthenis.floros](https://forums.ipg-automotive.com/u/dimosthenis.floros)\
**Replies:** 0\
**Last updated:** [23 October 2024 09:02 UTC](https://forums.ipg-automotive.com/t/cm4sl-numerical-time-integration-settings/1164 "2024-10-23T09:02:03Z")

</div>

Hello, I have developed a CM model, which uses various plug-ins and a brake system model FMU. I have developed the exact same model in CM4SL. The responses from the two environments (CM and CM4SL) are very similar. I wo…

---

## [Changing OpenXWD calculation frequency?](https://forums.ipg-automotive.com/t/changing-openxwd-calculation-frequency/1122)

<div class="topic-metadata">

**Author:** [@JacekJagosz](https://forums.ipg-automotive.com/u/JacekJagosz)\
**Replies:** 1\
**Last updated:** [4 September 2024 00:41 UTC](https://forums.ipg-automotive.com/t/changing-openxwd-calculation-frequency/1122 "2024-09-04T00:41:12Z")

</div>

TLDR: Is it possible to change the frequency of how often the powertrain simulation is being run inside Simulink? We are using Carmaker to develop torque vectoring for our electric car. After prototyping some algorithms…

---

## [MPC: Controlling Plant from Simulink](https://forums.ipg-automotive.com/t/mpc-controlling-plant-from-simulink/1031)

<div class="topic-metadata">

**Author:** [@fahadjudoon](https://forums.ipg-automotive.com/u/fahadjudoon)\
**Replies:** 3\
**Last updated:** [5 August 2024 18:57 UTC](https://forums.ipg-automotive.com/t/mpc-controlling-plant-from-simulink/1031 "2024-08-05T18:57:24Z")

</div>

I am confuse about how the control from Simulink side works. As it can be seen that only Vehicle Gas and Steering Angle signal are coming from MPC controller other signals remains unchanged. My confusion is that when i r…

---

## [Problems with CM dict](https://forums.ipg-automotive.com/t/problems-with-cm-dict/1039)

<div class="topic-metadata">

**Author:** [@Kim](https://forums.ipg-automotive.com/u/Kim)\
**Replies:** 1\
**Last updated:** [5 August 2024 04:37 UTC](https://forums.ipg-automotive.com/t/problems-with-cm-dict/1039 "2024-08-05T04:37:10Z")

</div>

Hello dear IPG Forum members, I am doing research related to vehicle motion control. While using CarMaker, we consider the yaw rate value as a measurable value as the state value of the vehicle, and use it by loading t…

---

## [CM4SL Desired Acceleration instead of VC.Gas](https://forums.ipg-automotive.com/t/cm4sl-desired-acceleration-instead-of-vc-gas/952)

<div class="topic-metadata">

**Author:** [@fahadjudoon](https://forums.ipg-automotive.com/u/fahadjudoon)\
**Replies:** 3\
**Last updated:** [26 July 2024 22:11 UTC](https://forums.ipg-automotive.com/t/cm4sl-desired-acceleration-instead-of-vc-gas/952 "2024-07-26T22:11:03Z")

</div>

I am designing MPC controller in cm4sl which will send acceleration as control input instead of gas pedal. Is there anyway to map acceleration to gas pedal? Secondly, I also need to map gas pedal to acceleration.

---

## [Unable to set IPGDriver parameters about \`External steer inputs \` during lane change](https://forums.ipg-automotive.com/t/unable-to-set-ipgdriver-parameters-about-external-steer-inputs-during-lane-change/988)

<div class="topic-metadata">

**Author:** [@llong](https://forums.ipg-automotive.com/u/llong)\
**Replies:** 8\
**Last updated:** [27 June 2024 20:45 UTC](https://forums.ipg-automotive.com/t/unable-to-set-ipgdriver-parameters-about-external-steer-inputs-during-lane-change/988 "2024-06-27T20:45:15Z")

</div>

Hello, This is the scenario I set up: IPGDriver controls the vehicle’s lane change and an external steering wheel torque can intervene, so I set the parameters in the diagram. But this will cause the vehicle to run off t…

---

## [Tire modeling in carmaker](https://forums.ipg-automotive.com/t/tire-modeling-in-carmaker/881)

<div class="topic-metadata">

**Author:** [@Kim](https://forums.ipg-automotive.com/u/Kim)\
**Replies:** 2\
**Last updated:** [24 April 2024 06:52 UTC](https://forums.ipg-automotive.com/t/tire-modeling-in-carmaker/881 "2024-04-24T06:52:35Z")

</div>

When using Carmaker, I only considered body control and used tire models in the format FileIdent = CarMaker-Tire-MF52 2 via carmaker gui-\>tire select. However, we are currently working on a project that takes tire blowo…

---

## [PT Control using a Simulink model to control electric powertrain](https://forums.ipg-automotive.com/t/pt-control-using-a-simulink-model-to-control-electric-powertrain/911)

<div class="topic-metadata">

**Author:** [@bdm](https://forums.ipg-automotive.com/u/bdm)\
**Replies:** 2\
**Last updated:** [15 April 2024 10:14 UTC](https://forums.ipg-automotive.com/t/pt-control-using-a-simulink-model-to-control-electric-powertrain/911 "2024-04-15T10:14:51Z")

</div>

Hi, I am trying to use a custom Simulink model to control a 4WD electric powertrain. I have created a plug-in model in simulink and added it in Powertrain\>Control Unit\>PT Control. I am planning on using this model to c…

---

## [Trying to set acceleration via Simulink](https://forums.ipg-automotive.com/t/trying-to-set-acceleration-via-simulink/902)

<div class="topic-metadata">

**Author:** [@jprehbein](https://forums.ipg-automotive.com/u/jprehbein)\
**Replies:** 1\
**Last updated:** [10 April 2024 06:54 UTC](https://forums.ipg-automotive.com/t/trying-to-set-acceleration-via-simulink/902 "2024-04-10T06:54:01Z")

</div>

Hey, So I am faced with the following problem: We generated a ACC controller, capable of lateral and longitudinal control. The controller output of the longitudinal control is the acceleration and I cant find any way to…

---

## [CM4SL Write motor torque target](https://forums.ipg-automotive.com/t/cm4sl-write-motor-torque-target/891)

<div class="topic-metadata">

**Author:** [@Hohyon](https://forums.ipg-automotive.com/u/Hohyon)\
**Replies:** 1\
**Last updated:** [5 April 2024 10:42 UTC](https://forums.ipg-automotive.com/t/cm4sl-write-motor-torque-target/891 "2024-04-05T10:42:10Z")

</div>

Hi. I’m studying motor torque distribution criteria in multi-motored vehicles. I want to use whole CarMaker powertrain models (ex. motor, gearbox, differential, etc), and adjust target torque to motors. I’ve tried writ…

---

## [Slip ratio calculation when Vx reaches zero](https://forums.ipg-automotive.com/t/slip-ratio-calculation-when-vx-reaches-zero/776)

<div class="topic-metadata">

**Author:** [@Farzad](https://forums.ipg-automotive.com/u/Farzad)\
**Replies:** 5\
**Last updated:** [6 March 2024 15:00 UTC](https://forums.ipg-automotive.com/t/slip-ratio-calculation-when-vx-reaches-zero/776 "2024-03-06T15:00:10Z")

</div>

Hi everyone, Does anyone know how CarMaker calculates slip ratio when Vx is close to zero? I tried to calculate it as s=(-Vsx)/max(1,Vx) but the value is different from the one that Carmaker is showing me. Thanks

---

## [CM4SL Regenerative braking](https://forums.ipg-automotive.com/t/cm4sl-regenerative-braking/808)

<div class="topic-metadata">

**Author:** [@Ldanstrom](https://forums.ipg-automotive.com/u/Ldanstrom)\
**Replies:** 1\
**Last updated:** [5 February 2024 14:15 UTC](https://forums.ipg-automotive.com/t/cm4sl-regenerative-braking/808 "2024-02-05T14:15:27Z")

</div>

My FS team is attempting to create a control system for the regenerative braking in CM4SL. This system will function much like for the Gas system with the torque demand being controlled by a traction controller etc. but …

---

## [Use MPC in Carmaker for Simulink](https://forums.ipg-automotive.com/t/use-mpc-in-carmaker-for-simulink/805)

<div class="topic-metadata">

**Author:** [@Pogo](https://forums.ipg-automotive.com/u/Pogo)\
**Replies:** 1\
**Last updated:** [30 January 2024 09:46 UTC](https://forums.ipg-automotive.com/t/use-mpc-in-carmaker-for-simulink/805 "2024-01-30T09:46:22Z")

</div>

We currently have a vehicle controller model for parking in Simulink, which can calculate the vehicle’s speed, angle, and other states. However, we need to input these states to the vehicle for simulation purposes, witho…

---

## [How to use steer by touque in cm4sl](https://forums.ipg-automotive.com/t/how-to-use-steer-by-touque-in-cm4sl/780)

<div class="topic-metadata">

**Author:** [@llong](https://forums.ipg-automotive.com/u/llong)\
**Replies:** 10\
**Last updated:** [17 January 2024 16:44 UTC](https://forums.ipg-automotive.com/t/how-to-use-steer-by-touque-in-cm4sl/780 "2024-01-17T16:44:13Z")

</div>

When enabling Cockpit Configuration and steer by torque, I found that the steering wheel cannot change the vehicle direction.

---

## [Data is different from postprocessing to ipgcontrol](https://forums.ipg-automotive.com/t/data-is-different-from-postprocessing-to-ipgcontrol/765)

<div class="topic-metadata">

**Author:** [@fcm.user](https://forums.ipg-automotive.com/u/fcm.user)\
**Replies:** 1\
**Last updated:** [19 December 2023 09:14 UTC](https://forums.ipg-automotive.com/t/data-is-different-from-postprocessing-to-ipgcontrol/765 "2023-12-19T09:14:01Z")

</div>

Hello, I try to evaluate the slip values of my car but when analysing the details CarMaker shows me in IPGControl that the slips values range from 0 to 6% whereas when I monitor them in Matlab (either from the erg file …

---

## [Where should i define my object(Ex. Speed Bump) in Simulink model to detect as a object in Carmaker?](https://forums.ipg-automotive.com/t/where-should-i-define-my-object-ex-speed-bump-in-simulink-model-to-detect-as-a-object-in-carmaker/750)

<div class="topic-metadata">

**Author:** [@vishal\_12](https://forums.ipg-automotive.com/u/vishal_12)\
**Replies:** 2\
**Last updated:** [11 December 2023 00:25 UTC](https://forums.ipg-automotive.com/t/where-should-i-define-my-object-ex-speed-bump-in-simulink-model-to-detect-as-a-object-in-carmaker/750 "2023-12-11T00:25:20Z")

</div>

Hello everyone, currently i am working with Simulink and Carmaker 11.0 and trying to implement an object in Carmaker scenario. The object which i want to implement is a Speed Bump. Through the Tutorial videos of IPG Car…

---

## [CM4SL Assistance](https://forums.ipg-automotive.com/t/cm4sl-assistance/206)

<div class="topic-metadata">

**Author:** [@iammp98](https://forums.ipg-automotive.com/u/iammp98)\
**Replies:** 2\
**Last updated:** [31 October 2023 07:47 UTC](https://forums.ipg-automotive.com/t/cm4sl-assistance/206 "2023-10-31T07:47:27Z")

</div>

Hello, I’m trying to use implement the FSE\_TorqueVectoring package for my vehicle but I keep on seeing “ERROR PowerTrain.Control: Unknown kind ‘CM4SL’, version 1” It looks like this lines up with line 553 on FS…

---

## [Can we save certain workspace data in Matlab into mat-file by running Test Manager](https://forums.ipg-automotive.com/t/can-we-save-certain-workspace-data-in-matlab-into-mat-file-by-running-test-manager/620)

<div class="topic-metadata">

**Author:** [@Vinay1215](https://forums.ipg-automotive.com/u/Vinay1215)\
**Replies:** 1\
**Last updated:** [21 August 2023 16:48 UTC](https://forums.ipg-automotive.com/t/can-we-save-certain-workspace-data-in-matlab-into-mat-file-by-running-test-manager/620 "2023-08-21T16:48:59Z")

</div>

Can we save certain workspace data in Matlab into mat-file by running Test Manager?

---

## [CM ver 7, erg file deleted](https://forums.ipg-automotive.com/t/cm-ver-7-erg-file-deleted/602)

<div class="topic-metadata">

**Author:** [@beenhui.lee](https://forums.ipg-automotive.com/u/beenhui.lee)\
**Replies:** 0\
**Last updated:** [31 July 2023 09:11 UTC](https://forums.ipg-automotive.com/t/cm-ver-7-erg-file-deleted/602 "2023-07-31T09:11:52Z")

</div>

I am using CarMaker 7 version in CarMaker for simulink environment. When running Run using TestManager, erg file is not created. I set it to save all, and no diagram is created. What more can I check?

---

## [Integrate acceleration signal](https://forums.ipg-automotive.com/t/integrate-acceleration-signal/596)

<div class="topic-metadata">

**Author:** [@zik](https://forums.ipg-automotive.com/u/zik)\
**Replies:** 8\
**Last updated:** [26 July 2023 17:18 UTC](https://forums.ipg-automotive.com/t/integrate-acceleration-signal/596 "2023-07-26T17:18:01Z")

</div>

Hi all, I’m currently trying to validate a vehicle model using CM4SL and when I try to integrate the acceleration signal, error seems to accumulate. I’ve integrated the Car.ax signal to a new variable(7DoF.vx) to check…

---

## [Total Brake Toque Vs Brake Torque](https://forums.ipg-automotive.com/t/total-brake-toque-vs-brake-torque/445)

<div class="topic-metadata">

**Author:** [@prabanjan](https://forums.ipg-automotive.com/u/prabanjan)\
**Replies:** 1\
**Last updated:** [23 March 2023 09:56 UTC](https://forums.ipg-automotive.com/t/total-brake-toque-vs-brake-torque/445 "2023-03-23T09:56:45Z")

</div>

May I know the difference between Vhcl..Trq\_Brake, Brake.Trq\_WB\_ these quantities? when I attached scopes on these quantities (Vhcl..Trq\_Brake = 3\* Brake.Trq\_WB\_) one is always a multiple of other. I am wondering how!

[Next page](https://forums.ipg-automotive.com/c/coding-integration/cm4sl/6.md?page=1)
