You are on page 1of 5

MEEM/EE 5750 Distributed Embedded Control Systems

Lab 3: Development of Hybrid Electric Vehicle Powertrain Controller Using Stateflow In this lab, you are going to develop a powertrain controller for a series-parallel hybrid electric vehicle using Stateflow. In a series-parallel hybrid electric vehicle, an engine provides power for both charging battery and driving vehicle. The Stateflow controller shown in Figure 1 has 4 input signals, 4 output signals, and two flags. The definitions of input and output signals are given in Table 1 and Table 2 defines the flags of the Stateflow controller.

Figure 1. Input and output signals of HEV powertrain controller.

Table 1. The input and output signals of the Stateflow controller. Input signals Accelerator pedal position (APP) Brake pedal position (BPP) State of charge (SOC) Vehicle velocity (v) Output signals Engine Torque Request (Engine_TR) Motor Torque Request (Motor_TR) Friction Brake Torque Request (Brake_TR) Regenerative Brake Torque Request (Regen_TR)

Table 2. Two flags of the Stateflow controller. Flag name Charge State Flag Battery Protection Flag Flag symbol Chargestate_flag Bat_protection_flag

The Stateflow controller has 4 parallel (AND) states: ChargingState, BatteryProtection BlendingStrategy, and Braking. 1. ChargingState state There are two exclusive (OR) states ChargeDepletion and ChargeSustainment in the ChargingState state. The ChargeDepletion state is a default active state. The logic of the ChargingState is listed in Table 3.

Table 3. The logic of the ChargingState. ChargeSustainment ChargeDepletion Condition SOC<=55% SOC>65% Charge state Flag (Chargestate_flag) 1 0 2. BatteryProtection state There are also two exclusive (OR) states NoProtection and Protection in the BatteryProtection state. The NoProtection state is a default active state. The logic of the BatteryProtection state is listed in Table 4. Table 4. The logic of the BatteryProtection state. Protection NoProtection Condition SOC>=95% SOC<95% Battery Protection Flag (Bat_protection_flag) 1 0 3. BlendingStrategy state There are four exclusive (OR) states MotorOnly, Blending, EngineOnly, and Charging in the BlendingStrategy state. The MotorOnly state is a default active state. The logic of the BlendingStrategy state is listed in Table 5. Table 5. The logic of the BlendingStrategy state. State Condition MotorOnly v<7m/s APP Blending EngineOnly Chargestate_flag=0 7m/s<v<17m/s v>17m/s 0.5APP 0 Charging Chargestate_flag=1 State State

Motor Torque Request 0 (Motor_TR) Engine Torque 0 0.75APP APP 0.2+APP Request (Engine_TR) Note: The torque request of the engine cannot be greater than 1. You may need to add a saturation block after engine torque request signal. 4. Braking state There are two exclusive (OR) states RegenerativeBrake and FrictionBrake in the Braking state. The FrictionBrake state is a default active state. The logic of the Braking state is listed in Table 6.

Table 6. The logic of the Braking state. State Condition Friction Brake Torque Request (Brake_TR) Regenerative Brake Torque Request (Regen_TR) 5. Basic requirements for lab report: 1) Summarize output and input relations based on provided control logic 2) Describe model development 3) Validate your controller a) Use provided test signals to validate output signals and flags b) Design additional test signals to test all the state transitions c) Validate the correctness of the output signals and flags with all the possible input signal combinations 4) Present simulation results; include plots for output signals and flags. 5) Discuss the simulation results 6) Modify controller logic to improve the performance of the controller. Show the performance improvement. 7) Submit the model file (*.mdl) with your report. FrictionBrake v<=5m/s or Bat_protection_flag=1 BPP 0 RegenerativeBrake (v>5m/s) and Bat_protection_flag=0 BPP0.5 BPP0.75

6. Hints: 1) Save your model in a flash drive. Run the model from flash drive not network drive. 2) Use To Workspace blocks to save simulation signals into workspace and plot signals using saved data. 3) Use debug function in the Stateflow chart to check if your chart works properly. You can set delay to 1 sec to see the transitions between the states.

4) Configure sample time. In your simulink model window, click Simulation in the menu bar and choose Configuration Parameters, a new window will pop-up as shown below. Click Solver, select Type as Fixed-step and set Fixed-step size to 0.1 second.

You might also like