• 沒有找到結果。

Item 987654321/15578

N/A
N/A
Protected

Academic year: 2021

Share "Item 987654321/15578"

Copied!
32
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會補助專題研究計畫 □

ˇ 成 果 報 告

□期中進度報告

CAN 資料匯流排應用於無人飛行載具(UAV)機上網路之

可行性研究

計畫類別:□

ˇ

個別型計畫 □ 整合型計畫

計畫編號:NSC 96-2221-E-018-006-

執行期間:96 年 08 月 01 日至 97 年 07 月 31 日

計畫主持人: 楊介仙 (彰化師範大學車輛所副教授)

計畫參與人員:吳柏璟(彰化師範大學車輛所碩士生)

賴敬業(彰化師範大學車輛所碩士生)

張耕華(彰化師範大學車輛所碩士生)

張文金(彰化師範大學車輛所碩士生)

吳鈞達(彰化師範大學車輛所碩士生)

謝侑成(彰化師範大學車輛所碩士生)

成果報告類型(依經費核定清單規定繳交):□

ˇ

精簡報告 □完整報告

本成果報告包括以下應繳交之附件:

□赴國外出差或研習心得報告一份

□赴大陸地區出差或研習心得報告一份

ˇ

出席國際學術會議心得報告及發表之論文各一份

□國際合作研究計畫國外研究報告書一份

處理方式:除產學合作研究計畫、提升產業技術及人才培育研究計畫、

列管計畫及下列情形者外,得立即公開查詢

□涉及專利或其他智慧財產權,□一年□二年後可公開查詢

執行單位:國立彰化師範大學

(2)

本計畫為控制器區域網路(CAN)資料匯流排應用於無人飛行載具(UAV)資料通

訊及其通訊效率之研究,並發展通用型 CAN 之硬體,建立廠級替換單元或線上替換

單元的環境(Shop Replaceable Units or Line Replaceable Units, SRU/LRU),除了提高資

料傳輸效率與實現系統線上或維修廠替換單元之功能外,期能降低系統元件之研發、

製造及維修成本。本計畫已發展一可行 CAN(Controller Aera Network)系統之資料通訊

協定,可應用於飛行載具機上網路,並依此建立廠級替換單元及線上替換單元

(SRU/LRU)之環境,並評估於此資料通訊協定與機制及 SRU/LRU 環境下之通訊效

能。CAN 主節點與該匯流排上之其他節點間是否具雙向通訊之能力為是否可建立

SRU/LRU 環境之重要指標,因此本文提出一可行之群組主節點間接雙向通訊架構,

並利用 CAN 系統之通訊資源,適切地規劃其資料通訊協定,提出實務上可行且配合

群組主節點雙向通訊架構之資料通訊協定,除可達成主節點之雙向溝通之目的外,亦

可提供線上修改 CAN 匯流排上之某硬體節點仲裁辨識碼、遮罩、過濾碼等,甚至可

提供線上更新軟體之功能,且無須拆卸硬體相關設備,除此之外,可增加其他資料傳

輸之功能,另該資料通訊協定亦可符合 SAE J1939 編碼之規範。本文中亦驗證上述所

提之機制與資料通訊協下之功能,並分別量測直接雙向通訊及間接雙向通訊之反應時

間及分析其通訊效率等,其結果揭櫫若主節點之時間觸發為 1 秒,則於鮑率為 250kbps

時每一節點於直接及間接雙向通訊所佔之頻寬實測值分別約為 0.12%與 0.18%。

關鍵詞:控制器區域網路、資料通訊協定、通用型單元、線上替換單元、維修廠替換

單元、無人飛行載具。

Abstract

This project mainly studies the feasibility of the shop replaceable units or line

replaceable units (SRU/LRU) for unmanned aerial vehicles (UAV) onboard information

systems based on controller area network (CAN). The kernel objective of the SRU/LRU

can be defined as the round way communication between the master node and the other

nodes in the CAN bus. The round way communication is crucial for CAN system

because of the inherent constraints of CAN communication. The mechanism of CAN

communication has to be changed for SRU/LRU except the network configuration. In

this project, we propose a feasible approach to handling the problems of the round way

communication including the group master architecture and the data communication

protocol. Therefore, the environment of the SRU/LRU can be created in CAN bus. The

round way communication can be achieved by indirect way. Besides, the capability of the

CAN system will be increased and the communication between nodes is not only the data

signals but the instruction signals. In addition, we also analyze and assess the

communication efficiency of this proposed mechanism. The results show that little

bandwidth is consumed by this mechanism. For instance, the bandwidths are around

0.12% and 0.18% for direct round way communication and indirect round way

communication, respectively, in case that the baud rate of CAN bus is 250 Kbps.

keywords:Controller Area Network (CAN), Data Communication Protocol, Generic unit,

Line Replaceable Unit (LRU), Shop Replaceable Unit (SRU), Unmanned

Aerial Vehicles (UAV).

(3)

1

1、前言

近年來航太電子相關技術發展迅速,可謂一日千里,機載航電設備及其次系統已

由早期獨立運作之模式,進步至整合之系統,各次系統間相關資訊之交換與分享亦成

為航電領域重要課題之一,早期之機載網路因機載航電系統較少且較簡單,各系統間

是以點對點之連接方式交換與分享相互間相關資訊,但進年來,機載航電系統愈形重

要,若仍採用點對點之連接方式進行交換與分享相互間之資訊,將造成機載航電系統

間線束繁多,除增加重量外,亦造成可靠度降低及維修上之困擾,有鑑於此,機載網

路系統因應而生,如 MIL1553B、ARINC 429 及 ARINC 629 等。上述之機載網路系

統均所費不貲,均可適用於中大型航空載具,但對於小型、輕型及超輕型航空載具或

UAV(無人飛行載具,Unmanned Aerial Vehicle),實是難符經濟效益,而對於無需航空

認證之航空載具,其價格更是無法接受,因此各航電廠莫不研發或尋求替代產品。

1980 年代中期,德國 Bosch 公司在汽車工程師學會(Society of Automotive

Engineers, SAE)會議上發表控制區域網 (Controller Area Network, CAN)系統,該網路

系統為串列式匯流排,支援分散式即時系統,最初應用於車輛上之即時控制,因 CAN

網路系統簡單、穩定且通訊效能佳,亦被廣泛應用在航太、船舶、醫療電子及工業控

制等系統,更於 1999 年,該網路系統成為新數位網路技術,其目的在於提供可靠及

快速通訊效能、交換與分享各系統間相關資訊、降低車輛整體之生產成本。

由 CAN 系統之通訊機制與架構,可知 CAN 系統之主節點與其它節點間是否具

雙向通訊之能力為可否可建立 CAN 系統 SRU/LRU 環境之重要指標,因此本文提出

一可行之 CAN 系統群組主節點間接雙向通訊架構,並利用 CAN 系統之通訊資源,

適切規劃其資料通訊協定,提出實務上可行且配合群組主節點間接雙向通訊架構之資

料通訊協定,除可達成主節點之雙向溝通之目的外,亦可提供線上修改 CAN 匯流排

上之某硬體節點仲裁(辨識)碼、遮罩、過濾碼等,甚至可提供線上更新軟體之功能,

且無須拆換硬體相關設備,除此之外,亦可增加其他資料傳輸之功能,另該資料通訊

協定亦可符合 SAE J1939 編碼之規範。本文中亦驗證上述所提機制與資料通訊協下之

功能,並分別量測直接雙向通訊及間接雙向通訊之反應時間及分析其通訊效率等,其

結果揭櫫若主節點之時間觸發為 1 秒,則每一節點於直接及間接雙向通訊所佔之頻寬

分別約為 0.12%與 0.18%。

2、研究目的

CAN 系統通訊協定是由 Bosch 公司於 80 年代首先發展[1],主要目的是為了因

應新型車輛上不斷增加之電子裝置與設備而採用 CAN 之通訊技術,使車輛電子系統

