Project 2
Final Project
Hybrid Fuel Cell Electric Vehicle with Battery and Ultracapacitor
Aim:
To design the complete working model of Hybrid Fuel cell Electric Vehicle with battery and Ultracapacitor and to analyze fuel consumed, current, Load sharing and state of charge of battery and ultracapacitor.
Software Used:
- MATLAB / Simulink
Blocks used:
- Repeating sequence
- Memory
- Integrator
- Derivative
- Add
- Subtract
- Product
- Divide
- Abs
- Square
- Square root
- Greater than
- Constant
- Switch
- Saturation
- Gain
- Goto
- From
- To workspace
- Max
- Min
- OR
- AND
- In
- Out
- 1-D lookup table
- 2-D lookup table
- Reciprocal
- Interval test
- Zero order Hold
- Transfer function
- Stop
Explanation:
Model:

- Repeating sequence is used to give the input desired velocity for the system which is in kmph.
- The data for the repeating sequence is imported from the base workspace.
- This input desired velocity is given to driver subsystem to produce accelerator and brake command by comparing with the feedback actual velocity.
- These accelerator and brake command are then converted to the tractive force through sequential calculation in the electric powertrain subsystem.
- Then the tractive force is given to the vehicle dynamics subsystem to convert it to actual velocity of vehicle.
- The obtained velocity is in m/s and is converted to kmph by multiplying 3.6.
Driver Subsystem:

- Input to this system is desired velocity and actual velocity.
- Driver subsystem is actually a PID controller.
- Error signal is calculated by comparing the desired and actual velocity.
- This error signal is then is then fed to proportional, integral and derivative controller.
- To avoid the unwanted error due to integrator, the external reset is done whenever the actual velocity is zero.
- Proportional gain is given as 0.75, Integral gain as 0.03 and Differential gain as 0.
- The PID output is from -1 to 1. If the output is between 0 to 1 it is given as accelerator command and if the output is between -1 to 0 it is multiplied with -1 and is given as brake command.
- The output of this subsystem is accelerator and brake command.
Electric Powertrain Subsystem:

- Input to the subsystem is accelerator and brake commands.
- This consists of controller, torque/power, tractive force, Energy management system, fuel cell system, H2 consumption and energy storage system.
- The output of the subsystem is tractive force, hydrogen consumption, SOC of battery and ultracapacitor.
Controller Subsystem:

- The input of the subsystem is accelerator and brake command and the output is torque request.
- The accelerator command is multiplied with the maximum torque value of the electrical machine to produce the Positive torque request.
- The brake command is multiplied with minimum torque value of the electrical machine to produce negative torque request.
- And the negative torque is requested if the any one of state of charge of ultracapacitor and battery is greater than 0.8.
- If the SOC of Battery and ultracapacitor is less than 0.8 then the negative torque request is 0 goes for regenerative braking.
- Both positive and negative torque request is added to get the total torque request.
Torque / Power Subsystem:

- The input of this subsystem is torque request and output is Torque out and power demand.
- According to the Electrical machine angular velocity, the maximum and minimum torque is set by using lookup table (Max torque curve and Min torque curve) and if the torque request is within this limit, then the torque is given as output.
- The power is calculated from the Torque and angular velocity.
P = T*w
Energy Management System (EMS):

- Energy management system is used for load sharing among the energy devices to efficiently operate the vehicle by operating in the optimum region of Battery, ultracapacitor and fuel cell.
- The input to the subsystem is Power demand.
- The output is Fuel cell power, ultracapacitor power and Battery power.
- If the power demand is positive, that is used for propulsion.
- If the power demand is negative, that is used for regeneration.
- The load demand sharing algorithm has to be used to deliver the load.
Positive power Subsystem:

- The operating range for the fuel cell is 23kW to 55kW. It is derived from the polarization curve. This power is delivered by fuel cell.
- If the power demand is low i.e., in our case if it is less than 23kW and if SOC is greater than minimum value of battery then this power has to be delivered by battery.
- If the power demand is high i.e., in our case if it is more than 55kW and if SOC is greater than minimum value of ultracapacitor then this power has to be delivered by ultracapacitor.
Fuel cell backup Subsystem:

- If the power demand is above 55kW and if SOC of ultracapacitor is greater than minimum value then this power has to be delivered by ultracapacitor.
- If the SOC of Ultracapacitor is less than minimum value, then this power has to be met by battery.
- And if both SOC of battery and ultracapacitor is less than the minimum value then that power has to delivered by fuel cell.
Battery backup subsystem:

- If the power demand is high i.e., in our case if it is greater than 55kW and if SOC is less than minimum value of ultracapacitor and if the SOC of battery is greater than minimum value then this power has to be delivered by battery.
Negative power subsystem:

- For the negative power i.e., regenerative braking, if the SOC of ultracapacitor is greater than battery then the regenerative power is used to charge the battery.
- If the SOC of ultracapacitor and battery is equal then 0.5C charging is done for both ultracapacitor and battery.
- If the SOC of Battery is greater than ultracapacitor then the negative power is used to charge the ultracapacitor as the same way as battery.
- The Ultracapacitor power from the positive and negative power subsystem are added to get the total Ultracapacitor power.
- The battery power from the positive and negative power subsystem and the battery backup power are added to get total Battery power.
- The Fuel cell power and fuel cell backup power is added to get total fuel cell power.
Fuel cell Subsystem:

