within ; package TSFS02_Lab1_Braking package Experiments model RampBraking "Braking from speed test" extends VeSyMA.Experiments.Templates.VehicleTest( redeclare replaceable Suspensions.Drivers.Obsolete.TestDriver.SingleStep driver( activationCondition=2, handbrake=false, brakeOveride=true, acceleratorOveride=true, clutchOveride=true, overideDistance=25, acceleratorSource(k=0), clutchSource(k=1), redeclare model brakeSource = Modelica.Blocks.Sources.Ramp ( height=1, duration=5, startTime=1), final initialGear=vehicle.initialGear, stopLogic=false, gearLogic=false, pullAwayStop=false, antiStall=false), redeclare replaceable TSFS02_Lab1_Braking.CarModel.SmallFamilyCar vehicle( v_start=25, initialGear=3, brakes(eSPPumpcopy(brakeBias=Kbf.value)), stabilityControl(deactivationFeedEBD(k=EBD_ON.value), deactivationFeedSC(k=SC_ON.value))), redeclare replaceable VeSyMA.Roads.StaticRoads.FlatRoad road( animation=world.enableAnimation, animateCones=true, r0Cones=[25,1.5; 25,-1.5], mue=1, v=25, explicitContact=true, length=75), redeclare replaceable VehicleInterfaces.Atmospheres.ConstantAtmosphere atmosphere); CarModel.ValueBlock Kbf(value=0.5) annotation (Placement(transformation(extent={{-94,42},{-74,62}}))); CarModel.ValueBlock EBD_ON(value=0) annotation (Placement(transformation(extent={{-50,72},{-30,92}}))); CarModel.ValueBlock SC_ON(value=0) annotation (Placement(transformation(extent={{-24,72},{-4,92}}))); annotation ( experiment( StopTime=10, __Dymola_NumberOfIntervals=2000, __Dymola_Algorithm="Radau"), __Dymola_experimentSetupOutput, Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is an experiment designed to test vehicle braking capability. The vehicle accelerates to a predetermined velocity before fully applying the brakes for the remainder of the test.

"), __Dymola_Commands( executeCall={createPlot( id=1, position={38,17,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.wheelSpeed1", "vehicle.brakes.summary.wheelSpeed2", "vehicle.brakes.summary.wheelSpeed3", "vehicle.brakes.summary.wheelSpeed4"}, range={0.0,180.0,-20.0,100.0}, autoerase=false, grid=true, legends={"wheelSpeed1","wheelSpeed2","wheelSpeed3", "wheelSpeed4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"rad/s","rad/s","rad/s","rad/s"}),createPlot( id=2, position={641,20,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={ "vehicle.brakes.eSPPumpcopy.brakeLineSingleCircuitcopy.brakeBias"}, range={0.0,180.0,0.62,0.78}, autoerase=false, grid=true, legends={"brakeBias"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit=""),createPlot( id=4, position={633,424,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.eSPPumpcopy.espPressureWheel_1", "vehicle.brakes.eSPPumpcopy.espPressureWheel_2", "vehicle.brakes.eSPPumpcopy.espPressureWheel_3", "vehicle.brakes.eSPPumpcopy.espPressureWheel_4"}, range={0.0,180.0,-100000.0,1000000.0}, autoerase=false, grid=true, legends={"brakePressure1","brakePressure2","brakePressure3", "brakePressure4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit=""),createPlot( id=5, position={28,422,600,373}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.fx","vehicle.wheel_2.summary.fx", "vehicle.wheel_3.summary.fx","vehicle.wheel_4.summary.fx"}, range={0.0,180.0,-1400.0,400.0}, autoerase=false, grid=true, legends={"longTireForce1","longTireForce2","longTireForce3", "longTireForce4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"N","N","N","N"}),createPlot( id=6, position={1239,25,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.brakePedalPosition"}, range={0.0,180.0,-0.02,0.12000000000000001}, autoerase=false, grid=true, legends={"brakePedalPosition"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m"}),createPlot( id=7, position={1238,432,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalAcceleration"}, range={0.0,180.0,-3.0,0.5}, autoerase=false, grid=true, legends={"longitudinalAcceleration"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m/s2"}),createPlot( id=8, position={1225,504,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalVelocity"}, range={0.0,180.0,20.0,100.0}, autoerase=false, grid=true, legends={"longitudinalVelocity"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"km/h"}),createPlot( id=9, position={95,95,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.kappa", "vehicle.wheel_2.summary.kappa","vehicle.wheel_3.summary.kappa", "vehicle.wheel_4.summary.kappa"}, range={0.0,180.0,-1.2000000000000002,0.3999999999999999}, autoerase=false, grid=true, legends={"tireSlip1","tireSlip2","tireSlip3","tireSlip4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="")} "Braking", file="modelica://Suspensions/Scripts/Analysis/Body Variables.mos" "Body Variables", file="modelica://Suspensions/Scripts/Analysis/Wheel Forces.mos" "Wheel Forces", file= "modelica://Suspensions/Scripts/Analysis/Manual Driver Controls.mos" "Driver Inputs", file= "modelica://Suspensions/Scripts/Analysis/Spring and Damper Forces.mos" "Spring and Damper Forces", file= "modelica://Suspensions/Scripts/Analysis/Spring Deformation and Damper Velocity.mos" "Spring Deformation and Damper Velocity", file="modelica://Suspensions/Scripts/SideViewCar.mos" "Car Side Rotations Transparent Body", file="modelica://Suspensions/Scripts/PlanTransparentBody.mos" "Car Plan Rotations Transparent Body", file= "modelica://Suspensions/Scripts/Front Rotations Transparent Body.mos" "Car Front Rotations Transparent Body")); end RampBraking; model RampBrakingLowFriction "Braking from speed test" extends VeSyMA.Experiments.Templates.VehicleTest( redeclare replaceable Suspensions.Drivers.Obsolete.TestDriver.SingleStep driver( activationCondition=2, handbrake=false, brakeOveride=true, acceleratorOveride=true, clutchOveride=true, overideDistance=25, acceleratorSource(k=0), clutchSource(k=1), redeclare model brakeSource = Modelica.Blocks.Sources.Ramp ( height=1, duration=5, startTime=1), final initialGear=vehicle.initialGear, stopLogic=false, gearLogic=false, pullAwayStop=false, antiStall=false), redeclare replaceable TSFS02_Lab1_Braking.CarModel.SmallFamilyCar vehicle( v_start=25, initialGear=3, brakes(eSPPumpcopy(brakeBias=Kbf.value)), stabilityControl(deactivationFeedEBD(k=EBD_ON.value), deactivationFeedSC(k=SC_ON.value))), redeclare replaceable VeSyMA.Roads.StaticRoads.FlatRoad road( animation=world.enableAnimation, animateCones=true, r0Cones=[25,1.5; 25,-1.5], mue=0.3, v=25, explicitContact=true, length=75), redeclare replaceable VehicleInterfaces.Atmospheres.ConstantAtmosphere atmosphere); CarModel.ValueBlock Kbf(value=0.5) annotation (Placement(transformation(extent={{-94,42},{-74,62}}))); CarModel.ValueBlock EBD_ON(value=0) annotation (Placement(transformation(extent={{-50,72},{-30,92}}))); CarModel.ValueBlock SC_ON(value=0) annotation (Placement(transformation(extent={{-24,72},{-4,92}}))); annotation ( experiment( StopTime=10, __Dymola_NumberOfIntervals=2000, __Dymola_Algorithm="Radau"), __Dymola_experimentSetupOutput, Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is an experiment designed to test vehicle braking capability. The vehicle accelerates to a predetermined velocity before fully applying the brakes for the remainder of the test.

"), __Dymola_Commands( executeCall={createPlot( id=1, position={38,17,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.wheelSpeed1", "vehicle.brakes.summary.wheelSpeed2", "vehicle.brakes.summary.wheelSpeed3", "vehicle.brakes.summary.wheelSpeed4"}, range={0.0,180.0,-20.0,100.0}, autoerase=false, grid=true, legends={"wheelSpeed1","wheelSpeed2","wheelSpeed3", "wheelSpeed4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"rad/s","rad/s","rad/s","rad/s"}),createPlot( id=2, position={641,20,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={ "vehicle.brakes.eSPPumpcopy.brakeLineSingleCircuitcopy.brakeBias"}, range={0.0,180.0,0.62,0.78}, autoerase=false, grid=true, legends={"brakeBias"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit=""),createPlot( id=4, position={633,424,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.eSPPumpcopy.espPressureWheel_1", "vehicle.brakes.eSPPumpcopy.espPressureWheel_2", "vehicle.brakes.eSPPumpcopy.espPressureWheel_3", "vehicle.brakes.eSPPumpcopy.espPressureWheel_4"}, range={0.0,180.0,-100000.0,1000000.0}, autoerase=false, grid=true, legends={"brakePressure1","brakePressure2","brakePressure3", "brakePressure4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit=""),createPlot( id=5, position={28,422,600,373}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.fx","vehicle.wheel_2.summary.fx", "vehicle.wheel_3.summary.fx","vehicle.wheel_4.summary.fx"}, range={0.0,180.0,-1400.0,400.0}, autoerase=false, grid=true, legends={"longTireForce1","longTireForce2","longTireForce3", "longTireForce4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"N","N","N","N"}),createPlot( id=6, position={1239,25,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.brakePedalPosition"}, range={0.0,180.0,-0.02,0.12000000000000001}, autoerase=false, grid=true, legends={"brakePedalPosition"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m"}),createPlot( id=7, position={1238,432,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalAcceleration"}, range={0.0,180.0,-3.0,0.5}, autoerase=false, grid=true, legends={"longitudinalAcceleration"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m/s2"}),createPlot( id=8, position={1225,504,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalVelocity"}, range={0.0,180.0,20.0,100.0}, autoerase=false, grid=true, legends={"longitudinalVelocity"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"km/h"}),createPlot( id=9, position={95,95,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.kappa", "vehicle.wheel_2.summary.kappa","vehicle.wheel_3.summary.kappa", "vehicle.wheel_4.summary.kappa"}, range={0.0,180.0,-1.2000000000000002,0.3999999999999999}, autoerase=false, grid=true, legends={"tireSlip1","tireSlip2","tireSlip3","tireSlip4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="")} "Braking", file="modelica://Suspensions/Scripts/Analysis/Body Variables.mos" "Body Variables", file="modelica://Suspensions/Scripts/Analysis/Wheel Forces.mos" "Wheel Forces", file= "modelica://Suspensions/Scripts/Analysis/Manual Driver Controls.mos" "Driver Inputs", file= "modelica://Suspensions/Scripts/Analysis/Spring and Damper Forces.mos" "Spring and Damper Forces", file= "modelica://Suspensions/Scripts/Analysis/Spring Deformation and Damper Velocity.mos" "Spring Deformation and Damper Velocity", file="modelica://Suspensions/Scripts/SideViewCar.mos" "Car Side Rotations Transparent Body", file="modelica://Suspensions/Scripts/PlanTransparentBody.mos" "Car Plan Rotations Transparent Body", file= "modelica://Suspensions/Scripts/Front Rotations Transparent Body.mos" "Car Front Rotations Transparent Body")); end RampBrakingLowFriction; model RampBrakingWhileCornering "Braking from speed test" extends VeSyMA.Experiments.Templates.VehicleTest( redeclare replaceable Suspensions.Drivers.Obsolete.TestDriver.SingleStep driver( activationCondition=2, handbrake=false, brakeOveride=true, acceleratorOveride=true, clutchOveride=true, overideDistance=25, acceleratorSource(k=0), clutchSource(k=1), redeclare model brakeSource = Modelica.Blocks.Sources.Ramp ( height=0.1, duration=3, startTime=1), final initialGear=vehicle.initialGear, stopLogic=false, gearLogic=false, pullAwayStop=false, antiStall=false), redeclare replaceable TSFS02_Lab1_Braking.CarModel.SmallFamilyCar vehicle( v_start=25, initialGear=3, brakes(eSPPumpcopy(brakeBias=Kbf.value)), stabilityControl(deactivationFeedEBD(k=EBD_ON.value), deactivationFeedSC(k=SC_ON.value))), redeclare replaceable VeSyMA.Roads.StaticRoads.GenericRoad road( animation=world.enableAnimation, animateCones=true, r0Cones=[25,1.5; 25,-1.5], mue=1, explicitContact=true, fileName="curvedroad.mat", vOverride=true, vProfile=[0,25; 1000,25]), redeclare replaceable VehicleInterfaces.Atmospheres.ConstantAtmosphere atmosphere); CarModel.ValueBlock Kbf(value=0.5) annotation (Placement(transformation(extent={{-94,42},{-74,62}}))); CarModel.ValueBlock EBD_ON(value=0) annotation (Placement(transformation(extent={{-50,72},{-30,92}}))); CarModel.ValueBlock SC_ON(value=0) annotation (Placement(transformation(extent={{-24,72},{-4,92}}))); annotation ( experiment( StopTime=10, __Dymola_NumberOfIntervals=2000, __Dymola_Algorithm="Radau"), __Dymola_experimentSetupOutput, Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is an experiment designed to test vehicle braking capability. The vehicle accelerates to a predetermined velocity before fully applying the brakes for the remainder of the test.

"), __Dymola_Commands( executeCall={createPlot( id=1, position={38,17,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.wheelSpeed1", "vehicle.brakes.summary.wheelSpeed2", "vehicle.brakes.summary.wheelSpeed3", "vehicle.brakes.summary.wheelSpeed4"}, range={0.0,180.0,-20.0,100.0}, autoerase=false, grid=true, legends={"wheelSpeed1","wheelSpeed2","wheelSpeed3", "wheelSpeed4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"rad/s","rad/s","rad/s","rad/s"}),createPlot( id=2, position={641,20,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={ "vehicle.brakes.eSPPumpcopy.brakeLineSingleCircuitcopy.brakeBias"}, range={0.0,180.0,0.62,0.78}, autoerase=false, grid=true, legends={"brakeBias"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit=""),createPlot( id=4, position={633,424,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.eSPPumpcopy.espPressureWheel_1", "vehicle.brakes.eSPPumpcopy.espPressureWheel_2", "vehicle.brakes.eSPPumpcopy.espPressureWheel_3", "vehicle.brakes.eSPPumpcopy.espPressureWheel_4"}, range={0.0,180.0,-100000.0,1000000.0}, autoerase=false, grid=true, legends={"brakePressure1","brakePressure2","brakePressure3", "brakePressure4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit=""),createPlot( id=5, position={28,422,600,373}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.fx","vehicle.wheel_2.summary.fx", "vehicle.wheel_3.summary.fx","vehicle.wheel_4.summary.fx"}, range={0.0,180.0,-1400.0,400.0}, autoerase=false, grid=true, legends={"longTireForce1","longTireForce2","longTireForce3", "longTireForce4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"N","N","N","N"}),createPlot( id=6, position={1239,25,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.brakePedalPosition"}, range={0.0,180.0,-0.02,0.12000000000000001}, autoerase=false, grid=true, legends={"brakePedalPosition"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m"}),createPlot( id=7, position={1238,432,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalAcceleration"}, range={0.0,180.0,-3.0,0.5}, autoerase=false, grid=true, legends={"longitudinalAcceleration"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m/s2"}),createPlot( id=8, position={1225,504,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalVelocity"}, range={0.0,180.0,20.0,100.0}, autoerase=false, grid=true, legends={"longitudinalVelocity"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"km/h"}),createPlot( id=9, position={95,95,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.kappa", "vehicle.wheel_2.summary.kappa","vehicle.wheel_3.summary.kappa", "vehicle.wheel_4.summary.kappa"}, range={0.0,180.0,-1.2000000000000002,0.3999999999999999}, autoerase=false, grid=true, legends={"tireSlip1","tireSlip2","tireSlip3","tireSlip4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="")} "Braking", file="modelica://Suspensions/Scripts/Analysis/Body Variables.mos" "Body Variables", file="modelica://Suspensions/Scripts/Analysis/Wheel Forces.mos" "Wheel Forces", file= "modelica://Suspensions/Scripts/Analysis/Manual Driver Controls.mos" "Driver Inputs", file= "modelica://Suspensions/Scripts/Analysis/Spring and Damper Forces.mos" "Spring and Damper Forces", file= "modelica://Suspensions/Scripts/Analysis/Spring Deformation and Damper Velocity.mos" "Spring Deformation and Damper Velocity", file="modelica://Suspensions/Scripts/SideViewCar.mos" "Car Side Rotations Transparent Body", file="modelica://Suspensions/Scripts/PlanTransparentBody.mos" "Car Plan Rotations Transparent Body", file= "modelica://Suspensions/Scripts/Front Rotations Transparent Body.mos" "Car Front Rotations Transparent Body")); end RampBrakingWhileCornering; model FullBraking "Braking from speed test" extends VeSyMA.Experiments.Templates.VehicleTest( redeclare replaceable Suspensions.Drivers.Obsolete.TestDriver.SingleStep driver( activationCondition=2, handbrake=false, brakeOveride=true, acceleratorOveride=true, clutchOveride=true, overideDistance=25, acceleratorSource(k=0), clutchSource(k=1), redeclare model brakeSource = Modelica.Blocks.Sources.Ramp ( height=1, duration=0, startTime=1), final initialGear=vehicle.initialGear, stopLogic=false, gearLogic=false, pullAwayStop=false, antiStall=false), redeclare replaceable TSFS02_Lab1_Braking.CarModel.SmallFamilyCar vehicle( v_start=25, initialGear=3, brakes(eSPPumpcopy(brakeBias=Kbf.value)), stabilityControl(deactivationFeedEBD(k=EBD_ON.value), deactivationFeedSC(k=SC_ON.value))), redeclare replaceable VeSyMA.Roads.StaticRoads.FlatRoad road( animation=world.enableAnimation, animateCones=true, r0Cones=[25,1.5; 25,-1.5], mue=1, v=25, explicitContact=true, length=75), redeclare replaceable VehicleInterfaces.Atmospheres.ConstantAtmosphere atmosphere); CarModel.ValueBlock Kbf(value=0.5) annotation (Placement(transformation(extent={{-94,42},{-74,62}}))); CarModel.ValueBlock EBD_ON(value=0) annotation (Placement(transformation(extent={{-50,72},{-30,92}}))); CarModel.ValueBlock SC_ON(value=0) annotation (Placement(transformation(extent={{-24,72},{-4,92}}))); annotation ( experiment( StopTime=10, __Dymola_NumberOfIntervals=2000, __Dymola_Algorithm="Radau"), __Dymola_experimentSetupOutput, Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is an experiment designed to test vehicle braking capability. The vehicle accelerates to a predetermined velocity before fully applying the brakes for the remainder of the test.

"), __Dymola_Commands( executeCall={createPlot( id=1, position={38,17,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.wheelSpeed1", "vehicle.brakes.summary.wheelSpeed2", "vehicle.brakes.summary.wheelSpeed3", "vehicle.brakes.summary.wheelSpeed4"}, range={0.0,180.0,-20.0,100.0}, autoerase=false, grid=true, legends={"wheelSpeed1","wheelSpeed2","wheelSpeed3", "wheelSpeed4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"rad/s","rad/s","rad/s","rad/s"}),createPlot( id=2, position={641,20,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={ "vehicle.brakes.eSPPumpcopy.brakeLineSingleCircuitcopy.brakeBias"}, range={0.0,180.0,0.62,0.78}, autoerase=false, grid=true, legends={"brakeBias"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit=""),createPlot( id=4, position={633,424,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.eSPPumpcopy.espPressureWheel_1", "vehicle.brakes.eSPPumpcopy.espPressureWheel_2", "vehicle.brakes.eSPPumpcopy.espPressureWheel_3", "vehicle.brakes.eSPPumpcopy.espPressureWheel_4"}, range={0.0,180.0,-100000.0,1000000.0}, autoerase=false, grid=true, legends={"brakePressure1","brakePressure2","brakePressure3", "brakePressure4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit=""),createPlot( id=5, position={28,422,600,373}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.fx","vehicle.wheel_2.summary.fx", "vehicle.wheel_3.summary.fx","vehicle.wheel_4.summary.fx"}, range={0.0,180.0,-1400.0,400.0}, autoerase=false, grid=true, legends={"longTireForce1","longTireForce2","longTireForce3", "longTireForce4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"N","N","N","N"}),createPlot( id=6, position={1239,25,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.brakePedalPosition"}, range={0.0,180.0,-0.02,0.12000000000000001}, autoerase=false, grid=true, legends={"brakePedalPosition"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m"}),createPlot( id=7, position={1238,432,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalAcceleration"}, range={0.0,180.0,-3.0,0.5}, autoerase=false, grid=true, legends={"longitudinalAcceleration"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m/s2"}),createPlot( id=8, position={1225,504,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalVelocity"}, range={0.0,180.0,20.0,100.0}, autoerase=false, grid=true, legends={"longitudinalVelocity"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"km/h"}),createPlot( id=9, position={95,95,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.kappa", "vehicle.wheel_2.summary.kappa","vehicle.wheel_3.summary.kappa", "vehicle.wheel_4.summary.kappa"}, range={0.0,180.0,-1.2000000000000002,0.3999999999999999}, autoerase=false, grid=true, legends={"tireSlip1","tireSlip2","tireSlip3","tireSlip4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="")} "Braking", file="modelica://Suspensions/Scripts/Analysis/Body Variables.mos" "Body Variables", file="modelica://Suspensions/Scripts/Analysis/Wheel Forces.mos" "Wheel Forces", file= "modelica://Suspensions/Scripts/Analysis/Manual Driver Controls.mos" "Driver Inputs", file= "modelica://Suspensions/Scripts/Analysis/Spring and Damper Forces.mos" "Spring and Damper Forces", file= "modelica://Suspensions/Scripts/Analysis/Spring Deformation and Damper Velocity.mos" "Spring Deformation and Damper Velocity", file="modelica://Suspensions/Scripts/SideViewCar.mos" "Car Side Rotations Transparent Body", file="modelica://Suspensions/Scripts/PlanTransparentBody.mos" "Car Plan Rotations Transparent Body", file= "modelica://Suspensions/Scripts/Front Rotations Transparent Body.mos" "Car Front Rotations Transparent Body")); end FullBraking; model FullBrakingWhileCornering "Braking from speed test" extends VeSyMA.Experiments.Templates.VehicleTest( redeclare replaceable Suspensions.Drivers.Obsolete.TestDriver.SingleStep driver( activationCondition=2, handbrake=false, brakeOveride=true, acceleratorOveride=true, clutchOveride=true, overideDistance=25, acceleratorSource(k=0), clutchSource(k=1), redeclare model brakeSource = Modelica.Blocks.Sources.Ramp ( height=1, duration=0, startTime=1), final initialGear=vehicle.initialGear, stopLogic=false, gearLogic=false, pullAwayStop=false, antiStall=false), redeclare replaceable TSFS02_Lab1_Braking.CarModel.SmallFamilyCar vehicle( v_start=25, initialGear=3, brakes(eSPPumpcopy(brakeBias=Kbf.value)), stabilityControl(deactivationFeedEBD(k=EBD_ON.value), deactivationFeedSC(k=SC_ON.value))), redeclare replaceable VeSyMA.Roads.StaticRoads.GenericRoad road( animation=world.enableAnimation, animateCones=true, r0Cones=[25,1.5; 25,-1.5], mue=1, explicitContact=true, fileName="curvedroad.mat", vOverride=true, vProfile=[0,25; 1000,25]), redeclare replaceable VehicleInterfaces.Atmospheres.ConstantAtmosphere atmosphere); CarModel.ValueBlock Kbf(value=0.5) annotation (Placement(transformation(extent={{-94,42},{-74,62}}))); CarModel.ValueBlock EBD_ON(value=0) annotation (Placement(transformation(extent={{-50,72},{-30,92}}))); CarModel.ValueBlock SC_ON(value=0) annotation (Placement(transformation(extent={{-24,72},{-4,92}}))); annotation ( experiment( StopTime=10, __Dymola_NumberOfIntervals=2000, __Dymola_Algorithm="Radau"), __Dymola_experimentSetupOutput, Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is an experiment designed to test vehicle braking capability. The vehicle accelerates to a predetermined velocity before fully applying the brakes for the remainder of the test.

"), __Dymola_Commands( executeCall={createPlot( id=1, position={38,17,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.wheelSpeed1", "vehicle.brakes.summary.wheelSpeed2", "vehicle.brakes.summary.wheelSpeed3", "vehicle.brakes.summary.wheelSpeed4"}, range={0.0,180.0,-20.0,100.0}, autoerase=false, grid=true, legends={"wheelSpeed1","wheelSpeed2","wheelSpeed3", "wheelSpeed4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"rad/s","rad/s","rad/s","rad/s"}),createPlot( id=2, position={641,20,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={ "vehicle.brakes.eSPPumpcopy.brakeLineSingleCircuitcopy.brakeBias"}, range={0.0,180.0,0.62,0.78}, autoerase=false, grid=true, legends={"brakeBias"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit=""),createPlot( id=4, position={633,424,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.eSPPumpcopy.espPressureWheel_1", "vehicle.brakes.eSPPumpcopy.espPressureWheel_2", "vehicle.brakes.eSPPumpcopy.espPressureWheel_3", "vehicle.brakes.eSPPumpcopy.espPressureWheel_4"}, range={0.0,180.0,-100000.0,1000000.0}, autoerase=false, grid=true, legends={"brakePressure1","brakePressure2","brakePressure3", "brakePressure4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit=""),createPlot( id=5, position={28,422,600,373}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.fx","vehicle.wheel_2.summary.fx", "vehicle.wheel_3.summary.fx","vehicle.wheel_4.summary.fx"}, range={0.0,180.0,-1400.0,400.0}, autoerase=false, grid=true, legends={"longTireForce1","longTireForce2","longTireForce3", "longTireForce4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="", displayUnits={"N","N","N","N"}),createPlot( id=6, position={1239,25,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.brakes.summary.brakePedalPosition"}, range={0.0,180.0,-0.02,0.12000000000000001}, autoerase=false, grid=true, legends={"brakePedalPosition"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m"}),createPlot( id=7, position={1238,432,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalAcceleration"}, range={0.0,180.0,-3.0,0.5}, autoerase=false, grid=true, legends={"longitudinalAcceleration"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"m/s2"}),createPlot( id=8, position={1225,504,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.controlBus.chassisBus.longitudinalVelocity"}, range={0.0,180.0,20.0,100.0}, autoerase=false, grid=true, legends={"longitudinalVelocity"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200}}, timeUnit="", displayUnits={"km/h"}),createPlot( id=9, position={95,95,592,372}, x="vehicle.motion.groundCoordinates.positionGround.s", y={"vehicle.wheel_1.summary.kappa", "vehicle.wheel_2.summary.kappa","vehicle.wheel_3.summary.kappa", "vehicle.wheel_4.summary.kappa"}, range={0.0,180.0,-1.2000000000000002,0.3999999999999999}, autoerase=false, grid=true, legends={"tireSlip1","tireSlip2","tireSlip3","tireSlip4"}, bottomTitleType=2, bottomTitle="Position [m]", colors={{28,108,200},{238,46,47},{0,140,72},{217,67,180}}, timeUnit="")} "Braking", file="modelica://Suspensions/Scripts/Analysis/Body Variables.mos" "Body Variables", file="modelica://Suspensions/Scripts/Analysis/Wheel Forces.mos" "Wheel Forces", file= "modelica://Suspensions/Scripts/Analysis/Manual Driver Controls.mos" "Driver Inputs", file= "modelica://Suspensions/Scripts/Analysis/Spring and Damper Forces.mos" "Spring and Damper Forces", file= "modelica://Suspensions/Scripts/Analysis/Spring Deformation and Damper Velocity.mos" "Spring Deformation and Damper Velocity", file="modelica://Suspensions/Scripts/SideViewCar.mos" "Car Side Rotations Transparent Body", file="modelica://Suspensions/Scripts/PlanTransparentBody.mos" "Car Plan Rotations Transparent Body", file= "modelica://Suspensions/Scripts/Front Rotations Transparent Body.mos" "Car Front Rotations Transparent Body")); end FullBrakingWhileCornering; function BuildRoad "Creates curvedroad.mat to be used with RampBrakingWhileCornering and FullBrakingWhileCornering" algorithm Suspensions.Roads.RoadBuildingFunctions.RoadFromCurvature("curvedroad.mat", [0, 0; 25, 0; 30, 1/50; 120, 1/50], width=[0, 8; 10, 8], showRoad=false); end BuildRoad; end Experiments; package Controllers model MyEBD extends Claytex.Icons.Component; Modelica.Blocks.Interfaces.RealOutput brakeBias annotation (Placement(transformation(extent={{90,10},{110,30}}))); Modelica.Blocks.Interfaces.RealInput controllerActivationSignal annotation (Placement(transformation(extent={{-108,86},{-86,108}}), iconTransformation(extent={{-108,86},{-86,108}}))); // Sensor signals Modelica.Blocks.Interfaces.RealInput a_x annotation (Placement(transformation(extent={{-106,70},{-86,90}}), iconTransformation(extent={{-106,70},{-86,90}}))); Modelica.Blocks.Interfaces.RealInput a_y annotation (Placement(transformation(extent={{-106,52},{-86,72}}), iconTransformation(extent={{-106,52},{-86,72}}))); Modelica.Blocks.Interfaces.RealInput v_x annotation (Placement(transformation(extent={{-108,34},{-86,56}}), iconTransformation(extent={{-108,34},{-86,56}}))); Modelica.Blocks.Interfaces.RealInput Omega_z annotation (Placement(transformation(extent={{-108,14},{-86,36}}), iconTransformation(extent={{-108,14},{-86,36}}))); Modelica.Blocks.Interfaces.RealInput omega_1 annotation (Placement(transformation(extent={{-108,-6},{-86,16}}), iconTransformation(extent={{-108,-6},{-86,16}}))); Modelica.Blocks.Interfaces.RealInput omega_2 annotation (Placement(transformation(extent={{-108,-28},{-86,-6}}), iconTransformation(extent={{-108,-28},{-86,-6}}))); Modelica.Blocks.Interfaces.RealInput omega_3 annotation (Placement(transformation(extent={{-108,-48},{-86,-26}}), iconTransformation(extent={{-108,-48},{-86,-26}}))); Modelica.Blocks.Interfaces.RealInput omega_4 annotation (Placement(transformation(extent={{-108,-70},{-86,-48}}), iconTransformation(extent={{-108,-70},{-86,-48}}))); Modelica.Blocks.Interfaces.RealInput delta_sw annotation (Placement(transformation(extent={{-106,-90},{-86,-70}}), iconTransformation(extent={{-106,-90},{-86,-70}}))); Modelica.Blocks.Interfaces.RealInput F_bp annotation (Placement(transformation(extent={{-106,-110},{-86,-90}}), iconTransformation(extent={{-106,-110},{-86,-90}}))); // Brake pressure distribution Real Kbf; // ------------------------------------------------------------------------- // ----------------- Do not modify anything above this line ---------------- // Parameters parameter Real g = Modelica.Constants.g_n "Gravity constant"; parameter Real pi = Modelica.Constants.pi "Pi"; parameter Real m = 1242; parameter Real h = 0.45; parameter Real L = 2.65; parameter Real l_1 = 1.23; parameter Real R_w = 0.3264; parameter Real J_w = 2.7; parameter Real A_cp = 7.9e-3; parameter Real p_bmax = 1.5e6; parameter Real R_disc = 0.25; parameter Real mu_bp = 1; // Variables equation Kbf = 0.5; //Replace this // ----------------- Do not modify anything under this line ---------------- // ------------------------------------------------------------------------- // Output signal from model if controllerActivationSignal > 0 then brakeBias = max(0, min(1, Kbf)); else brakeBias = 0.5; end if; annotation (); end MyEBD; model MySC extends Claytex.Icons.Component; Modelica.Blocks.Interfaces.RealOutput wheel_1 annotation (Placement(transformation(extent={{90,50},{110,70}}))); Modelica.Blocks.Interfaces.RealOutput wheel_2 annotation (Placement(transformation(extent={{90,10},{110,30}}))); Modelica.Blocks.Interfaces.RealOutput wheel_3 annotation (Placement(transformation(extent={{90,-30},{110,-10}}))); Modelica.Blocks.Interfaces.RealOutput wheel_4 annotation (Placement(transformation(extent={{90,-70},{110,-50}}))); Modelica.Blocks.Interfaces.RealInput controllerActivationSignal annotation (Placement(transformation(extent={{-108,86},{-86,108}}), iconTransformation(extent={{-108,86},{-86,108}}))); // Sensor signals Modelica.Blocks.Interfaces.RealInput a_x annotation (Placement(transformation(extent={{-106,70},{-86,90}}), iconTransformation(extent={{-106,70},{-86,90}}))); Modelica.Blocks.Interfaces.RealInput a_y annotation (Placement(transformation(extent={{-106,52},{-86,72}}), iconTransformation(extent={{-106,52},{-86,72}}))); Modelica.Blocks.Interfaces.RealInput v_x annotation (Placement(transformation(extent={{-108,34},{-86,56}}), iconTransformation(extent={{-108,34},{-86,56}}))); Modelica.Blocks.Interfaces.RealInput Omega_z annotation (Placement(transformation(extent={{-108,14},{-86,36}}), iconTransformation(extent={{-108,14},{-86,36}}))); Modelica.Blocks.Interfaces.RealInput omega_1 annotation (Placement(transformation(extent={{-108,-6},{-86,16}}), iconTransformation(extent={{-108,-6},{-86,16}}))); Modelica.Blocks.Interfaces.RealInput omega_2 annotation (Placement(transformation(extent={{-108,-28},{-86,-6}}), iconTransformation(extent={{-108,-28},{-86,-6}}))); Modelica.Blocks.Interfaces.RealInput omega_3 annotation (Placement(transformation(extent={{-108,-48},{-86,-26}}), iconTransformation(extent={{-108,-48},{-86,-26}}))); Modelica.Blocks.Interfaces.RealInput omega_4 annotation (Placement(transformation(extent={{-108,-70},{-86,-48}}), iconTransformation(extent={{-108,-70},{-86,-48}}))); Modelica.Blocks.Interfaces.RealInput delta_sw annotation (Placement(transformation(extent={{-106,-90},{-86,-70}}), iconTransformation(extent={{-106,-90},{-86,-70}}))); Modelica.Blocks.Interfaces.RealInput F_bp annotation (Placement(transformation(extent={{-106,-110},{-86,-90}}), iconTransformation(extent={{-106,-110},{-86,-90}}))); // Normalized brake pressures // Limits the maximum brake pressure applied Real ub1; Real ub2; Real ub3; Real ub4; // ------------------------------------------------------------------------- // ----------------- Do not modify anything above this line ---------------- // Parameters parameter Real g = Modelica.Constants.g_n "Gravity constant"; parameter Real pi = Modelica.Constants.pi "Pi"; parameter Real m = 1242; parameter Real h = 0.45; parameter Real L = 2.65; parameter Real l_1 = 1.23; parameter Real R_w = 0.315; parameter Real J_w = 2.7; parameter Real A_cp = 7.9e-3; parameter Real p_bmax = 1.5e6; parameter Real R_disc = 0.25; parameter Real mu_bp = 1; // Variables equation ub1 = 1; //Replace this ub2 = 1; //Replace this ub3 = 1; //Replace this ub4 = 1; //Replace this // ----------------- Do not modify anything under this line ---------------- // ------------------------------------------------------------------------- // Output signal from model if controllerActivationSignal > 0 then wheel_1 = max(0, min(1, ub1)); wheel_2 = max(0, min(1, ub2)); wheel_3 = max(0, min(1, ub3)); wheel_4 = max(0, min(1, ub4)); else wheel_1 = 1; wheel_2 = 1; wheel_3 = 1; wheel_4 = 1; end if; annotation (Diagram(coordinateSystem(extent={{-100,-100},{100,100}})), Icon(coordinateSystem(extent={{-100,-120},{100,100}}))); end MySC; end Controllers; package CarModel model BrakeLineCircuit "Brake Line configuration with bias for a single circuit system" parameter Integer splitConfig=1 "Configuration" annotation (choices( choice=1 "Front-Rear", choice=2 "Diagonal Front-Rear", choice=3 "Triangular Front-Rear")); parameter Real maxRear=0.9 "Maximum normalised rear force"; parameter Real staticBrakeBias=0.5; Modelica.Blocks.Interfaces.RealOutput wheel_1(unit="Pa") annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-100,-60}))); Modelica.Blocks.Interfaces.RealOutput wheel_2(unit="Pa") annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-100,60}))); Modelica.Blocks.Interfaces.RealOutput wheel_3(unit="Pa") annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={100,-60}))); Modelica.Blocks.Interfaces.RealOutput wheel_4(unit="Pa") annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={100,60}))); Modelica.Blocks.Interfaces.RealOutput brakeBias annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,-60}))); Modelica.Blocks.Interfaces.RealInput linePressure annotation (Placement( transformation( extent={{-20,-20},{20,20}}, rotation=270, origin={0,100}))); Modelica.Blocks.Interfaces.RealInput dynamicBrakeBias annotation (Placement( transformation( extent={{-20,-20},{20,20}}, rotation=270, origin={-60,100}))); Modelica.Blocks.Interfaces.RealInput deactivationFeedEBD annotation (Placement( transformation( extent={{-20,-20},{20,20}}, rotation=270, origin={60,100}))); equation if deactivationFeedEBD > 0 then brakeBias = dynamicBrakeBias; else brakeBias = staticBrakeBias; end if; if splitConfig == 1 then wheel_1 = (linePressure*brakeBias)/2; wheel_2 = (linePressure*brakeBias)/2; wheel_3 = (linePressure*(1 - brakeBias))/2; wheel_4 = (linePressure*(1 - brakeBias))/2; elseif splitConfig == 2 then wheel_1 = (linePressure*brakeBias)/2; wheel_2 = (linePressure*(1 - brakeBias))/2; wheel_3 = min((linePressure*brakeBias)/2, maxRear); wheel_4 = min((linePressure*(1 - brakeBias))/2, maxRear); else wheel_1 = ((linePressure*brakeBias)/2)*0.5 + ((linePressure*(1 - brakeBias)))*0.5; wheel_2 = ((linePressure*brakeBias)/2)*0.5 + ((linePressure*(1 - brakeBias)))*0.5; wheel_3 = min(((linePressure*brakeBias)/2), maxRear); wheel_4 = min(((linePressure*(1 - brakeBias))), maxRear); end if; annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}})), Icon(graphics={Rectangle( extent={{-100,100},{100,-100}}, lineColor={0,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid),Line( points={{-20,100},{-20,60},{-90,60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 2),Line( points={{20,100},{20,60},{90,60}}, color={255,0,0}, smooth=Smooth.None, visible=splitConfig == 2),Line( points={{-20,60},{20,-60},{90,-60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 2),Line( points={{20,60},{-20,-60},{-90,-60}}, color={255,0,0}, smooth=Smooth.None, visible=splitConfig == 2),Rectangle( extent={{51,-51},{69,-69}}, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, visible=splitConfig == 2),Rectangle( extent={{51,69},{69,51}}, lineColor={255,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, visible=splitConfig == 2),Line( points={{-20,100},{-20,64},{-90,64}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 3),Line( points={{-20,64},{-20,-58},{-90,-58}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 3),Line( points={{-20,-58},{90,-58}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 3),Line( points={{20,100},{20,58},{-90,58}}, color={255,0,0}, smooth=Smooth.None, visible=splitConfig == 3),Line( points={{20,100},{20,-64},{-90,-64}}, color={255,0,0}, smooth=Smooth.None, visible=splitConfig == 3),Line( points={{20,58},{90,58}}, color={255,0,0}, smooth=Smooth.None, visible=splitConfig == 3),Rectangle( extent={{51,69},{69,51}}, lineColor={255,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, visible=splitConfig == 3),Rectangle( extent={{51,-51},{69,-69}}, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, visible=splitConfig == 3),Line( points={{-16,100},{-16,0},{-72,0},{-72,60},{-88,60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 1),Line( points={{-72,0},{-72,-60},{-88,-60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 1),Line( points={{14,100},{14,0},{70,0},{70,60},{86,60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 1),Line( points={{70,0},{70,-60},{86,-60}}, color={0,0,255}, smooth=Smooth.None, visible=splitConfig == 1)}), Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

Brake line configuration model for transferring line pressure to the individual brakes. The model receives a similar value of brake line pressure, distributing the pressure to the four wheels according to the brakeBias and maxRear parameters and the configuration selected with the splitConfig parameter. The brakeBias parameter is used to split the input pressure into front and rear components, with maxRear being used to limit the amount of pressure the rear brakes can experience (analogous to a blow off value).

The parameter splitConfig controls the distribution configuration of the braking signals to each of the wheels.

This component is for use in single circuit systems.

")); end BrakeLineCircuit; model HydraulicCircuit "Braking system" extends VeSyMA.Brakes.Templates.FourWheelBrakes( final includeManualHandbrake=true, redeclare replaceable Suspensions.Brakes.Summary.ESPEnabledBrakes summary( wheelSpeed1=wheelSpeed_1.w, wheelSpeed2=wheelSpeed_2.w, wheelSpeed3=wheelSpeed_3.w, wheelSpeed4=wheelSpeed_4.w, handbrakeForce3=wheel3Handbrake.fInput, handbrakeForce4=wheel4Handbrake.fInput, brakeTorque1=brake_1.brake.flange_a.tau, brakeTorque2=brake_2.brake.flange_a.tau, brakeTorque3=brake_3.brake.flange_a.tau, brakeTorque4=brake_4.brake.flange_a.tau, brakePedalPosition=vacuumBooster.positionSensor.s, brakeForce1=brake_1.fInput, brakeForce2=brake_2.fInput, brakeForce3=brake_3.fInput, brakeForce4=brake_4.fInput, plungerForce=vacuumBooster.plungerForce, masterCylinderPressure=singleMasterCylinder.brakeLinePressure, espPressure1=eSPPumpcopy.add_1.u2, espPressure2=eSPPumpcopy.add_2.u2, espPressure3=eSPPumpcopy.add_3.u2, espPressure4=eSPPumpcopy.add_4.u2, brakePistonPressure1=caliperPistonWheel_1.linePressure, brakePistonPressure2=caliperPistonWheel_2.linePressure, brakePistonPressure3=caliperPistonWheel_3.linePressure, brakePistonPressure4=caliperPistonWheel_4.linePressure), redeclare VeSyMA.Brakes.Components.Brake brake_1(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=10000)), redeclare VeSyMA.Brakes.Components.Brake brake_2(redeclare Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=10000)), redeclare VeSyMA.Brakes.Components.Brake brake_3(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=10000)), redeclare VeSyMA.Brakes.Components.Brake brake_4(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=10000))); replaceable VeSyMA.Brakes.Components.VacuumBoosterPosition vacuumBooster constrainedby VeSyMA.Brakes.Interfaces.VacuumBooster annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,60}))); VeSyMA.Brakes.Components.SingleCircuitMasterCylinder singleMasterCylinder(D=0.025) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,20}))); VeSyMA.Brakes.Components.CaliperPiston caliperPistonWheel_2 annotation ( Placement(transformation( extent={{-10,10},{10,-10}}, rotation=90, origin={-40,10}))); VeSyMA.Brakes.Components.CaliperPiston caliperPistonWheel_1 annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={-40,-30}))); VeSyMA.Brakes.Components.CaliperPiston caliperPistonWheel_4 annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=90, origin={40,10}))); VeSyMA.Brakes.Components.CaliperPiston caliperPistonWheel_3 annotation ( Placement(transformation( extent={{-10,10},{10,-10}}, rotation=270, origin={40,-30}))); ESPABSPump eSPPumpcopy( firstOrder1(initType=Claytex.Types.Init.InitialState), firstOrder2(initType=Claytex.Types.Init.InitialState), firstOrder(initType=Claytex.Types.Init.InitialState), firstOrder3(initType=Claytex.Types.Init.InitialState)) annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={0,-10}))); VeSyMA.Brakes.Components.Brake wheel4Handbrake( redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=handbrakeForce.k), leftWheel=false, animation=animation, specularCoefficient=specularCoefficient, caliper( r_shape={wheel4Handbrake.disc.length*0.55,-wheel4Handbrake.disc.outerDiameter *0.55,0}, lengthDirection(displayUnit="1") = {0,1,0}, widthDirection(displayUnit="1") = {0,-1,0}, height=abs(wheel4Handbrake.disc.outerDiameter*0.45))) "Handbrake model for wheel 4" annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=90, origin={90,40})), choicesAllMatching=true); VeSyMA.Brakes.Components.Brake wheel3Handbrake( redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(tau_max=handbrakeForce.k), leftWheel=true, animation=animation, specularCoefficient=specularCoefficient, caliper( r_shape={wheel3Handbrake.disc.length*0.55,-wheel3Handbrake.disc.outerDiameter *0.55,0}, lengthDirection(displayUnit="1") = {0,1,0}, widthDirection(displayUnit="1") = {0,-1,0}, height=abs(wheel3Handbrake.disc.outerDiameter*0.45))) "Handbrake model for wheel 3" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=90, origin={90,-40})), choicesAllMatching=true); Modelica.Mechanics.Translational.Sensors.PositionSensor positionSensor1 annotation (Placement(transformation( origin={88,0}, extent={{5,-5},{-5,5}}, rotation=0))); Modelica.Blocks.Math.Gain handbrakeForce(k=15000) "Gain to convert position to handbrake force" annotation (Placement( transformation( extent={{-7,7},{7,-7}}, rotation=180, origin={70,0}))); equation connect(controlBus, eSPPumpcopy.controlBus) annotation (Line( points={{-100,60},{-100,60},{-100,-100},{0,-100},{0,-20}}, color={255,204,51}, thickness=0.5)); connect(brakePedal, vacuumBooster.pedalInput) annotation (Line(points={{0,100},{0,70}}, color={0,127,0})); connect(eSPPumpcopy.espPressureWheel_4, caliperPistonWheel_4.linePressure) annotation (Line(points={{23.2,-5},{40,-5},{40,0}}, color={0,0,127})); connect(eSPPumpcopy.espPressureWheel_3, caliperPistonWheel_3.linePressure) annotation (Line(points={{23,-15},{40,-15},{40,-20}}, color={0,0,127})); connect(eSPPumpcopy.espPressureWheel_2, caliperPistonWheel_2.linePressure) annotation (Line(points={{-19.4,-5.2},{-40,-5.2},{-40,0}}, color={0,0,127})); connect(eSPPumpcopy.espPressureWheel_1, caliperPistonWheel_1.linePressure) annotation (Line(points={{-22.8,-14.2},{-40,-14.2},{-40,-20}}, color={0,0,127})); connect(singleMasterCylinder.brakeLinePressure, eSPPumpcopy.linePressure) annotation (Line(points={{0,10},{0,0}}, color={0,0,127})); connect(vacuumBooster.plungerForce, singleMasterCylinder.plungerForce) annotation (Line(points={{0,50},{0,30}}, color={0,0,127})); connect(brake_2.fInput, caliperPistonWheel_2.padForce) annotation (Line( points={{-50,60},{-40,60},{-40,20}}, color={0,0,127})); connect(caliperPistonWheel_3.padForce, brake_3.fInput) annotation (Line( points={{40,-40},{40,-60},{50,-60}}, color={0,0,127})); connect(caliperPistonWheel_4.padForce, brake_4.fInput) annotation (Line(points={{40,20},{40,60},{50,60}}, color={0,0,127})); connect(caliperPistonWheel_1.padForce, brake_1.fInput) annotation (Line( points={{-40,-40},{-40,-60},{-50,-60}}, color={0,0,127})); connect(wheel3Handbrake.wheelHub, wheelHub_3) annotation (Line( points={{90,-50},{90,-74},{60,-74},{60,-100}}, color={135,135,135}, thickness=0.5)); connect(wheel4Handbrake.wheelHub, wheelHub_4) annotation (Line( points={{90,50},{90,74},{60,74},{60,100}}, color={135,135,135}, thickness=0.5)); connect(handbrakeForce.u, positionSensor1.s) annotation (Line(points={{78.4, -1.77636e-15},{80,-1.77636e-15},{80,0},{82.5,0}}, color={0,0,127})); connect(handbrakeForce.y, wheel4Handbrake.fInput) annotation (Line( points={{62.3,0},{60,0},{60,40},{80,40}}, color={0,0,127})); connect(handbrakeForce.y, wheel3Handbrake.fInput) annotation (Line( points={{62.3,0},{60,0},{60,-40},{80,-40}}, color={0,0,127})); connect(handbrakeCable, positionSensor1.flange) annotation (Line(points={{100,0},{93,0}}, color={0,127,0})); annotation (Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

This is a Pseudo-Hydraulic braking model, simulating the action of a hydraulic braking system within a vehcile equipped with an Electronic Stability Programme (ESP). The model works in the same way as the VeSyMA.Brakes.IndependentBrakes.SingleCircuit model, but with the added architecture of an ESP system.


The ESPPump recieves signals from the espController through the brakesControlBus and generates a brake line pressure which is fed into each of the invidiual wheel CaliperPiston models depending upon the action dictated by the espController logic.

The handbrake requires the manual input and uses a separate brake model to the conventional brakes. This allows the handbrake to be entirely separate to the ESP system and not interfere with their working. The handbrake cable position is converted to a force in the handbrakeForce block, where k is the ratio of position travel to force.

"), Icon(graphics={Rectangle( extent={{-2,18},{2,10}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={215,215,215}),Rectangle( extent={{-18,-10},{18,10}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={0,0,0}),Polygon( points={{-2,26},{2,26},{0,18},{-2,26}}, lineColor={0,127,0}, lineThickness=0.5, fillColor={0,127,0}, fillPattern=FillPattern.Solid),Line( points={{0,24},{0,94}}, color={0,127,0}, thickness=0.5),Line(points={{-4,-18},{-4,-68},{-38,-68}}, color={0,0,0}),Line(points={{-12,-18},{-12,-22},{-34,-22},{-34,48}, {-38,48}}, color={0,0,0}),Rectangle( extent={{-14,-10},{-10,-18}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={135,135,135}),Rectangle( extent={{-6,-10},{-2,-18}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={135,135,135}),Rectangle( extent={{2,-10},{6,-18}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={135,135,135}),Rectangle( extent={{10,-10},{14,-18}}, lineColor={0,0,0}, fillPattern=FillPattern.VerticalCylinder, fillColor={135,135,135}),Line( points={{-90,60},{-84,60},{-84,0},{-18,0}}, color={255,204,51}, thickness=0.5),Line(points={{4,-18},{4,-68},{38,-68}}, color={0,0,0}),Line(points={{12,-18},{12,-22},{34,-22},{34,48},{ 38,48}}, color={0,0,0}),Text( extent={{-84,2},{-38,-26}}, lineColor={255,204,51}, fillPattern=FillPattern.VerticalCylinder, fillColor={135,135,135}, textString="ESP"),Polygon( points={{80,60},{80,58},{82,48},{80,38},{80,36},{70,36},{70, 42},{72,48},{70,54},{70,60},{80,60}}, lineColor={255,0,0}, smooth=Smooth.Bezier, fillColor={255,0,0}, fillPattern=FillPattern.Solid),Polygon( points={{80,-56},{80,-58},{82,-68},{80,-78},{80,-80},{70,-80}, {70,-74},{72,-68},{70,-62},{70,-56},{80,-56}}, lineColor={255,0,0}, smooth=Smooth.Bezier, fillColor={255,0,0}, fillPattern=FillPattern.Solid),Line(points={{80,48},{80,-68}}, color={0,140,72}),Line(points={{100,0},{80,0}}, color={0,140,72})})); end HydraulicCircuit; model ESPABSPump "Hydraulic pump which actuates the brakes under command of the ESP controller" extends Claytex.Icons.Component; parameter Modelica.Units.SI.Pressure maxESPPresure=1500000 "The maximum pressure the ESP pump can generate"; parameter Modelica.Units.SI.Time tConstant=0.002 "Time Constant for actuators"; parameter Integer splitConfig=1 "Configuration" annotation (choices( choice=1 "Front-Rear", choice=2 "Diagonal Front-Rear", choice=3 "Triangular Front-Rear")); parameter Real brakeBias=0.5 "Normalised brake force from front"; parameter Real maxRear=0.9 "Maximum normalised rear force"; parameter Modelica.Units.SI.Time filterT_1=0.01 "Filter time constant to replicate inherent smoothing of actual sensor feeds"; parameter Modelica.Units.SI.Time filterT_2=0.01 "Filter time constant to replicate inherent smoothing of actual sensor feeds"; parameter Modelica.Units.SI.Time filterT_3=0.01 "Filter time constant to replicate inherent smoothing of actual sensor feeds"; parameter Modelica.Units.SI.Time filterT_4=0.01 "Filter time constant to replicate inherent smoothing of actual sensor feeds"; Modelica.Blocks.Interfaces.RealOutput espPressureWheel_1 annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-228,-42}))); Modelica.Blocks.Interfaces.RealOutput espPressureWheel_2 annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-194,48}))); Modelica.Blocks.Interfaces.RealOutput espPressureWheel_3 annotation (Placement(transformation(extent={{220,-60},{240,-40}}))); Modelica.Blocks.Interfaces.RealOutput espPressureWheel_4 annotation (Placement(transformation(extent={{222,40},{242,60}}))); VehicleInterfaces.Interfaces.ControlBus controlBus annotation ( Placement(transformation( extent={{-20,-20},{20,20}}, rotation=180, origin={0,-100}))); Modelica.Blocks.Math.Add add_2 annotation (Placement(transformation(extent={{-26,40},{-46,60}}))); Modelica.Blocks.Math.Add add_1 annotation (Placement(transformation(extent={{-28,-60},{-48,-40}}))); Modelica.Blocks.Math.Add add_3 annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={38,-50}))); Modelica.Blocks.Math.Add add_4 annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={38,50}))); Modelica.Blocks.Interfaces.RealInput linePressure annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,100}))); TSFS02_Lab1_Braking.CarModel.BrakeLineCircuit brakeLineSingleCircuitcopy( final splitConfig=splitConfig, final maxRear=maxRear, staticBrakeBias=brakeBias) annotation (Placement(transformation(extent={{-10,60},{10,80}}))); protected VehicleInterfaces.Interfaces.BrakesControlBus brakesControlBus annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=90, origin={0,-56}))); public Claytex.Blocks.Math.LargestSignal largestSignal annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-160,74}))); Claytex.Blocks.Math.LargestSignal largestSignal1 annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={-188,-22}))); Claytex.Blocks.Math.LargestSignal largestSignal2 annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, origin={200,-26}))); Claytex.Blocks.Math.LargestSignal largestSignal3 annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, origin={202,76}))); Modelica.Blocks.Sources.Constant const1(k=0) annotation (Placement(transformation(extent={{-146,-24},{-162,-8}}))); Modelica.Blocks.Sources.Constant const2(k=0) annotation (Placement(transformation(extent={{-32,72},{-48,88}}))); Modelica.Blocks.Sources.Constant const3(k=0) annotation (Placement(transformation(extent={{30,74},{46,90}}))); Modelica.Blocks.Sources.Constant const4(k=0) annotation (Placement(transformation(extent={{144,-16},{160,0}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder(final T=filterT_1, k= maxESPPresure) annotation (Placement(transformation(extent={{-14,-78},{-26,-66}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder1(final T=filterT_2, k= maxESPPresure) annotation (Placement(transformation(extent={{-4,38},{-16,50}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder2(final T=filterT_3, k= maxESPPresure) annotation (Placement(transformation(extent={{2,38},{14,50}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder3(final T=filterT_4, k= maxESPPresure) annotation (Placement(transformation(extent={{8,-78},{20,-66}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder4(final T=filterT_1, k= maxESPPresure, initType=Claytex.Types.Init.InitialState) annotation (Placement(transformation(extent={{-54,-80},{-66,-68}}))); SmallestSignal smallestSignal annotation (Placement(transformation(extent={{-98,42},{-120,62}}))); SmallestSignal smallestSignal1 annotation (Placement(transformation(extent={{-142,-66},{-164,-46}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder5(final T=filterT_2, k= maxESPPresure, initType=Claytex.Types.Init.InitialState) annotation (Placement(transformation(extent={{-36,18},{-48,30}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder6(final T=filterT_4, k= maxESPPresure, initType=Claytex.Types.Init.InitialState) annotation (Placement(transformation(extent={{44,-80},{56,-68}}))); SmallestSignal smallestSignal2 annotation (Placement(transformation(extent={{148,-66},{170,-46}}))); Claytex.Blocks.Continuous.FirstOrder firstOrder7(final T=filterT_3, k= maxESPPresure, initType=Claytex.Types.Init.InitialState) annotation (Placement(transformation(extent={{34,14},{46,26}}))); SmallestSignal smallestSignal3 annotation (Placement(transformation(extent={{138,34},{160,54}}))); Modelica.Blocks.Math.Product product1 annotation (Placement(transformation(extent={{-38,-6},{-48,4}}))); Modelica.Blocks.Sources.Constant const5(k=2) annotation (Placement(transformation(extent={{-22,-18},{-30,-10}}))); Modelica.Blocks.Math.Product product2 annotation (Placement(transformation(extent={{-70,16},{-80,26}}))); Modelica.Blocks.Math.Product product3 annotation (Placement(transformation(extent={{-84,-40},{-94,-30}}))); Modelica.Blocks.Math.Product product4 annotation (Placement(transformation(extent={{46,-12},{56,-2}}))); Modelica.Blocks.Math.Product product5 annotation (Placement(transformation(extent={{84,22},{94,32}}))); Modelica.Blocks.Sources.Constant const6(k=2) annotation (Placement(transformation(extent={{32,-20},{38,-14}}))); Modelica.Blocks.Math.Product product6 annotation (Placement(transformation(extent={{84,-42},{94,-32}}))); Modelica.Blocks.Math.Add add_5(k2=-1) annotation (Placement(transformation( extent={{-4,-4},{4,4}}, rotation=0, origin={36,-4}))); Modelica.Blocks.Sources.Constant const7(k=1) annotation (Placement(transformation(extent={{20,2},{26,8}}))); equation connect(controlBus.brakesControlBus, brakesControlBus) annotation (Line( points={{-0.1,-100.1},{-0.1,-50},{0,-50},{0,-56}}, color={255,204,51}, thickness=0.5)); connect(brakeLineSingleCircuitcopy.wheel_2, add_2.u1) annotation (Line( points={{-10,76},{-20,76},{-20,56},{-24,56}}, color={0,0,127})); connect(brakeLineSingleCircuitcopy.wheel_4, add_4.u1) annotation (Line( points={{10,76},{20,76},{20,56},{26,56}}, color={0,0,127})); connect(brakeLineSingleCircuitcopy.wheel_1, add_1.u1) annotation (Line( points={{-10,64},{-18,64},{-18,-44},{-26,-44}}, color={0,0,127})); connect(brakeLineSingleCircuitcopy.wheel_3, add_3.u1) annotation (Line( points={{10,64},{16,64},{16,-44},{26,-44}}, color={0,0,127})); connect(largestSignal.y, espPressureWheel_2) annotation (Line(points={{-171,74}, {-178,74},{-178,48},{-194,48}}, color={0,0,127})); connect(largestSignal1.y, espPressureWheel_1) annotation (Line(points={{-199, -22},{-208,-22},{-208,-42},{-228,-42}}, color={0,0,127})); connect(largestSignal2.y, espPressureWheel_3) annotation (Line(points={{211,-26}, {216,-26},{216,-50},{230,-50}}, color={0,0,127})); connect(largestSignal3.y, espPressureWheel_4) annotation (Line(points={{213,76}, {218,76},{218,50},{232,50}}, color={0,0,127})); connect(const1.y, largestSignal1.u2) annotation (Line(points={{-162.8,-16},{-176,-16}}, color={0,0,127})); connect(largestSignal.u2, const2.y) annotation (Line(points={{-148,80},{-48.8,80}},color={0,0,127})); connect(largestSignal3.u2, const3.y) annotation (Line(points={{190,82},{46.8,82}},color={0,0,127})); connect(largestSignal2.u2, const4.y) annotation (Line(points={{188,-20},{174,-20},{174,-8},{160.8,-8}}, color={0,0,127})); connect(firstOrder1.y, add_2.u2) annotation (Line(points={{-16.6,44},{-24,44}}, color={0,0,127})); connect(firstOrder1.u, brakesControlBus.espWheel2) annotation (Line( points={{-2.8,44},{-2,44},{-2,-56},{0,-56}}, color={0,0,127})); connect(firstOrder2.y, add_4.u2) annotation (Line(points={{14.6,44},{26,44}}, color={0,0,127})); connect(firstOrder2.u, brakesControlBus.espWheel4) annotation (Line(points={{0.8,44},{0,44},{0,-56}}, color={0,0,127})); connect(firstOrder.u, brakesControlBus.espWheel1) annotation (Line( points={{-12.8,-72},{-8,-72},{-8,-56},{0,-56}}, color={0,0,127})); connect(add_1.u2, firstOrder.y) annotation (Line(points={{-26,-56},{-26, -56},{-20,-56},{-20,-62},{-34,-62},{-34,-62},{-34,-72},{-26.6,-72}}, color={0,0,127})); connect(firstOrder3.u, brakesControlBus.espWheel3) annotation (Line( points={{6.8,-72},{6,-72},{6,-56},{0,-56}}, color={0,0,127})); connect(firstOrder3.y, add_3.u2) annotation (Line(points={{20.6,-72},{22, -72},{22,-56},{26,-56}}, color={0,0,127})); connect(linePressure, brakeLineSingleCircuitcopy.linePressure) annotation (Line(points={{0,100},{0,80}}, color={0,0,127})); connect(brakesControlBus.deactivationFeedEBD, brakeLineSingleCircuitcopy.deactivationFeedEBD) annotation (Line( points={{0,-56},{14,-56},{14,80},{6,80}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(brakesControlBus.brakeBias, brakeLineSingleCircuitcopy.dynamicBrakeBias) annotation (Line( points={{0,-56},{-14,-56},{-14,80},{-6,80}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(brakesControlBus.absWheel1, firstOrder4.u) annotation (Line( points={{0,-56},{-38,-56},{-38,-74},{-52.8,-74}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(add_1.y, smallestSignal1.u1) annotation (Line(points={{-49,-50},{-139.8,-50}},color={0,0,127})); connect(smallestSignal1.y, largestSignal1.u1) annotation (Line(points={{-165.1, -56},{-165.1,-44},{-176,-44},{-176,-28}}, color={0,0,127})); connect(add_2.y, smallestSignal.u1) annotation (Line(points={{-47,50},{-68,50},{-68,58},{-95.8,58}}, color={0,0,127})); connect(smallestSignal.y, largestSignal.u1) annotation (Line(points={{-121.1, 52},{-136,52},{-136,68},{-148,68}}, color={0,0,127})); connect(brakesControlBus.absWheel2, firstOrder5.u) annotation (Line( points={{0,-56},{-14,-56},{-14,24},{-34.8,24}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(add_3.y, smallestSignal2.u1) annotation (Line(points={{49,-50},{145.8,-50}},color={0,0,127})); connect(smallestSignal2.y, largestSignal2.u1) annotation (Line(points={{171.1, -56},{180,-56},{180,-32},{188,-32}}, color={0,0,127})); connect(brakesControlBus.absWheel3, firstOrder6.u) annotation (Line( points={{0,-56},{21,-56},{21,-74},{42.8,-74}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(brakesControlBus.absWheel4, firstOrder7.u) annotation (Line( points={{0,-56},{14,-56},{14,20},{32.8,20}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); connect(add_4.y, smallestSignal3.u1) annotation (Line(points={{49,50},{135.8,50}},color={0,0,127})); connect(smallestSignal3.y, largestSignal3.u1) annotation (Line(points={{161.1, 44},{174,44},{174,70},{190,70}}, color={0,0,127})); connect(product1.u1, brakeLineSingleCircuitcopy.brakeBias) annotation ( Line(points={{-37,2},{-2,2},{-2,64},{0,64}}, color={0,0,127})); connect(const5.y, product1.u2) annotation (Line(points={{-30.4,-14},{-37, -14},{-37,-4}}, color={0,0,127})); connect(product1.y, product2.u2) annotation (Line(points={{-48.5,-1},{ -59.25,-1},{-59.25,18},{-69,18}}, color={0,0,127})); connect(firstOrder5.y, product2.u1) annotation (Line(points={{-48.6,24},{-69,24}}, color={0,0,127})); connect(product2.y, smallestSignal.u2) annotation (Line(points={{-80.5,21}, {-80.5,46},{-95.8,46}}, color={0,0,127})); connect(product1.y, product3.u1) annotation (Line(points={{-48.5,-1},{ -48.5,-17.5},{-83,-17.5},{-83,-32}}, color={0,0,127})); connect(firstOrder4.y, product3.u2) annotation (Line(points={{-66.6,-74}, {-76,-74},{-76,-38},{-83,-38}}, color={0,0,127})); connect(product3.y, smallestSignal1.u2) annotation (Line(points={{-94.5, -35},{-117.25,-35},{-117.25,-62},{-139.8,-62}}, color={0,0,127})); connect(const6.y, product4.u2) annotation (Line(points={{38.3,-17},{42.15, -17},{42.15,-10},{45,-10}}, color={0,0,127})); connect(product4.y, product5.u2) annotation (Line(points={{56.5,-7},{ 70.25,-7},{70.25,24},{83,24}}, color={0,0,127})); connect(firstOrder7.y, product5.u1) annotation (Line(points={{46.6,20},{ 64,20},{64,30},{83,30}}, color={0,0,127})); connect(product5.y, smallestSignal3.u2) annotation (Line(points={{94.5,27}, {115.25,27},{115.25,38},{135.8,38}}, color={0,0,127})); connect(product4.y, product6.u1) annotation (Line(points={{56.5,-7},{ 64.25,-7},{64.25,-34},{83,-34}}, color={0,0,127})); connect(firstOrder6.y, product6.u2) annotation (Line(points={{56.6,-74},{ 70,-74},{70,-40},{83,-40}}, color={0,0,127})); connect(product6.y, smallestSignal2.u2) annotation (Line(points={{94.5, -37},{119.25,-37},{119.25,-62},{145.8,-62}}, color={0,0,127})); connect(brakeLineSingleCircuitcopy.brakeBias, add_5.u2) annotation (Line( points={{0,64},{14,64},{14,-6.4},{31.2,-6.4}}, color={0,0,127})); connect(add_5.y, product4.u1) annotation (Line(points={{40.4,-4},{45,-4}}, color={0,0,127})); connect(const7.y, add_5.u1) annotation (Line(points={{26.3,5},{26.3,0.5}, {31.2,0.5},{31.2,-1.6}}, color={0,0,127})); annotation ( Icon(coordinateSystem(preserveAspectRatio=false), graphics={Rectangle( extent={{-14.5,4.5},{14.5,-4.5}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={244,125,35}, origin={-40.5,31.5}, rotation=90),Rectangle( extent={{-8,11},{8,-11}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={244,125,35}, origin={0,-77}, rotation=90),Rectangle( extent={{-72,-12},{-54,-34}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={175,175,175}),Rectangle( extent={{-12,-68},{12,-72}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={255,170,85}),Rectangle( extent={{-14.5,4.5},{14.5,-4.5}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={244,125,35}, origin={-14.5,31.5}, rotation=90),Rectangle( extent={{-14.5,4.5},{14.5,-4.5}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={244,125,35}, origin={19.5,31.5}, rotation=90),Rectangle( extent={{-14.5,4.5},{14.5,-4.5}}, lineColor={0,0,0}, fillPattern=FillPattern.HorizontalCylinder, fillColor={244,125,35}, origin={45.5,31.5}, rotation=90),Rectangle( extent={{-43,55},{43,-55}}, lineColor={0,0,0}, fillColor={135,135,135}, fillPattern=FillPattern.HorizontalCylinder, origin={1,-25}, rotation=90)}), Diagram(coordinateSystem(preserveAspectRatio=false)), Documentation(revisions="

   


Copyright © 2015-2020, Claytex Services Limited

", info="

Depending upon the ESP control signal supplied, this model either generates an additional pressure to be inputted into the braking system, acting like a pump, or reduces the pressure in the system, acting like a valve. Each wheel receives an addition/reduction in brake line pressure depending upon the brake force distribution specified in the BrakeLineSingleCircuit model.

A first order filter is included between the pump and each wheel to give an initial representation of actuator dynamics and to reduce a large non-linear system created by the ESP system.

")); end ESPABSPump; model BrakeController extends Suspensions.Control.Interfaces.BaseStabilityController; replaceable TSFS02_Lab1_Braking.CarModel.MyESC baseESC constrainedby Suspensions.Control.Interfaces.BaseESC annotation (Placement(transformation(extent={{-24,74},{30,132}}))); Modelica.Blocks.Sources.Constant deactivationFeedESC(k=0) "Feeds a zero to the signal priority blocks to prevent errors when deactivating individual modules of the stability programme" annotation (Placement(transformation(extent={{-94,126},{-80,140}}))); TSFS02_Lab1_Braking.Controllers.MySC mySC annotation (Placement(transformation(extent={{-18,6},{36,56}}))); Modelica.Blocks.Sources.Constant deactivationFeedSC(k=0) "Feeds a zero to the signal priority blocks to prevent errors when deactivating individual modules of the stability programme" annotation (Placement(transformation(extent={{-64,48},{-50,62}}))); TSFS02_Lab1_Braking.Controllers.MyEBD myEBD annotation (Placement(transformation(extent={{-18,-62},{30,-14}}))); Modelica.Blocks.Sources.Constant deactivationFeedEBD(k=0) "Feeds a zero to the signal priority blocks to prevent errors when deactivating individual modules of the stability programme" annotation (Placement(transformation(extent={{-62,-18},{-48,-4}}))); equation connect(baseESC.steeredAngle, controlBus.driverBus.steeringWheelAngle) annotation (Line(points={{-24,79.8},{-74,79.8},{-74,-99.9},{0.1,-99.9}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.yawRate, controlBus.chassisBus.yawRate) annotation (Line( points={{-24,91.4},{-80,91.4},{-80,-99.9},{0.1,-99.9}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(controlBus.chassisBus.lateralAcceleration, baseESC.a_y) annotation ( Line( points={{0.1,-99.9},{-158,-99.9},{-158,114.6},{-24,114.6}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.wheel_1, brakesControlBus.espWheel1) annotation (Line(points={{30, 120.4},{76,120.4},{76,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.wheel_2, brakesControlBus.espWheel2) annotation (Line(points={{30, 108.8},{76,108.8},{76,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.wheel_3, brakesControlBus.espWheel3) annotation (Line(points={{30,97.2}, {76,97.2},{76,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.wheel_4, brakesControlBus.espWheel4) annotation (Line(points={{30,85.6}, {76,85.6},{76,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(baseESC.controllerActivationSignal, deactivationFeedESC.y) annotation (Line(points={{-24,126.2},{-55,126.2},{-55,133},{-79.3,133}}, color= {0,0,127})); connect(baseESC.v_x, controlBus.chassisBus.longitudinalVelocity) annotation ( Line(points={{-24,103},{-24,104},{-130,104},{-130,-99.9},{0.1,-99.9}}, color= {0,0,127}), Text( string="%second", index=1, extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); connect(mySC.wheel_1, brakesControlBus.absWheel1) annotation (Line(points={{36, 46.9091},{62,46.9091},{62,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(mySC.wheel_2, brakesControlBus.absWheel2) annotation (Line(points={{36, 37.8182},{62,37.8182},{62,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(mySC.wheel_3, brakesControlBus.absWheel3) annotation (Line(points={{36, 28.7273},{62,28.7273},{62,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(mySC.wheel_4, brakesControlBus.absWheel4) annotation (Line(points={{36, 19.6364},{62,19.6364},{62,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(myEBD.brakeBias, brakesControlBus.brakeBias) annotation (Line(points= {{30,-33.2},{76,-33.2},{76,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(deactivationFeedEBD.y, brakesControlBus.deactivationFeedEBD) annotation (Line(points={{-47.3,-11},{72.35,-11},{72.35,2},{100,2}}, color={0,0,127}), Text( string="%second", index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(deactivationFeedSC.y, mySC.controllerActivationSignal) annotation ( Line(points={{-49.3,55},{-33.65,55},{-33.65,55.3182},{-17.19,55.3182}}, color={0,0,127})); connect(controlBus.chassisBus.longitudinalAcceleration, mySC.a_x) annotation ( Line( points={{0.1,-99.9},{-174,-99.9},{-174,51.4545},{-16.92,51.4545}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(mySC.a_y, baseESC.a_y) annotation (Line(points={{-16.92,47.3636}, {-158,47.3636},{-158,114.6},{-24,114.6}}, color={0,0,127})); connect(baseESC.v_x, mySC.v_x) annotation (Line(points={{-24,103},{-24,104},{-130, 104},{-130,44},{-17.19,43.5}}, color={0,0,127})); connect(baseESC.yawRate, mySC.Omega_z) annotation (Line(points={{-24,91.4}, {-80,91.4},{-80,38.9545},{-17.19,38.9545}}, color={0,0,127})); connect(baseESC.steeredAngle, mySC.delta_sw) annotation (Line(points={{-24,79.8}, {-74,79.8},{-74,16},{-16.92,15.0909}}, color={0,0,127})); connect(controlBus.brakesBus.wheelSpeed_1, mySC.omega_1) annotation (Line( points={{0.1,-99.9},{-120,-99.9},{-120,34.4091},{-17.19,34.4091}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(controlBus.brakesBus.wheelSpeed_2, mySC.omega_2) annotation (Line( points={{0.1,-99.9},{-116,-99.9},{-116,29.4091},{-17.19,29.4091}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(controlBus.brakesBus.wheelSpeed_3, mySC.omega_3) annotation (Line( points={{0.1,-99.9},{-112,-99.9},{-112,24.8636},{-17.19,24.8636}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(controlBus.brakesBus.wheelSpeed_4, mySC.omega_4) annotation (Line( points={{0.1,-99.9},{-108,-99.9},{-108,19.8636},{-17.19,19.8636}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(controlBus.driverBus.brakePedalPosition, mySC.F_bp) annotation (Line( points={{0.1,-99.9},{-102,-99.9},{-102,10.5455},{-16.92,10.5455}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); connect(myEBD.controllerActivationSignal, deactivationFeedEBD.y) annotation (Line(points={{-17.28,-14.72},{-30.64,-14.72},{-30.64,-11},{ -47.3,-11}}, color={0,0,127})); connect(myEBD.a_x, mySC.a_x) annotation (Line(points={{-17.04,-18.8},{ -174,-18.8},{-174,51.4545},{-16.92,51.4545}}, color={0,0,127})); connect(myEBD.a_y, baseESC.a_y) annotation (Line(points={{-17.04,-23.12}, {-158,-22},{-158,114.6},{-24,114.6}}, color={0,0,127})); connect(baseESC.v_x, myEBD.v_x) annotation (Line(points={{-24,103},{-24, 104},{-130,104},{-130,-28},{-17.28,-27.2}}, color={0,0,127})); connect(baseESC.yawRate, myEBD.Omega_z) annotation (Line(points={{-24, 91.4},{-80,91.4},{-80,-32},{-17.28,-32}}, color={0,0,127})); connect(baseESC.steeredAngle, myEBD.delta_sw) annotation (Line(points={{ -24,79.8},{-74,79.8},{-74,-58},{-17.04,-57.2}}, color={0,0,127})); connect(myEBD.F_bp, mySC.F_bp) annotation (Line(points={{-17.04,-62},{ -102,-62},{-102,10.5455},{-16.92,10.5455}}, color={0,0,127})); connect(myEBD.omega_4, mySC.omega_4) annotation (Line(points={{-17.28, -52.16},{-108,-52.16},{-108,19.8636},{-17.19,19.8636}}, color={0, 0,127})); connect(myEBD.omega_3, mySC.omega_3) annotation (Line(points={{-17.28, -46.88},{-112,-46.88},{-112,24.8636},{-17.19,24.8636}}, color={0, 0,127})); connect(myEBD.omega_2, mySC.omega_2) annotation (Line(points={{-17.28, -42.08},{-116,-44},{-116,29.4091},{-17.19,29.4091}}, color={0,0, 127})); connect(myEBD.omega_1, mySC.omega_1) annotation (Line(points={{-17.28, -36.8},{-120,-38},{-120,34.4091},{-17.19,34.4091}}, color={0,0, 127})); annotation ( Diagram(coordinateSystem(extent={{-100,-100},{100,100}})), Icon(coordinateSystem(extent={{-100,-100},{100,100}}))); end BrakeController; model SmallFamilyCar "Small family car" extends Suspensions.Vehicles.FrontWheelDrive.SmallFamilyMT(redeclare replaceable TSFS02_Lab1_Braking.CarModel.HydraulicCircuit brakes( usingMultiBodyChassis=true, brake_2(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(cgeo=0.5, tau_max=10000)), brake_4(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(cgeo=0.5, tau_max=10000)), brake_3(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(cgeo=0.5, tau_max=10000)), brake_1(redeclare replaceable Claytex.Mechanics.Rotational.Parts.ElasticBrake brake(cgeo=0.5, tau_max=10000))), redeclare Suspensions.Bodies.Ideal.SmallFamilyBootPayload body); replaceable TSFS02_Lab1_Braking.CarModel.BrakeController stabilityControl constrainedby Suspensions.Control.Interfaces.BaseStabilityController annotation (Placement(transformation(extent={{60,90},{80,110}}))); equation connect(stabilityControl.controlBus, controlBus) annotation (Line( points={{70,90},{70,76},{100,76},{100,22},{-220,22}}, color={255,204,51}, thickness=0.5)); annotation ( Diagram(coordinateSystem( preserveAspectRatio=false, extent={{-220,-110},{220,110}}, initialScale=0.1)), Icon(coordinateSystem( preserveAspectRatio=false, extent={{-220,-110},{220,110}}, initialScale=0.1), graphics={Text( extent={{-210,94},{-144,60}}, lineColor={0,0,0}, lineThickness=0.5, textString="ESP")}), Documentation(info="

This example is a front wheel drive passenger car with a manual transmission; exactly the same as the FWDCarMT but with a brake actuated ESP controller and a boot payload mass.

By default, the hitch for towing a trailer is disabled, including hitchFrame, hitchTransformation and toHitch.

", revisions="

   


Copyright © 2015-2020, Claytex Services Limited

")); end SmallFamilyCar; model SmallestSignal "Detects and outputs the smallest input signal" extends Modelica.Blocks.Interfaces.SI2SO; equation y = noEvent(min(u1, u2)); annotation ( Diagram(graphics), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={Rectangle( extent={{-100,100},{100,-100}}, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid),Text( extent={{-90,36},{90,-36}}, lineColor={160,160,164}, textString="min()"),Text( extent={{-100,95},{100,65}}, lineColor={0,0,255}, fillColor={234,234,234}, fillPattern=FillPattern.Solid, textString="noEvent")}), Documentation(revisions="

   


Copyright © 2008-2020, Claytex Services Limited

", info="

Returns the minimum of the two inputs (u1 and u2) and prevents events being generated.

")); end SmallestSignal; block ValueBlock extends Modelica.Blocks.Icons.Block; parameter Real value=0; annotation ( Icon(graphics={Text( extent={{-76,64},{80,-60}}, lineColor={28,108,200}, textString="%value")})); end ValueBlock; model MyESC extends Suspensions.Control.Interfaces.BaseESC; Modelica.Blocks.Interfaces.RealOutput wheel_1; Modelica.Blocks.Interfaces.RealOutput wheel_2; Modelica.Blocks.Interfaces.RealOutput wheel_3; Modelica.Blocks.Interfaces.RealOutput wheel_4; Modelica.Blocks.Interfaces.RealInput a_y; Modelica.Blocks.Interfaces.RealInput v_x; Modelica.Blocks.Interfaces.RealInput yawRate; Modelica.Blocks.Interfaces.RealInput steeredAngle; Modelica.Blocks.Interfaces.RealInput controllerActivationSignal; Real ub1; Real ub2; Real ub3; Real ub4; // -------------------------------------------------------------------------- // ----------------- Do not modify anything above this line ----------------- // Parameters // Variables equation ub1 = 0; ub2 = 0; ub3 = 0; ub4 = 0; // Output signal from model if controllerActivationSignal > 0 then wheel_1 = max(0, min(1, ub1)); wheel_2 = max(0, min(1, ub2)); wheel_3 = max(0, min(1, ub3)); wheel_4 = max(0, min(1, ub4)); else wheel_1 = 0; wheel_2 = 0; wheel_3 = 0; wheel_4 = 0; end if; annotation (); end MyESC; end CarModel; annotation (uses( Modelica(version="4.0.0"), VeSyMA(version="2021.1"), Suspensions(version="2021.1"), Claytex(version="2021.1"), VehicleInterfaces(version="2.0.0"))); end TSFS02_Lab1_Braking;