Frequently asked questions

Need technical support?

How to implement rear wheel steering in CarMaker?

Question

In CarMaker, there are two ways to implement a rear wheel steering. The easiest way is to use external angle value acting on the wheel carriers which is described in section one. Section two reports about adding new DOF to the suspension kinematics model, which can be done by using measurements data as input or a linear suspension model. In addition, an adjustment within the steering model necessary, since the input of the suspension is given by the steering model.

Solution

1. Overwriting wheel angles directly:

By writing on the User Accessible Quantities "Car.CRR.rz_ext" and "Car.CRL.rz_ext" you can add a rotation angle (in radians) to the movement of both rear wheels around the z-axis. CarMaker does calculate the full movement of the wheels depending on the kinematics and compliance restrains. This rotation angle applied via DVA is added afterwards like an offset. Thus, the movement of the wheel (z-axis) will not be overwritten completely. The DVA command can be applied in several ways, e.g. using a “Write CM Dict” block in CarMaker for Simulink or Realtime Expressions in the Maneuver dialog, as the following example shows:

  1. Eval Car.CRR.rz_ext = Steer.WhlAng * factor

The advantage of this method is that CarMaker can still calculate the kinematics and compliance part as usual. If you would rather like to overwrite the rotation angle of wheel carrier (“Car.C.rz”), the DVA approach can also be used by manipulating the following formula:

MyTargetValue= Car.CRR.rz = Car.CRR.rz_kin +Car.CRR.rz_com + Car.CRR.rz_ext

However, the target values need to be reduced by kinematics and compliance parts:

  1. Eval Car.CRR.rz_ext = MyTargetValue – (Car.CRR.rz_kin + Car.CRR.rz_com)

2. Adding degree of freedom to rear suspension and steering model

Using measurements as input:

From CarMaker version 5.1.1 onward, it is possible to use a rear steering degree of freedom (DOF). Similar to the front axle you can provide the wheel position in dependence of the steering rack by the corresponding entries in the skc file.

If the steering rack movement of the front axle is not supposed to be transferred one-by-one to the rear axle steering movement, it is also possible to define a FACTOR (".Fac2SI") or OFFSET(".Offset") which is applied to the steering rack DOF in the skc file.

Please find below an example how a skc file for a steered rear axle could look like:

Apart from the non-linear kinematics and compliance description using skc files, the additional rear wheel steering degree of freedom is also supported by the linear suspension models. The additional column for the rear axles in the suspension parameterization of the Vehicle Data Set is available since CarMaker version 6.0.

Providing additional outputs from steering for rear axle:

By the help of a user model extension for a steering system, you can also define an additional DOF at the rear axle, which will then be used as input to the calculation of the rear wheel kinematics. The corresponding model class interface signals (UAQs) are the following:

    Steer.RL/RR.q

and their derivations

    Steer.RL/RR.qp/qpp

The model class interface signals are provided by the Model Manager for any model extension interface (C-Code, FMI, Model Plugins). Further, these DOFs are also accessible via DVA (e.g. in MATLAB/Simulink or Realtime Expressions).

Please note the following C-code example is only a simple model, based on the “MySteering.c” example model in your installation directory. It just shows how the relevant signals can be accessed via C-Code. There, the steer degree of freedom on the rear axis directly depends on the front axis steer degree of freedom q. Depending on the vehicle speed (Car.ConBdy1.v), a consensual or opposing steer motion is implemented.

 

Steps to implement the example model:

  1. Create new project (incl. Sources/Build Environment & Sources: Extra Models)

  2. Copy the downloaded files MySteering.c & User.c to /src (replace existing files)

  3. Additionally copy MyModels.h from /src/Extra Models to /src

  4. Open the file named Makefile in /src and add “MySteering.o” to line 25
    25: OBJS =   CM_Main.o CM_Vehicle.o User.o MySteering.o

  5. Open the program MSYS, navigate to /src and execute “make” (see also "Rebuilding the CarMaker Simulation Program" in ProgrammersGuide)

  6. Go to CM GUI > Application > Configuration / Status, select your custom application (most likely src/CarMaker.win64.exe), press "Start & Connect"
  7. Load any TestRun

  8. Open Vehicle Data Set “Examples/ExtraModels/DemoCar_MySteering”

  9. Select in Vehicle Data Set > Suspension > Kinematics > Rear to “Model Linear 3 DOF” and set “Rotation rz” to 5 [rad/m]

  10. Start simulation

Download: User.c

Download: MySteering.c

Need technical support?
  • Date: 06.03.2022
  • Product: CarMaker
  • Version: 10.2
  • Component: Vehicle Model
  • Language: English

Tags

RWS
Kinematics
DOF