model Vehicle_parallelHybrid annotation(Icon(graphics = {Text(rotation = 0, lineColor = {0,0,255}, fillColor = {0,0,255}, pattern = LinePattern.Solid, fillPattern = FillPattern.None, lineThickness = 0.25, extent = {{-74.1085,33.7984},{74.1085,-43.4109}}, textString = "Simple EV"),Rectangle(rotation = 0, lineColor = {0,0,255}, fillColor = {120,120,120}, pattern = LinePattern.Solid, fillPattern = FillPattern.cylinder, lineThickness = 0.25, extent = {{-98.9147,74.1085},{99.2248,-72.2481}})}), experiment(StartTime = 0.0, StopTime = 50.0, Tolerance = 0.000001), Diagram()); Real _rearWheelsForce_log annotation(Placement(visible = true, transformation(origin = {81.694,83.3333}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _rearWheelsTorque_log annotation(Placement(visible = true, transformation(origin = {81.694,83.6066}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _frontWheelsForce_log annotation(Placement(visible = true, transformation(origin = {81.9672,83.0601}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _frontWheelsTorque_log annotation(Placement(visible = true, transformation(origin = {82.2404,83.6066}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _rearBrakesLossPower_log annotation(Placement(visible = true, transformation(origin = {82.2404,83.3333}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _rearBrakesTorque_log annotation(Placement(visible = true, transformation(origin = {81.9672,83.3333}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _rearBrakesSpeed_log annotation(Placement(visible = true, transformation(origin = {81.9672,83.0601}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _frontBrakesLossPower_log annotation(Placement(visible = true, transformation(origin = {82.2404,83.3333}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _frontBrakesTorque_log annotation(Placement(visible = true, transformation(origin = {81.9672,83.6066}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _frontBrakesSpeed_log annotation(Placement(visible = true, transformation(origin = {81.694,83.8798}, extent = {{-12,-12},{12,12}}, rotation = 0))); Real _vehicleSpeed_log annotation(Placement(visible = true, transformation(origin = {81.4208,83.3333}, extent = {{-12,-12},{12,12}}, rotation = 0))); Engine engine1(parMaxTorque = 170, parStartSpeed = 25, parDragTorque = 70, parEtaOpt = 0.35, parMaxSpeed = 500, engineFile = "maps/engine/base.txt") annotation(Placement(visible = true, transformation(origin = {-72.9833,-44.9117}, extent = {{-13.2,-13.2},{13.2,13.2}}, rotation = 0))); Modelica.Mechanics.Rotational.Components.Clutch clutch1 annotation(Placement(visible = true, transformation(origin = {-46.1026,-46.7256}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); Driver driver1 annotation(Placement(visible = true, transformation(origin = {-68.9641,82.5874}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); GasPedal gaspedal1 annotation(Placement(visible = true, transformation(origin = {-48.7548,79.0553}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); Modelica.Blocks.Sources.TimeTable timetable1(table = [0,0;10,0;20,120;39,120;40,0;50,0;60,0;70,120;500,120;510,0;520,0]) annotation(Placement(visible = true, transformation(origin = {-88.126,85.2672}, extent = {{-4.62652,-4.62652},{4.62652,4.62652}}, rotation = 0))); Modelica.Mechanics.Rotational.Components.Brake brake1 annotation(Placement(visible = true, transformation(origin = {39.439,-42.7154}, extent = {{-8.19616,-8.19616},{8.19616,8.19616}}, rotation = 0))); Modelica.Mechanics.Translational.Components.IdealRollingWheel idealrollingwheel1 annotation(Placement(visible = true, transformation(origin = {59.8037,-42.7344}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); Modelica.Mechanics.Translational.Sensors.SpeedSensor speedsensor1 annotation(Placement(visible = true, transformation(origin = {38.3227,-88.0681}, extent = {{9.91736,9.91736},{-9.91736,-9.91736}}, rotation = -180))); Gearbox gearbox1 annotation(Placement(visible = true, transformation(origin = {17.7427,-42.6554}, extent = {{-9.01578,-9.01578},{9.01578,9.01578}}, rotation = 0))); Modelica.Mechanics.Rotational.Components.IdealRollingWheel idealrollingwheel2 annotation(Placement(visible = true, transformation(origin = {62.1165,-66.5477}, extent = {{-6.77369,-6.77369},{6.77369,6.77369}}, rotation = 0))); Modelica.Mechanics.Rotational.Components.Brake brake2 annotation(Placement(visible = true, transformation(origin = {40.3838,-66.5477}, extent = {{-6.1579,-6.1579},{6.1579,6.1579}}, rotation = 0))); Chassis chassis1(mass = 1100, cwA = 0.677, fr = 0.014) annotation(Placement(visible = true, transformation(origin = {80.6137,-29.5599}, extent = {{-17.5692,-17.5692},{17.5692,17.5692}}, rotation = 0))); ElectricMotor motor(maxTorque = 600, maxPower = 100000, inertia = 0, maxSpeed = 1000, maxEta = 0.95, fileName = "maps/motor/base.txt") annotation(Placement(visible = true, transformation(origin = {-24.3092,-17.4569}, extent = {{-8.19616,-8.19616},{8.19616,8.19616}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground2 annotation(Placement(visible = true, transformation(origin = {-4.30962,-9.40337}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {45.046,5.1194}, extent = {{-5.59809,-5.59809},{5.59809,5.59809}}, rotation = 0))); Modelica.Electrical.Analog.Sensors.PotentialSensor potentialsensor1 annotation(Placement(visible = true, transformation(origin = {31.7249,31.9688}, extent = {{-5.59809,-5.59809},{5.59809,5.59809}}, rotation = 0))); Battery battery1(resistance = 0.01, voltage = 200) annotation(Placement(visible = true, transformation(origin = {22.4997,8.7382}, extent = {{-10.9091,-10.9091},{10.9091,10.9091}}, rotation = 0))); BatteryManagement batteryManagement1 annotation(Placement(visible = true, transformation(origin = {47.5804,56.0486}, extent = {{9.01578,-9.01578},{-9.01578,9.01578}}, rotation = -270))); Modelica.Blocks.Continuous.Integrator integrator1 annotation(Placement(visible = true, transformation(origin = {-28.7614,-34.1773}, extent = {{-4.62652,-4.62652},{4.62652,4.62652}}, rotation = 0))); ElectricMotor starter annotation(Placement(visible = true, transformation(origin = {-72.2222,-29.7222}, extent = {{-6.77369,-6.77369},{6.77369,6.77369}}, rotation = 0))); ElectricVehicleSystem electricVehicleSystem1(powerDemand = 1000) annotation(Placement(visible = true, transformation(origin = {-59.302,23.4851}, extent = {{-7.45106,-7.45106},{7.45106,7.45106}}, rotation = 0))); Modelica.Electrical.Analog.Basic.Ground ground4 annotation(Placement(visible = true, transformation(origin = {-74.666,11.8951}, extent = {{-5.59809,-5.59809},{5.59809,5.59809}}, rotation = 0))); Controller_ParallelHybrid controller_parallelHybrid1 annotation(Placement(visible = true, transformation(origin = {-66.4712,51.8539}, extent = {{-12,-12},{12,12}}, rotation = 0))); BrakeSystem brakesystem1 annotation(Placement(visible = true, transformation(origin = {15.9455,-20.4256}, extent = {{-8.19616,-8.19616},{8.19616,8.19616}}, rotation = 0))); Modelica.Electrical.Analog.Sensors.CurrentSensor currentsensor1 annotation(Placement(visible = true, transformation(origin = {10.6398,31.9168}, extent = {{-6.1579,-6.1579},{6.1579,6.1579}}, rotation = 0))); Modelica.Mechanics.Rotational.Sensors.SpeedSensor speedsensor2 annotation(Placement(visible = true, transformation(origin = {-91.3353,-66.5189}, extent = {{5.08917,-5.08917},{-5.08917,5.08917}}, rotation = -270))); equation connect(speedsensor2.w,controller_parallelHybrid1.input_generatorSpeed) annotation(Line(points = {{-91.3353,-60.9208},{-92.7778,-60.9208},{-92.7778,43.6111},{-75.5503,43.6111},{-75.5503,43.5934}})); connect(speedsensor2.flange,engine1.flange_crankShaft) annotation(Line(points = {{-91.3353,-71.6081},{-59.5037,-71.6081},{-59.5037,-45.9933},{-61.937,-45.9933}})); connect(brakesystem1.output_brakeTorqueFront,brake1.f_normalized) annotation(Line(points = {{21.9749,-16.2333},{38.8754,-16.2333},{38.8754,-33.6996},{39.439,-33.6996}})); connect(gaspedal1.output_demand,brakesystem1.input_pedalPosition) annotation(Line(points = {{-42.7597,79.4407},{2.22222,79.4407},{2.22222,-19.719},{9.96327,-19.719}})); connect(motor.pin_p,currentsensor1.p) annotation(Line(points = {{-29.6421,-11.8105},{-32.5,-11.8105},{-32.5,32.2222},{4.48186,32.2222},{4.48186,31.9168}})); connect(currentsensor1.i,batteryManagement1.input_batteryCurrent) annotation(Line(points = {{10.6398,25.7589},{10.6398,21.4519},{51.0016,21.4519},{51.0016,49.2554},{53.2275,49.2554}})); connect(electricVehicleSystem1.pin_p,currentsensor1.p) annotation(Line(points = {{-65.4906,26.6725},{-67.6354,26.6725},{-67.6354,31.9168},{4.48186,31.9168}})); connect(currentsensor1.n,battery1.pin_p) annotation(Line(points = {{16.7977,31.9168},{15.12,31.9168},{15.12,14.3933},{16.8721,14.3933}})); connect(brakesystem1.output_brakeTorqueRear,brake2.f_normalized) annotation(Line(points = {{22.022,-23.7229},{29.4139,-23.7229},{29.4139,-58.9119},{40.3838,-58.9119},{40.3838,-59.774}})); connect(controller_parallelHybrid1.output_torqueDemandMotor,motor.input_torqueDemand) annotation(Line(points = {{-56.7224,45.7516},{-41.6667,45.7516},{-41.6667,-16.6667},{-31.6562,-16.6667},{-31.6562,-16.4815}})); connect(controller_parallelHybrid1.output_engineOn,engine1.input_switchOn) annotation(Line(points = {{-56.9456,51.4446},{-51.3889,51.4446},{-51.3889,36.1111},{-87.7778,36.1111},{-87.7778,-42.7778},{-84.2358,-42.7778},{-84.2358,-43.059}})); connect(controller_parallelHybrid1.output_torqueDemandEngine,engine1.input_torqueDemand) annotation(Line(points = {{-57.0945,56.4678},{-47.5,56.4678},{-47.5,33.3333},{-90.2778,33.3333},{-90.2778,-47.2222},{-84.2325,-47.2222},{-84.2325,-47.2315}})); connect(batteryManagement1.output_SOC,controller_parallelHybrid1.input_batterySOC) annotation(Line(points = {{47.0772,65.2181},{-86.3889,65.2181},{-86.3889,57.5469},{-75.5875,57.5469}})); connect(ground4.p,electricVehicleSystem1.pin_n) annotation(Line(points = {{-74.666,17.4932},{-74.666,18.2345},{-65.4285,18.2345},{-65.4285,21.7879}})); connect(motor.pin_p,starter.pin_p) annotation(Line(points = {{-29.6421,-11.8105},{-76.6667,-11.8105},{-76.6667,-25.0558},{-76.6296,-25.0558}})); connect(integrator1.u,engine1.output_fuelPower) annotation(Line(points = {{-34.3133,-34.1773},{-60.2348,-34.1773},{-60.2348,-41.2045},{-61.7623,-41.2045}})); connect(speedsensor1.v,driver1.input_speed) annotation(Line(points = {{27.4136,-88.0681},{-94.1667,-88.0681},{-94.1667,79.4444},{-76.9069,79.4444},{-76.9069,79.8164}})); connect(potentialsensor1.phi,batteryManagement1.input_batteryVoltage) annotation(Line(points = {{37.8828,31.9688},{40.8387,31.9688},{40.8387,49.3113},{42.8559,49.3113}})); connect(battery1.pin_n,ground1.p) annotation(Line(points = {{27.8861,14.3915},{44.9792,14.3915},{44.9792,10.7175},{45.046,10.7175}})); connect(potentialsensor1.p,battery1.pin_p) annotation(Line(points = {{26.1268,31.9688},{15.0709,31.9688},{15.0709,14.3933},{16.8721,14.3933}})); connect(motor.pin_n,ground2.p) annotation(Line(points = {{-23.818,-11.8292},{-17.7969,-11.8292},{-17.7969,1.81157},{-4.30962,1.81157},{-4.30962,-1.95231}})); connect(motor.flange_shaft,gearbox1.flange_inputShaft) annotation(Line(points = {{-17.1015,-16.5359},{-9.39794,-16.5359},{-9.39794,-42.6449},{9.80032,-42.6449}})); connect(speedsensor1.flange,chassis1.flange_frontAndRearAxles) annotation(Line(points = {{48.24,-88.0681},{87.049,-88.0681},{87.049,-32.758},{86.236,-32.758}})); connect(idealrollingwheel1.flangeT,chassis1.flange_frontAndRearAxles) annotation(Line(points = {{67.2547,-42.7344},{86.7303,-42.7344},{86.7303,-32.758},{86.236,-32.758}})); connect(idealrollingwheel2.flangeT,chassis1.flange_frontAndRearAxles) annotation(Line(points = {{68.8902,-66.5477},{87.024,-66.5477},{87.024,-32.4802},{86.236,-32.4802},{86.236,-32.758}})); connect(brake2.flange_b,idealrollingwheel2.flangeR) annotation(Line(points = {{46.5417,-66.5477},{54.7744,-66.5477},{54.7744,-66.5477},{55.3428,-66.5477}})); connect(gearbox1.flange_outputShaft,brake1.flange_a) annotation(Line(points = {{26.0501,-42.8303},{37.9785,-42.8303},{37.9785,-42.7154},{31.2428,-42.7154}})); connect(clutch1.flange_b,gearbox1.flange_inputShaft) annotation(Line(points = {{-38.6515,-46.7256},{-9.48276,-46.7256},{-9.48276,-42.6449},{9.80032,-42.6449}})); connect(brake1.flange_b,idealrollingwheel1.flangeR) annotation(Line(points = {{47.6351,-42.7154},{61.1797,-42.7154},{61.1797,-42.7344},{52.3526,-42.7344}})); connect(timetable1.y,driver1.input_speedDemand) annotation(Line(points = {{-83.0368,85.2672},{-77.0624,85.2672},{-77.0624,85.1325},{-76.8978,85.1325}})); connect(driver1.output_gasPedalPosition,gaspedal1.input_position) annotation(Line(points = {{-61.0559,79.8132},{-54.2367,79.8132},{-54.2367,79.7404},{-54.6214,79.7404}})); connect(engine1.flange_crankShaft,clutch1.flange_a) annotation(Line(points = {{-61.937,-45.9933},{-53.4483,-45.9933},{-53.4483,-46.7256},{-53.5536,-46.7256}})); _vehicleSpeed_log = speedsensor1.v; _frontBrakesSpeed_log = brake1.w; _frontBrakesTorque_log = brake1.tau; _frontBrakesLossPower_log = brake1.lossPower; _rearBrakesSpeed_log = brake2.w; _rearBrakesTorque_log = brake2.tau; _rearBrakesLossPower_log = brake2.lossPower; _frontWheelsTorque_log = idealrollingwheel1.flangeR.tau; _frontWheelsForce_log = idealrollingwheel1.flangeT.f; _rearWheelsTorque_log = idealrollingwheel2.flangeR.tau; _rearWheelsForce_log = idealrollingwheel2.flangeT.f; end Vehicle_parallelHybrid;