"With Simulink and Embedded Coder, we design complex real-world applications and generate efficient embedded code for complete stand-alone systems."
Christian Birle, Vodafone
Global positioning satellite (GPS) technology has enabled governments worldwide to improve their toll-collection methods. Today, onboard systems equipped with GPS receivers can automatically determine whether a vehicle is traveling on a road or in a region that requires a toll.
Vodafone Group Research and Development uses MathWorks software for Model-Based Design to investigate and develop highly accurate road-usage charging applications that can be implemented and trialed on a range of platforms.
"MathWorks software for Model-Based Design enables us to simulate each step of the process, ensuring higher design quality and better-informed design decisions," explains Christian Birle, Senior Line Manager Traffic Telematics at Vodafone Group. "In addition, generating code from a single model enables us to port the solution to various hardware targets with less effort and time."
To meet European Committee for Standardization requirements, Vodafone’s prototype road-usage charging application needed to be designed for potential operability across Europe. It also needed to be geared towards meeting the requirements of regional service providers.
Road-usage charging requires precise location of the vehicle in relation to chargeable areas or sectors. The onboard unit (OBU) uses a GPS receiver to determine the vehicle’s position and speed. It also includes a GSM/GPRS module for communication and a database of geographical information.
Vodafone required a single development environment to design, model, and simulate the system before generating embedded code for the OBU. To address evolving system needs, they would need to adapt the OBU to different hardware platforms.
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.
To research and develop an onboard unit for tracking road usage and collecting tolls
Use Simulink, Stateflow, and Embedded Coder to model, simulate, and generate code for a dedicated embedded target