Using MathWorks software, Vodafone has designed and trialed a complete road-usage charging application. For the first phase of the project, they automatically generated and deployed code onto an ARM7 32-bit microprocessor in an automotive supplier’s OBU. The team used Simulink® to develop a system model that included linked modules for control, human–machine interface, communications, GPS preprocessing, route identification correlated to incoming GPS positions, and data logging. The team used Stateflow® to develop an event-driven control flow for each module.
Their PC served as a rapid prototyping target, enabling them to verify the controller model in a real environment. Vodafone engineers equipped the PC with a GPS receiver, a mobile phone, and a smart card reader connected via serial ports. They wrote S-function device drivers to connect each device as a block within the Simulink model.
In Phase 1 of the project, they conducted their first road tests as hardware-in-the-loop simulations. The team used Embedded Coder® to generate C code for the OBU and to specify parameters such as stack size and debugging level, further refining and tuning the system for the embedded target. Finally, they downloaded the executable code to the ARM7 system.
“Embedded Coder generated C code that was error-free and efficient—so much so that the team only needed to write code for our device drivers,” reports Dr. Christian Robl, System Architect at Vodafone Group R&D.
After a successful trial on a number of vehicles, Vodafone began Phase 2, in which the system was ported to a mobile platform. They divided the original model into two parts: a GPS-data collection, a pre-processing application to be deployed on a mobile phone, and a road-identification system to be deployed on a PC in a remote back office. The communication part had to be implemented on both systems. Using Embedded Coder with custom storage classes, the team generated C code for the Symbian mobile phone platform. A similar processing chain was used to deploy the second part of the model on a PC as a thread of the transaction system in the back office.