基于ARM的车身控制系统设计与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
汽车车身设备数量日益增多,功能日趋复杂,车载总线网络使用范围逐步扩大。本文主要是对以嵌入式技术为基础的支持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总线通信程序等。在前后台系统构架下,各程序模块以数据表为纽带相互关联,共同组成软件系统,实现车身控制系统既定功能。
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.
引文
[1] 李春明,捷达都市先锋轿车结构与维修,北京理工大学出版社,2000.10:1-88
    [2] 关惠平、谢飞鸿、刘有录,车载综合信息系统终端构筑方案的研究与实践,计算机工程与设计,2006,第 27 卷第 2 期:278-282
    [3] 张春化,汽车电器与电路,人民邮电出版社,2003.11:1-46
    [4] 李玮,载货车电气网络应用层协议设计,吉林大学学位论文,2006.6
    [5] 陈家瑞,汽车构造(下册),机械工业出版社,2002.1:372-416
    [6] 一汽大众汽车有限公司,宝来轿车用户手册,www.che168.com
    [7] Ralf Hadeler,Design of Intelligent Body Networks,SAE 2000 World Congress,2000.3.9,2000-01-0152
    [8] 郭利进、王化祥、龚进峰,基于 CAN 总线的车身网络系统及其控制策略研究,汽车工程,2006,第 28 卷第 8 期:774-778
    [9] Philips Semiconductors,LPC2294 datasheet Rev03,2005.11:1-47
    [10] Philips Semiconductors,LPC2294 User manual,2004.5.3:1-306 [11] Philips Semiconductors,LPC2294 Errata Sheet V2.0,2006.3.9:1-15
    [12] 清源计算机工作室,Protel99SE 电路设计与仿真,机械工业出版社,2002.3:1-185
    [13] 周立功,ARM 嵌入式系统基础教程,北京航空航天大学出版社,2005.5:1-414
    [14] 周立功,ARM 嵌入式系统实验教程(三),北京航空航天大学出版社,2005.7:1-132
    [15] Sipex Corporation,SPX1117 datasheet,2004.8.25:1-15
    [16] 王幸止,单片机应用系统电磁干扰与抗干扰技术,北京航空航天大学出版社,2006.2:155-215
    [17] Sipex Corporation,SP708 datasheet,2000.10.17:1-18 [18] ISOCOM INC,TLP521 datasheet,2003.7.4:1-3 [19] Paul Horowitz,Winfield Hill 著,吴利民 译,电子学,电子工业出版社,2005.10:1-51、96-144、381-539
    [20] 张毅刚,新编 MCS-51 单片机应用设计,哈尔滨工业大学出版社,2004.11:1-152、241-256、394-421
    [21] 龚进峰、曹健,基于 CAN/LIN 总线的智能车身网络研发,汽车电器,2006,第 5 期:4-7
    [22] Philips Semiconductors,TJA1050 datasheet,2000.5.26:1-20 [23] Philips Semiconductors,TJA1020 datasheet,2002.6.17:1-24
    [24] 毛法尧,数字逻辑,高等教育出版社,2002.9:26-59
    [25] 杜春雷,ARM 体系结构与编程,清华大学出版社,2006.12:1-496
    [26] 高超然、徐成、李仁发,ADS 环境下 ARM 系统两种初始化方式分析,计算机工程,2006,第 32 卷第 2 期:73-75
    [27] 姜京梅、郭树旭,ARM7 启动代码设计方法与流程,微计算机信息,2004,第 20 卷第 5 期:78-79、105
    [28] Todd D.Morton 著,严隽永 译,嵌入式微控制器,机械工业出版社,2005.9:1-55
    [29] Jean J.Labrosse 著,邵贝贝 译,嵌入式实时操作系统 μC/OS-II(第2 版),北京航空航天大学出版社,2003.5:1-143、283-332
    [30] 张云生,实时控制系统软件设计原理及应用,国防工业出版社,2005.3:58-82
    [31] 晨风,嵌入式系统多任务软件开发基础,清华大学出版社,2004.9:1-46
    [32] Qing Li 著,王安生 译,嵌入式系统的实时概念,北京航空航天大学出版社,2004.6:1-88
    [33] Daniel D.Gajski 著,边计年 译,嵌入式系统的描述与设计,机械工业出版社,2005.7:1-64
    [34] 李伯成,嵌入式系统可靠性设计,电子工业出版社,2006.1:1-188
    [35] 韩江洪、郑淑丽等,离散事件控制系统规则化描述方法的研究,合肥工业大学学报(自然科学版),2005,第 28 卷第 9 期:1081-1084
    [36] 徐正权、王治国,基于 ECA 规则的工作流过程建模,计算机工程与科学,2006,第 28 卷第 5 期:105-108
    [37] 姜跃平、汪卫、施伯乐、董继润,ECA 规则的模型和行为特定理论,软件学报,1997,第 3 期:190-196
    [38] 韩江洪、魏振春等,总线式车身控制系统的规则化建模方法,汽车工程,2006,第 28 卷第 12 期:1121-1124
    [39] 李刚炎、杨开英、杨明忠,轿车中央智能控制系统及其控制策略的研究,武汉汽车工业大学学报,1998,第 20 卷第 1 期:1-4
    [40] Michale J.Pont 著,周敏 译,时间触发嵌入式系统设计模式,中国电力出版社,2004.6:1-233
    [41] 饶运涛,现场总线 CAN 原理与应用技术,哈尔滨工业大学出版社,2004.11:1-166
    [42] SAE,SAE J1939-21,Society of Automotive Engineers Inc,1998

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700