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

Publisher:暗里著迷Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: This paper introduces the application of object-oriented design method in the development of automobile emission testing system software. In the analysis stage, the objects of the problem domain and the relationships between objects are identified. In the high-level design stage, the top-level view of the application is given. Finally, the advantages of object-oriented programming are analyzed and the actual application situation is introduced.

    Keywords: Object-oriented approach, emission testing software development

Object-oriented programming method is the most important software design method since the 1990s. The automobile emission testing system is a computer system based on peripheral hardware equipment such as chassis dynamometer, emission analysis instrument, and data acquisition card, and completes the collection and processing of various automobile emission test data in accordance with the requirements of national emission regulations and production research. Since the system needs to interact with peripheral devices, there are many test projects and complex user requirements, the traditional software design method based on functional decomposition makes software development and debugging very difficult, and the reliability of the software is poor. As the hardware equipment changes, the number of test projects increases. As well as 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 expresses the problem domain solution method. The characteristics of abstract data types, data encapsulation and inheritance make the software architecture stable, reusable, and easy to maintain and expand. , which can greatly improve the efficiency of software development.

1 Hardware structure and software requirements of automobile emission testing system

The overall structure of the automobile emission testing system is shown in Figure 1. Among the input signals, signals such as atmospheric pressure, dry temperature, humid temperature, and pressure before and after the catalytic converter come from sensors, vehicle speed and distance pulses come from the drum test bench, and the driver's start signal comes from the remote control. The signal conditioning unit converts these signals into standard signals that can be received by the computer interface, and the host computer collects these signals through A/D and DI/O interface cards. The host computer communicates with the constant volume sample device and the emission analyzer through the GPIB interface card, reads data and controls these devices according to the test process. The main computer controls the working curve display of the driver's assistant display through a graphics accelerator card. The software requirements are as follows:

(1) In accordance with the requirements of emission regulations and production research, the process control of CVS test, modal test, and catalytic converter conversion efficiency test can be realized. During the test process, the system is required to complete tasks such as initial parameter setting, data collection, equipment control, display monitoring interface, and write measurement results to disk files.

(2) Print out test data tables and curves according to user requirements, including CVS result tables, modal test statistical results tables according to working conditions and cycles, emission pollutant concentration typical lines, temperature and pressure curves before and after the catalytic converter, catalytic converter Pollutant concentration curves before and after, etc.

(3) Before starting the test, check the acquisition card, emission analyzer and other hardware equipment. If the equipment is abnormal, the user will be prompted and the test will be stopped.

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

2 Object-oriented analysis

Abstract data type is one of the central concepts of object-oriented programming equipment. The structural framework and high-level design of an object-oriented software system are ultimately expressed as a series of classes, their definitions and objects. A class is an abstract data type. Its definition includes a set of attribute data and a set of operations on the attribute data. It provides external services 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 stage produces comprehensive documents that describe the system functions and the basic characteristics of the problem domain. The objects in the automobile emission testing 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 DI/O interface; the "Driver Assistant" object implements the driver's assistant display working conditions Display of the curve; the "Test Equipment" object encapsulates the operation of the hardware equipment in the emissions testing system. Provides 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 data tables and curves.

The hardware equipment of the emission test system may use different types of analyzers, such as HORIBA's MEXA_9000 or AVL's CEB_x00, or different types of I/O interface cards, such as Zhongtai's PC_6313 or Advantech's PCL_812. According to User requirements may also add new test projects. In the object-oriented method, inheritance is a technology that uses existing classes as a basis to create new classes. The new class reuses the definition of the existing class and can add new attributes and operations. Objects communicate through messages, which are actual calls to operations, in which the "sender" sends a message to the "receiver" to implement certain processing functions. The relationship between objects in the emission testing system is shown in Figure 3.

The triangles in the figure represent the overall and partial structures, the semicircles represent the general and special structures, and the solid arrows represent message connections. The "Test Equipment" object consists of three objects: "Emission Analyzer", "Data Acquisition Card" and "Driver Assistant". "Emission Analyzer", "Data Acquisition Card", "Test" and "Data File" are used as base classes Different subclasses can be derived, and the "test" object sends messages to the "test equipment" object to implement functions such as data collection, analyzer control, and engine auxiliary display.

As can be seen from the object relationship diagram, object-oriented technology builds the software structure on objects that correspond to the entities in the problem domain. The functions of the software are dispersed among the objects. Since the objects are relatively stable, software modifications mainly focus on encapsulation in the objects. internal properties and operations without affecting the software's architecture. This localization of modifications maintains the stability of the software structure and reduces the workload and difficulty of software modifications.

3 High-level design

The objects identified by the object-oriented analysis process and the relationships between them constitute the problem domain model, the structure of the development system in the high-level design stage, and the overall model of the application software. The object encapsulates the implementation of specific functions in the problem domain and provides external services through the interface. The application program is equivalent to a driver module, responsible for creating instances (objects) of classes, receiving user input and sending messages to objects to implement function calls. The application structure of the automobile emission testing system is shown in Figure 4. The system is divided into three processing functions: system maintenance, emission testing and data processing. The "System Maintenance" function includes the overall accuracy check of the analyzer and channel calibration. The "Emission Test" completes the test process according to the test category selected by the user. The "Data Processing" function completes the printout based on the data file loaded by the user. When the user selects a certain function, the application sends a message to the corresponding object. The arrow in Figure 4 indicates the sending of the message.

4 Analysis of Characteristics of Object-Oriented Method

(1) Traditional structured programming constructs systems centered on "process" and "operation" and is a processing-oriented architecture. The "process" and "operation" are unstable. If the basic hardware, user needs, and programming environment (compiler and operating system) change, the processing architecture may also need to be changed, and the migration or upgrade of the system will cost a lot. cost. Object-oriented programming models the problem domain, focusing on "objects" and "data structures". The software architecture is relatively stable, and the reusability of the ideological results is good.

(2) Encapsulation and data hiding are basic elements of object-oriented programming. The data and related processes are bundled together and defined as a whole (i.e. object). 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 the implementation. The code area of ​​this class will not cause system changes, which facilitates program maintenance.

(3) The abstract characteristics of the class provide a modular architecture. The interface of the class indicates the services it provides. Users of the class do not need to care about the current details of these services. Store some tested classes in the class library. When building new application software, you only need to find the required classes in the class library or reuse existing classes through inheritance to meet changes in the problem domain. This makes object-oriented design The reusability is improved.

In accordance with software engineering standards, the author completed the design of the automobile emission testing system software using object-oriented technology, and implemented it under Win98 using the graphical programming language LabVIEW of the American NI Company. 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 is easy to maintain, fully embodying the advantages of object-oriented programming.

Reference address:Application of object-oriented method in automobile emission testing system software development

Previous article:Development of digital integrated circuit test system
Next article:Development of gunner simulator for anti-aircraft artillery training

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号