Detailed Description
To further illustrate the technical means and effects of the present application for achieving the intended application purpose, the following detailed description is provided with reference to the accompanying drawings and preferred embodiments for specific embodiments, methods, steps, features and effects of the UDS-based CAN bus test system and the CAN bus test method according to the present application.
The foregoing and other technical matters, features and effects of the present application will be apparent from the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings. While the present application has been described in terms of specific embodiments and examples for achieving the desired objects and objectives, it is to be understood that the invention is not limited to the disclosed embodiments, but is to be accorded the widest scope consistent with the principles and novel features as defined by the appended claims.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an embodiment of a UDS-based CAN bus testing method according to the present application.
In this embodiment, the CAN bus test method includes, but is not limited to, the following steps.
Step S101, connecting an ECU to be tested to PCAN hardware through a CAN bus; it should be noted that, in this embodiment, the PCAN hardware, i.e., PCAN-USB, or CAN card, may implement a CAN-to-USB interface, may transmit a message on the CAN bus network to the PC personal computer through the USB interface, and may generate the CAN message through the related software, so as to implement the related functions such as testing.
Step S102, connecting the ECU to be tested to an external testing device in a USB mode by utilizing PCAN hardware; it should be noted that, in this embodiment, the USB may also adopt a USB hub mode to realize a simultaneous online multi-test function, and the external test device may be a PC, which may be connected to a near-end line, or may further exist in a mode of being connected to a local area network or a wide area network through the USB to a cloud server, which is not limited in this application.
And step S103, starting the ECU to be tested, and testing the working performance of the ECU to be tested through the external testing device. It should be noted that, in this embodiment, the ECU to be tested may be directly powered on and started, or may be controlled by the vehicle main controller to be started or shut down in a unified manner, so as to perform the operation test according to different control strategies.
It is worth mentioning that the present application may be applied to ECU testing, such as an anti-lock brake system ECU, a four-wheel drive system ECU, an electronically controlled automatic transmission ECU, an active suspension system ECU, an airbag system ECU, a multi-directional adjustable electronically controlled seat ECU, and the like, and in other embodiments, may be specifically applied to testing an engine ECU, a motor MCU, a battery BMS, an automatic transmission TCU, a hybrid controller HCU, and the like.
In this embodiment, the step of connecting the ECU to be tested to the PCAN hardware through the CAN bus may specifically include: and respectively connecting the ECU to be tested to CAN _ H and CAN _ L of the PCAN hardware through CAN _ H and CAN _ L.
It should be noted that, the step of connecting the ECU to be tested to an external test device through USB by using PCAN hardware is described, and the external test device is installed with PCAN Explorer (a general-purpose tool for monitoring CAN network data developed by PEAK company in germany) and its series of test software.
Correspondingly, the CAN bus test method CAN further comprise the following steps: and carrying out secondary development on the PCAN Explorer and the serial test software thereof installed in the external test device, and programming a test program by adopting VB script language.
For example, the step of programming the test program by using the VB script language may specifically include: and compiling a seed request, a security authentication algorithm of a seed generation key and a sending key by adopting VB script language.
Correspondingly, the step of testing the working performance of the ECU to be tested by the external testing device may specifically include: and testing the safe access service of the ECU to be tested through the external testing device. Please refer to the test effect diagram shown in fig. 3.
Besides the test for the safety access service, the test system is built by adopting the CAN bus, the PCAN hardware and the PCAN Explorer, and CAN meet the requirements of automobile indoor and outdoor environment tests, plateau polar region tests, endurance tests and road tests in various harsh environments. Various parameters on the automobile CAN be collected, and various signals such as vehicle speed, rotating speed, temperature, pressure, flow, wind speed, humidity, temperature, voltage, current, pulse, acceleration, angular speed, angle, strain and CAN bus are covered. The external testing device CAN perform real-time monitoring, visual display, data recording and analysis and the like on signals on the CAN bus through PCAN-Exploore software. The whole test system has compact structure, modularization, high protection level and stable performance.
In addition, the PCAN Explorer of the present application can adopt the PCAN-Explore5 (PE 5 for short) series. All files and elements CAN be stored and managed in the engineering project, and engineering project components such as CAN connection, a message transceiving window, a chart display plug-in and a dashboard display plug-in CAN also be clearly displayed in the engineering project; the integrated data recorder CAN store messages and data information on the CAN bus. The testing method CAN also comprise the operation processes of configuring the baud rate and the object type of the CAN bus, configuring various parameters of test data acquisition and the like.
The method is simple to operate, stable and reliable, and can analyze, calculate and research the automobile system according to the tested data and parameters, thereby greatly improving the development and development speed of the automobile system and shortening the development period.
The application PE5 CAN customize a symbol file (a file containing related binary file debugging information), CAN analyze a CAN message into actual physical quantity, CAN also import a dbc file (database file), CAN embed a VB script (scripting language produced by Microsoft corporation), and CAN create a script to automatically schedule complex tasks. In addition, PE5 may integrate data recording functions so that data transmitted over the CAN bus may be recorded, analyzed, and saved by PE5, and may be remotely controlled by scripting.
This application is through adopting PCAN Explorer's mode, and the purchase is convenient and with low costs, CAN connect a plurality of CAN passageways simultaneously moreover, and various automation task CAN be accomplished through the script to configurable data logging function, integrated standard macro and VB script that CAN also integrate, CAN be in the control CAN network in addition, backstage operation script, CAN also count message error and bus load etc. in the network simultaneously.
According to the method, the ECU to be tested is connected to the PCAN hardware through the CAN bus, the ECU to be tested is connected to an external testing device through the PCAN hardware in a USB mode, the ECU to be tested is started, and the working performance of the ECU to be tested is tested through the external testing device. Through the mode, the German Vector software collocation canoe hardware test system with high cost can be avoided, the cost of tens of thousands of yuan of the existing test scheme can be replaced by low cost of about hundreds of yuan, the test cost is effectively reduced, the test effect is accurate, the success rate is high, the test system is simple to erect and convenient to operate and easy to understand, the same test function as the German Vector software collocation canoe hardware test system can be realized, and the working performance of the product is ensured.
Referring to fig. 2 in conjunction with the above embodiments, fig. 2 is a schematic structural diagram of an embodiment of a UDS-based CAN bus test system according to the present application.
In the present embodiment, the CAN bus test system includes, but is not limited to, PCAN hardware 21 and an external test device 22.
The PCAN hardware 21 is used for being connected to an ECU to be tested through a CAN bus;
the external testing device 22 is configured to be connected to the PCAN hardware 21 in a USB manner, and further connected to the ECU to be tested through the PCAN hardware 21, so that when the ECU to be tested is started, the external testing device 22 tests the working performance of the ECU to be tested.
It should be noted that, in the present embodiment, the PCAN hardware 21, i.e., PCAN-USB or CAN card, may implement a CAN-to-USB interface, may transmit a message on the CAN bus network to the PC personal computer through the USB interface, and may generate the CAN message through the related software, so as to implement the related functions such as testing.
In this embodiment, the USB may also adopt a USB hub mode to realize a simultaneous online multi-test function, and the external test device 22 may be a PC, which may be connected to a near-end line, or may further exist in a mode of being connected to a local area network or a wide area network through the USB to a cloud server, which is not limited in this application.
In the embodiment, the ECU to be tested can be directly powered on for starting, or can be uniformly controlled by the vehicle main controller for starting or closing, so as to perform operation test according to different control strategies.
It should be noted that CAN _ H and CAN _ L of the PCAN hardware 21 may be connected to CAN _ H and CAN _ L of the ECU to be tested, respectively.
Further, the external test device 22 is installed with PCAN Explorer and its series test software.
It should be noted that the PCAN Explorer and its series of test software installed in the external test device 22 are developed for the second time, and a test program is compiled in the VB script language, wherein a seed request, a security authentication algorithm for generating a key by the seed, and a transmission key are compiled in the VB script language.
In the present embodiment, the external test device 22 is used for testing the secure access service of the ECU to be tested.
Besides the test for the safety access service, the test system is built by adopting the CAN bus, the PCAN hardware 21 and the PCAN Explorer, and CAN meet the requirements of automobile indoor and outdoor environment tests, plateau polar region tests, durability tests and road tests in various harsh environments. Various parameters on the automobile CAN be collected, and various signals such as vehicle speed, rotating speed, temperature, pressure, flow, wind speed, humidity, temperature, voltage, current, pulse, acceleration, angular speed, angle, strain and CAN bus are covered. The external testing device 22 CAN perform real-time monitoring, visual display, data recording and analysis and the like on signals on the CAN bus through PCAN-Exploore software. The whole test system has compact structure, modularization, high protection level and stable performance.
In addition, the PCAN Explorer of the present application may employ the PE5 series. All files and elements CAN be stored and managed in the engineering project, and engineering project components such as CAN connection, a message transceiving window, a chart display plug-in and a dashboard display plug-in CAN also be clearly displayed in the engineering project; the integrated data recorder CAN store messages and data information on the CAN bus. The testing method CAN also comprise the operation processes of configuring the baud rate and the object type of the CAN bus, configuring various parameters of test data acquisition and the like.
The method is simple to operate, stable and reliable, and can analyze, calculate and research the automobile system according to the tested data and parameters, thereby greatly improving the development and development speed of the automobile system and shortening the development period.
The PE5 CAN customize the symbol file, CAN analyze the CAN message into actual physical quantity, CAN also import the dbc file, CAN embed the VB script, and CAN create the script to automatically schedule complex tasks. In addition, PE5 may integrate data recording functions so that data transmitted over the CAN bus may be recorded, analyzed, and saved by PE5, and may be remotely controlled by scripting.
This application is through adopting PCAN Explorer's mode, and the purchase is convenient and with low costs, CAN connect a plurality of CAN passageways simultaneously moreover, and various automation task CAN be accomplished through the script to configurable data logging function, integrated standard macro and VB script that CAN also integrate, CAN be in the control CAN network in addition, backstage operation script, CAN also count message error and bus load etc. in the network simultaneously.
According to the method, the ECU to be tested is connected to the PCAN hardware 21 through the CAN bus, the ECU to be tested is connected to the external testing device 22 through the PCAN hardware 21 in a USB mode, the ECU to be tested is started, and the working performance of the ECU to be tested is tested through the external testing device 22. Through the mode, the German Vector software collocation canoe hardware test system with high cost can be avoided, the cost of tens of thousands of yuan of the existing test scheme can be replaced by low cost of about hundreds of yuan, the test cost is effectively reduced, the test effect is accurate, the success rate is high, the test system is simple to erect and convenient to operate and easy to understand, the same test function as the German Vector software collocation canoe hardware test system can be realized, and the working performance of the product is ensured.
In the present application, the UDS-based CAN bus test system and method described above CAN be used in a vehicle system having a vehicle TBOX.
In this embodiment, the CAN may include three network channels CAN _1, CAN _2, and CAN _3, and the vehicle may further include one ethernet network channel, where the three CAN network channels may be connected to the ethernet network channel through two in-vehicle networking gateways, for example, where the CAN _1 network channel includes a hybrid power assembly system, where the CAN _2 network channel includes an operation support system, where the CAN _3 network channel includes an electric dynamometer system, and the ethernet network channel includes a high-level management system, the high-level management system includes a human-vehicle-road simulation system and a comprehensive information collection unit that are connected as nodes to the ethernet network channel, and the in-vehicle networking gateways of the CAN _1 network channel, the CAN _2 network channel, and the ethernet network channel may be integrated in the comprehensive information collection unit; the car networking gateway of the CAN _3 network channel and the Ethernet network channel CAN be integrated in a man-car-road simulation system.
Further, the nodes connected to the CAN _1 network channel include: the hybrid power system comprises an engine ECU, a motor MCU, a battery BMS, an automatic transmission TCU and a hybrid power controller HCU; the nodes connected with the CAN _2 network channel are as follows: the system comprises a rack measurement and control system, an accelerator sensor group, a power analyzer, an instantaneous oil consumption instrument, a direct-current power supply cabinet, an engine water temperature control system, an engine oil temperature control system, a motor water temperature control system and an engine intercooling temperature control system; the nodes connected with the CAN _3 network channel are as follows: electric dynamometer machine controller.
The preferable speed of the CAN _1 network channel is 250Kbps, and a J1939 protocol is adopted; the rate of the CAN _2 network channel is 500Kbps, and a CANopen protocol is adopted; the rate of the CAN _3 network channel is 1Mbps, and a CANopen protocol is adopted; the rate of the Ethernet network channel is 10/100Mbps, and a TCP/IP protocol is adopted.
In this embodiment, the vehicle networking gateway may be equipped with an IEEE802.3 interface, a DSPI interface, an eSCI interface, a CAN interface, an MLB interface, a LIN interface, and/or an I2C interface.
In this embodiment, for example, the IEEE802.3 interface may be used to connect to a wireless router to provide a WIFI network for the entire vehicle; the DSPI (provider manager component) interface is used for connecting a Bluetooth adapter and an NFC (near field communication) adapter and can provide Bluetooth connection and NFC connection; the eSCI interface is used for connecting the 4G/5G module and communicating with the Internet; the CAN interface is used for connecting a vehicle CAN bus; the MLB interface is used for connecting an MOST (media oriented system transmission) bus in the vehicle, and the LIN interface is used for connecting a LIN (local interconnect network) bus in the vehicle; the IC interface is used for connecting a DSRC (dedicated short-range communication) module and a fingerprint identification module. In addition, the application can merge different networks by mutually converting different protocols by adopting the MPC5668G chip.
In addition, the vehicle TBOX system, Telematics-BOX, of the present embodiment is simply referred to as a vehicle TBOX or a Telematics.
Telematics is a synthesis of Telecommunications and information science (information) and is defined as a service system that provides information through a computer system, a wireless communication technology, a satellite navigation device, and an internet technology that exchanges information such as text and voice, which are built in a vehicle. In short, the vehicle is connected to the internet (vehicle networking system) through a wireless network, and various information necessary for driving and life is provided for the vehicle owner.
In addition, Telematics is a combination of wireless communication technology, satellite navigation system, network communication technology and vehicle-mounted computer, when a fault occurs during vehicle running, the vehicle is remotely diagnosed by connecting a service center through wireless communication, and the computer built in the engine can record the state of main parts of the vehicle and provide accurate fault position and reason for maintenance personnel at any time. The vehicle can receive information and check traffic maps, road condition introduction, traffic information, safety and public security services, entertainment information services and the like through the user communication terminal, and in addition, the vehicle of the embodiment can be provided with electronic games and network application in a rear seat. It is easy to understand that, this embodiment provides service through Telematics, can make things convenient for the user to know traffic information, the parking stall situation that closes on the parking area, confirms current position, can also be connected with the network server at home, in time knows electrical apparatus running condition, the safety condition and guest's condition of visiting etc. at home.
The vehicle according to this embodiment may further include an Advanced Driver Assistance System (ADAS) that collects environmental data inside and outside the vehicle at the first time using the various sensors mounted on the vehicle, and performs technical processing such as identification, detection, and tracking of static and dynamic objects, so that a Driver can recognize a risk that may occur at the fastest time, thereby attracting attention and improving safety. Correspondingly, the ADAS of the present application may also employ sensors such as radar, laser, and ultrasonic sensors, which can detect light, heat, pressure, or other variables for monitoring the state of the vehicle, and are usually located on the front and rear bumpers, side view mirrors, the inside of the steering column, or on the windshield of the vehicle. It is obvious that various intelligent hardware used by the ADAS function can be accessed to the car networking system by means of an ethernet link to realize communication connection and interaction.
The host computer of the present embodiment vehicle may comprise suitable logic, circuitry, and/or code that may enable operation and/or functional operation of the five layers above the OSI model (Open System Interconnection, Open communication systems Interconnection reference model). Thus, the host may generate and/or process packets for transmission over the network, and may also process packets received from the network. At the same time, the host may provide services to a local user and/or one or more remote users or network nodes by executing corresponding instructions and/or running one or more applications. In various embodiments of the present application, the host may employ one or more security protocols.
In the present application, a network connection for an internet of vehicles system may be a switch, which may have AVB functionality (Audio Video brightening, meeting the IEEE802.1 set of standards), and/or include one or more unshielded twisted pair wires, each of which may have an 8P8C module connector.
In a preferred embodiment, the vehicle networking system specifically comprises a vehicle body control module BCM, a power bus P-CAN, a vehicle body bus I-CAN, a combination meter CMIC, a chassis control device and a vehicle body control device.
In this embodiment, the body control module BCM may integrate the functions of the car networking gateway to perform signal conversion, message forwarding, and the like between different network segments, i.e., between the power bus P-CAN and the body bus I-CAN, for example, if a controller connected to the power bus needs to communicate with a controller connected to the body bus I-CAN, the body control module BCM may perform signal conversion, message forwarding, and the like between the two controllers.
The power bus P-CAN and the vehicle body bus I-CAN are respectively connected with a vehicle body control module BCM.
The combination instrument CMIC is connected with a power bus P-CAN, and the combination instrument CMIC is connected with a vehicle body bus I-CAN. Preferably, the combination meter CMIC of the present embodiment is connected to different buses, such as a power bus P-CAN and a vehicle body bus I-CAN, and when the combination meter CMIC needs to acquire controller information that is hung on any bus, it is not necessary to perform signal conversion and message forwarding through a vehicle body control module BCM, so that gateway pressure CAN be reduced, network load CAN be reduced, and the speed of acquiring information by the combination meter CMIC CAN be increased.
The chassis control device is connected with the power bus P-CAN. The vehicle body control device is connected with a vehicle body bus I-CAN. In some examples, the chassis control device and the body control device CAN respectively broadcast data such as information to the power bus P-CAN and the body bus I-CAN, so that other vehicle-mounted controllers and other devices hung on the power bus P-CAN or the body bus I-CAN CAN acquire the broadcast information, and communication between the vehicle-mounted devices such as different controllers is realized.
In addition, in the car networking system of the vehicle of the embodiment, two CAN buses, namely a power bus P-CAN and a car body bus I-CAN, CAN be used, the car body control module BCM is used as a gateway, and the structure that the combination instrument CMIC is connected with both the power bus P-CAN and the car body bus I-CAN is adopted, so that the operation that information of a chassis control device or a car body control device is forwarded to the combination instrument CMIC through the gateway when the combination instrument CMIC is hung on one of the two buses in the traditional mode CAN be omitted, therefore, the pressure of the car body control module BCM as the gateway is relieved, the network load is reduced, and information of vehicle-mounted equipment hung on a plurality of buses, such as the power bus P-CAN and the car body bus I-CAN, CAN be sent to the combination instrument CMIC for display and the information transmission is strong in real-time.
This application CAN test to above-mentioned complicated vehicle based on UDS's CAN bus test system and method, corresponds and provides more perfect comprehensive test service, when making the comprehensive development of vehicle system, CAN realize corresponding comprehensive system test, avoids adopting costly test tool, CAN guarantee the test result moreover, does benefit to and generally uses widely in vehicle manufacturer.
Although the present application has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the application, and all changes, substitutions and alterations that fall within the spirit and scope of the application are to be understood as being included within the following description of the preferred embodiment.