Application of object-oriented method in software development of automobile emission test system

The object-oriented programming approach is the most important software design method since the 1990s. The vehicle emission test system is based on chassis dynamometer, emission analyzer, data acquisition card and other peripheral hardware equipment, and completes the computer system for collecting and processing various types of vehicle emission test data in accordance with national emission regulations and production research requirements. Because the system has to interact with peripheral devices, many experimental projects and complex user requirements, the traditional software design method based on functional decomposition makes software development and debugging very difficult, software reliability is poor, and with the change of hardware equipment, test items increase. And changes in user requirements, it is difficult to expand on the original system. The object-oriented method establishes the problem domain model according to people's normal thinking habits. The software design naturally represents the problem domain solving method. The abstract data type, data encapsulation and inheritance make the software architecture stable, reusable, easy to maintain and expand. Can greatly improve the development efficiency of software.

This article refers to the address: http://

1 Hardware structure and software requirements of automotive emission test system

The overall structure of the vehicle emission test system is shown in Figure 1. In the input signal, the signals such as atmospheric pressure, dry temperature, wet temperature, temperature and pressure before and after the catalyst come from the sensor, the speed of the vehicle and the distance pulse come from the drum test bench, and the driver's start signal comes from the remote controller. The signal conditioning unit converts these signals into standard signals that the computer interface can receive. The host computer collects these signals through the A/D and DI/O interface cards. The host computer communicates with the constant volume sampling device and the emission analyzer through the GPIB interface card, reads the data and controls the devices according to the test flow. The main computer controls the display of the working condition curve of the driver's help display through a graphic accelerator card. The software requirements are as follows:

(1) Process control of CVS test, modal test, and catalytic converter conversion efficiency test can be realized according to emission regulations and production research requirements. During the test, the system must complete tasks such as initial parameter setting, data acquisition, device control, display monitoring interface, and write the measurement results to the disk file.

(2) According to the user's requirements, the test data table and curve printout, including CVS result table, modal test according to working conditions and cycle statistics table, emission pollutant concentration curve, catalyst before and after temperature and pressure curve, before and after the catalyst Contaminant concentration curve, etc.

(3) Check the hardware devices such as the acquisition card and emission analyzer before the test starts. If the equipment is not normal, prompt the user and stop the test.

(4) The A/D input channel can be calibrated.

2 object-oriented analysis

Abstract data types are one of the central concepts of object-oriented programming. The structural framework and high-level design of an object-oriented software system end up as a series of classes, their definitions and objects. A class is an abstract data type. Its definition consists of a set of attribute data and a set of operations on the attribute data. The class provides an external service through the interface of the class. The object is an instance of the class and corresponds to the entity in the problem domain. The object-oriented analysis process identifies the entities in the problem domain and determines the relationships between these entities. This phase produces a comprehensive document describing the system functions and the basic characteristics of the problem domain. The objects in the vehicle emission test system are shown in Figure 2.

The “Emission Analyzer” object encapsulates the operation of the analyzer; the “I/O Interface Card” encapsulates the input and output operations of the A/D interface card and the DI/O interface card; the “Driver Assistance” object enables the driver to assist the display. The display of the curve; the "Test Equipment" object encapsulates the hardware device operation in the emissions test system. Provide services for the “emission test” object; the “emission test” object encapsulates the test process and stores the measurement results in a disk file; the “data file” object reads the file and realizes the printout of the data table and curve.

The hardware equipment of the emission test system may use different types of analyzers, such as HORIA_9000 of HORIBA or CEB_x00 of AVL, or different types of I/O interface cards, such as PC_6313 of China-Thailand or PCL_812 of Advantech, according to User requirements may also add new pilot projects. In an object-oriented approach, inheritance is the technique of building a new class using existing classes as a basis. The new class reuses the definition of existing classes and adds new properties and operations. Messages are communicated between objects by a message, which is the actual call to the action, where the "sender" sends a message to the "recipient" to implement some processing functions. The relationship between objects in the emission test system is shown in Figure 3.