可透過簡單的並列介面,即可完成各車輛電子次系統的連接,達成資訊交換之目的

等。傳統電子裝置之點對點資料交換與傳遞方法是以裝置為通訊之辨識,此通訊方式

雖可以有效地將資料傳送至欲傳遞之裝置,但由於點對點之通訊方法,將使通訊網路

變得較為錯綜複雜,相對地不但會增加載具的製造與生產成本,且資訊傳輸效率不

佳,更增加載具之電子系統發展與維修之成本,反觀 CAN 之通訊模式,主要是以訊

息框架(Message Frame)為通訊之主體,且是經過標準化之通信協定[2]。

目 前 航 空 載 具 上 常 使 用 之 網 路 系 統 包 含 ARINC 429 、 ARINC 629 及

MIL-STD-l553B 網路系統[3],而 UAV 之網路系統亦然,雖然其通訊協定所具有之傳

輸機制適合運用於飛行載具網路系統[4],但考慮其成本因素,本研究建議採用成本

較低之 CAN 網路系統,而運用 CAN 系統作為 UAV 之內部網路系統除了可節省通訊

之硬體成本外,CAN 匯流排於硬體間亦使用仲裁機制處理資料碰撞,且最多可支援

2

29

個節點等優點,比較上述通訊系統之優劣後,以 CAN 系統較適合應用於介於車輛

(4)

與載人飛行載具之間的無人飛行載具之內部通訊網路系統。

本研究主要目的為發展通用型 CAN 硬體與合適之資料通訊協定應用於無人飛行

載具(Unmanned Aerial Vehicles, UAV)電子裝置,主要目標乃建立線上或廠級替換單元

之環境(Line/Shop Replaceable Unit, LRU/SRU),而 LRU/SRU 包含資料存取單元與周

邊介面等,其主要功能為存取硬體、感測器、制動器之資訊與可透過資料通訊協定讀

取、更改其硬體資訊等,飛行載具上常使用許多感測器與裝置,除了姿態感測器

(Gyro)、加速規(Acceleromter)外,亦具空速、引擎溫度、GPS 裝置等感測器[5]等,制

動器除油控裝置外,諸如 UAV 各控制面(Control Surfaces)、前視影像擷取鏡頭(Looking

Forward Camera)及環架(Gimbals)之姿態控制器等,皆可透過 CAN 網路分享資訊,提

高資料傳輸效率,並簡化各感測器及制動器間之連線、減輕通訊連接線束之重量。

3、文獻探討

CAN 匯流排節點傳送資料訊息為廣播通訊(Broadcast Communication),以訊息優

先權高低為系統間資訊網路傳輸仲裁機制,因其為分散式架構,可有效降低系統間資

訊網路傳輸之成本,取代原車輛上複雜且笨重之硬體接線[6-10]。文獻[11-13]以 CAN

系統訊息排序(Scheduling Messages)之方法應用即時控制系統,如即時電腦整合製造

(Computer Integration Manufacture, CIM)之應用等,並提出高效率 CAN 系統訊息排序

之設計及實現等論述;文獻 [14]揭櫫 CAN 系統於即時系統應用時之限制,並提出動

態分配可變優先權分配之方法,面對及處理該限制;文獻[15-17] 根據 CAN 系統傳輸

資料時發生錯誤之情形,分析及計算其資料傳輸之響應時間(Response Time),並改善

CAN 匯流排之資料通訊,降低資料通訊傳輸之錯誤情事;CAN 匯流排亦被實際應用

於電動車輛之車載網路系統 [18,19],而[19]中亦以 SAE J1939[20-22]規範,應用於電

動客車之車載網路系統;CAN 系統業已廣泛且成功應用於不同之工業領域,可參考

文獻[2,23,24]及其參考之文獻等。

航空電子元件之可靠度與複雜度更是重要,因此航空電子元件之維修,除了可靠

度之考量外,維修效率更是重要,不但可以降低維修成本,更可提升服務品質,因此

衍生廠級替換單元 (Shop Replaceable Units, SRU)之關念,而就中大型飛行載具而

言,其航空電子元件可能於飛行中失效或故障(如屬重要電子元件,則系統將自動切

換至已開機之備用元件),系統將通知機師逕行將失效或故障之電子元件抽換,此為

線上替換單元(Line Replaceable Units, LRU)之機制,此機制亦可應用於小型、輕型及

超輕型航空載具或 UAV 等電子元件之維修上,駕駛員或維修人員可依據維修手冊逕

行更換該失效或故障之電子元件,而無需進廠維修,亦可降低維修成本。文獻[25]指

出至公元 2010 年時,SRU/LRU 將成為航空電子系統維修體系之主流概念,作者更強

調航空電子系統之錯誤資料將快速被分析與解譯,因此可提升航空電子系統之維修效

率;文獻[26]及[27]中分別研究 C-17 航空載具之自動測試裝備及嵌入測試機制;文獻

[28]中則探討有關 LRU 航空電子系統之系統錯誤紀錄及回報方法(Fault Recording and

Reporting Methods),所提出之方法,針對 LRU 機載航空電子系統之除錯,除可降低

機載航空電子系統之系統錯誤碼的解譯過程外,並可去除提供不必要系統維修的程序

及減少系統維修技術人員;而近年來奈米技術亦應用於 LRU 機載航空電子系統,奈

米級之裝置可取代整片印刷電子板(Print Circuit Board,PCB),甚或取代組成單一 LRU

之整組 PCB,文獻[29]中針對奈米技術於航空載具之設計及維修的衝擊提出精闢見解

與說明,因此機載航空電子系統 SRU/LRU 之機制的重要性將不言而喻。但對於 CAN

系統可否應用於之機載航空電子之網路系統,端視 CAN 系統可否建立 SRU/LRU 之

機制而定。

(5)

3

4、研究方法

CAN 系統之低速網路(125Kbps)與高速網路(1Mbps)分別規範於 ISO-11519[30]及

ISO-11898[31]之標準中,CAN 匯流排之通訊協定為載波感測多重通道與具碰撞位元

解析之碰撞偵測(Carrier Sense Multiple Access and Collision Detection with Collision

Resolution, CSMA/CD-CR)之方式,具優先權仲裁(Priority Arbitration)及非破壞性

(non-destructive)匯流排仲裁之機制,而 CAN 系統採用非破壞式逐位仲裁之方式,因

此 CAN 匯流排傳輸訊息中具標識碼(Identifier),亦即仲裁碼(Arbitration),即使訊號發

生碰撞,CAN 匯流排則由仲裁碼之優先順序決定何者之資料訊息可優先傳輸,此機

制可有效解決網路匯流排之訊號碰撞問題。而資料匯流排上之節點是否可接收網路傳

輸之訊息資料,則可由該節點之遮罩(Mask)及過濾器(Filter)決定接收該資料訊息與否

之依據。因此 CAN 系統之通訊機制並非以位址為定址之依據,且匯流排上節點之仲

裁碼除提供仲裁之功用外,亦成為間接定址(Addressing)之依據。

CAN 系統之訊息中包含優先權和資料等相關資訊,其訊息框架依不同情況可分

為四類:(1)資料框架(Data Frame);(2)遠端框架(Remote Frame);(3) 錯誤框架(Error

Frame);(4)超載框架(Overload Frame)。CAN 匯流排資料訊息格式之規範為 CAN 2.0A

標準格式(Standard Frame Message,如圖 1 所示)及 CAN 2.0B 擴展格式(Extended Frame

Message,如圖 2 所示),就 CAN 匯流排傳輸之資料框架而言,每一資料框架由 7 個

不同的區域組成。標準格式及擴展格式之資料框架相似,最大差異為仲裁區域分別佔

12 位元及 32 位元,各可規劃 11 及 29 個位元之仲裁碼,最多分別支援 2

11

及 2

29

個網

路節點,而每一筆傳送之資料最多可傳送 8 個位元組(Byte),該資料成為資料通訊協

