POLITECNICO DI TORINO Master Degree Course in Mechatronic Engineering Master Degree Thesis Software Development of the Fuel Level Control Vehicle Function for an Electronic Control Unit Supervisor Prof. Massimo Violante Condidate Marco Petrongari Company supervisor Eng. Mrs. Lorena Capuana ACADEMIC YEAR 2017-2018 "Success consists of going from failure to failure without loss of enthusiasm" -WINSTON CHURCHILL to my family Contents Introduction 2 1 AUTOSAR 5 1.1 The idea of AUTOSAR . .6 1.1.1 Difference with the past . .6 1.1.2 "Cooperate on standards, compete on implementation" . .8 1.2 The AUTOSAR Backbone . 10 1.2.1 Architecture . 10 1.2.2 Methodology . 19 1.2.3 Application Interface . 21 1.2.4 Conformance Test . 22 1.3 The Future of AUTOSAR . 22 2 Fuel Level Control 24 2.1 The new perspective of vehicle function . 26 2.2 Sensor Handling . 28 2.2.1 Fuel-Level Sensor . 29 2.2.2 Hardware Interface . 30 2.2.3 Software Interface . 31 2.2.4 Diagnosis Layer . 31 2.3 Vehicle Function Interconnections . 31 2.3.1 Inputs . 32 2.3.2 Outputs . 33 2.4 Measurement Logic . 33 2.4.1 STATIC . 33 2.4.2 DYNAMIC . 35 2.4.3 RIFO . 37 2.4.4 OUTPUT . 38 2.4.5 FAULT . 39 2.5 Vehicle Function Design . 40 3 Model Based Approach 41 3.1 First Half of the V-Model ...................... 43 3.1.1 System Requirements . 43 3.1.2 System Design . 44 3.1.3 System Description . 44 3.2 StateFlow . 45 3.2.1 States . 46 1 3.2.2 Transitions . 48 3.2.3 Connective Junctions . 49 3.2.4 Graphical Function . 49 3.3 Vehicle Function Implementation . 50 3.3.1 STATIC . 50 3.3.2 DYNAMIC . 52 3.3.3 RIFO . 53 3.3.4 OUTPUT . 54 3.3.5 FAULT . 54 3.4 Vehicle Function Model . 55 4 Code Generation and Integration 56 4.1 Coding . 58 4.1.1 TargetLink . 58 4.2 Software and Hardware Integration . 60 4.2.1 SOFTUNE Workbench . 61 4.3 Acceptance Test . 62 4.3.1 CANAnalyser and CANCase . 63 4.3.2 Hardware Simulator . 64 4.4 The Final V-Model . 65 5 Test Cases 67 5.1 STATIC . 68 5.1.1 Test Case 0 . 68 5.1.2 Test Case 1 . 71 5.2 RIFO . 73 5.2.1 Test Case 2 . 73 5.3 DYNAMIC . 75 5.3.1 Test Case 3 . 75 5.3.2 Test Case 4 . 77 5.4 COMPLETE . 79 5.4.1 Test Case 5 . 79 Conclusions 83 Acknowledgments 84 Bibliography 90 2 Introduction Since the production of the first Ford in 1908, the automotive industry has thrived all over the world and it has become one the bedrocks for the economy of the wealthiest countries. The use of a vehicle has quickly turned from an expensive object for the rich to an essential means of transport for everyone. Although the automobile identifies a great breakthrough and an engineering masterpiece, it is undeniable that, throughout the decades, it has undergone impressive change not only in terms of sales but also external features and inner functionality. Rather than a pure mechanical conveyance, today vehicles can be compared to high-tech devices where electronic systems guarantee a safer and more secure environment for the driver and millions of lines of code are run in a short period. Within this context, the main goal of the thesis is to follow each single step behind both the software development of the Fuel Level Control vehicle function and its integration in an automotive electronic control unit (ECU). Overall, the whole project consists of five sections that intend to provide a top-down approach. In fact, starting from the description of the automotive environment, the body of the thesis brings out the software modelling phase without forgetting, in the final part, the importance of the test cases to attest the correctness of the imple- mentation. The first chapter highlights the difference between the software development process before and after the birth of AUTOSAR. In particular, this section ex- plains the reasons that made car-makers and vendors think about a common standard and how this dramatic change had been achieved successfully. There- fore, the AUTOSAR bedrocks together with future objectives are analyzed in depth in order to illustrate the evolution of this consortium and the path that the automotive world endeavors to follow in the foreseeable future. The AUTOSAR description and, in particular, the software architecture en- able to focus on how a vehicle function is implemented. Consequently, the center of attention of the second chapter deals with the functionality description in terms of requirements, sensors and transfer functions. For this reason, understanding how the logic of the Fuel Level Control works, describing its mode of operation and studying all the interconnections are accurately covered in this part. Obvi- ously, it aims to provide a high-level sketch where the most important transitions and states of the vehicle function are figured out. The idea to follow a top-down analysis is particularly evident in the third chapter where requirements and objectives are matched with the V-model pur- 3 pose. As a consequence, what is clearly evident from this section is that the path to follow for the Fuel Level Control development is the result of a well-defined scheme rather than accidental events. In fact, the main goals are not only to link the first phases of the V-model scheme with the information provided before but also to justify the choice of the Matlab/Simulink environment for the model based design approach and the use of the Stateflow chart for the logic implementation. Thereby, while the output of the second chapter was a sketch on paper of the vehicle function, at the end of this section it turns into a proper software model. The fourth chapter continues to discuss the remaining V-Model phases. In particular, it deals with the rising side of the diagram that takes into consideration each stage from the code generation to the final integration on the hardware target. In order to provide a clear idea of how to handle the code on a hardware device, all the required software that allow the code to be compiled and checked during a bench test are deeply discussed. Finally, the fifth chapter compares the outcomes of identical test cases that will be performed both in the simulation and bench tests with the aim of achieving marginal and expected differences that witness all the study conducted before. 4 Chapter 1 AUTOSAR 5 AUTOSAR At the beginning of 2000, the consistent progress in the field of electronic systems and the ongoing importance of the software brought on revolutionary change in the automotive world. The need not only to integrate software applications and new components but also to exploit technological progress in favor of safer, more efficient and more secure automobiles provoked a great breakthrough in the ve- hicle software development. Although in that period software development processes had already been re- alized by some automotive companies, the main drawback was that these were single development strategies. In addition to this, the collaboration with third parties would have only increased the complexity of the software without guaran- teeing a long-lasting and reusable solution for future applications. In this scenario, the urgency to come up with a standardized outcome became a priority in order to lay the foundation for the future car development. 1.1 The idea of AUTOSAR 1.1.1 Difference with the past In 2003, the worldwide partnership of automotive stakeholders and vendors founded AUTOSAR (AUTomotive Open System ARchitecure): a standardized and open software architecture for automotive electronic control units (ECUs). Since then, this collaboration has been focusing on using software to control car applica- tions and managing growing system complexity. In order to achieve these goals while keeping costs affordable, AUTOSAR has defined a set of specification for the description of software architecture, application interfaces, and methodology. Whereas, from the beginning the representatives of this partnership delineated a set of main aims to standardize out of competitiveness: • Safety requirements; • Redundancy activation; • Scalability to different platforms variants; • Implementation of basic functions; • Transferability of functions from an ECU to another ECU; 6 1.1. THE IDEA OF AUTOSAR • Integration of functional modules; • Maintenability throughout the entire product life cycle; • Software updates and upgrades; However, the critical differences between previous and present software archi- tecture were both the internal structure of an ECU and the way through which ECUs of two distinct sub-domains 1 communicate on the network (table 1.1). Before AUTOSAR, because of the absence of a common standard, both the ECU internal structure and the communication among ECUs developed accordingly to the past evolution of each sub-domain. Therefore, functional requirements to hardware and software were assigned to a one-on-one basis. This approach implied several negative consequences: first, any kind of change or improvement raised complexity and costs, secondly, this type of solution was difficult to re-use or integrate in other applications. On the contrary, AUTOSAR aims to turn temporary into long-lasting solu- tions and to standardize the communication between the nodes2 of the automotive network. By means of a layered structure, the ECU is essentially decomposed in three independent layers which make use of a dedicated virtual address space and interact each other through a specific interface. In this way, the level of abstrac- tion proves to be the key factor that allows developers to overlook how to deal with the signal coming from the BUS but, simply, to handle the received data.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages95 Page
-
File Size-