17 1 2012 2 Vol 17 No 1 JOURNAL OF HARBIN UNIVERSITY OF SCIENCE AND TECHNOLOGY Feb 2012 CAN 150080 CAN CAN CAN SAE J1939 CAN CAN CAN CAN SAE J1939 TP23 A 1007-2683201201- 0068-06 A Design Method of CAN BUS Network Communication Structure for Electric Vehicle LI RanWU Jun-fengWANG Hai-yingZHAO Xu School of Measure-control Technology and Communication EngineeringHarbin University of Science and TechnologyHarbin 150080China AbstractIn order to research the study on the real-time and reliability of the CAN BUS informations on electric vehicle this study designed a structure of CAN BUS network communication for electric vehicle based on the characteristics of CAN BUS technology and an application layer protocol of SAE J1939 for electric vehicle and the hardware modules The software modules used the priority-based of the right mode of competition to ensure the system s real-time and reliability Through the actual data collection on road the hardware circuits and the software design are reasonable So the designed of CAN BUS network communication structure for electric vehicle has practical application value Key wordscan BUScommunication structuresae J1939electric vehicle 0 CAN BOSCH 20 80 8 8 2010-03 - 02 9732009CB220107 12511104 RC2009QD008004 1980 E-mailzeemoolr@ 126 com 1959 1MBPS CAN 1-3 CAN
1 CAN 69 4 接受滤波 CAN CRC LLC 超载通知数恢复管理 CAN 据数据封装 / 拆装 5 链帧编码 ( 填充 / 解除 ) 媒体访问管理 路 CAN 应答 SAE J1939 1 1 CAN 1 1 CAN 层 1CAN CAN 7 CAN 1 2 2CAN CAN 1 58% CAN 1 2 6 8 MAC PLS PMA MDI 错误监测出错标定 串行化 / 解除串行化位编码 / 解码位定时同步驱动器 / 接收器特征连接器 监控器 总线故障管理 故障鉴定 CAN 3CAN CAN ABS 仪表 信息单元 前组合控制单元 后组合控制单元 发动机发电机变频器 CANA 整车控制器 控制器 辅助控制器 主电机 AMT CANB 中央管理系统 01 01 02 02 03 03 04 04 20 20 CANC 2 CAN 2 SAE J1939 1 ~ 255 1 2 1 SAE J1939 SAEJ1939 J1939 200 ms 7 8 CAN J1939 FF J1939
70 17 2 2 SAE J1939 250kbps CAN 3 3 CAN 29 1 Mb /s SAE J1939 82C250 CANH CANL CAN ID 1 CAN 3 8 R 82C250 SJA1000 0DP 08 PF 8 PS 8 SA 82C250 CAN DP SJA1000 TX RX 6N137 0 1 82C250 CAN DP 0 PF 0 CAN 239 PDU1 PS PF DC /DC 240 255 PDU2 PS CAN PF 9 2 0x18FECA00 Byte 1 ~ 4 3 0x18FECA00 Byte 5 ~ 8 10 1 CAN ID EEP- CAN CAN ID ROM LED 1 0x18FFCE00 Byte 1 ~ 6 4 CAN 4 0x18FEEE00 Byte 1 5 0x18FEEE00 Byte 5 6 4 CAN 6 0x18FEEE00 Byte 1 2 7 0x18FEEF00 Byte 3 4 8 0x18FF83D0 Byte 1 2 9 0x0CF00400 Byte 4 5 3 CAN CAN CAN CAN CAN 4 1 CAN SJA1000 6N137 CAN CAN 82C250 CAN CAN PCA82C250 CAN
1 CAN 71 89C51 P00 P01 P02 P03 P04 P05 P06 P07 P20 RD WR ALE INT1 STA1000 AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 CS RD WR ALE INT1 TX0 TX1 RX0 RX1 CLKOUT MODE VDD1 VDD2 VDD3 VDD1 VDD2 VDD3 62k 47k 100nF IN 6N137 EN VDD VO GND GND VO VDD EN IN 6N137 100nF 82C250 TXD CANH RXD CANL VRef RS GND 100nF 5 5 47k 30pF 30pF CANH%CANL 4 CAN 4 2 CAN void cancirbufinitcancirbuf * ptcancirbuf TCAN - DATA * ptcanframebufunsigned char uc- Length ptcancirbuf - > ulwriteindex = 0ptCanCirBuf - CANBUS > ulreadindex = 0/* Buffer * / 5 ptcancirbuf - > bisfull = false/* * / ptcancirbuf - > ullength = uclength/* 发送程序开始设置发送帧的标识符 * / ptcancirbuf - > ptcanframbuf = ptcanframe- 从缓冲区申请一帧报文的存储 Buf/* * / Y 判断缓冲区是否满 for unsigned int i = 0i < uclengthi + + N 确定报文类型 报文数据长度以及报文 ID ptcancirbuf - > ptcanframbuf i isext = 1/* * / ptcancirbuf - > ptcanframbuf i rxrtr = 0 ptcancirbuf - > ptcanframbuf i dlc = 0/* * / ptcancirbuf - > ptcanframbuf i id = 0/* CAN ID* / for unsigned int j = 0j < 8j + + ptcancirbuf - > ptcanframbuf i data j= 0/* * / CAN 20ms CAN 5 发送数据到缓冲区 发送程序结束 CAN 4 3 CAN QY9263K RBS RBS 0 RBS 1 6
72 17 收到中断, 接收开始 判断是否是报文 Y 判断缓冲区是否满 N N 确定报文类型 报文数据长度以及报文 ID 6 接收数据到缓冲区 接收程序结束 Y 5 CAN 1 6 000 CAN 2 CAN CAN 2 /s 1-20 21-40 41-60 /V 1 001-1 020 1 021-5 061-1 040 5 080 5 081-6 000 1 26 403 26 449 26 388 25 042 24 804 24 636 25 197 2 26 417 26 41 26 437 24 967 24 856 24 628 25 141 3 26 413 26 413 26 417 24 92 24 84 24 64 25 082 4 26 429 26 421 26 388 24 84 24 836 24 64 25 029 5 26 437 26 41 26 37 24 789 24 88 24 745 24 974 6 26 429 26 381 26 35 24 782 24 936 24 749 25 022 7 26 429 26 35 26 343 24 816 24 967 24 816 25 053 8 26 478 26 347 26 339 24 808 25 245 24 8 25 118 9 26 512 26 335 26 343 24 808 25 305 24 848 25 154 10 26 502 26 323 26 339 24 808 25 279 24 879 25 193 11 26 494 26 303 26 319 24 808 25 293 24 94 25 186 12 26 512 26 307 26 264 24 808 25 271 24 967 25 174 13 26 523 26 3 26 21 24 808 25 261 24 967 25 209 14 26 523 26 319 26 163 24 804 25 291 24 998 25 197 15 26 554 26 323 26 107 24 808 25 257 25 079 25 201 16 26 543 26 315 26 038 24 808 25 297 25 333 25 193 17 26 505 26 319 25 969 24 808 25 353 25 277 25 233 18 26 494 26 323 25 899 24 812 25 353 25 229 25 209 19 26 502 26 343 25 875 24 808 25 369 25 245 25 201 20 26 49 26 343 25 843 24 804 25 424 25 205 25 205 CAN 7 CAN CAN CAN SAE J1939 CAN CAN 6 CAN
1 CAN 73 29 28 27 26 25 24 23 22 (a)g01tv 29 28 27 26 25 24 23 22 (b) 总线分析仪 7 1 CAN SJA1000 J 200742 81-83 2 Petri CAN J 2009143 46-50 3PINHO LMVASQUES F Timing Analysis of Reliablere Realtime Conmmunication in CAN NetworksC/ /IEEE in Digital Object Identifier200179-86 4 CAN J 10 CAN J 2009104 52-63 2008741 138-141 5SHENG M CMENG W Analysis of Schedulability of CAN Based on RM AlgorithmC/ /Vehicular Electronics and Safety ICVES IEEE International Conference2007121-4 6 CAN J 2008277 9-12 7 C8051 CAN J 2008178 35-38 8 CAN J 200443 42-48 9FENG G SZHANG WJIA S Met al CAN Bus Application in Automotive Network ControlC/ /Proc Measuring Technology and Mechatronics AutomationICMTMA2010779-782