定重要之資源之一,因此 CAN 2.0A 標準格式單筆資料訊息傳輸總長度為 44~108 位

元,而 CAN 2.0B 擴展格式單筆資料訊息傳輸總長度為 64~128 位元。

圖 1. 標準格式之資料框架

圖 2. 擴展格式之資料框架

CAN 系統之通訊協定,主要為 CAN 匯流排節點仲裁碼、接收之 CAN 匯流排硬

體節點遮罩及過濾器等三部分[32,33],仲裁碼屬於傳送端,且匯流排上無重複之仲裁

碼,接收節點之遮罩及過濾器與傳送訊息仲裁碼之對應位元必須比對以決定該筆傳送

訊息可否被該接收端之節點接收(如表 1 主節點與其他節點可接收資料訊息之能力表

列)。雖然 CAN 系統在機載網路通訊之應用上較其他網路通訊系統具更多優勢,但仍

然有其限制的存在,例當機載網路系統擁有多個 CAN 匯流排節點,而接收端的節點

該如何將其所接收到的資料正確地解譯,並做出正確的動作,正是 CAN 系統在資料

傳輸機制上之一大限制[34,35]。就 CAN 系統上建構 SRU/LRU 環境之問題實是 CAN

系統之主節點是否具與其匯流排上之其他所有節點雙向溝通之機制。

(6)

表 1. 主節點與其他節點之可接收範例

Node Arbitrary Mask Filter Receivability

M 18FF000016 18FF000016 18FF000016 A,B A 18FF010116 18FF010116 18FF000116 B B 18FF020116 18FF020116 18FF000116 A

吾人可利用資料訊息框架中之資料區域(Data Field)所傳輸的資料,由於考慮

CAN 系統應用時之最飽和情形,本研究將利用資料區域之 8 個位元組,規劃 CAN 系

統之資料通訊協定,該資料通訊協定除可滿足一般數據傳輸外,亦可指定某節點執行

某些指令,如更改該節點之仲裁碼、遮罩、過濾器等,甚或執行透過 ISP 更新節點之

軟體等。首先將具 64 位元之資料區域劃分為 4 個區,分別為格式位元區(Format Bit,

FB)、目標標識碼區(Destination Identifier, DI)、動作指令碼區(Action Code, AC)、傳輸

資料區(Transmission Data, TD),如圖 3 所示,其說明如下:

格式位元區(FB):格式位元區供佔 1 位元,可分辨與區分二 CAN 匯流排之資料訊息

格式,分別為標準格式及擴展格式。如當位元碼為 0 時(FB=0),定義匯流排之資料訊

息為標準格式;反之(FB=1),則定義該資料訊息為擴展格式。

目標標識碼區(DI):此區為 CAN 匯流排上之主節點傳送資訊息或指令至目標節點仲

裁碼之數值。其功能主要為當非該目標標識碼之節點收到該訊息時,除群組主節點

外,可不處理該筆資料訊息,而當匯流排上之某節點仲裁碼與目標標識碼區之數值一

致時,則該節點執行該筆資料訊息所代表之指令。

a.標準格式

b.擴展格式

圖 3. 資料通訊協定之資料框架規劃

動作指令碼區(AC):動作指令碼之定義取決於 CAN 系統之應用。舉例而言,若一

CAN 系統應用中少於 256 個動作指令,則資料框架中資料區域之動作指令碼之規劃

可不大於 8 位元。動作指示碼仍有些例外之情況,例如一些特別之動作指令,因其可

能佔用之資料可能大於資料區域所佔之 64 位元,則動作指令碼將有所調整,如改變

擴展格式中 CAN 匯流排上節點之仲裁碼、過濾器或遮罩等,如表 2 所示。

傳輸資料區(TD):此區主要為資料之傳輸。在 CAN 匯流排之資料訊息格式為標準格

式時(FB=0),所傳送之資料範圍可為 1~5 位元組,該數據資料應具足夠之解析度(約

9.0949×10

-11

%);而於擴展格式時(FB=1),所傳送之資料範圍除更改匯流排上之節點

之仲裁碼、過濾器或遮罩外,其所佔之空間為 1~3 位元組,解析度近似於 5.960×10

-6

%,亦足堪應用於大多數之數據傳輸。

本研究在於發展一資料通訊協定(Data Communication Protocol),圖 4 為傳統

CAN 匯流排通訊架構示意圖,實 (藍色)線表 CAN 匯流排實體連接示意,虛(橘色)

線表 CAN 匯流排上資料訊息傳遞方向示意,當匯流排上之主節點的遮罩位元可均設

為 0(或遮罩及過濾器與其他節點之仲裁碼均匹配)時,該主節點可接收所有其他節點

所傳送之任何資料訊息,但該主節點傳送之資料訊息卻未必為匯流排上所有其他節點

(7)

5

所接收,因此傳統 CAN 匯流排通訊架構無法滿足 CAN 匯流排上之主節點與其他所

有節點雙向溝通之需求(詳如第二節所述)。

表 2. 資料框架之資料通訊協定規劃

a. 標準格式

b. 擴展格式

CAN 匯流排上可設一主節點,其他節點各依其功能組成若干群組,亦即相互傳

遞資料訊息之節點組成同一群組,其群組中某節點之仲裁碼與群組中其他節點之遮罩

及過濾器相互匹配,而群組中擇一節點為群組主節點,群組內之其他節點均可接收該

群組主節點所傳送之資料訊息,例 CAN 匯流排上有 4 個節點,各為主節點(Master

Node, M)、群組主節點(Group Master Node, GM)、節點 A (Node A, A)與群組節點 B

(Node B, B),其仲裁碼、遮罩及過濾器之數值,如表 3 所示。除主節點外,其他節點

均歸類為同一群組。群組中之所有節點的仲裁碼均與群組中之其他節點的遮罩及過濾

器匹配,因此群組中之各節點(包括群組主節點)均可相互間傳送與接收 CAN 匯流排

上之訊息,若 CAN 匯流排主節點之仲裁碼可與群組主節點之遮罩及過濾器匹配,換

言之,群組主節點可接收 CAN 匯流排主節點所傳遞之資料訊息,則透過資料通訊協

定,群組主節點可將 CAN 匯流排上主節點之資料訊息,傳遞至該群組之其他節點(如

圖 5 所示,各線之定義參閱圖 4),亦即群組主節點為 CAN 匯流排上主節點與群組中

之所有其他節點間之閘道(Gateway), CAN 匯流排主節點之資料訊息可間接傳遞至匯

流排上之任一節點,如此主節點與其他所有節點可建立雙向溝通之機制,亦即 CAN

系統上可建構 SRU/LRU 之環境。

圖 4. 傳統 CAN 匯流排通訊架構示意圖

表 3. 主節點與群組主節點之可接收範例

Node Arbitrary Mask Filter Receivability

M 18FF000016 18FF000016 18FF000016 GM,A,B

GM 18FF000116 18FF100016 18FF000116 M,A,B

A 18FF010116 18FF010116 18FF000116 GM,B

(8)

圖 5. 群組主節點 CAN 匯流排通訊架構示意圖

5、結果與討論

本研究除發展適合建構 SRU/LRU 環境之資料通訊協定及 CAN 匯流排主節點與

其他所有節點之間接雙向通訊外,亦發展適合於機載電子 CAN 系統之通用型單元(如

圖 6 所示),輸出入介面包括 CAN 介面、數位及類此輸出入介面、串列埠介面等,幾

乎已涵蓋大多數可能之裝備可能之輸出入介面,為實驗與量測之便,吾人將該使用之

通用型單元組合如圖 7 所示之通用型單元組,每一通用型單元之軟體均相同,且除

CAN 匯流排主節點外,其他節點內定之仲裁碼、遮罩及過濾器均相同(主節點之軟體

亦可相同,但僅需於 MCU 板上置一開關或跳接閘區分主節點及非主節點),由主節點

按資料通訊協定傳遞指令至匯流排上之節點,匯流排上之節點一一依照規劃之節點仲

裁碼、遮罩及過濾器更改並將更新之仲裁碼、遮罩及過濾器儲存至延伸唯讀記憶體,

如第四章所述,其中之一通用型單元規劃為 CAN 匯流排主節點,其他單元各規劃為

二群組,每一群組各規劃一單元為該群組之主節點,節點軟體乃根據不同仲裁碼執行

不同指令,則通用型單元之硬體及軟體均完全相同。

圖 6. CAN 系統之通用型單元

圖 7. CAN 系統之通用型單元組

(9)

7

為 驗 證 本 文 提 出 可 行 方 案 之 SRU/LRU 功 能 , 擬 以 系 統 之 自 動 測 試 配 備

(Automatic Test Equipment, ATE)為目標功能,由 CAN 匯流排主節點分別對群組 1 及

群組 2 之所有節點一一下 ATE 之某指令,並由各節點之串列埠將接收狀態送至監控

電腦,並由監控電腦分別顯示各群組主節點及各節點之傳送資料訊息,其結果如圖 8

所示,其中圖 8a 及 8b 分別為群組 1 及群組 2 中各節點之接收與處理狀態,圖中各節

點指示燈號各為:左側(黃色)燈號為節點接收由群組主節點間接傳遞來自 CAN 匯流

排主節點傳送之資料訊息狀態;右側(綠色)燈號為節點接收 ATE 某指令並處理後,回

傳資料訊息至匯流排主節點之狀態。由圖 8 可驗證 ATE 之某項功能,因此可依此架

構擴充更多系統 SRU/LRU 之相關功能,本文不再贅述。

(a) 群組 1 (b) 群組 2

圖 8. 可行方案之 ATE 功能驗證示意圖

理論上 CAN 匯流排主節點與各節點間之直接(主節點與群組主節點)與間接(主

節點與群組之其他節點)雙向通訊響應時間(Response Time)可分為資訊產生時間及訊

息傳遞時間,就資訊產生時間而言,直接與間接雙向通訊響應時間之理論值分別為

2 8 64+ × B N

64+8 ×3 B N

,其中 N 為資料區域位元組之個數,B 為鮑率,例資料區

域為 8 位元組且鮑率為 250Kbps,則直接與間接雙向通訊響應時間之理論值應分別為

1024µs 及 1536µs;訊息傳遞時間理論為 0.0033µs/m,量測通訊響應時間之訊息傳遞

長度約為 10m,因此該項可忽略不計。圖 9 為直接與間接雙向通訊響應時間之量測值

與理論值比較,量測值為 10000 次雙向通訊響應時間總和之平均值,量測值與理論值

之間之誤差應為各節點接收資料訊息後至發送資料訊息間系統處理之時間。

由此可知,資料訊息中資料區域位元組之個數越少,則無論直接或間接雙向通

訊之效率均可提升,因此可改善資料通訊協定所佔之位元數及其通訊次數,以提升

CAN 系統之直接或間接雙向通訊效率,例於某一 CAN 系統中共具 60 個節點,若所

有節點之仲裁碼均對應各自之遮罩與過濾器,且仲裁碼均編碼,一筆資料訊息僅需 3

位元組及可,且可同時更改該節點之仲裁碼、遮罩及過濾器,由圖 9 之量測值可知直

接與間雙向接通訊響應時間分別為 840.0µs 及 1284µs,與原通訊響應時間 3528µs 及

5418µs 比較,提升效率約 76%以上。

本文已提出 CAN 系統應用於航空電子裝備網路系統之可行性分析及研究,並首

度提出適合建構 SRU/LRU 環境之資料通訊協定及 CAN 匯流排群組主節點之間接雙

向通訊的可行方案,除實際發展通用型單元外,並驗證其功能和量測其通訊效率等,

且提出仲裁碼、遮罩及過濾器應編碼以改善雙向接通訊效率。文中所提之資料通訊協

(10)

定,無論標準格式與擴展格式皆符合 SAE J1939 之編碼規範。在未來研究中,為提升

機載 CAN 網路系統之可靠性(Reliability)及穩定性(Stability),將以資料通訊協定及

CAN 匯流排群組主節點之間接雙向通訊的可行方案,輔以雙 CAN 匯流排之通用型硬

體架構為基礎[35,36],並將 CAN 匯流排實際應用於機載訊號擷取與傳遞(如圖 10)。

(a)直接 (b)間接

圖 9. CAN 直接與間雙向接通訊響應時間

4G 三軸加速規 直流馬達 10G 三軸加速規 三軸陀螺儀

圖 10. UAV 硬體迴路模擬-姿態控制

6、參考文獻

[1] N. Navet,, “Controller area network: CANs use within automobiles,” IEEE Potentials, vol.17, pp. 12-14, 1999.

[2] M. Farsi, K Ratcliff, and M. Barbosa, “An overview of Controller Area Network,” Computing & Control Engineering Journal, vol.10, pp. 113-120, 1999.

[3] S. Dellacherie, L. Burgaud and P. di Crescenzo, “Improve - HDL - a DO-254 formal property checker used for design and verification of avionics protocol controllers,” The 22nd Digital Avionics Systems Conference, vol 1, Oct. 2003.

[4] A. Gabillon and L. Gallon, “Availability constraints for avionic data buses,” The First International Conference on Availability, Reliability and Security, Apr. 2006.

[5] E. Pastor, J. Lopez and P. Royo, “An Embedded Architecture for Mission Control of Unmanned Aerial Vehicles,” EUROMICRO Conference on Digital System Design: Architectures, Methods and Tools, Aug. 2006, pp.554-560.

[6] J. Schill, “An overview of the CAN protocol,” Embedded System Programming, vol. 10, pp. 46-62, 1997.

[7] W. Lawrenz, CAN System Engineering: From Theory to Practical Applications, New York: Spring-Verlag, 1997.

[8] X. Wang, C. Chen, and H. Ding, “The Application of Controller Area Network on Vehicle,” in Proceedings of the IEEE International Vehicle Electronics Conference, 1999(IVEC’99), vol.1, pp. 455-458, 1999.

[9] K. Etschberger, Controller Area Network, Germany: IXXAT Press, 2001.

[10] 饒運濤、鄒繼軍、鄭勇芸,

現區域總線

CAN

原理應用技術

,北京航空大學出版社,中國,

(11)

9

[11] K.M. Zuberi and K.G. Shin, “Non-Preemptive Scheduling of Messages on Controller Area Network for Real-Time Control Applications,” in Proceedings of Real-Time Technology and Applications symposium, pp. 240-249, 1995.

[12] K.M. Zuberi and K.G. Shin, “Scheduling Messages on Controller Area Network for Real-Time CIM Applications,” IEEE Transactions on Robotics and Automation, vol. 13, pp. 310-314, Apr. 1997.

[13] K.M. Zuberi and K.G. Shin, “Design and implementation of efficient message scheduling for control area network,” IEEE Transactions on Computers, vol. 49, pp. 182-188, 2000.

[14] S. Cavalieri, “Meeting real-time constraints in CAN,” IEEE Transactions on Industrial Informatics, vol. 1, pp. 310-314, 1997.

[15] K.W. Tindell and A. Burnsm “Guaranteeing message latencies on controller area network (CAN),” in Proceedings of the 1st International CAN Conference (ICC’94), 1994.

[16] K.W. Tindell, H. Hamsson, and A.J. Wellings, “Analysing real-time communications: controller area network (CAN),” in Proceedings of the 15th Real-Time Systems Symposium (RTSS’94), pp. 259-263, 1994.

[17] K.W. Tindell, H. Hamsson, and A.J. Wellings, “Calculating controller area network (CAN) messages response times,” Control Engineering Practice, vol. 3, pp. 1163-1169, 1995.

[18] L. Chaari, N. Masmoudi, and L. Kamoun, “Electronic control in electric vehicle based on CAN network,” in Proceedings of IEEE Conference on Systems, Man and Cybernetics, vol. 7, pp. 4-7, 2002.

[19] J. Nan, L. Zai, Z. Wang, and J. Wang, “Bus Communication and Control Protocol Using the Electric Passenger Car Control System,” In Proceedings of The Sixth World Congress on Intelligent Control and Automation, vol. 2, pp. 8288-8291, 2006.

[20] SAE Standards, SAE J1939: “Vehicle Application Layer SAE J1939/11,” 1996. [21] SAE Standards, SAE J1939: “Vehicle Application Layer SAE J1939/73,” 1996. [22] SAE Standards, SAE J1939: “Vehicle Application Layer SAE J1939/81,” 1996.

[23] K.C. Lee and H.H. Lee, “Network-based fire-detection system via controller area network for smart home automation,” IEEE Transactions on Consumer Electronics, vol. 50, pp. 1093 – 1100, 2004.

[24] C.E. Lin, C.C. Li, A.S. Hou, and C. C. Wu, “A Real Time Remote Control Architecture using Mobile Communication,” IEEE Transactions on Instrumentation and Measurement, vol. 52, pp. 997-1003, 2003.

[25] D. Dowling and T.L. Rupinski, “Avionics Maintenance 2010,” IEEE Transactions on Selected Areas in Communications, vol. SAC-4, pp. 1090-1096, 1986.

[26] G.T. Beck and C. Huff, “C-17 automatic test system operations versatile automated test equipment,” in Proceedings of AUTOTESTCON '96, pp. 358-360, 1996.

[27] M.D. Sudolsky, “C-17 O-level fault detection and isolation bit improvement concepts,” in Proceedings of AUTOTESTCON '96, pp. 361-368, 1996.

[28] M.D. Sudolsky, “The fault recording and reporting method,” in Proceedings of AUTOTESTCON '98, pp. 429-437, 1998.

[29] L.V. Kirkland and R.G. Wright, “Nanotechnology impact on aircraft design and maintenance,” in Proceedings of AUTOTESTCON '02, pp.769-776, 2002.

[30] ISO Standards, ISO 11519-2: “Road Vehicles-Low Speed Series Data Communication, Part 2: Low Speed Controller Area Network,” 1994.

[31] ISO Standards, ISO 11898: “Road Vehicles-Interchange of Digital Information: Controller Area Network for High Speed Communication,” 1994.

[32] Silicon Laboratories Corp., C8051F060 User’s Manual, 2004.

[33] Robert Bosch GmbH Automotive Equipment Division Corp., C_CAN User’s Manual, Revision 1.2., 2000.

[34] 楊介仙、華鈞毅,“車身網路之資料通訊協定應用於車輛電子資訊系統”,

第十一屆車輛

工程學術研討會論文集

,民國九十五年十一月。

[35] J.S. Young and C.Y. Hua, “Applications of data communication protocol to vehicle information systems based on CAN,” in Proceedings of International MultiConference of Engineers and Computer Scientists 2007 (IMECS 2007), vol. 2, pp 1415-1420, 2007.

(12)

[36] C.E. Lin, Yen, H.M “Reliability and Stability Survey on CAN-Based Avionics Network for Small Aircraft,” in Proceedings of The 24th Digital Avionics Systems Conference. DASC 2005. vol. 2, 2005.

[37] C.E. Lin and H.M Yen “A Prototype Dual CAN-Bus Avionics System for Small Aircraft Transportation System,” in Proceedings of The 25th Digital Avionics Systems Conference pp.1-10, Oct. 2006

7、計畫成果自評

本研究計畫之計畫為發展 CAN 硬體單元,並評估硬體之功能與其成本,先以通

訊為目標測試 CAN 之功能與便利性,再以其為基礎發展可行之 CAN 硬體單元開發

板 , 並 考 量 其 使 用 擴 充 性 而 建 構 其 硬 體 , 現 已 如 質 如 期 完 成 。 相 關 結 果 已 於

2008.7.7~10 日本沖繩舉辦之 2008 電機工程國際研討會(The International Conference

on Electrical Engineering 2008 (ICEE 2008))發表論文共三篇,題目為:

1. Data Communication Protocol of SRU/LRU for Vehicle Network Systems Based on

CAN;

2. Applications of On-Board Diagnosis via CAN and GPRS Technologies;

3. The Analysis of the Dynamics for the Unturned Wheels of Vehicles.

另本計畫之相關研究成果亦已投稿至 2008 中華民國航太學會學術研討會(2008

AASRC Conference) 及

Journal of Aerospace Computing, Information, and

Communication (AIAA)等研討會或期刊。

本團隊業已發展適合建構 SRU/LRU 環境之資料通訊協定及 CAN 匯流排群組主

節點之間接雙向通訊外,亦發展適合於機載電子 CAN 系統之通用型單元,已於車輛

系統驗證其部份功能,因本團隊以其他經費購得直流馬達(DC Motor)、4G 加速規 2

組、10G 加速規 1 組及三軸陀螺儀等,並於本研究計畫中購得一無人飛行載具(UAV)

模擬平台(如圖 10 所示),現已裝置妥當,雖因計畫結束,但仍持續做相關研究。

(13)

出席國際學術會議心得報告

計畫編號

NSC 96-2221-E-018 -006

計畫名稱 CAN 資料匯流排應用於無人飛行載具(UAV)機上網路之可行性研究

出國人員姓名

服務機關及職稱

楊介仙

國立彰化師範大學 車輛科技研究所 副教授

會議時間地點

2008.7.7~10 日本沖繩

會議名稱

(中文) 2008電機工程國際研討會

(英文) The International Conference on Electrical Engineering 2008 (ICEE

2008)

發表論文題目

1. Data Communication Protocol of SRU/LRU for Vehicle Network Systems

Based on CAN (O-208)

2. Applications of On-Board Diagnosis via CAN and GPRS Technologies

(O-209)

3. The Analysis of the Dynamics for the Unturned Wheels of Vehicles (O-212)

一、參加會議經過

7 月 6 日上午抵達日本沖繩之那霸國際機場,於旅館安頓及用膳後,逕赴該研討會

之地點-琉球會議中心(Okinawa Convention Center),因會議報到註冊時間有所變動,已更

改為 7 月 7 日早上 8:30 時開始註冊,由於當下與承辦人員溝通後,因介仙已完成線上註

冊,承辦人員同意並建議介仙先行完成報到及提領相關會議資料等。

2008 電機工程國際研討會(The International Conference on Electrical Engineering 2008,

ICEE 2008)為日本電機工程師學會(Institute of Electrical Engineers of Japan, IEEJ)主辦,中

國電機工程學會(Chinese Society of Electrical Engineering, CSEE)、香港工程師學會(Hong

Kong Institute of Engineers, HKIE)及韓國電機工程師學會(Korean Institute of Electrical

Engineers)協辦,會議共分四類,包括主旨會議(Keynote and Plenary Sessions)、專題討論

會議(Panel Discussion)、論文報告(Oral Sessions)及論文壁報(Poster Sessions)等。論文之主

題則分為電子電機基礎科目、材料及教育(Fundamentals, Materials & Education)、電子、

資訊及控制系統(Electronics, Information & Control Systems)、電力系統及能量(Power

Systems & Energy)、電機機械、電力電子及工業應用(Electrical Machines, Power Electronics

& Industry Applications)、感測器及微機械(Sensor & Micro-machines)等,幾將電機工程領

域完全包含,為東亞各國電機工程發展之櫥窗,參與會議可一窺東亞各國電機工程發展

之趨勢。本次大會地主國日本參加的學者最多,其次是韓國,日本、韓國、香港大都由

當地電機工程協會組團參加,聲勢浩大,能見度高,而與會者包括學校教授及學生、產

業界之研發人員及工程師、國防工業之研究人員等,參與人數達千人以上。

介仙此次共發表三篇論文,論文題目如上表格所示,時間均為 7 月 9 日下午,第一、

二篇被安排於 IC3 Session (Information, Control & Sensing System Session,編號為 O-208 及

O-209),第三篇則於 ET1 Session (Electrical Traction Systems and Control,編號為 O-212),

(14)

三篇均為報告論文。由於報告時間接近,而有些議程亦些微延遲,因此造成論文報告時

極大挑戰,介仙得兩地跑,以免錯過報告時間,所幸兩地相距不甚遠,尚可應付。而聽

講之專家學者,亦不因研討會最後之一報告論文而離開,反而踴躍提問,足見參與者認

真學習的態度。

二、與會心得

日本、韓國、香港及大陸等論文報告佔大部分,日本、韓國之論文報告大多由學生

報告,雖說日韓學生(即便是教授)之英語說得能力不佳,聽得能力更是乏善可陳,但日

韓學生敢於嘗試超過自己能力的挑戰,就具保守性格的東方民族而言,實是難能可貴,

足堪國內學生學習其學習態度,學習總是潛移默化,一蹴可及是不易的,而嘗試超過自

己能力的學習,卻是進步的原動力,反觀國內學生說起英語畏首畏尾,能力絕非低於日

韓學生,但不敢勇於嘗試,我消彼長,依此循環,國家競爭力將每下愈況,另一原因則

是學生(特別是碩士生)參與國際研討會之經費籌措不易,導致學生發表論文之意願降

低,就韓國而言,由於韓國政府大力發展科技及人才培育,碩、博士學生發表國際會議

論文即給予補助,因此直接鼓勵碩、博士學生積極參與國際學術會議,而東亞之國際學

術會議參與之經費不多,且各國之英語能力平平,可建立國內學生之自信,再逐步走向

國際,因此參與東亞之國際學術會議實,應是國內碩、博士學生英語聽說能力之學習及

初試啼聲之場所。吾人實不願見國家競爭力逐年下降,因此常鼓勵學生出國參與國際學

術會議並報告論文,以培育具國際視野之人才。

三、建議

近幾年來,國人參與國際學術研討會的人數正相對地逐年遞減中,早年幾乎都是國

人的人數比率居多,曾幾何時,日本、韓國,乃至大陸的參與人數比率已迎頭趕上,並

早已超越國人參與人數比率,常此以往,國人將會被國際學術研討會邊緣化,因此應鼓

勵並支持國內研究人員積極參與國際學術研討會,以培育具國際視野之人才,建議應給

予參與的學生(包括大學生及碩士生等)適當之經費補助,以資鼓勵。

四、攜回資料名稱及內容

研討會論文光碟一片、會議議程一本。

(15)

1

Data Communication Protocol of SRU/LRU for

Vehicle Network Systems Based on CAN

YOUNG, Jieh-Shian and HUANG, Yu-Wei

Institute of Vehicle Engineers, National Changhua University of Education, R.O.C. #1 Jin-De Road, Paisha Village, Changhua 500, Taiwan, R.O.C.

Abstract

The data communication protocol and its communication efficiency are mainly studied for vehicle information systems based on controller area network (CAN) in this paper. The motive is to create an environment of the shop-replaceable units or line-replaceable units (SRU/LRU) in vehicle network. The round-way communication between master node and other nodes in CAN is crucial to the mechanism of SRU/LRU. This paper proposes a feasible configuration with the group master architecture. A kind of possible data communication protocols is also proposed to raise some manifold functions in CAN system. The results show that little bandwidth is consumed by this proposed approach. Besides, the bandwidth can be saved if the ID’s of the CAN system are encoded in less data length. Although many other approaches can be found in literature, the proposed approach for SRU/LRU in CAN is original as it is based on the mechanism of indirect round-way communications.

Keywords: Controller area network, data communication protocol, generic unit, line-replaceable unit, shop-replaceable unit.

1 INTRODUCTION

Almost all functions were confined to stand-alone units in traditional electronic network systems in vehicles. They did not share the data between other units since they are connected peer-to-peer. There is a current trend of an increased number of interconnected devices and a considerable number of data to be shared. Controller Area Network (CAN) developed in mid 1980s by Robert Bosch GmhH is a broadcast communication with priority-based access to the medium. CAN provides the cost-effective communication network of in-vehicle electronics as an alternative to the expensive and cumbersome wiring looms [1-6]. Its communication protocol has become a data transmission standard in automotive applications. This protocol implements a priority-based bus with a carrier sense multiple access with collision avoidance (CSMA/CA) to control access to the bus. A minimal communication profile of CAN consists of three layers: physical layer, data link layer (DLL), and application layer. The ISO standards define the physical layer and data link layer for low-speed applications (125Kbps) and high-speed applications (1Mbps) in ISO 11519-2 [7] and ISO 11898 [8], respectively. Any node in CAN dose not play a preponderant role in the protocol. It can connect several devices and share data from other nodes by a single pair of wires with the data exchanges between them at the same time. CAN conforms to the open systems intercommunication model, which is defined in terms of physical layers. A message transmitted in CAN has an identifier, or arbitration, which is unique to the network system and serves two purposes: a priority

assignment for the transmission and message filter upon reception. In other words, it controls both bus arbitration and message addressing. It can be utilized for some purposes. Zuberi and Shin have presented the scheduling messages on CAN for some real-time applications corresponding to assigning different priorities [9-11]. Cavalieri has proposed a procedure for dynamic assignment of priorities to variables to be transmitted [12]. Tindell et al. have proposed an analysis of response time, or latencies, that takes into account the possibility that transmission errors can occur [13-15]. The relevant real-time requirements can be achieved by this approach. Nan et al. have applied to an electronic passenger car control system with CAN [16]. The identifier in that paper was based on SAE J1939 code rules [17-19].

Nowadays, CAN is widely utilized for diverse areas of different industrial applications [20-22]. The total expenses of an application during its life cycle have to be considered such as those of manufacture, maintenance, logistics, etc. The implementation of shop-replaceable units (SRU) and line-replaceable units (LRU) for the CAN communication network is studied in this paper in order to reduce the total expenses and to increase the profits of products during the life cycle of systems. For avionics, a LRU can be removed and replaced in an aircraft on the flight line. Besides, a SRU, such as a print circuit card, can be removed and replaced by a generic unit in the avionics intermediate shop. Dowling and Ruoinski regarded the SRU/LRU as an avionics maintenance concept for the year 2010 [23]. They highlighted that fault data would be The International Conference on Electrical Engineering 2008

(16)

analyzed as soon as possible and thereby the operational readiness would be improved. The automated test equipment (ATE) and the built-in test (BIT) of C-17 were studied for the LRU requirements partly in [24] and [25], respectively. The fault recording and reporting method by LRU was also studied in [26]. This approach minimizes on-aircraft data interpretations, rendering unnecessary on-board maintenance processors, and technicians for LRU troubleshooting. Nanotechnology also makes a great impact on design and maintenance of aircraft [27]. The nanoscaled devices can replace an entire PC board or the set of PC board that comprise a LRU. Similarly, for the automotive electronics, SRU/LRU of the CAN also seems to be necessary and significant in order to reduce the total expenses of the life-cycle for a vehicle.

This paper proposes a feasible approach to SRU/LRU environment creation and realization for CAN systems. It is based on the results presented in [28]. The data communication protocol of CAN has been studied to achieve the requirements of SRU/LRU. The mechanism of the round-way communication for the master node of CAN has also been discussed. By this mechanism, the master node of CAN can transmit and receive the messages to and from all other nodes via the CAN bus even though all the filters and masks of CAN nodes are not compatible with the node ID of the master node. In this paper, the implementation of the proposed mechanism for SRU/LRU will be presented. The hardware of each CAN node is recommended to be the same, so-called the generic unit, in order to reduce the total cost during the system life cycle such as research, development, manufacture, and maintenance. All the parameters, including node ID’s, filters, and masks, of CAN units can be set and reset by remote unit on-line or by setting the dual in-line packages (DIP). Some kinds of response time for the assessments of efficiencies are measured under the SRU/LRU environment of the CAN system. The results show that the proposed approach of the round-way communication mechanism rarely affects the bandwidth of data bus (less than 0.18% bandwidth loss). The efficiency of transmission in CAN bus will be increased in case of the appropriate planning of time triggered or event triggered mechanism in master node.

