PROCEEDINGS OF THE INSTITUTE OF VEHICLES 5(109)/2016 Krzysztof Rokicki 1 GPS AND OBD DATA IN TESTING OF THE VEHICLE DYNAMICS 1. Introduction Previously to determine the speed of the vehicle during dynamic tests were used optical sensors Correvit-L. In recent times, for this purpose are increasingly used GPS receivers [1]. GPS accuracy is very close to Correvit-L measurements [2]. The disadvantage of GPS measurements is that the GPS signal is disturbed by road infrastructure, such as viaducts overpass, tall buildings and trees. The article presents the possibility of using OBD data as supporting the GPS signal. The study showed that the OBD data in terms of the longitudinal speed of the vehicle is identical to the GPS signal. 2. Measurement of longitudinal speed of the vehicle 2.1. Measurements based on the GPS signal For certain applications in the automotive industry, to measure the longitudinal speed of the vehicle may be sufficient cheap and easy to use GPS receivers. Measurement data sharing by such receivers are described in NMEA format. This makes it very simple to use any of available GPS receivers. The accuracy of measurements made using GPS receivers and professional optical sensors Correvit-L is similar. This is confirmed by publications which presents the results of measurements of the effectiveness of the braking of the vehicle [2]. In the above-mentioned publications and in this article have been used cheap receivers Qstarz BT-Q818XT [3]. Fig. 1. GPS receiver Qstarz BT-Q818XT 1 Krzysztof Rokicki, M.Sc. Eng.; Institute of Vehicles, Warsaw University of Technology 77
2.2. Speed measurements based on OBD-II data Another inexpensive and easy way to measure the longitudinal speed of the vehicle is to read data from the on-board diagnostics OBD-II. All the vehicles are now equipped with this system, and the communication between the car and an external devices is described by the standards. OBD-II gives, among others, current data like eg. vehicle speed. For vehicles produced in recent years diagnostic data are transmitted via the CAN bus High Speed of 250 kbps or 500 kbsp and set of basic commands of communication is described and available even on Wikipedia [4]. 01 OBD mode allows to receive real data of engine work, including vehicle speed. To obtain these data, external device should sent to the OBD the following command: 0x01 0x0D where the data above are the two single-byte numbers in hexadecimal. The vehicle in response returns the data in the appropriate format, for example: 0x41 0x0D 0x00 The data of the vehicle speed includes a third byte of diagnostic response, which is expressed in [km/h]. Standard OBD modes available in each vehicle, provide data of speed with an accuracy of 1 km/h. Many vehicle manufacturers gives the data more accurately, even for each wheel individually. Access to them, however, is not described by the standards and requires more effort and knowledge. Goal of this study was to compare the vehicle speed data from GPS and OBD. For this purpose, prepared a special software in LabVIEW. Registration GPS data was held by a virtual COM port, and data from the OBD-II were obtained by diagnostic CAN bus using the card NI USB-8473. Fig. 2. NI USB-8473 used for OBD-II data receiving over CAN bus. 78
2.3. GPS and OBD speed data comparison Tests were made in Jeep Grand Cherokee 2008. In the tested vehicles OBD data refresh rate was more than 200Hz (OBD via CAN-Bus), above 20 times more often than from GPS. Fig. 3. Velocity signal comparison - OBD vs GPS Fig. 4. Velocity signal comparison - OBD vs GPS, during the acceleration of the car 79
Fig. 5. Velocity signal comparison - OBD vs GPS, during the braking of the car. Slipping of wheel is visible. The data logged by GPS and OBD were compared, and as a result obtained the following conclusions: Speed logged by the OBD may be subject to a linear error, because of the different real diameter of wheel than programmed in the vehicle; After multiplying the velocity values by the appropriate factor, when vehicle is driving less dynamicly, the GPS and OBDspeed are the same (a difference of less than 1 km/h); During the dynamic changes of speed, GPS data are delayed with respect to the OBD approx. 0.1 0.3 s; During the dynamic changes of speed, especially braking, OBD data allow to observe the phenomenon of wheel slip (Fig. 5). References: [1] Sar H., Pokorski J., Fundowicz P., Reński A., Application of GPS receiver to road tests of automobile, Journal of KONES Powertrain and Transport, Vol. 20, No. 3, 2013, pp. 359-366. [2] Pokorski J., Sar H., Fundowicz P., Reński A., Badania porównawcze skuteczności hamowania z wykorzystaniem odbiornika nawigacji satelitarnej GPS i czujnika korelacyjnego Correvit-L, Zeszyty Naukowe Instytutu Pojazdów 5(96)/2013, pp. 31-38. [3] http://www.qstarz.com/products/gps%20products/bt-q818xt-f.htm [4] https://en.wikipedia.org/wiki/obd-ii_pids Abstract The work concerns the comparison of data on longitudinal speed of the vehicle from two different methods of measurement data obtained from the GPS receiver Qstarz BT-Q818XT 10 Hz, whose measurement accuracy and usefulness in the task of measuring the speed of the vehicle has been described in publications and data obtained from the vehicle on-board diagnostics system (OBD). Article presents a method of 80
retrieving data from the OBD system using CAN bus and standardized diagnostic commands, which allow to get information about the instantaneous longitudinal speed of the vehicle. The result of comparison of speed data obtained from GPS and OBD showed they are one very similar, except for the following cases when the GPS signal is disturbed by the infrastructure or other obstacles and in the case of wheel slip when the speed data recorded by the OBD are incorrect. Keywords: GPS, OBD, vehicle speed data DANE GPS I OBD W BADANIACH PRĘDKOŚCI POJAZDÓW Streszczenie Praca dotyczy porównania danych o prędkości wzdłużnej pojazdu pochodzących z dwóch różnych metod pomiarowych - danych uzyskiwanych z odbiornika GPS Qstarz BT-Q818XT 10 Hz, którego dokładność pomiarowa oraz przydatność w zadaniu pomiaru prędkości pojazdu została opisana w publikacjach, oraz danych uzyskiwanych z systemu diagnostyki pokładowej OBD pojazdu. W pracy przedstawiono metodę pobierania danych z systemu OBD z wykorzystaniem magistrali diagnostycznej CAN oraz znormalizowanych poleceń diagnostycznych, pozwalających uzyskać z pojazdu dane o chwilowej prędkości wzdłużnej pojazdu. Wynik porównania danych o prędkości uzyskanych z GPS oraz OBD wykazały, że są one bardzo zbliżone, po za przypadkami, kiedy zostaje zakłócony sygnał GPS przez infrastrukturę lub inne przeszkody ograniczające siłę sygnału, a także w przypadku uślizgu kół, kiedy to dane o prędkości rejestrowane przez OBD zostają zafałszowane. Słowa kluczowe: GPS, OBD, prędkość pojazdu 81