{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Combustion engine cruise control\n", "\n", "### Question: \n", "\n", "Simulate the time response of the combustion engine cruise control model equations descibed below. \n", "\n", "\n", "### Mathematical model:\n", "\n", "\n", "To develop a mathematical model we start with a force balance for the car body. Let $\\nu$ be the speed of the car, m the total mass (including passengers), F the force generated by the contact of the wheels with the road, and $F_d$ the disturbance force due to gravity, friction and aerodynamic drag. \n", "\n", "The equation of motion of the car is simply\n", "\\begin{equation}\n", " m \\frac{d \\nu}{dt} = F -F_d \\label{ex:combustion}\n", "\\end{equation}\n", "\n", "The force F is generated by the engine, whose torque is proportional to the rate of fuel injection, which is itself proportional to a control signal $0\\leq u\\leq 1$ that controls the throttle position. The torque also depends on engine speed $\\omega$. \n", "\n", "A simple representation of the torque at full throttle is given by the torque curve\n", "\\begin{equation}\n", " T(\\omega) = T_m \\left (1- \\beta \\left ( \\frac{\\omega}{\\omega_n} -1 \\right )^2 \\right ), \\nonumber \n", "\\end{equation}\n", "where the maximum torque $T_m$ is obtained at engine speed $\\omega_m$.\n", "\n", "Let n be the gear ratio and r the wheel radius. The engine speed is related to the velocity through the expression\n", "\\begin{equation}\n", " \\omega = \\frac{n}{r} \\nu = \\alpha_n \\nu, \\nonumber \n", "\\end{equation}\n", "and the driving force can be written as\n", "\\begin{equation}\n", " F = \\frac{n u}{r} T(\\omega) = \\alpha_n u T(\\alpha_n,\\nu) \\label{ex:comb_force} \n", "\\end{equation}\n", "\n", "Typical values of $\\alpha_n$ for gears 1 through 5 are $\\alpha_1$ = 40, $\\alpha_2$ = 25, $\\alpha_3$ = 16, $\\alpha_4$ = 12 and $\\alpha_5$ = 10. The inverse of $\\alpha_n$ has a physical interpretation as the effective wheel radius. The figure below shows the torque as a function of vehicle speed. \n", "\n", "\n", "\n", "The disturbance force $F_d$ has three major components: $F_g$, the forces due to gravity; $F_r$, the forces due to rolling friction; and $F_a$, the aerodynamic drag:\n", "\\begin{equation}\n", " F_d=F_g+F_r+F_a. \\label{ex:comb_disurbance_force}\n", "\\end{equation}\n", "\n", "Letting the slope of the road be $\\theta$, gravity gives the force $F_g = mg\\sin\\theta$, where g = 9.8 $\\frac{m}{s^2}$ is the gravitational constant. A simple model of rolling friction is\n", "\n", "\\begin{equation}\n", " F_r = m g C_r sgn(\\nu) \\nonumber \n", "\\end{equation}\n", "\n", "where $C_r$ is the coefficient of rolling friction and $sgn(\\nu)$ is the sign of $\\nu$ or zero if $\\nu$ = 0. \n", "\n", "Finally, the aerodynamic drag is proportional to the square of the speed:\n", "\\begin{equation}\n", " F_a = \\frac{1}{2} \\rho C_d A \\nu^2 ,\n", "\\end{equation}\n", "where $\\rho$ is the density of air, $C_d$ is the shape-dependent aerodynamic drag coefficient and A is the frontal area of the car.\n", "\n", "The overall differential equation model then becomes\n", "\\begin{equation}\n", " m \\frac{d \\nu}{dt} = \\frac{n u}{r} T_m \\left (1- \\beta \\left ( \\frac{\\omega}{\\omega_n} -1 \\right )^2 \\right ) - mg\\sin\\theta - m g C_r sgn(\\nu) -\\frac{1}{2} \\rho C_d A \\nu^2 \n", "\\end{equation}\n", "\n", "**Python based simulation methods**:\n", "\n", "- [ODE simulation of Combustion engine model](Combustion_engine_cruise_control_ODE.ipynb)\n", "- [Transfer model of Combustion engine model](Combustion_engine_cruise_control_TF.ipynb)\n", "- [State Space model of Combustion engine model](Combustion_engine_cruise_control_SS.ipynb)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }