Accelerometer in the PID control system of the cruise control of the car

I operate a rather modern American car stuffed with electronics. From what controls the movement, it has an electronic stabilization system, a PBS with emulation of a differential lock, of course an ABS, and of course, cruise control. The latter is not yet adaptive (that is, without the function of maintaining the distance to the car in front). There is an electronic gas pedal in the car (this is a fundamental moment for this article - I will explain why later).



Anyone who wants to know what the cruise control did not please and what is proposed to be improved - welcome under cat.



In general, modern electronic systems of a car, which are directly responsible for the movement, are quite complex. In particular, the ECU together with the PCU (powertrain control unit, automatic transmission controller, can be a separate device, or integrated with the ECU), they know not only the characteristics (that is, they have and use a physical model) of the engine and transmission, but also the physical model of the car itself.



Why is the latter important, and what are the benefits of this when combined with an electronic gas pedal? Because, unlike a mechanical throttle drive, an electronic pedal is only a master (command) organ - like a ship's engine telegraph.



If the mechanical drive imperatively determines the air flow rate of the engine, and the ECU has no choice but to maintain the stoichiometry according to the given flow rate, then in the case of an electronic pedal, the controller, regardless of the driver a) forms the dynamics of opening or closing the throttle to protect the transmission from peak moments, b) limits the moment on the wheels with the maximum traction force that can be realized (according to the physical model of the transmission and the car itself), c) limits the speed of the driving wheels when slipping is detected, d) maintains the speed of the car by monitoring the frequency of the driving wheels in cruise control mode - that is, the controller always knows the current settlement(if I also knew the actual value, for example, through the sensor of the angular twist of the toe of the crankshaft relative to the flywheel, there would be space in general) the value of the torque supplied to the wheels and the target control function, since it controls this moment itself. This is the fundamental difference between systems with an electronic pedal and mechanical ones.



What didn't I like about this whole vegetable garden? And here's what - despite the availability of information about the physical properties of the engine-transmission-car system (the controller, in theory, can even calculate the current load of the car through the statistical analysis of dynamic characteristics (the response of acceleration in response to the moment acting on the wheels), but it hardly does it) , the cruise control in it is very primitive - it reacts to the fact of a change in speed, and not to the fact of a change in resistance to movement, the consequence of which is a change in speed, and therefore, unlike a human driver, it fights with the effect, not the cause.



Now let's look at what can cause the change in resistance to movement. It, with an accuracy of o-small, consists of four components: a) all structural losses (for example, due to viscous friction in the transmission), b) losses due to rolling friction of the wheel-road (depends mainly on the type and quality of the pavement, type of rubber, mass of the car), c) losses from air resistance (mainly depend on airspeed (a term from aviation, but it should be clear here), d) projection of gravity onto the axis of motion (can accelerate or decelerate the car, depending on the sign ).



Let's make an assessment of the importance of these factors in terms of their influence on the quality of speed regulation and the possibility of their automatic accounting and compensation during the cruise control operation time:



  • factor a) is available for modeling (it depends on the transmission temperature, the gear engaged, the ATF viscosity parameters - all these data are available to the controller), but is insignificant in the steady state driving mode in the auto-regulation range (warmed up transmission, cruise speed> 30 km / h) - they in the PID model, you can simply neglect
  • factor b) is quite significant, at least in the range of permitted speeds, and consists of static (type of tires, vehicle weight), dynamic (vehicle speed) and stochastic (type of coverage under the wheels) components.


Taken together, factors a) and b) can be simply put into the model in the form of averaged parameters, or their coefficients can be derived by statistical analysis of the current dynamics of the car, as a response to the calculated moment on the wheels.



Further, factor c) - depends mainly on the current speed, the projection of the wind speed on the axis of movement, and the presence of abnormal elements that change the midsection and Cx of the car. Basic parameters (midsection, Cx, air density under standard conditions) can be encoded in a car model, design deviations can be determined by long-term analysis of dynamics at high speeds (when the air resistance force prevails over the rest), short-term (from the projection of wind speed on the axis of motion) can be considered random disturbing moment (limiting its value from above to a reasonable limit [say, 20 m / s - at a higher wind speed, not like on a cruise - it is difficult to keep the car at speed in manual mode]), the controller knows the current speed relative to the road almost exactly - total, the factor c) with a certain stochastic component can be calculated.



Finally, factor d) is quite significant; has a 100% stochastic component in the absence of an accelerometer, and practically zero in the presence of one.



So, driving on hilly terrain with cruise on, and observing its delayed reaction to the change in speed value due to the movement of the car uphill, I got the idea to add an accelerometer to the control system. Many control systems already even contain a rough road sensor (needed to ignore the analysis of uneven crankshaft rotation due to movement over bumps) - this is essentially the same accelerometer, only interpreted differently.



Note that the accelerometer itself (without API) is not a gyroscope and not a "miracle device" in our gadgets, which supposedly "knows" the true position of the normal to the earth's surface (in fact, it is recalibrated with memory expansion along the axes at those moments when the magnitude of the acceleration vector issued by the acceleration sensor is strictly 1g), but since only the controller itself can be the initiator of traction on the wheels (hello to systems with an electronic pedal), the value of the longitudinal acceleration relative to the vehicle axis can be easily calculated and compensated - and we after averaging, we get a good approximation of the value of the longitudinal profile of the road, which we can introduce into the speed control model.



That's the whole idea. It is clear that it is almost impossible to implement it in the controller firmware at the DIY level (outside the car factory). However, we can build our computer next to the main controller of the car, analyze the current driving parameters via CAN, and give control actions there. I'm not sure that the current moment on the wheels can be taken from CAN, but the gear engaged, air consumption and rpm are definitely possible (this allows you to indirectly calculate the moment). Further, it is most likely impossible to command the throttle directly via CAN (it would be very dangerous) - but we can most likely give proactive commands to increase or decrease the set cruise speed, or (if CAN does not support this) connect to the corresponding buttons on steering wheel of the car. Everything else seems to becan be implemented in this external controller.



UPDATE: Dialogue with lonelymypled me to a simpler solution - since in a steady state the car moves uniformly, the magnitude of the acceleration vector from the accelerometer is always 1g (regardless of its position relative to the car's coordinate system). If the accelerometer detects the rotation of this vector along an axis perpendicular to the axis of motion, this means the appearance of additional resistance (rise, cover, headwind) or movement force (descent, tailwind). The control system is guided by the dynamics of vector rotation and generates a pre-emptive action. Then we do not need a model of losses in the transmission, tires, etc., although we need information about the current mass, since the characteristic of direct control depends on it (the ratio of acceleration in the longitudinal axis to the delta of the moment on the wheels)



All Articles