Questions
Below are the control strategy of hydraulic hybrid vehicle. How can I modify code below to...

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

In: Mechanical Engineering

SIMPLE LINEAR REGRESSION. For this and the next 3 parts. The journal, Fisheries Science (Feb 1995)...

  1. SIMPLE LINEAR REGRESSION. For this and the next 3 parts. The journal, Fisheries Science (Feb 1995) reported on a study of the variables that affect endogenous nitrogen excretion (ENE) in carp raised in Japan. Carp were divided into groups of 2 to 15 fish each according to body weight and each group placed in a separate tank. The carp were then fed a protein-free diet three times daily for a period of 20 days. One day after terminating the feeding experiment, the amount of ENE in each tank was measured. The table below gives the mean body weight (in grams) and ENE amount (in milligrams per 100 grams of body weight per day) for each carp group [Source: Watanabe, T. and Ohta, M. "Endogenous Nitrogen Excretion and Non-Fecal Energy Loss in Carp and Rainbow Trout," Fisheries Science, Vol. 61, No. 1, Feb 1995, p. 56]. You should be able to determine which variable is the response variable and which is the explanatory variable. Which of the following is true? [I] Plot of the residuals shows an upward curvature [II] Plot of the residuals shows a downward curvature [III] The regression is significant at the 1% level [IV] Correlation coefficient of the two variables = -0.68 [V] Standard error of the estimate is 0.0297.

    Tank

    Body Weight

    ENE

    1

    11.7

    15.3

    2

    25.3

    9.3

    3

    90.2

    6.5

    4

    213.0

    6.0

    5

    10.2

    15.7

    6

    17.6

    10.0

    7

    32.6

    8.6

    8

    81.3

    6.4

    9

    141.5

    5.6

    10

    285.7

    6.0

    I and V only

    II, IV, V

    I and IV only

    II and III only

    None of the above

Part B.

  1. SIMPLE LINEAR REGRESSION (above data). Give a 99% prediction interval for the expected (mean) value of the dependent variable with X = 0 (note alpha = 0.01).

    8.3724; 14.4355

    6.9928; 15.8151

    -0.0508; -0.0034

    -0.0615; 0.0073

    None of the above

Part C.

  1. SIMPLE LINEAR REGRESSION (above data). Give a 99% confidence interval for the slope (note alpha = 0.01).

    8.3724; 14.4355

    6.9928; 15.8151

    -0.0508; -0.0034

    -0.0615; 0.0073

    None of the above

Part D.

  1. MULTIPLE REGRESSION (refer to above data). Conduct a multiple regression by introducing a quadratic term to the model. Which of the following is true? [I] About 74% of the variation in Y explained the regression [II] At the 1% level, the regression is statistically significant [III] At the 5% level, the regression is statistically significant [IV] Both coefficients are statistically significant at the 5% level [V] At least one of the independent variables is not significant

    I, III, V

    III, IV, V

    I, II, IV

    None of the above

In: Math

How can teachers build relationships with their students?

How can teachers build relationships with their students?

In: Nursing

financial risks in university and students against ncovid

financial risks in university and students against ncovid

In: Finance

Why is scholarly writing important to doctoral students ?

Why is scholarly writing important to doctoral students ?

In: Operations Management

essay on test anxiety for foundation students. Symptoms

essay on test anxiety for foundation students. Symptoms

In: Psychology

Martin is a piano teacher who wants to price discriminate across his students based on their...

Martin is a piano teacher who wants to price discriminate across his students based on their household income. He doesn't know the exact household income of his students, but what is a simple, verifiable characteristic he could use as a proxy for student income?

age

hair color

parents' musical background

prior purchasing history

year in school

address

number of siblings

In: Economics

30% of all college students major in STEM (Science, Technology, Engineering, and Math). If 45 college...

30% of all college students major in STEM (Science, Technology, Engineering, and Math). If 45 college students are randomly selected, find the probability that

a. Exactly 12 of them major in STEM.  _____
b. At most 14 of them major in STEM. ____  
c. At least 11 of them major in STEM.  _____
d. Between 9 and 16 (including 9 and 16) of them major in STEM.  _____

In: Statistics and Probability

33% of all college students major in STEM (Science, Technology, Engineering, and Math). If 34 college...

33% of all college students major in STEM (Science, Technology, Engineering, and Math). If 34 college students are randomly selected, find the probability that a. Exactly 12 of them major in STEM. b. At most 10 of them major in STEM. c. At least 9 of them major in STEM. d. Between 7 and 15 (including 7 and 15) of them major in STEM.

In: Statistics and Probability

27% of all college students major in STEM (Science, Technology, Engineering, and Math). If 45 college...

27% of all college students major in STEM (Science, Technology, Engineering, and Math). If 45 college students are randomly selected, find the probability that

a. Exactly 13 of them major in STEM.

b. At most 12 of them major in STEM.

c. At least 9 of them major in STEM.

d. Between 8 and 15 (including 8 and 15) of them major in STEM.

In: Statistics and Probability