In Section 2, the problem of the SRU/LRU for CAN communication is defined and related work is presented. A feasible approach with the data communication protocol is proposed to realize the concept of SRU/LRU in Section 3. The group master architecture with indirect round-way communication is addressed in Section 4. Section 5 is devoted to an implementation of the proposed approach and the round-way communication mechanism. The results measured are also assessed in this section.

2 PROBLEM DEFINITION

There are four types of frames that can be transferred in CAN. Two are used during normal operation: the Data Frame, which is used to transmit local data, and the Remote Frame, which is used to request remote data. Besides, the Error Frame signals the detection of error states in CAN, and

the Overload Frame is used by nodes requiring extra delays before the transmission of Data Frames. The specific fields of a Data frame includes Start of Frame (SOF), Arbitration Field (or Identifier), Control Field, Data Field, Cyclical Redundancy Check (CRC) field, Acknowledgement (ACK) Field, and End of Frame (EOF). CAN has two formats that are standard format (standard frame) and extended format (extended frame). The Arbitration Field contains the 11-bit and 29-bit message identifiers for standard format and extended format, respectively. In addition, the data field in the Data Frames contains 0 to 8 bytes of data.

Although CAN is widely used for diverse areas of different industrial applications, CAN is still a fixed architecture. One of the communication restrictions for CAN is that the master node of a CAN system can not transmit some instructions to all other nodes directly since the arbitration of the master node is not always compatible with the masks and filters of all other nodes. The restriction obstructs the constructions of the SRU/LRU environment. One of the feasible ways is that the masks of all other nodes canbe set to 0. However, it is impossible for the sake of the transmission efficiency and addressing. The one-way transmission for the master node cannot achieve the requirements of SRU/LRU. To sum up, the problem of CAN systems can be defined as follows.

Problem Definition [28]: Is there any mechanism by

which the master node of CAN not only receives messages from but transmits messages to all other nodes in this CAN network?

3 DATA COMMUNICATION PROTOCOL FOR SRU/LRU

The data communication protocol is defined as the sentence of the transmitted data in data field of the Data Frame in a CAN system. There are no more than 8 bytes in the data field in a transmission. The environment of SRU/LRU can be created for CAN systems if the mechanism for the round-way communication can be constructed. Besides, the data communication protocol should be compatible with two different data formats of CAN since the arbitrations of CAN nodes have the standard format and the extended format with211 and 229 possible nodes, respectively. In

this paper, all the 8-byte data will be employed in case that all possible CAN nodes are available. The Data Field with 64 bits can be separated into 4 segments. These 4 segments are defined as Format Bit (FB), Destination Identifier (DI), Action Code (AC), and Transmission Data (TD) as shown in Figure 1 with standard format and extended format.

Format Bit (FB): CAN has two formats that are standard

format and extended format. FB indicates whether the destination node of the CAN network is the standard format or the extended format.

Destination Identifier (DI): DI indicates the arbitration of

the destination node which the master node of the CAN system transmits messages to or requests to act, e.g., to change the values of registers in chip such as arbitration, filter, mask, etc.

Action Code (AC): The definitions of codes in AC depend July 6-10, 2008, OKINAWA, JAPAN

(17)

3

on what the application is. For example, the bit size of AC occupies no less than 8 bits in Data Field of the Data Frame if there are less than 256 actions defined in an application. Table 1 shows a possible data bit assignments of AC. It can make the arbitration, the mask, and the filter of a node reassigned remotely. Beside, more than other 250 actions can be defined.

(a) Standard format.

(b) Extended format.

Figure 1. Segments of Data Field for data communication protocol.

Table 1. Segments of Data Field for data communication protocol.

(a) Standard Forma

(b) Extended format.

“*” denotes the unconcerned values.

Transmission Data (TD): TD is the data transmitted. The

bit size of TD can be ranged from 1 byte to 5 bytes in standard format. However, in extended format, it can be ranged from 1 byte to 3 bytes except reassignments of arbitrations, masks, and filters. Both of them depend on the applications. In standard format, 1 to 5 bytes of data have sufficient resolutions, approximate to 9.0949u1011%,

for most of signals in automotive electronics and other fields. In extended format, the resolution approximate to

% 10 960 .

5 u 6 is also enough although the TD occupies

only 3 bytes. There is no restriction for more information in a transmission. Some CAN nodes may transmit more than one datum in a message if the message is defined.

4 THE GROUP MASTER ARCHITECTURE

The proposed protocol can be modulated for applications appropriately such as the bit arrangements, the bit size assignments, the Data Field segmentations, etc. Figure 2 illustrates the conventional CAN communication architecture. The solid line represents the physical wiring of connections, while the dash line indicates the message receivability of a node from other nodes. When assigned data with the data communication protocol are transmitted to

a specified node by the master node, any node whose mask and filter are compatible with the arbitration of the transmitting node can receive these data. However, the specific node in DI is not necessary to receive these data. That is, not all nodes in the CAN can receive the message from the master node. The node which cannot receive any message from the master node will not be responded to any request from the master node. Therefore, it is still a one-way communication for the master node.

Figure 2. Communication architecture of conventional CAN systems.

There are 29 bits of arbitration can be arranged in extended format of CAN. The groups in a CAN system can be arranged by the arbitrations. In case that all the nodes can receive the messages from the master node directly, the maximal number of groups is 10 as the valid bits of arbitration are divided by 3 bits (8 node/group). One of them can be the master node in CAN, but it is not compatible with the SAE J1939 coding rules [17-19]. Therefore, it is recommended to group all the nodes of the CAN system into several groups which can be compliant with the rule of SAE J1939 coding rules. For instance, if there are four nodes in the CAN and they are defined as Master Node, Group1 Master Node, Group1 Node A, and Group1 Node B, the values of arbitrations, masks and filters of them are all assigned as shown in Table 2. They are members of Group1 except Master node. The mask and filter of Master Node are compatible with arbitrations of all nodes. Although it can be easy to receive messages from all other nodes in the CAN system, it cannot transmit messages to all other nodes. In Group1, the values of mask and filter of Group1 Master Node are compatible with all arbitrations of Master Node, Node A, and Node B. The masks and filters of Node A and Node B are also compatible with all arbitrations of nodes in Group1. Group1 Master Node can receive message from Master Node, and the Node A and B can also receive messages from Group1 Master Node. That means the Group Master Node can be a gateway between the Master Node and the member nodes in this Group.

The mechanism for the round-way communication of a CAN system includes the data communication protocol between one and another, the assignments of the Group Master Nodes, and the assignment of the Master Node. The hierarchy of the CAN system is proposed as shown in Figure 3. The connections of all nodes in the CAN system are the same as the conventional one. The related nodes may be bunched up into several groups such as an engine controller group, a transmission controller group, a cab display group, etc. The International Conference on Electrical Engineering 2008

(18)

One node, or the Group Master Node, in a group which can transmit data to all other nodes in this group is selected. Its mask and filter are easily set to be compatible with the arbitration of the Master Node. The CAN system won’t be changed at all but the values of the masks, filters. Furthermore, the software of all Group Master Nodes has to be modified appropriately. The Group Master Node can not only receive the messages from the master node but transmit messages to all the member nodes in the group. The mechanism for the round-way communication has been developed via the group master architecture. It is so-called the indirect round-way communication in a CAN system. Table 2. Example for the receivability of Master Node and

Nodes in a group.

