J2ME Based Bluetooth Portable Monitoring ...

3 downloads 0 Views 600KB Size Report
battery as the auxiliary power unit. Until now a fleet of fuel cell buses has been grounded in sequence, one in the fleet is shown in Fig. 1. [4]. The power train ...
08SFL-0128

J2ME Based Bluetooth Portable Monitoring & Diagnosis System for Fuel Cell City Bus Jianfeng Hua, Ping Guo, Jianqiu Li, Minggao Ouyang State Key Lab of Automotive Safety and Energy, Tsinghua University

Copyright © 2008 SAE International

ABSTRACT Under the background of the increasingly serious global energy crisis and environmental problems, governments and enterprises around the world have paid more attention to the development of a new generation of green energy. The fuel cell city bus has become a favorite choice for new energy vehicles due to its free emission, high energy conversion efficiency as well as long driving endurance. A fuel cell city bus consists of varied components, such as fuel cell stack, power battery, DC/DC converter, electronic motor and etc. A distributed control system is developed for the fuel cell bus which has been facing many challenges from complex electromagnetic environment, demands of online monitoring and diagnosis, wide working temperature range, energy dynamic optimization (EDO) ability and etc. In order to meet the requirements of the challenges, a series of novel electronic technologies has been successfully implemented into the control system of fuel cell city bus. This paper presents a portable monitoring & diagnosis system via Bluetooth communication for the fuel cell city bus, the monitoring terminal could be a cell phone, PDA or any other smart mobile device.

INTRODUCTION The pursuit of clean energy resource in the automobile industry has become graver and graver in recent decades with the environment showing signs of irreversible damage from fossil fuels and the fear that this conventional resource is running out in the near future. Fuel cell has been considered for transportation primarily because it’s ability to increase vehicle energy efficiency and significantly reduce or eliminate tailpipe emissions. Compared to fossil energy, as a renewable energy source, hydrogen can be reproduced from different kinds of energy sources, such as solar energy, bio-energy, electric energy and etc. [1]

Proton Exchange Membrane Fuel Cells (PEMFC) feature simple compact stacks which do not have complex requirements with respect to fuel, oxidant and coolant supplies. PEM fuel cells deliver high power density and offer the advantages of low weight and volume, compared to other fuel cells. PEM fuel cells operate at relatively low temperatures, around 80°C. Low temperature operation allows them to start quickly (less warm-up time) and results in less wear on system components and better durability. Therefore, PEM fuel cells are used primarily for automotive applications. [2] In the last decade a variety of demonstration vehicles have been developed by the major car manufactures. DaimlerChrysler has been playing an important role in the research of fuel cell powered vehicles, as their prototype series has already reached the fifth generation. Manufactures such as Ford, GM. Toyota Nissan Honda and many others as well have made considerable progress in their efforts toward mass producing fuel cell cars in the near future. [3] The State Key Lab of Automotive Safety and Energy at Tsinghua University has already started the research on the fuel cell vehicle since 2002, which mainly focuses on commercial vehicles. Under the support of China National 863 Hi-tech Research Program, the first Chinese fuel cell city bus was developed in 2004 by Tsinghua University and its partners. It is a hybrid vehicle combined a PEM fuel cell as main power and a battery as the auxiliary power unit. Until now a fleet of fuel cell buses has been grounded in sequence, one in the fleet is shown in Fig. 1. [4] The power train configuration of the bus is shown in Fig. 2. The bus is driven by an AC motor, which has a rated power output of 100KW, a peak power output of 150KW, a maximal speed of 6000rpm and a maximal torque of 670Nm. A fuel cell with a rated power of 65KW and an 80Ah power battery are equipped as the hybrid power source. The fuel cell and battery are separated by a DC-

DC converter, which can regulate the power output of the fuel cell according to vehicle global energy management strategy.

120

Compressor Air System Fuel Cell MS

Air-Filer Press Relief Valve

Hydrogen System

Purge Valve

DC-DC MS

Pump

Water-Heat Management System

Humidifier

Battery MS

Vehicle Control Unit

CVM System

Cells

Motor MS

H2 Tank Hydrogen Supply MS

Fig.1: A fuel cell city bus developed by Tsinghua Univ.

Alarm System H2 Security System

H2 Sensors

120

Fig.3: Power train control system configuration