The triangles in the figure represent the whole and part of the structure, the semicircles indicate general and special structures, and the solid arrows indicate message connections. The “Test Equipment” object consists of three objects: “Emission Analyzer”, “Data Acquisition Card” and “Driver Assistance”. The “Emission Analyzer”, “Data Acquisition Card”, “Test” and “Data File” are used as the base class. Different subclasses can be derived, and the "test" object sends messages to the "test device" object for data collection, analyzer control, and driver assistance display.

It can be seen from the object relationship diagram that the object-oriented technology establishes the software structure on the object corresponding to the entity in the problem domain, and the function of the software is dispersed in the middle of the object. Since the object is relatively stable, the software modification mainly focuses on the inside of the object. Attributes and operations do not affect the architecture of the software. The localization of this modification maintains the stability of the software structure and reduces the workload and difficulty of software modification.

3 high-rise design

The object identified by the object-oriented analysis process and the relationship between them constitute the problem domain model, the structure of the development system at the high-level design stage, and the overall model of the application software. The object encapsulates a specific functional implementation within the problem domain and provides external services through the interface. The application is equivalent to a driver module, responsible for establishing an instance (object) of the class, receiving user input and sending a message to the object to implement the function call. The application structure of the vehicle emission test system is shown in Figure 4. The system is divided into three processing functions: system maintenance, emissions testing, and data processing. The “System Maintenance” function includes the analyzer's total accuracy check and channel calibration. The “Emission Test” completes the test flow according to the user-selected test category. The “Data Processing” function completes the print output according to the data file loaded by the user. When the user selects a function, the application sends a message to the corresponding object, and the arrow in Figure 4 indicates the sending of the message.

4 Analysis of the characteristics of object-oriented methods

(1) The traditional structured programming is based on the "process" and "operation", and is a processing-oriented architecture. The "process" and "operation" are unstable. If the underlying hardware, user requirements, programming environment (compiler and operating system) change, the processing architecture may also need to be changed, and the system migration or upgrade will cost a lot. . Object-oriented programming models the problem domain, with the "object" and "data structure" as the center, the software architecture is relatively stable, and the thinking results are reusable.

(2) Encapsulation and data hiding are the basic elements of object-oriented programming. Bundling data and related processes is defined as a whole (ie, objects). The scope and visibility of the processes and functions that manipulate the data are limited to the local area of ​​the code. Changing the data structure or algorithm is limited to implementation. The code area of ​​this class does not cause system changes, which provides convenience for program maintenance.

(3) The abstract nature of the class provides a modular architecture. The interface of the class indicates the services it provides. The users of the class do not need to care about the implementation details of these services. Store some tested classes in the class library. When building a new application, you only need to find the required classes in the class library or reuse existing classes by inheritance to meet the problem domain changes, which makes object-oriented design Reusability is improved.

According to the software engineering standard, the author completed the design of the vehicle emission test system software with object-oriented technology, and implemented it under the Win98 under the graphical programming language LabVIEW of NI. This system has been put into use at the Shanghai Pan Asia Automotive Technology Center. The system has a short development cycle, good reliability and easy maintenance, which fully reflects the advantages of object-oriented programming.

G12 Led Corn Light

uses high-brightness SMD2835 lamp beads. LED G12 Bulb light adopts aluminum material and high-temperature flexible high-quality light board. G12 LED energy-saving cornlight bulb has the characteristics of low power consumption, high brightness, environmental protection, energy saving and so on. Products are widely used in indoor and outdoor LED lighting, is the best choice for foreign trade, engineering, lighting lighting. LED G12 corn light is widely used in supermarkets, shopping malls, squares, gardens and other engineering lighting and exhibition halls, clothing stores, merchandise key lighting.

Youtech G12 LED lamp power from 10W to 35W.

G12 LED Corn Light

G12 Led Corn Light,220V G12 Led Corn Light,G12 12W Led Corn Light

Huizhou Youtech Light Industrail Co., LTD. , http://www.youtechlight.com