In: Mechanical Engineering
Below are the control strategy of hydraulic hybrid vehicle. How can I modify code below to include the torque of motor of hydraulic hybrid vehicle? and How can I improve this
function [SOC,k,T_engine,S_engine,T_brake,T_pump] = strategy(duration,gamma,P,V,Pmin,Pmax,Vmin,Vmax,SOC,Disp,T_wheel,S_wheel,gearratio,S_map,Te_max,T_engine,S_engine,T_pm,k,eff_mech,eff_hyd)
S_flywheel = S_wheel*gearratio;
T_flywheel = T_wheel/gearratio;
T_brake = 0;
if SOC < 0.1
k=1; %Engine on
elseif SOC > 0.7
k=0; %Engine off
end
%T_pump +ve = charging
%T-pump -ve = discharging
if k==1
if T_engine*eff_mech < T_flywheel
%Engine provides full torque when hydraulic is insufficient to
support
if SOC < 0.1
T_engine = T_flywheel/eff_mech;
Tmax = interp1(S_map,Te_max,S_engine);
if T_engine > Tmax
T_engine = Tmax;
end
end
T_pump = T_engine*eff_mech-T_flywheel;
elseif T_engine*eff_mech >= T_flywheel && T_flywheel
>= 0
T_pump = T_engine-T_flywheel/eff_mech;
elseif T_engine*eff_mech >= T_flywheel && T_flywheel
< 0
T_pump = T_engine-T_flywheel;
end
elseif k==0
T_pump = -T_flywheel;
T_engine = 0;
S_engine = 0;
end
%Stop charging when accumulator is full
if SOC >= 1 && T_pump > 0
T_pump = 0;
T_brake = -T_wheel;
end
%Including hydraulic efficiency
if T_pump > 0 %Charging thus real torque is smaller
T_pump = T_pump*eff_hyd;
elseif T_pump < 0 %Discharging thus requires higher real
torque
T_pump = T_pump/eff_hyd;
end
%Torque of pump does not exceed its limit
if T_pump >= T_pm
T_brake = (T_pump-T_pm)*gearratio/eff_hyd;
T_pump = T_pm;
elseif T_pump <= -T_pm
T_pump = -T_pm;
T_brake = nan;
end
%Accumulator will charge to full
if SOC > 0.6
Qmax = (V-Vmin)/duration;
x_max = Qmax/(S_flywheel*Disp);
Tmax = P*Disp*x_max;
if T_pump > Tmax
T_pump = Tmax;
if T_brake == 0
T_brake =
(T_engine*eff_hyd-T_pump)*gearratio/eff_hyd-T_wheel;
elseif T_brake > 0
T_brake =
T_brake+(T_engine*eff_hyd-T_pump)*gearratio/eff_hyd-T_wheel;
end
end
end
x = T_pump/(P*Disp);
Q = S_flywheel*Disp*x*duration;
if Q == 0
SOC = SOC;
else
%V is volume of nitrogen gas; Q is rate of change of fluid
pumped
V = V-Q;
SOC = (0.9*((Vmax/V)^gamma)-1)*Pmin/(Pmax-Pmin);
end
First of all the assumption is that we are speaking of a "Series" Hydraulic Hybrid Vehicle (HHV). You want to incorporate the torque of hydraulic motor present in the powertrain. The so called "Pump-Motor" acts as a hydraulic motor only when the vehicle is starting from rest and the engine is off. Rest it acts as a pump. So during its action as a Hydraulic Motor, it takes pressurized fluid from the accumulator and lets off low pressure fluid in the reservoir till the fluid level in accumulator goes below a prescribed level after which the engine turns on. The energy extracted from this decrease in the overall dynamic "head" of the fluid is used to turn the wheels.
So our case is for k=0 (as per your code) i.e. when engine is off. Now to get the torque of hydraulic motor refer to the following formula:
Tactual * N = nv * nm * pin * Q,
where Tactual is the actual torque output in N-m,
N is the rotational speed of the output shaft of motor in rad/s,
nv is the volumetric efficiency,
nm is the mechanical efficiency.
pin is the pressure of the fluid at inlet of motor in Pa,
Q is the volumetric flowrate of fluid at the inlet in m3/s.
This formula gives you the relationship between the Actual output torque of the motor and the Output shaft speed of the motor. SInce the motor is coupled to the driveline shaft , kinematically the speed of the output shaft of the motor is same as that of the driveline speed.
But on a far deeper aspect I would like to state that this treatment of the "Pump-Motor" as Hydraulic machine might not be the most general analysis of the whole powertrain of a HHV. Analysis will be better if traetment is done as a Turbomachine. In analysis of hydraulic machines we disregard the fact of changing densities of the fluid at the inlet and outlet of the pump which is good when the fluid is e.g. water under small temperature-pressure band about the STP conditions. But I read that HHVs are using Compressed Nitrogen in the accumulator, and in that case I think it will be better to analyze from the very basics of thermodynamics and laws of steady state flow, which will give the most general and accurate results.
For this analysis start by knowing the temperature and pressures of the accumulator and the reservoir. Then calculate the internal energy and enthalpy of the fluid in both the chambers by either approximating it with using the standard formulas from thermodynamics or better use a software named EES (Engineering Equation Solver) which gives enthalpy as output of an inbulit function if we give two input independant parameters: temperature and pressure. You might go on to know the dimensions of the connecting pipelines and their material of construction to calculate the major and minor losses. Thus you will know the total head at inlet and outlet of the motor. Then taking motor as control volume apply the SSFEE (Steady State Flow Energy Equation) to get the output power of the motor as follows:
h1 + v1^2/2g + q = h2 + v2^2/2g + w,
where h1 and h2 are enthalpies of the fluid per unit mass at the inlet and outlet of the CV (control volume)
v1 and v2 are velocities of the fluid at the inlet and outlet of the CV
q is the heat transferred to the CV per unit mass of fluid
w is the work output per unit mass of fluid.
To get power output in Watts (W), P = w * m_dot, where m_dot is mass flow rate, which is constant throughout the pipeline.
Torque = P/N, where N is the rotational speed of the output shaft of motor in rad/s.