节点文献
基于ARM的车身控制系统设计与实现
Design and Implementation of Body Control System Based on ARM
【作者】 王金江;
【导师】 秦贵和;
【作者基本信息】 吉林大学 , 计算机应用技术, 2008, 硕士
【摘要】 汽车车身设备数量日益增多,功能日趋复杂,车载总线网络使用范围逐步扩大。本文主要是对以嵌入式技术为基础的支持CAN(控制器局域网,Controller Area Network)/LIN(局部互联网,Local Interconnect Network)总线接口的集中式车身控制系统进行了研究。本文对车身电气设备进行了调研,总结出控制对象物理特性表;对车身控制系统功能进行了深入分析,归纳得到车身控制系统传统的基本功能,本系统的智能功能以及将来的扩展功能。在需求分析的基础上,提出了支持CAN/LIN总线接口的集中式车身控制系统总体设计方案。以微控制器LPC2294(ARM7核)为核心设计了系统硬件电路,包括:电源电路、复位电路、模拟量和开关量输入电路、开关量和PWM(脉冲宽度调制,Pulse Width Modulation)输出电路、JTAG(联合测试执行组,Joint Test Action Group)调试电路和CAN、LIN、RS232总线接口电路;通过对硬件电路关键节点电压进行测量采样,并与理论计算值进行对比分析,验证了硬件电路满足设计要求。在ADS1.2集成开发环境下,以C语言为主结合汇编语言进行了软件编程,包括系统启动和初始化程序、信号采集和分析程序、控制逻辑判断程序、输出控制程序、定时器中断处理程序和CAN总线通信程序等。在前后台系统构架下,各程序模块以数据表为纽带相互关联,共同组成软件系统,实现车身控制系统既定功能。
【Abstract】 Automotive Body Control System (also called Body Controller or BCM, short for Body Control Module) is an electrical and electronic control system, which operates the electrical equipments in vehicle, according to the operations of the drivers and motorists. Its control objects mainly include the dashboard, the lights, the electric windows, the electric locks, the wipers and the wash pumps. It effects on the visibility, convenience, comfort and entertainment in vehicle.With the growing number of electrical equipments, various functions become more intelligent; the fieldbus network spreads the scope of application increasingly. It is an inevitable trend to develop the BCM using the computer technology and the body network. In this paper, the basic principle and method of developping BCM are learned, and a DDC (Direct Digital Control) BCM, which provides the CAN (Controller Area Network) and LIN (Local Interconnect Network) interface, is designed and implemented successfully. There are three main parts.Part I: The analysis and overall design for the BCM. In this part, the body electrical equipments are investigated; the position, the electrical characteristic and the control methods of the equipments are analysised. Based on the functions of the existing mechanical and electrical control system, with the journals and industry standard, the basic functions are summed up, which the BCM should have. The intelligent functions of the system are proposed, including: energy management, central lock, guard against theft and alarm system, indoor light gradually put out, lock with the speed, collision unlock, intelligent wiper and so on. The idea that the BCM will become an information platform in vehicle is proposed. Based on the requirement and the current technical condition and other factors, an overall design for a DDC body control system provided with the CAN and LIN interface is proposed.Part II: Design the hardware circuit of the BCM. The LPC2294 chip, made by PHILIPS, with an ARM7-core, is selected as the central microcontroller, according to the requirements, the blue print of overall design, the computing power, the type and quantity of the in-chip peripherals, the commercial security, the debugging environment, and other factors. Centre to LPC2294, an ECU (Electronic Control Unit) is designed, which is made up of the core circuit of the ECU, the input interface circuit, the output and driver circuit and the bus network interface circuit.The core circuit of the ECU is made up of the microcontroller, the external crystal oscillator, the power supply circuit, the reset circuit, the startup circuit and the JTAG debug circuit. In order to provide stable and reliable power, the ECU uses two step power supply circuit. The former step uses the 78H05 chip, steel packaging, converts the batterie’s 12V to 5V, provides power to the end step. The end step uses the series of SPX1117 to convert 5V to 1.8V and 3.3 V respectively for the microcontroller.The input and output circuit implement switch signal input/output and PWM (Pulse Width Modulation) output. The optoisolator TLP521 enlarges the ability of the system-driven, and couples external 12V signals with the 3.3V signals in ECU, and isolates the internal current-loop from the external current-loop, and prevents the external disturbance accessing into the ECU. The analog input module uses resistance circuit to convert 0-12V to 0-3.3V, in order to suit the microcontroller. TheЛ-filter circuit, made up of the resistance and the capacitance, could filter the noise of the input signal. Measured the voltage of the hardware circuit’s key points, and compared the sample results with the theoretical value, the hardware circuit is validated that it accords with the requirement.The CAN interface is preparative by linking the CAN transceiver TJA1050 to the LPC2294’s CAN controller. Similarly, the LIN bus interface is preparative by linking the LIN transceiver TJA1020 to the LPC2294’s UART (Universal Asynchronous Receiver-Transmitter). Using the voltage converter chip MAX3232, the UART0 connects the PC’s serial port. Using ISP (In System Programming), the executable image file can be burned into in-chip Flash. Using an external JTAG protocol converter, the JTAG connects the PC’s parallel port; the software could be debugged by the in-chip Embedded-ICE module.After analysing the requirement carefully, some functions of the window are isolated from the ECU. Abstracted the control signals to logic variables, designed the electrical window circuit with the logic algebraic knowledge, the window function is implemented fully. This method not only decreases a lot of the harness, but also reduces the load of the ECU.Part III: Design the software of the BCM. The software system uses the foreground-background structure, the main procedure runs in the background, the event-triggered tasks are executed pollingly; and the time-triggered tasks and high real-time tasks are executed in the foreground, using multiple ISRs (Interrupt Service Routine) for the IRQ (Interrupt ReQuest). Under the IDE (Integrated Development Environment) ADS1.2, a scatter file defines the address map of the image file; the application program is programmed with C language mainly and with the ARM assembly language and the embedded assembly language a little.During the software system development process, the software is designed in accordance with the corresponding hardware circuit, including: the system target board configuration and startup function, the initialization function, the switch signal collection and analysis function, the analog signal collection and analysis function, the logic judgement and control function, the GPIO and PWM output control function, the timer T0 ISR and the CAN communication function. In addition to the functions, the software system also defines a number of data tables to indicate the various kinds of information, including: the GPIO switch signal input table, the analog input table, the event table, the analog signal actual signification table, the intermediate state and event logo table, the order table and the body equipment state table.The software system’s workflow is as follows: after the power-on reset, the startup function runs firstly, it configures the target board; and secondly the initialization function is called, it initializes the various functional modules of the system; thirdly the main circulatory process is entered, both of the switch signal collection and analysis function and the analog signal collection and analysis function collect the input information, and write the information into the event table and the analog signal actual signification table; in succession, the logic judgement and control function, with the relevant information in the two tables above and the body equipment state table, in accordance with the control rules, makes a logic judgement, and generates the control instruction; lastly, the GPIO and PWM output control function and the timer T0 ISR operate the PWM and GPIO output according to the control instruction, and update the body equipment state table.In the software system, the procedure modules are independent each other, they establish contacts by data tables, and data tables are ties between procedural modules. Data tables are used as the interfaces between various modules, as long as the interface requirement is meet, input/ouput modules can be replaced, and it improves the system’s modularization.For improve the CPU’s utilization, the interrupt is used to send and receive the CAN frame in the CAN communication function. The experiments confirm that the interrupt can effectively save CPU’s time during sending and receiving the CAN frame, and the CAN frame in the experiment agrees with the J1939 protocol.The DDC body control system, which provides the CAN interface and LIN interface, implements the control functions using a DDC method. The CAN and LIN interfaces are prepared to develop the distributed control system and to connect with the power CAN, the comfort CAN in the future. The high-performance ARM core in the ECU, prepares adequate hardware resource for supporting the system become an information platform in-vehicle. The research of the system accumulates a lot of valuable experience for the development of the distributed body control system, and the system provides an application platform for the description and implementation of the discrete event control system.
- 【网络出版投稿人】 吉林大学 【网络出版年期】2008年 10期
- 【分类号】TP273.5
- 【被引频次】5
- 【下载频次】385