Figure 3. The group master architecture of CAN systems. In general, DI and TD can be numbered, or encode, for the arbitrations, filters, masks, and other data in CAN systems so as to reduce the bit size of transmitted data. The communication efficiency will therefore be improved. Although, it is still a kind of the data communication protocols of the round-way communication for CAN systems in those cases. In this paper, we would like to implement the proposed mechanism in a rigorous situation in which all possible nodes in CAN system may be approximate to 211 or 229 even though it is impossible in

applications. The Master Node is indeed a network manager which can transmit messages including some instructions or data to or receive such messages from all other nodes in the CAN system. However, the communication efficiency of CAN will be traded off.

5 THE IMPLEMENTATION OF THE PROPOSED MECHANISM AND ITS EFFICIENCY

In implementation, a generic unit of CAN units is realized. In some applications, the generic unit definitely reduces the total expenses of research, manufacture, maintenance, and logistic during the system life cycle. The hardware is implemented as shown in Figure 4. An ISP interfaces is reserved for the software updated on-line. The values of the arbitration, mask, and filter of the generic unit can be initialized with specific values. The arbitration, mask, and

filter of the generic unit can be reassigned from the master unit through the data communication protocol remotely. The new values of the arbitration, the mask, and the filter can be stored in the external memory (XROM) in order to initialize as the unit restarts. The environment of SRU/LRU can then be created.

Figure 4. Hardware of generic units for CAN systems. In this paper, the major parts of the automotive electronic system simulation board contain a turn signal and dimmer switch lever, a windshield wiper switch assembly, headlight modules, rear lights modules, a wiper motor, a horn switch, etc., as shown in Figure 5. The key feature of the simulation board is the toggle switch, or the network switch, which can alternate the traditional network with the CAN system. The functions of the CAN system can be verified through this switch. Besides, the terminal panel is utilized to connect to other devices.

Figure 5. The automotive electronic system simulation board.

The devices of the automotive electronic system simulation board can be grouped into three parts. They are headlights, rear lights, and wiper system for the Group 1, Group 2, and Group 3 in this CAN system, respectively. Each device has a unique identifier which can be controlled by a generic unit. The communication among each generic unit can be fulfilled through CAN bus as shown in Figure 6. Actually, in real application, there are not necessary to have so many nodes in CAN systems. However, we would like to realization the concept of SRU/LRU and to assess the effects in more complicated system. In this system, the TTCAN can be utilized to synchronize both the front and rear turn lights. One of the applications of SRU/LRU is the ATE function. The ATE function is used to make all the nodes in CAN systems response the statuses of them. Master Node cannot indeed transmit this message to all nodes directly. Figure 7 shows the statuses of ATE function from CAN bus monitor. The light color (yellow) circle of the member node in a group symbolizes that the request from Master Node for the member node has been passed by the Group Master Node.

(19)

5

The dark color (green) one symbolizes that Member Node responds the signal of completions of ATE functions. In Figure 7, Group Master Nodes can receive the requests directly. Furthermore, all the Member Nodes in Group 1 and 2 have fulfilled the ATE functions by the requests from Master Node indirectly.

Figure 6. The generic unit set of CAN nodes.

(a) Group 1 (b) Group 2.

Figure 7. The statuses of the ATE function from CAN bus monitor.

The response time of the round-way communication is more important to assess the efficiencies of communication. The theoretical values of the response time are 648 u2

B N

and 648 u3

B

N for the round way communication

between Master and Group Master (M-GM, direct) and between Master and Member Nodes in a group (M-MN, indirect), respectively, where N is the data length of a transmission and B is the baud rate if the loss transmitted in bus can be neglected. There is almost no difference with different data trip length of 8 m in bus since it takes about0.027Ps, theoretically. The differences between the measured response time and the theoretical one could be the delay caused by hardware and software. Figure 8 illustrates the theoretical values and the measured values of average response time with 8 m of the data trip length based on 10000 communications. It shows that the response time mainly depends on the data length. In addition, the response time of M-MN communication is about 1.5 of that of M-GM communication.

6 CONCLUSIONS

In this paper, the data communication protocol for SRU/LRU of CAN systems has been studied originally. A

feasible approach has also been proposed. The data field of the date frame can be separated into four segments which can raise manifold functions for the CAN systems. It transmits not only data but also instructions during communication. The protocol depends on what the applications are. In addition, the mechanism of the round-way communication proposed for SRU/LRU has also been realized and implemented in this paper. The configuration of the group masters makes the indirect round-way communication between Master Node and all other nodes possible in case that the data communication protocol is planned appropriately. The data communication protocol is also compatible with SAE J1939 coding rules. It can be utilized in both standard format and extended format. A simple ATE function simulation for the automotive electronic system shows that the data communication protocol approach can fulfill the requirements of SRU/LRU in CAN systems. The total expenses during the system life cycle will be reduced by the data communication protocol with the generic units definitely.

(a) Direct (M-GM) (b) Indirect (M-MN) Figure 8. The response time of round-way communication

with 8 m of data trip length and 250bps.

The data length in data communication protocol is recommended to be less as possible so as to increase the communication efficiency. For instance, there are 60 nodes in a CAN system. There may be 6 bits both in DI and TD segments if the arbitrations, filters, and masks of all the nodes are encoded. It may save 6 bytes in Data Field, or save about 420Ps and 630Ps in a transmission for M-GM and M-MN, respectively. It saves about 35% response time for both cases. The measured results show that the bandwidth of the communication in CAN systems can be consumed about 0.12% and 0.18% for direct (M-GM) and indirect (M-MN) round-way communications with 8 data bytes in a transmission, respectively, if the Master Node is in time trigger of 1 s.

A future direction is to investigate the reliability and the availability of CAN network with the data communication protocol. The dual bus architecture is a feasible way to achieve these requirements. It may enhance the fault tolerances, safety, reliability, and stability of systems with CAN.

ACKNOWLEDGMENTS

This research work is supported by National Science Council under Grand NSC-96-2221-E-018-006 and NSC-96-2516-S-018-001.!

數據

表 1.  主節點與其他節點之可接收範例
圖 5.  群組主節點 CAN 匯流排通訊架構示意圖  5、結果與討論  本研究除發展適合建構 SRU/LRU 環境之資料通訊協定及 CAN 匯流排主節點與 其他所有節點之間接雙向通訊外,亦發展適合於機載電子 CAN 系統之通用型單元(如 圖 6 所示),輸出入介面包括 CAN 介面、數位及類此輸出入介面、串列埠介面等,幾 乎已涵蓋大多數可能之裝備可能之輸出入介面,為實驗與量測之便,吾人將該使用之 通用型單元組合如圖 7 所示之通用型單元組,每一通用型單元之軟體均相同,且除 CAN 匯流排主節點外,其他節點
Table  1  shows  a  possible  data  bit  assignments  of  AC.    It  can make the arbitration, the mask, and the filter of a node  reassigned remotely
Table 2. Example for the receivability of Master Node and  Nodes in a group.
+7

參考文獻

相關文件

© NET Section, CDI, EDB, HKSAR Unit 2 - Sports Articles Activity 2 Worksheet 1: Identifying the Structure and Language Features of a Sports Article.. Structure of a Sports

Do you agree with the proposed changes for the Compulsory Part of Information and Communication Technology curriculum.. Agree Disagree

Computers, the internet and Information Communication Technology (ICT) in general is rehaping education in the 21 st Century in the same way as the printing press transformed the

Since the FP-tree reduces the number of database scans and uses less memory to represent the necessary information, many frequent pattern mining algorithms are based on its

In this chapter, the results for each research question based on the data analysis were presented and discussed, including (a) the selection criteria on evaluating

Based on the tourism and recreational resources and lodging industry in Taiwan, this paper conducts the correlation analysis on spatial distribution of Taiwan

For better efficiency of parallel and distributed computing, Apache Hadoop distributes the imported data randomly on data nodes.. This mechanism provides some advantages

Some efficient communication scheduling methods for the Block-Cyclic redistribution had been proposed which can help reduce the data transmission cost.. The previous work [9,