Fig.2: Power train configuration of the fuel cell city bus For the complexity of the power train configuration, some working parameters are significant for diagnosis and security purpose, such as fuel cell output voltage and current, minimal cell voltage, hydrogen pressure, motor speed, SoC (State of Charge) of the power battery, working state of each device, error code and etc. Accordingly, in the development and demonstration process of the fuel cell city bus, some particular measurement devices are indispensable due to the speciality of fuel cell engine and electrified power train system. In order to procure the status of the vehicle power train especially the fuel cell engine rapidly and conveniently, a novel wireless portable on-line monitoring system based on J2ME (Java 2nd Micro Edition) and Bluetooth technology is implemented for the fuel cell city bus.

The controller area networks were first developed by Robert Bosch in 1986 for use in automobiles, which is documented in ISO 11898 (for applications up to 1 Mbps) and ISO 11519 (for applications up to 125 Kbps). Equipped with an array of sensors, the network is able to monitor the systems that the automobile depends on to run properly and safely. CAN is kind of a serial bus network of microcontrollers that connects devices, sensors and actuators in a system or sub-system for real-time control applications. There is no addressing scheme used in controller area networks, as in the sense of conventional addressing in networks (such as Ethernet). Rather, messages are broadcast to all the nodes in the network using an identifier unique to the network. Based on the identifier, the individual nodes decide whether or not to process the message and also determine the priority of the message in terms of competition for bus access. This method allows for uninterrupted transmission when a collision is detected, unlike Ethernets that will stop transmission upon collision detection. The arbitration process of CAN networks is shown in Fig.4. [5]

SYSTEM DESCRIPTION The power train control system of the bus is distributed, which consists of fuel cell engine MS (Management System), electric motor MS, DC-DC MS, power-battery MS and Hydrogen Supply MS. Different kinds of microprocessors are embedded into each control note according to the complexity of control tasks, enabling the notes to manage their own components and system independently. These control sub-systems are connected by CAN (Control Area Networks) bus and centralizedly governed by a Vehicle Control Unit (VCU), as shown as Fig. 3.

Fig.4: CAN notes arbitration process [6]

Since all of significant data supervised by each subcontrol note can be gathered via CAN bus, a traditional monitoring and diagnosis solution is based on only the CAN networks, a PC or laptop is chosen as monitoring terminal device. This method has some disadvantages as below: • For the monitoring via CAN bus a PC or laptop is necessary because almost all of the CAN interface applications only runs on the Windows or Linux platform. It’s very inconvenient to set up a PC working environment inside a vehicle during the road test. • An inverter has to be equipped to the vehicle to provide a 220V AC power source for PC or Laptop battery recharging. • The remote monitoring and diagnosis is hard to achieve due to there is not a common network for PC or laptop in most urban and suburb area. • The placement of monitoring devices is restricted into a limited bound as long as the connection must be created through a twisted-pair cable to in-vehicle CAN networks.

The desired prototype of this paper is a portable wireless monitoring terminal which is very convenient for carrying out a remote diagnosis. When it comes to wireless monitoring and remote diagnosis, the combination of two types of wireless communication technology makes it possible to implement a portable monitoring & diagnosis system based on the smart phone or PDA, one is Bluetooth for short-range communication and another is mobile cellular networks for world-wide connection. Bluetooth is a universal short-range low-power radio protocol operating in the unlicensed industrial, automotive, scientific, and medical frequency band. Bluetooth technology was designed primarily to support simple wireless networking of personal consumer devices and peripherals, including cell phones, PDAs, and wireless headsets. Wireless signals transmitted with Bluetooth cover short distances, typically up to 10 meters by Bluetooth class 2 and 100 meters by Bluetooth class 1. It allows both data and voice connections, with a nominal maximum data of 723 Kbps by Bluetooth 1.2 version and 3 Mbps by Bluetooth 2.0 + EDR (Enhanced Data Rate) version, as shown in Table 1. The modulation for Bluetooth technique is Gaussian frequency-shift keying, with transmission at a rate of 1M symbol/s on one of 79 channels with 1-MHz spacing in the 2.402-2.480GHz band. Bluetooth uses a spreadspectrum frequency hopping connection with a rate of 1600 hops/s and its radio transceivers are categorized in three power classes, as shown in Table 2. [8] A cellular network is a radio network made up of a number of radio cells each served by a fixed transmitter. The most common example of a cellular network is a cell phone network. With the evolution of cellular networks from the second generation such as GSM, to GPRS and enhanced data rate for global evolution, then to 3G, more applications can be designed for next-generation

mobile tele-solutions. GPRS represents an enhancement of GSM whose specification defines the operation of mobile telephones in terms of voice mode, data mode, or both. GPRS provides a maximum theoretical speed of up to 171.2 kb/s with all eight time slots available, as shown in Table 3. [8] Version

Data Rate

Version 1.2

723 Kbps

Version 2.0 + EDR

3 Mbps

WiMedia Alliance (proposed)

53-480 Mbps

Table 1. Bluetooth transmission data rate [7] Class

Maximum Permitted Power

Range (approximate)

Class 1

100 mW (20 dBm)

~ 100 meters

Class 2

2.5 mW (4 dBm)

~ 10 meters

Class 3

1 mW (0 dBm)

~1 meter

Table 2. Bluetooth communication coverage [7]

Technology

Maximum Theoretical Data Rate

Freq. Spectrum (MHz)

GSM

9.6 Kbps

900/1800/1900

GPRS

171.2 Kbps

900/1800/1900

3G

2 Mbps

1885~2200

Table 3. Cellular networks transmission data rate [7] The prototype system structure is shown in Fig. 5: A matured Bluetooth 2.0 + EDR module is successfully embedded into the VCU of the bus. Via a Bluetooth connection to the VCU, all significant data of vehicle, such as fuel cell output voltage and current, minimal cell voltage, hydrogen pressure, motor speed, SoC (State of Charge) of the power battery, working state of each device, error code and etc., can be measured by each distributed control sub-system and gathered to the VCU via CAN bus. As a gateway between CAN and Bluetooth networks, VCU transmits the data to the cell phone via a secure Bluetooth connection according to the predefined protocol. With a J2ME application running in a smart cell phone the data can be monitored in real-time. The data exchange between the cell phone and VCU is highly secure under the guarantee of the Bluetooth pairing and authentication mechanism. Besides real-time monitoring diagrams, all collected data can be stored into a SD/MMC card inside the cell phone. The stored data is easily available for the off-line analysis in a computer via either a USB2.0 or Bluetooth connection as well.

The real-time data of vehicle can also be collected into an on-line web-database through a GPRS connection by cell phone monitoring terminal. Through a LAN (Local Area Networks) to the central database computer, researchers can get the vehicle information easily with either a PC or a laptop for analysis. Over time of the bus on-road test, a mass of data can be gathered for the offline analysis. An expert-system database of the bus can be established on the internet by statistical theory. Furthermore, a remote diagnosis can be implemented by means of a GPRS connection through the cell phone. The early fault diagnosis for the vehicle power train is thus possible on the basis of the website database. Local Area Networks

PC

Power Input DC/DC Filter Isolation Network

24V Inverse /Overload/Transient Impulse Protection

DIN DIN DIN DIN DIN DIN DIN DIN

1 2 3 4 5 6 7 8

AIN AIN AIN AIN AIN AIN AIN AIN

1 2 3 4 5 6 7 8

12V Out Filter Network

Voltage Regulator

5V/3.3V Output

DC/DC Isolation

Voltage DC/DC, Power Driver for Actuators, 12V Output

Clock & Reset Signal Process ing Module

2

DC/ DC Isolation

T P U

RAM:1M BYTEs FLASH:2M BYTEs

T P U

DC/ DC Isolation

HS Driver

LS Driver

MPC561 Signal Process ing Module

1

AntiInterfer ence Circuit

Q A D C

CAN Interface

Web Server

On-line Web Database PC

Fig.6.

CAN DC/DC Isolation

Q DC/ S DC D/A M Isolation DC/DC Isolation

Relay 1 Relay 2 Relay 3 Relay 4 Other Inductive Loads AOUT AOUT AOUT AOUT AOUT AOUT AOUT AOUT

1 2 3 4 5 6 7 8

SCI Interface

Bluetooth RF Module

Antenna

CAN Bus

GPRS Connection

Cellular Network

Fig.6: Design schematic of VCU

Monitoring Terminals

An antenna is fixed onto the outside of VCU case to ensure a stable Bluetooth connection, the antenna is carefully screwed and sealed, as shown in Fig.7.

Actuators Sensors CAN Interface

Vehicle Control Unit

Bluetooth Connection

Bluetooth RF

CAN Driver In-Vehicle CAN Bus

Fig.5: System configuration

HARDWARE DESCRIPTION VCU HARDWARE - The VCU of the fuel cell city bus consists of several functional blocks, as shown in Fig. 6. A 32-bit microprocessor MPC561 produced by Freescale is applied. The MPC561 is a high-speed 32bit control unit that combines high-performance data manipulation capabilities and with powerful peripheral subsystems, including dual QADC ports, three independent CAN interfaces, dual UART interfaces, dual TPU ports, a 64-bit floating point unit, 512Kbytes of internal Flash, 32Kbytes of internal static RAM and etc. [9] In order to achieve a higher performance, the system memory of VCU is extended with 1M external static RAM and 2M external Flash memory. Different types of switching power modules and regulators are used in design to fulfill several voltage supply demands, and all digital ports of VCU are isolated by optical couplers to avoid EMI damages like a surge voltage. The SCI interface connects the VCU and the Bluetooth module, the data rate through the SCI interface is up to 115.2kbps. The Design schematic of VCU is shown in

