Research on Automobile Accelerator Pedal Testing Based on LabVIEW 8.0
2026-04-06 07:50:48··#1
(Bian Zhiguo, Sino-German College of Tongji University; Chen Dong, Bosch Automotive Components Co., Ltd.) This paper describes a test system for a car accelerator pedal, built using LabVIEW 8.0 graphical programming software, equipped with NI's PCI-6233 data acquisition card and PCI-7342 motion control card, and a PC. The testing principle and software design are detailed below. 1. Introduction With the increasing prevalence of automobiles, various testing systems inside cars inevitably need to become more intelligent; accelerator pedal testing is a typical example. As a core component closely related to occupant safety, the accelerator pedal requires rigorous and comprehensive testing. The car engine accelerator, generally controlled by a pedal, is also called the accelerator pedal and is a device for controlling fuel supply to the engine. Accelerator pedal testing mainly includes linearity testing of its sliding rheostat, pressure and displacement matching testing, identification of special points, etc. These tests ultimately boil down to a mathematical problem—curve fitting. Therefore, theoretically, all current programming languages can handle this task, including C and Matlab. Since the testing process relies on hardware data acquisition, the more convenient the language hardware interface, the easier the programmer's work will be, allowing them to focus more on algorithm research. [IMG=Figure 1 System Hardware Block Diagram]/uploadpic/THESIS/2007/11/2007111311160440800T.jpg[/IMG]Figure 1 System Hardware Block Diagram [IMG=Figure 2 Program Flowchart]/uploadpic/THESIS/2007/11/20071113111846271846.jpg[/IMG]Figure 2 Program Flowchart In 1986, National Instruments (NI) proposed the concept of virtual instruments, a revolutionary programming approach. This concept is an inseparable combination of the front panel, data flow diagram, and graphical instrument. Specifically, it is a measurement and control system that uses a computer (containing LabVIEW software) as the operating platform and modular hardware as the bridge. In the concept of virtual instruments, hardware is merely a tool for inputting and outputting signals and the physical environment upon which software depends; software is the core of the entire system, determining the management of the hardware and the realization of instrument functions. This paper uses a LabVIEW-based accelerator pedal testing system, which greatly accelerates software development. 2. Testing Principle 2.1 Hardware Block Diagram of the Testing System The installed car pedal is fixed on the test bench. First, the servo motor moves forward at a constant speed in a straight line, pushing the pedal to its mechanical limit position—this is the first motion process. When the system detects that the pedal position has reached its limit (a judgment can be made when the pressure sensor located between the pedal and the motor detects a value greater than a certain threshold), the servo motor reverses direction, following the internal spring of the pedal back to its origin position—this is the second motion process. In both processes, on the one hand, the motion parameters of the motor are set using a motion control card via LabVIEW programming to control the motor's speed, direction, and start/stop; on the other hand, the corresponding test data is collected via a data acquisition card, and the data is processed using mathematical tools; finally, the measured data is compared with the parameters provided by the manufacturer to give the test results. The hardware block diagram of the testing system is shown in Figure 1. As can be seen, the core of the test system is a PC equipped with a data acquisition card, a motion control card, and LabVIEW 8.0 software. The data acquisition card is mainly responsible for acquiring the data required by the test system, such as voltage values, displacement sensor values, and pressure sensor values, and sending them to LabVIEW software for data processing; the motion control card is the bridge for LabVIEW to control the motor. 2.2 Test System Software Flowchart The program of the entire system is mainly divided into a main program and four subroutines: data acquisition subroutine, motor control subroutine, power control subroutine, data processing and curve display, and test conclusion. Its flowchart is shown in Figure 2. Several points about the flowchart: (1) Initialization is mainly the initialization of the main program and the power supply. First, the power supply is set to voltage output. (2) The process of starting the motor is the process of calling the motor control subroutine, including the process of initializing the motor, such as setting the motor speed, direction, etc. (3) The standard for judging whether the pedal has run to the bottom is based on the value of the pressure sensor. When the pressure reaches a certain value, the program considers that the pedal has run to the bottom. (4) The collected data are stored in array form. The change of power supply setting is mainly to set the output voltage to the output current. The motor reverse setting is to set the motor speed to the negative of the original value. (5) Whether the motor returns to the origin is determined by the displacement sensor. (6) Calculate the data collected and stored twice, compare the product's technical parameters, and give the test results. Determine whether to generate a test report document or print the document directly from the printer according to the customer's requirements. 2.3 Main Measurement Data 2.3.1 Voltage u1 and Input Voltage U In Figure 3, 1, 2, and 3 are the three pins of the pedal slider, and A and B are the two ends of a sliding rheostat. In the first process of the pedal following the motor's forward movement, the slider in the pedal's internal circuit will also slide from point A to point B. In this process, a constant voltage source U is added between pins 1 and 3. The analog input terminal of the data acquisition card is used to collect the voltage value u1 between pins 1 and 2. u1 changes continuously as the slider slides. At the same time as u1 is collected, the change process of the motor displacement L is also collected. Ideally, a curve plotted with L as the X-axis and u1 as the Y-axis should be a straight line. However, in practice, linear fitting of the two acquired arrays is required. The least squares method is generally used: The data acquisition card obtains and , and then the coefficients a and b need to be determined. Taking the partial derivatives of the above formula with respect to a and b respectively and setting them equal to zero yields two equations about a and b. Solving the system of equations makes it easy to find a and b, thus obtaining the best linear equation for the given data. Using LabVIEW's graphical programming method eliminates the need for such complex mathematical calculations; a module for solving the best linear fit using the least squares method is sufficient, as shown in Figure 4. Here, Y, X, and Weight represent the arrays , and (the weight of each point), Best Linear Fit represents the array , and slope and intercept represent the slope and intercept of the best linear fit line, respectively. Once these parameters are solved and compared with the parameters provided by the manufacturer, the test conclusion for the first parameter can be obtained. 2.3.2 Voltage R, Rn During the second phase of pedal movement, we changed the fixed voltage input between pins 1 and 3 to a fixed current input from pin 1; we changed the measurement of voltage u1 between pins 1 and 2 to the measurement of voltage u2 between pins 2 and 3. Dividing u2 by I yields the resistance R. Similarly, a curve with L as the x-axis and R as the y-axis is displayed on the front panel of the LabVIEW program. After the second phase ends, before the current is turned off after the motor is shut off, the voltage u3 between pins 1 and 3 is collected to calculate Rn = u3/I. These parameters are then compared with the manufacturer's specifications to provide test conclusions. 2.3.3 Motor Displacement L and Motor Pressure F on Pedal During the first and second phases of movement, displacement and pressure sensors are used to record the entire process of the slider moving from point A to point B and back to point A. The motor displacement is set to 0 when the slider is at point A and the maximum displacement is at point B, along with the pressure changes between the motor and the pedal. The values from the displacement sensor and pressure sensor are input to the computer through two analog input ports of the data acquisition card. In LabVIEW, the curve with L as the horizontal axis and F as the vertical axis is compared with the technical parameters of the curve provided by the manufacturer to obtain the test conclusion of the third parameter. 2.4 Main Subroutine Flowchart Since LabVIEW is a graphical programming software, and given the large size of the main program of this test system, only some subroutines are listed here for explanation. In the data acquisition subroutine, the various sampling parameters are first set, such as the sampling rate and sampling mode (multi-channel or single-channel, etc.). The sampling rate setting should take into account the performance of the data acquisition card (please refer to the relevant product manual for the performance of PCI-6233). Then, data sampling is started. In the subsequent while loop, the data sampled from multiple channels is stored in a two-dimensional array for easy calling by the data processing program. After that, there is a function module to stop sampling. Similarly, the main program can also call this subroutine flexibly. [IMG=Figure 3 Simplified Schematic Diagram of Pedal Circuit]/uploadpic/THESIS/2007/11/20071113112017884491B.jpg[/IMG]Figure 3 Simplified Schematic Diagram of Pedal Circuit[IMG=Figure 4 Linear Fitting Function Module]/uploadpic/THESIS/2007/11/2007111310491142632W.jpg[/IMG]Figure 4 Linear Fitting Function Module[IMG=Figure 5 Data Acquisition Subroutine Flowchart]/uploadpic/THESIS/2007/11/2007111310234018158J.jpg[/IMG]Figure 5 Data Acquisition Subroutine Flowchart[IMG=Figure 6 [Motor Control Subroutine Flowchart]/uploadpic/THESIS/2007/11/20071113102950626105.jpg[/IMG] Figure 6 Motor Control Subroutine Flowchart In the motor control subroutine, the motor is first initialized: the motor's operating mode and speed are set, and then the motor is started. The large box following is a while loop structure, in which the motor's position can be monitored in real time. The next box is a case structure; when a positive Boolean value is passed in the while loop, the program starts executing the motor stop function module, causing the motor to stop running. In the main program, we can flexibly change the program's parameter settings, such as speed, according to the requirements of the two processes for motor operation. For example, the speed can be set to 10000 in the first process and -10000 in the second process, indicating that the motor runs in the opposite direction at the same speed. 3 Conclusion Software design is the core content of the entire system design. Graphical programming greatly improves programming efficiency compared to text-based programming such as C, VC, and VB. Functions that require thousands of lines of text in text-based programming can be accomplished in LabVIEW in just a few seconds by adding a few controls. Examples include hardware initialization and the implementation of the least squares method. This efficiency is astonishing, which is the main reason LabVIEW was chosen as the development tool for this system. The system is currently running stably after initial testing at Bosch, with a reliability exceeding 95%. After further optimization, it is expected to be commercialized. (Proceedings of the 2nd and 3rd Servo and Motion Control Forums)