function force = engine_force_CJP (vel_ms, gear) %ENGINE_FORCE Determines forward force provided by the engine % FORCE = ENGINE_FORCE (VEL_MS, GEAR) computes the total forward force % provided by the engine when driving at a velocity VEL_MS in gear GEAR. % % Inputs: % VEL_MS: a vector of car velocities expressed in [m/s] % GEAR: the gear number; i.e., 1, 2, 3, or 4 % % Outputs: % FORCE: a vector of resistance forces expressed in [N]. FORCE has % the same dimensions as VEL_MS. % % Assumptions: % - the car is driving in a straight line -- differential is % modeled as a simple gear reduction % - there are no loses in the drivetrain (e.g., friction) % - the tires roll without slipping % - the car characteristics correspond approximately to those of a % Ford Taurus %% %% ME 2016 %% Fall 2007 %% %% AUTHOR: Chris Paredis %% % define the drivetrain parameters wheel_radius = 0.332; % in [m] gear_ratios = [2.77 1.54 1 0.69]; differential_ratio = 4.266; % compute the engine speed and corresponding torque engine_speed = vel_ms/wheel_radius*differential_ratio*gear_ratios(gear); engine_torque = engine_model_CJP(engine_speed); % convert torque back to forward force on car body force = engine_torque*gear_ratios(gear)*differential_ratio/wheel_radius; return;