Name | Description |
---|---|
CarBase | A sedan car modeled with linkages as parameterisised curves based on wheel travel. |
SedanCar_Level1_LinkageTables | Car model with suspensions toe in and camber charactistics from polynomials. |
SedanCar_Level2_RigidLinkages | Car model with rigid suspensions linkages. |
SedanCar_Level3_Bushings | Car model with bushings in suspensions linkages and massless rods. |
SedanCar_Level4_MassRods | Car model with bushings in suspensions linkages and mass rods. |
Dallara | Car model with bushings in suspensions linkages and mass rods. |
StandardCar | Standard car chassis |
SedanCarWithTrailer | Car model with rigid suspensions linkages. |
SuspensionTestRig | Rig for isolated testing of suspenson suspensions |
DoubleWishBoneTest | Test of a double wishbone suspension mounted in a rig. The suspension can easilly be replaced by selecting another suspension in the parameter dialog. |
Name | Default | Description |
---|---|---|
replaceable block Road | Environments.NoGraphicsRoad | |
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
partial model CarBase "A sedan car modeled with linkages as parameterisised curves based on wheel travel." extends Modelica.Icons.Example; inner replaceable block Road = Environments.NoGraphicsRoad extends VehicleDynamics.Environments.Interfaces.TyreRoadInterface; inner replaceable block Weather = Environments.ConstantWind extends VehicleDynamics.Environments.Interfaces.WeatherInterface; // INITIAL CONDITIONS parameter SI.Velocity v_x0=20 "|Initial conditions| start velocity x"; parameter SI.Position r_x0=0 "|Initial conditions| start position x"; parameter SI.Position r_y0=0 "|Initial conditions| start position y"; parameter SI.Position r_z0=0.24 "|Initial conditions| start position z"; protected parameter SI.Position[3] rInit={r_x0,r_y0,r_z0}; parameter Real[3] vInit={v_x0,0,0}; parameter SI.Angle[3] phiInit={0,0,0}; // DRIVER // STEERING parameter Real kLaneChange=1 "|Steering|LaneChange| Gain of Lane Change output, use this to turn on/off output"; parameter SI.Time t1LaneChange=2.5 "|Steering|LaneChange| start time of sine1 "; parameter SI.Time t2LaneChange=5.5 "|Steering|LaneChange|start time of sine2"; parameter SI.Time p1LaneChange=2 "|Steering|LaneChange|period of sine1"; parameter SI.Time p2LaneChange=2 "|Steering|LaneChange| period of sine2"; parameter SI.Angle a1LaneChange=0.6 "|Steering|LaneChange| amplitude of sine1"; parameter SI.Angle a2LaneChange=-0.6 "|Steering|LaneChange| amplitude of sine2"; parameter Boolean generateEvent=false "|Steering|LaneChange| generate event for discontinuities"; parameter Real kRampSteering=0 "|Steering|Ramp| Gain of Ramp output, use this to turn on/off output"; parameter SI.Angle heightRampSteering=0.0 "|Steering|Ramp| Height of ramp"; parameter SI.Time durationRampSteering(min=Modelica.Constants.SMALL) = 0.001 "|Steering|Ramp| Duration of ramp"; parameter SI.Angle offsetRampSteering=0 "|Steering|Ramp| Ramp offset"; parameter SI.Time startTimeRampSteering=1.5 "|Steering|Ramp| Output = offset for time < startTime"; parameter Real kTableSteering=0 "|Steering|TimeTable| Gain of Table output, use this to turn on/off output"; parameter Real tableSteering[:, :]=[0, 0; 1, 1; 2, 4] "|Steering|TimeTable| Table matrix (time = first column)"; parameter Real kRampDrive=0 "|Drive|Ramp| Gain of Ramp output, use this to turn on/off output"; parameter Real heightRampDrive=500 "|Drive|Ramp| Height of ramp"; parameter Real durationRampDrive(min=Modelica.Constants.SMALL) = 2 "|Drive|Ramp| Duration of ramp"; parameter Real offsetRampDrive=0 "|Drive|Ramp| Ramp offset"; parameter SI.Time startTimeRampDrive=1 "|Drive|Ramp| Output = offset for time < startTime"; protected Drivers.OpenLoopDriver driver( kLaneChange=kLaneChange, t1LaneChange=t1LaneChange, t2LaneChange=t2LaneChange, p1LaneChange=p1LaneChange, p2LaneChange=p2LaneChange, a1LaneChange=a1LaneChange, a2LaneChange=a2LaneChange, generateEvent=generateEvent, kRampSteering=kRampSteering, heightRampSteering=heightRampSteering, durationRampSteering=durationRampSteering, offsetRampSteering=offsetRampSteering, startTimeRampSteering=startTimeRampSteering, tableSteering=tableSteering, kTableSteering=kTableSteering, kRampDrive=kRampDrive, heightRampDrive=heightRampDrive, durationRampDrive=durationRampDrive, offsetRampDrive=offsetRampDrive, startTimeRampDrive=startTimeRampDrive); end CarBase;
The wheel suspensions are described by tables defining camber and toe-in angles as functions of wheel bounce, i.e., a vertical motion of the wheel with constrained changes of the Camber and toe-in angles.
This could easily be extended to handle also camber and toe-in as functions of side force, which would make it possible to mimic the behaviour of suspensions with bushings and other flexible elements. However, the drawback with this method is that the characteristics must either be measured, meaning that the suspension has to be built, or that the suspension characteristics has to be calculated from a more detailed model.
Steering is defined by an Ackermann function. The tables for camber and toe-in angles are implemented as scaled polynomials. Dymolas symbolic engine differentiates these polynomials twice to handle the reduction of degrees-of-freedom.
The complexity of the model is characterized in the following table showing the number of degrees-of-freedom (DOFs).
|
Individual DOFs |
Component count |
Total DOFs |
Comment |
Chassis |
6 |
1 |
6 |
|
Wheel bounce |
1 |
4 |
4 |
|
Wheel rotation |
1 |
4 |
4 |
|
Steering |
1 |
1 |
1 |
|
|
|
|
|
|
Total |
|
|
15 |
|
The tires have each 2 state variables for the deflection in x and y directions, i.e., 4*2 = 8 states. The total number of states for the vehicle dynamics itself is thus 2*15 + 8 = 38.
The steering in the benchmark model is a parameterized, given function which is filtered by a second order low pass filter to model driving behavior. The driver model of the benchmark model contains two additional state variables for the accelerator behavior. This is not used in this model since the vehicle maneuver is made with idle gear. The total number of state variables is thus 38 + 2 = 40.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model SedanCar_Level1_LinkageTables "Car model with suspensions toe in and camber charactistics from polynomials." extends StandardCar(chassis(redeclare VehicleDynamics.Chassis.Suspensions.SimpleSuspension frontSuspension, redeclare VehicleDynamics.Chassis.Suspensions.SimpleSuspensionNoSteer rearSuspension)); end SedanCar_Level1_LinkageTables;
The table description used in level 1is limited to only Camber and toe-in angles. It would of course be possible to extend to Caster angle trail as well as track width and wheel base translations. However, in many cases, in particular when trying new designs, it?s easier to describe the suspension in terms of the linkage that is used.
The suspensions in level 2 consist of rigid mechanical components, i.e. all flexible elements, except for the struts, are replaced by ideal joints. Instead of a multi-link suspension, a trailing arm with similar geometry is used. The advantage over level 1 is that the suspension can be modelled with physical data and no precalculations or measurements are therefore needed.
The level 2 model uses a MacPherson type front wheel suspension, with the wishbone attached to the chassis via an ideal revolute joint (1 DOF). A strut is placed between the chassis and the wishbone via two spherical joints. The eigen rotation of the strut around its axis (1 DOF) is constrained by the distance constraint of an additional rod with two spherical joints on each end (1 constraint). One of the spherical joints of this rod is attached to the steering. In total, the suspension has therefore one degree of freedom, if the steering angle is given. The anti-roll bar is approximated by a spring/damper combination where the vertical force acting at its mount point on the lower part of the MacPherson strut is proportional to the relative vertical distance of the left and the right mount points. The rear suspension is a type trailing arm with one DOF, the anti roll bar is modeled like in the front suspension.
When using base elements of the MultiBody library to build up the MacPherson suspension, several non-linear algebraic loops appear. By using composite joint models (e.g., an aggregation of a revolute, a spherical and a universal joint) that contain analytic solutions of the non-linear kinematic relationships within the aggregation, the non-linear algebraic loops do no longer occur in the generated code. In the following table the degrees of freedom of this vehicle model is summarized.
|
Individual DOFs |
Component count |
Total DOFs |
Comment |
Chassis |
6 |
1 |
6 |
|
Wishbone rotation |
1 |
2 |
2 |
|
Steering |
1 |
1 |
1 |
|
Trailing arm rotation |
1 |
2 |
2 |
|
Wheel rotation |
1 |
4 |
4 |
|
|
|
|
|
|
Total |
|
|
15 |
|
Similar to the level 1 car, there are 4*2 = 8 states for the tire deflections and 2 unused states. As a result, this model has also 40 states. Note, that the elasticity of the tires in vertical direction has been modified slightly (both for the level 1 and the level 2 cars) in order to approximately compensate for the neglected bushings.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model SedanCar_Level2_RigidLinkages "Car model with rigid suspensions linkages." extends StandardCar(chassis(redeclare VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension2 frontSuspension, redeclare VehicleDynamics.Chassis.Suspensions.TrailingArmSuspension rearSuspension)); end SedanCar_Level2_RigidLinkages;
Using ideal joint models for the linkage is not accurate enough for severe driving conditions since bushings with certain flexibility are used in the real vehicle. Flexible elements are introduced in the suspensions of the level 3 model. The front suspension has bushings in the A-arm mounts. The rear multilink suspension has no ideal joints and the links are modelled as mass-less bars. If the mass and inertia of the rod connecting two bushings would not be neglected, 6 DOF would be added for every such pushrod. However, the mass and inertia are usually very small compared to, say, the wheel and carrier masses, and therefore it is a good approximation to neglect the pushrod masses and inertias.
If the bushings would be described solely by springs, then no states would be added, since springs in series connection leads to algebraic equations to solve for the spring deflections. Since bushings have additionally a damping part, there are the states of the dampers (= 2*6). Once the states of one damper are known, the states of the other damper can be computed by relative kinematics. To summarize, a pushrod has 6 states, if the mass and inertia of the rod connecting the two bushings is neglected. There are 3 such bushing pairs at each rear wheel, i.e. the number of states is 2*´3*6=36 states.
Additionally, the elasticity in the steering is taken into account by having a spring/damper system in the rack steering adding one additional DOF.
The number of degrees of freedom is shown below.
|
Individual DOFs |
Component count |
Total DOFs |
Comment |
Chassis |
6 |
1 |
6 |
|
Front wheel carrier |
6 |
2 |
12 |
|
Steering |
1 |
1 |
1 |
|
Rack steering |
1 |
1 |
1 |
|
Rear wheel carrier |
6 |
2 |
12 |
|
Wheel rotation |
1 |
4 |
4 |
|
|
|
|
|
|
Total |
|
|
36 |
|
There are 4*2 = 8 states for the tire deflections and 2 unused states. As a result, this model has 2*36 + 36 + 8 + 2 = 118 states.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model SedanCar_Level3_Bushings "Car model with bushings in suspensions linkages and massless rods." extends StandardCar(chassis(redeclare VehicleDynamics.Chassis.Suspensions.MultiLink4Suspension3 rearSuspension, redeclare VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension3 frontSuspension)); end SedanCar_Level3_Bushings;
A slightly more detailed model is obtained by not neglecting the masses of the push rods. The number of degrees of freedom is shown below.
|
Individual DOFs |
Component count |
Total DOFs |
Comment |
Chassis |
6 |
1 |
6 |
|
Front wheel carrier |
6 |
2 |
12 |
|
Steering |
1 |
1 |
1 |
|
Rack steering |
1 |
1 |
1 |
|
Rear wheel carrier |
6 |
2 |
12 |
|
Pushrods of rear wheel carrier |
6 |
2*3 |
36 |
|
Wheel rotation |
1 |
4 |
4 |
|
|
|
|
|
|
Total |
|
|
72 |
|
This model has 2*72 + 8 + 2 = 154 states.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model SedanCar_Level4_MassRods "Car model with bushings in suspensions linkages and mass rods." extends StandardCar(chassis(redeclare VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension3 frontSuspension, redeclare VehicleDynamics.Chassis.Suspensions.MultiLink4Suspension4 rearSuspension)); end SedanCar_Level4_MassRods;
This is a model of a Dallara F3 race car. Typical for a formula car is stiff spring elements and the lack of bushings. This version uses inboard mouted struts both front and rear, adding more kinematical loops. In front, there is a BelleVille linkage that decouples roll and bounce stiffness. In the rear suspension, two struts are mounted onboard and the anti roll is handled by a bar with levers.
Name | Default | Description |
---|---|---|
replaceable block Road | Environments.NoGraphicsRoad | |
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.26 | start position z [m] |
model Dallara "Car model with bushings in suspensions linkages and mass rods." Chassis.FormulaChassis chassis( vInit=vInit, rInit=rInit, phiInit=phiInit); Aerodynamics.BasicAirResistance airResistance; extends CarBase(r_z0=0.26, phiInit={0,0.015,0}); // For plotting output SI.Acceleration sideAcceleration=chassis.BGR.a[2]; output SI.AngularVelocity yawVelocity=chassis.BGR.w[3]; output SI.Velocity longitudinalSpeed=chassis.BGR.v[1]; output SI.Velocity lateralSpeed=chassis.BGR.v[2]; equation connect(driver.flange_Lat, chassis.flange_SW); connect(airResistance.frame_a, chassis.BGR); end Dallara;
This is a model standard four wheeled car driven by an open loop driver, i.e. no feedback is considered. Only the front wheels can be steered. To the wheel flanges, a powertrain can be added.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model StandardCar "Standard car chassis" Chassis.StandardChassis chassis( vInit=vInit, rInit=rInit, phiInit=phiInit, redeclare VehicleDynamics.Chassis.Suspensions.MultiLink4Suspension3 rearSuspension); extends CarBase(redeclare block Road = VehicleDynamics.Environments.SplitMueRoad); Aerodynamics.BasicAirResistance airResistance; // For plotting output SI.Acceleration sideAcceleration=chassis.BGR.a[2]; output SI.AngularVelocity yawVelocity=chassis.BGR.w[3]; output SI.Velocity longitudinalSpeed=chassis.BGR.v[1]; output SI.Velocity lateralSpeed=chassis.BGR.v[2]; ModelicaAdditions.MultiBody.Parts.BoxBody load( r={-lLoad,0,0}, r0=rLoad + {lLoad/2,0,0}, LengthDirection={1,0,0}, WidthDirection={0,1,0}, Length=lLoad, Width=wLoad, Height=hLoad, rho=rhoLoad, Material={0,0,1,0.7}); parameter SI.Density rhoLoad=0 "|Additional Load||Density of load"; parameter SI.Length lLoad=0 "|Additional Load||Length of load"; parameter SI.Length wLoad=0 "|Additional Load||Width of load"; parameter SI.Length hLoad=0 "|Additional Load||Height of load"; parameter SI.Position[3] rLoad={-2.6,0.4,1.5} "|Additional Load||Position of load centre"; equation connect(driver.flange_Lat, chassis.flange_SW); connect(airResistance.frame_a, chassis.BGR); connect(load.frame_a, chassis.BGR); end StandardCar;
In this model, the StandardCar example is extended with a trailer.
Name | Default | Description |
---|---|---|
replaceable block Weather | Environments.ConstantWind | |
v_x0 | 20 | start velocity x [m/s] |
r_x0 | 0 | start position x [m] |
r_y0 | 0 | start position y [m] |
r_z0 | 0.24 | start position z [m] |
rhoLoad | 0 | Density of load [kg/m3] |
lLoad | 0 | Length of load [m] |
wLoad | 0 | Width of load [m] |
hLoad | 0 | Height of load [m] |
rLoad[3] | {-2.6,0.4,1.5} | Position of load centre [m] |
model SedanCarWithTrailer "Car model with rigid suspensions linkages." extends StandardCar(chassis(redeclare VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension2 frontSuspension, redeclare VehicleDynamics.Chassis.Suspensions.TrailingArmSuspension rearSuspension)); Chassis.Trailer trailer; equation connect(chassis.BGR, trailer.frame_a); end SedanCarWithTrailer;
This rig is used to test suspensions separated from the rest of the car. The proper load on the suspension can be set with a parameter. Additionally there are sensors to measuere the rotation of the wheel carrier (upright). The suspension to be mesured can be selected from the parameter dialog.
Name | Default | Description |
---|---|---|
k[1] | {4000} | Additional force [N] |
weightOnSuspension | 400 | The amount of weight on the tested suspension. [kg] |
width | 0.23 | Tyre width [m] |
radius | 0.295 | Tyre radius [m] |
rimRadius | 0.22 | Rim radius [m] |
animation | true | This should be false if the tyres should not be animated. |
suspension | redeclare VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension2 suspension |
model SuspensionTestRig "Rig for isolated testing of suspenson suspensions" parameter SI.Force[1] k={4000} "Additional force"; parameter SI.Mass weightOnSuspension=400 "The amount of weight on the tested suspension."; parameter SI.Distance width=0.23 "Tyre width"; parameter SI.Distance radius=0.295 "Tyre radius"; parameter SI.Distance rimRadius=0.22 "Rim radius"; parameter Boolean animation=true "This should be false if the tyres should not be animated."; ModelicaAdditions.MultiBody.Parts.InertialSystem ground(ng={0,0,1}); replaceable VehicleDynamics.Chassis.Suspensions.MacPhersonSuspension2 suspension extends Chassis.Interfaces.SuspensionInterface; Utilities.Parts.Body leftWheel( shape="tire", length=width, material={0.2,0.2,0.2,0.2}, width=2*radius, height=2*radius, extra=rimRadius/radius, m=weightOnSuspension/2, animation=animation, lengthDirection={0,1,0}); Utilities.Parts.Body rightWheel( shape="tire", length=width, material={0.2,0.2,0.2,0.2}, width=2*radius, height=2*radius, extra=rimRadius/radius, m=weightOnSuspension/2, lengthDirection={0,-1,0}, animation=animation); ModelicaAdditions.MultiBody.Forces.ExtLineForce leftForce(n={0,0,1}); ModelicaAdditions.MultiBody.Forces.ExtLineForce rightForce(n={0,0,1}); Modelica.Blocks.Sources.Pulse pulse1( amplitude=k, period={4}, offset=-k/3); Modelica.Blocks.Sources.Pulse pulse2( amplitude=k, period={8}, offset=-k/3); Modelica.Mechanics.Rotational.Fixed fixed; equation connect(ground.frame_b, suspension.frame_C); connect(leftWheel.frame_a, suspension.frame_U_1); connect(rightWheel.frame_a, suspension.frame_U_2); connect(leftForce.frame_b, leftWheel.frame_b); connect(rightForce.frame_b, rightWheel.frame_b); connect(pulse1.outPort, leftForce.inPort); connect(pulse2.outPort, rightForce.inPort); connect(fixed.flange_b, suspension.flange_SW); end SuspensionTestRig;
This an example showing the use of the SuspensionTestRig for a MacPhersonSuspension
model DoubleWishBoneTest "Test of a double wishbone suspension mounted in a rig. The suspension can easilly be replaced by selecting another suspension in the parameter dialog." extends Modelica.Icons.Example; SuspensionTestRig suspensionTestRig( animation=false, redeclare VehicleDynamics.Chassis.Suspensions.DoubleWishBoneSuspension suspension, k={2500}, weightOnSuspension=150); end DoubleWishBoneTest;