Antenna Fig.7: VCU exterior with antenna BLUETOOTH MODULE - In this application, a Bluetooth EDR + 2.0 module provided by a Finnish company Bluegiga is embedded into the VCU, as shown in Fig.8. The module is as small as a 2 Euro coin, which can be conveniently assembled at the VCU hardware.

Fig.8: Bluetooth Module [10]

The Bluetooth module from Bluegiga uses an iWRAP firmware. iWRAP is an embedded firmware running entirely in the RISC processor of WRAP modules, as shown in Fig.9. It implements the full Bluetooth protocol stack, and no host processor is required to run it. All software layers, including application software, run on the internal RISC processor in a protected user software execution environment known as a Virtual Machine.

The embedded program algorithm of VCU to implement the Bluetooth data exchange with the monitoring terminal is shown in Fig.11 as a flow chart. Read command

Start up

Decode message Self diagnosis

Alarm!

Acquire data Y to be

The VCU interfaces to iWRAP firmware via UART interface using the ASCII commands supported by the iWRAP firmware. With these ASCII commands the host VCU can access Bluetooth functionality without paying any attention to the complexity which lies in the Bluetooth protocol stack. [11]

N

monitored via CAN Pass?

Y

Packaging message

Wait for a BT connection. Keep in low power mode

N

interrupt wake up

Send data to AMA via Bluetooth module

Secure connection?

Y

Get response & verification form AMA

Fig.11: Program flow chart of VCU

SOFTWARE DESCRIPTION

Fig.9: iWRAP Stack of Bluetooth module [11] iWRAP has two operational modes, command mode and data mode. Command mode is default mode when there are no connections. It is possible to switch between modes at any time when there are one or more active connections. Data mode is not available if there are no active connections, because obviously there is no any data available, nor it can be sent anywhere. In the situation of command mode, the VCU waits for a connection from portable monitoring terminal. The state flow of operational mode is shown in Fig.10. [11]

Fig.10: State flow of Bluetooth module [11]

PLATFORM INTRODUCTION - The Automotive Monitoring Agent (AMA) was implemented by the Java 2 Platform, Micro Edition (J2ME), which is an optimized version of J2SE for embedded devices with limited processing power, memory, and graphical capability. More specifically, the AMA was developed with J2ME APIs with CLDC 1.0 configuration coupled with MIDP 2.0 profiles and File Connection optional package (with supporting devices). The Bluetooth communication was programmed using the Bluetooth API (JSR 82) based on version 1.1 of the Bluetooth specification. The AMA establishes a Serial Port Profile (SPP) service with the server under the RFCOMM protocol, which emulates an RS-232 serial connection. The SPP simplifies communication between the AMA and the VCU by providing a stream connection. The AMA is developed using the Eclipse environment and Eclipse ME plug-in. The application is tested, provisioned and emulated by J2ME Wireless Toolkit which helps developers to build wireless applications more efficiently and successfully. SOFTWARE ARCHITECTURE - The AMA is featured with a real-time, multi-channel and auto-scaled monitor canvass. The data diagram is synchronized with the performing of the VCU and can be switched between channels (e.g. voltage and current). The diagram will be auto-scaled according to the attributes (max and min values) of the selected channel. All channels are addable and removable under the protocol. Data received can be stored as files in the specific data format, which can be sent to the Diagnosis Center Server via GPRS later.

The functions of the AMA are realized by several components shown in Fig. 12. The main component is the Data Processing Module (DPM), which connects the other major function component. The Data Encoder/Decoder decodes the data received from the SPP connection with the VCU Bluetooth server and encodes the data to be sent from the DPM. The Monitoring Canvass component realizes the drawing function and receives data from the DPM. The GUI component provides a friendly interface to search and select remote Bluetooth devices. The Local Data Management component takes charge of I/O function of the RMS and files stored on the cell phone and exchanges control and data information with the DPM. The Bluetooth Connection component helps to establish a SPP connection with the VCU. And the Socket Connection component helps to connect the Diagnosis Center via GPRS.

Nr of the Size of payload Payload of channel (1 byte) (1 byte) channel (m bytes) • Nr The Number of the channel. Channel number with 0xff is reserved for the control channel. Other channels are data channels and can be defined by user. • Size of Channel Payload The size of the payload (1 byte) is no greater than 255. So the maxim size of the payload can be 255 bytes (m

Suggest Documents