- The input to the fuel cell subsystem is fuel cell power.
- The fuel cell system is 80kW system.
- The operating range for the fuel cell is 23kW to 55kW. It is derived from the polarization curve.
- The active area of fuel cell is 420cm^2.
- The operating range starts from current density of 0.24A/cm^2 and ends at 0.76A/cm^2.
- The average voltage of each cell is 0.6V.
- If 380 cells are used in series, then then total voltage is 380*0.6 = 228V.
- Lower limit of current = 420*0.24 = 100.8A
- Upper limit of current = 420*0.76 = 319A
- Lower power limit = 228*100.8 = 22.9kW
- Upper power limit = 228*319 = 72.7kW
- At 72.7kW, the efficiency is less.
- So, the upper power limit is taken as 55kW for high efficiency.
- The power is converted to kW and is given to the power control subsystem which gives the current from the fuel cell.
- According to this current, the optimum pressure is obtained from the lookup table.
- From this current, the current density is calculated.
- According to this current density and pressure, the cell voltage is obtained from the polarization curve (2-D lookup table).
- The stack voltage is calculated by multiplying number of cells connected in series.
- This is multiplied with current to calculate the fuel cell power.
- The auxiliary load is present in the vehicle such as 12V system which consumes the power which is taken as constant of 1.724 kW.
- And compressor used for cathode also consumes some power.
- By subtracting the auxiliary and compressor power from the fuel cell power, the net power is obtained which is then again fedback to power control subsystem to calculate current.
Power Control Subsystem:


- According to power demand, the current is obtained from the Power-Current curve.
- This is then added with the controller output.
- The controller is PID controller which process the error signal and gives current as output.
Compressor subsystem:


- The compressor is used in cathode side to maintain the optimum pressure for the oxygen from air to enter in the fuel cell for the proper working and efficiency.
- The input to the subsystem is the ambient pressure and optimum pressure from the lookup table.
- From this pressure ratio and compressor speed, the airflow is obtained and is converted to kg/s from static compressor map and the eta adiabatic is obtained from the static adiabatic map.

- The input to the power calculation for compressor subsystem is air mass flow, ambient temperature, ambient pressure, eta adiabatic and optimum pressure.
- The output of the subsystem is compressor power.
Air and H2 consumption subsystem:

- The input to this subsystem is current and other parameters inputs are air fuel ratio, number of cells, molar mass of oxygen, molar mass of hydrogen, hydrogen utilization factor and faraday constant.
- From current obtained from the fuel cell, oxygen and hydrogen consumption is obtained by using the formulas.
Oxygen consumption = ( I * AFR * n_cell * molar mass of O2)/( 4 * faraday constant)
Hydrogen consumption (kg/s) = (I * n_cell * molar mass of H2)/(2 * H2_utility factor * faraday constant)
Hydrogen Consumption subsystem:

- The input to the system is hydrogen consumption in kg/s.
- It is then integrated to get the total hydrogen consumption inn kg.
- If the total hydrogen consumption is greater than the tank capacity of the hydrogen the simulation has to be stopped.
Energy Storage System:

- The energy storage system consists of ultracapacitor and battery.
- The input of the subsystem is ultracapacitor power and battery power.
- The output is state of charge of Ultracapacitor and Battery power.
Ultracapacitor subsystem:


- In the charge and voltage calculation subsystem, the current, voltage, open circuit voltage and charge calculation subsystem is formed.
- The current calculation is done by using the formula,
I = ((SOC*V_max)-sqrt((SOC*V_max)^2-(4*R*P_uc*eff))/(2*R)

- The input to OCV subsystem is current. The Open circuit voltage is calculated by using formula,
OCV = integral(I/C)dt

- The charge can be calculated by using formula,
Q = C*V_max*n_cells

- The input to voltage subsystem is current and SOC. Voltage is calculated by using formula,
V = (SOC*V_max*n_cells)-(I*R)

- The input to the SOC calculation subsystem is current and charge. The SOC is calculated bu using formula,
SOC = integral((I*eff)/Q)dt

- Then the calculated SOC is subtracted from the Initial SOC to get the instantaneous SOC.
Battery model subsystem:


- The input to the subsystem is battery power and battery SOC.
- According to the SOC of battery, the open circuit voltage is obtained and is multiplied with number of cells to get battery voltage.
- If the power required is greater than or equal to zero, then the resistance while discharging according to SOC of battery is obtained from SOC vs R_disch map.
- If the power required is less than zero, then the resistance while charging according to SOC of battery is obtained from SOC vs R_ch map.
- If the power is positive, the positive current is given at the output for discharging or if the power is negative, negative current is given at output and is used for charging.

- State of charge of battery is calculated by using formula,
SOC = Initial SOC – int(I)/Q
Tractive Force:

- The input to this subsystem is Torque.
- The torque is converted to force and is given as output.
- This subsystem consists of Front brakes, front wheels, rear brakes and real rear wheels subsystems.
EM gearbox subsystem:

- The torque from the electrical machine is multiplied with gearbox ratio and gearbox efficiency to get the torque.
- The Angular vehicle velocity is then multiplied with gearbox ratio to get EM speed.
Front brakes:

- Vehicle brake torque value is added to the input torque to get the Output torque.
Front Wheels:

- The tractive force is calculated by dividing the vehicle tire radius from the torque value from the Front brakes.
- This force is used to drive the vehicle.
Rear Brakes:

- Rear brake subsystem is similar to the front brake but the only difference is input torque is grounded because we consider Front wheel drive only.
Rear Wheels:

- Rear wheels subsystem is similar to the front wheels and calculation is also same.
Vehicle Dynamics subsystem:

- The input to this subsystem tractive force which is converted to velocity and is given as output.
- The Opposing force is reduced from the input tractive force and acceleration is calculated by dividing with vehicle mass.
F = m*a.
- The acceleration is then integrated to get the actual velocity of vehicle.
- But due to the integral windup the overshoot occurs.
- This occurs because initially the error between the actual and desired velocity is more. In order to overcome this error, the overshoot occurs.
- Then due to this overshoot, another fluctuation less than desired velocity to overcome the error due to overshoot.
- This windup can be overcome by using anti windup. This is obtained by using external reset.
- When the acceleration and velocity is not equal to zero, then external reset is set.
- When the acceleration and velocity is zero, then the external reset is reset.
- By considering the initial condition of vehicle which is zero, in order to reject the unwanted errors, the memory is used.
Rolling Resistance:

- Rolling resistance force is calculated by using formula,
Rolling resistance force = U_res*Veh_mass*g*cos(alpha)
Air drag Force:

- Air drag resistive force is calculated by using formula,
Air drag resistance = (1/2)*Cd*Af* delta*V^2
Grade resistance force:

- Grade resistance force is calculated by using formula,
Grade resistance force = Veh_mass*g*U_res*sin (alpha)
Initialization:
- The model is initialized by .m script file.
- The .mat files required for the parameter are loaded into workspace by using .m initialization file.
- Then the model is simulated to get the output for analyzation.

Output:
H2 consumed:

Summary:
The hydrogen consumed for 602 seconds US06 drivecycle source is 0.1578 kg. Due to the energy management system the peak and low loads are met by battery and ultracapacitor. Only the medium load is met by fuel cell hence the hydrogen consumption is reduced.
Velocity Scope:


Summary:
The desired velocity is the input given to the system using the repeating sequence block. According to the desired velocity we need to get the actual velocity. So, we have to adjust the gain values in the driver subsystem to get the desired velocity. Some of the hikes are present due to the sudden overshoot. By considering the optimum values, the desired and actual velocities are matched. From the second plot, the output follows the input. This shows the efficiency of the model and error neglection.
Power Scope:

Summary:
From the above plot, the power demand gets shared among the energy storage device according to the energy management strategy. The total power demand is visualized in the 1st display of the scope. If the power demand is below 23kW then this power is delivered by battery which is visualized in the 4th display of plot. Initially the negative power is consumed by the ultracapacitor, because at that time SOC of the ultracapacitor is less than the SOC of the battery. By consuming the negative power, the SOC gets charged more than the SOC of battery. So, after that negative power is consumed by battery and gets charged. And load is shared. Whenever the power demand is between 23kW and 55kW then that power is delivered by the fuel cell which is visualized in the 2nd display of the scope. When the Load power demand is more than 55kW then this power is delivered by the ultracapacitor which is visualized in the 3rd display in the scope. All the values are shared perfectly according to given energy management strategy.
Current Scope:

Summary:
From the above plot, the current from the fuel cell, ultracapacitor and battery are observed. When the velocity of the vehicle is increased and according to the equivalent power demand, the current from the energy storage device is supplied. When the velocity is less the power is delivered by the battery and if the velocity is suddenly increased the fuel cell is used to meet the power to move the vehicle at the desired velocity if the power demand is within limit. The positive current represents discharging that is the power from the energy storage device is used for propulsion. When the velocity is reduced, the vehicle goes to regeneration. The vehicle motor acts as generator and supplies the current to energy storage device. This current is negative and it is used to charge the energy storage device. According to the state of charge of battery and ultracapacitor this current is used to charge both the devices with some priorities according to the energy management strategy.
SOC Scope:

Summary:
The state of charge of ultracapacitor and battery is visualized in the above plots. The state of charge of battery and ultracapacitor varies according to the power demand and load sharing. Whenever the negative current is supplied the energy storage devices get charged and its state of charge increased. When the current is positive the power is delivered that is discharged and its state of charge reduced. Hydrogen consumption also increase when the vehicle operated in the fuel cell mode. When the SOC ultracapacitor is too low to use then that power will be delivered by the battery pack.
Drive Link:
https://drive.google.com/drive/folders/1tEDlL7oqs7FeOZxAdmt8TEpr0Ahc6b8E?usp=sharing