基于模型的汽车系统测试

2018-10-08 17:19:59·  来源:洞云书屋  
 
近年来,汽车嵌入式设备的发展已经改变了电气和机械工程学科相结合的软件和电气/机械工程。这一变化对今天开发流程、方法和工具以及所需的工程技能是非常重要的。
(注:本文是译文,Original author: Eckard Bringmann)

In recent years the development of automotive embedded devices has changed from an electrical and mechanical engineering discipline to a combination of software and electrical/mechanical engineering. The effects of this change on development processes, methods, and tools as well as on required engineering skills were very significant and are still ongoing today.
近年来,汽车嵌入式设备的发展已经改变了电气和机械工程学科相结合的软件和电气/机械工程。这一变化对今天开发流程、方法和工具以及所需的工程技能是非常重要的。

At present there is a new trend in the automotive industry towards model-based development. Software components are no longer handwritten in C or Assembler code but modeled with MATLAB/Simulink™, Statemate, or similar tools.
目前汽车工业朝着基于模型的方向发展。软件组件不再以C或汇编代码手写,而是用Matlab/Simulink、StimeMe或类似的工具建模。

However, quality assurance of model-based developments, especially testing, is still poorly supported. Many development projects require creation of expensive proprietary testing solutions.
然而,基于模型的发展,特别是测试质量保证,仍然缺乏支持。许多开发项目需要创造昂贵的专用测试解决方案。

Reconsider testing procedures in practice. Furthermore, we introduce the test tool “TPT”.
在实践中重新考虑测试程序。此外,我们在汽车领域引入基于模型的测试工具TPT” 。

TPT is based on graphical test models that are not only easy to understand but also powerful enough to express very complex, fully automated closed loop tests in real-time. TPT has been initially developed by Daimler Software Technology Research. It is already in use in many production-vehicle development projects at car manufacturers and suppliers.
TPT是基于图形的测试模型,不仅容易理解,也足以表达非常复杂,完全自动化的实时闭环测试。TPT由戴姆勒软件技术研究初步开发,已有许多汽车制造商和供应商应用到开发的项目中

Motivation
动机
Within only a few years the share of software controlled innovations in the automotive industry has increased from 20 percent to 80 percent, and is still growing. Forecasts claim that software will determine more than 90% of the functionality of automotive systems within the next decade. Consequently the impact of software on the customer and hence on market shares and competition will be enormous.
仅仅在几年内软件控制的创新在汽车行业的份额已经从20%增加到80%,并且还在增长。预测认为,在接下来的十年软件将超过汽车系统的功能90%。因此,软件即影响了客户和汽车在市场的份额和竞争力。

During recent years the growth of software in the automotive industry led to a development process founded on model based technologies which have many advantages for automotive developments. Firstly model-based technologies such as MATLAB/Simulink, Statemate, MatrixX, or LabView are domain specific and support powerful mechanisms for handling and processing continuous signals and events which are the most important data types in the automotive domain. These model-based technologies allow the development of high-level models that can be used for simulation in very early stages of the development process. This in turn is important since automotive development is an interdisciplinary business with software, electrical, and mechanical engineering aspects inextricably entwined. Graphical models and simulation of such models allows engineers to find a common functional understanding early in the design phase. So, model-based development improves communication within development teams, with customers, or between car manufacturers and suppliers.
近年来,软件在汽车工业中的发展导致了基于模型的技术的开发,该技术对于汽车开发具有许多优点。首先,基于模型的技术,如Matlab/Simulink、StimeMaT、MatrixX或LabVIEW是特定于域的,并有支持处理连续信号和事件的强大机制,这些信号和事件是汽车领域中最重要的数据类型。这些基于模型的技术允许用于开发过程非常早期阶段的仿真高级模型。这很重要,因为汽车发展是一个跨学科的业务与软件,电气和机械工程方面密不可分。图形模型和仿真这样的模型允许工程师在设计阶段早期找到对功能的共同理解。因此,基于模型的开发改善了开发团队内部与客户之间的沟通,或者改善了汽车制造商和供应商之间的沟通。

It reduces time to market through component re-use and reduces costs by validating systems and software designs up front prior to implementation. Consequently models are often treated as part of the requirements specification, since the models illustrate the required functionality in an executable manner. Model-based development provides a development process from requirements to code, ensuring that the implemented systems are complete and behave as expected. Model-based development allows segregation of concerns; technical aspects such as fixed-point scaling (i.e. the transformation of floating-point algorithms to fixed-point computations), calibration data management, and the representation of signals in memory are separated from the core algorithms thereby keeping the models as lean as possible.
通过在执行之前验证系统和软件设计,减少了通过组件重用的市场时间,并降低了成本。因此,模型通常被视为需求规范的一部分,因为模型以可执行的方式说明所需的功能。基于模型的开发提供了一个从需求到代码的开发过程,确保实现的系统是完整并按照预期的行为。基于模型的开发允许分别关注各技术方面,例如定点缩放(即浮点算法到定点计算的转换)、校准数据管理和存储器中信号的表示与核心算法分开。因此,保持模型尽可能精炼。

Model-based testing in practice
基于模型的实践检验
Along with the growing functionality and the introduction of model-based development processes, the demands on quality assurance have also increased. In terms of testing, model-based development enables system engineers to test the system in a virtual environment when they are inexpensive to fix, i.e. before the code is actually implemented or integrated on the final hardware (which is called ECU or electronic control unit). However, in practice there are just a few testing procedures that address the automotive domain-specific requirements of model-based testing sufficiently. The applied test methods and tools are often proprietary, ineffective and require significant effort and money. about 15 years ago testing embedded devices comprised primarily of four well-understood areas: (1) electromagnetic compatibility (EMC tests), (2) electrical tests (e.g. short-circuit, creeping current, stress peaks), (3) environmental tests (i.e. testing under extreme climate conditions), and (4) field tests (on proving ground or the road).
随着功能的不断增多及基于模型的开发过程的引入,对质量保证的需求也增加了。在测试方面,基于模型的开发使系统工程师能够在虚拟环境中对系统进行测试,即可低成本地纠正错误,因为这个纠正发生在代码实际实现或集成到最终硬件(被称为ECU或电子控制单元)之前。然而,在实践中,只有少数测试程序能够满足基于模型测试的汽车领域的特定要求。应用的测试方法和工具通常是专有的,无效的,需要大量的努力和金钱。大约15年前测试嵌入式设备主要包括四个领域:(1)电磁兼容性(EMC试验),(2)电气试验(例如短路、蠕动电流、应力峰值)、(3)环境试验(即极端气候条件下的测试)和(4)现场试验(试验场或道路)。

Requirements for automotive MBT
汽车MBT要求
The term ‘model-based testing’ is widely used today with slightly different meanings. In the automotive industry it is normally used to describe all testing activities in the context of model-based development projects.
“基于模型的测试”这个术语如今被广泛使用,意义略有不同。在汽车工业中,它通常用来描述在基于模型的开发项目的环境中的所有测试活动。

Automotive model-based development has specific characteristics that require the use of dedicated model-based testing approaches. The characteristics of, and the resulting requirements for model-based testing are discussed below.
基于汽车模型的开发具有特定的特性,需要使用基于模型的专用测试方法。下面讨论了基于模型的测试的特性以及由此产生的需求。

Test automation
测试自动化
Automotive systems usually interact with a real-world environment which is under continual control of the embedded system. Thus the whole system is not only a piece of software, but a complex construction that consists of software, hardware, electrical, mechanical, and/or hydraulic parts. The development of such a system requires the co-design of software and hardware components. Consequently an iterative process is needed with a considerable number of interim releases of the integrated system. Thoroughly testing these interim releases is crucial to ensure that requirements inconsistencies and design or implementation faults can be uncovered as early as possible. This means that the same tests have to be repeated again and again over the development cycle. Test automation is therefore essential as the manual test workload over many iterations would be at best expensive and likely not practical, leading to less than thorough quality assurance standards.
汽车系统通常与嵌入式系统持续控制下的现实环境相互作用。因此整个系统不仅是一个软件,而是一个复杂的工程,包括软件、硬件、电气、机械和/或液压件。开发这样一个系统需要软件和硬件组件的协同设计。因此,系统集成需要相当多的迭代过程。彻底测试这些临时版本是保证尽早发现设计要求矛盾或实施故障。这意味着,在开发周期内同样的测试必须一遍又一遍的重复。在多次迭代,手动测试工作量巨大且质量难以保证的情况下有必要采用测试自动化。

Systematic test case design
系统测试设计
For many reasons automotive model-based developments usually consist of complex functionality. The systems interact with physical components that have a complex behavior which depends on many variables. Controlling such components also introduces complex controller functionality. Secondly the electrical, mechanical, and hydraulic components can fail and the embedded system has to detect such failures and compensate for them in a very robust way, as far as technically possible. The implementation of code to handle all such failure modes is a significant portion of the system software.
出于许多原因,基于汽车模型的开发通常包括复杂的功能。系统与具有许多变量相关的复杂行为的物理组件交互。控制这样的组件还引入了复杂的控制器功能。其次,电气、机械和液压元件可能会失效,并且嵌入式系统必须检测这些故障并以非常稳健的方式对它们进行补偿,实现所有这样的故障模式的代码是系统软件的重要组成部分。

Readability
可读性
Automotive model-based testing is a collaborative work between testers, system engineers, and programmers. All of these experts have different perspectives on the system, different skills and experiences, and provide important information for the identification of suitable test cases: system engineers know about the possible pitfalls of the application domain, programmers know about the complexity of algorithms and their risk of faults, and testers know about coverage and combination issues, boundary tests, robustness tests and others methods that have to be considered in the test implementation.
基于汽车模型的测试是测试人员、系统工程师和程序员之间的协作工作。所有这些专家对系统、不同的技能和经验都有不同的观点,并且为识别合适的测试用例提供了重要的信息:系统工程师知道应用领域可能的缺陷,程序员知道算法的复杂性,故障风险,测试人员知道在测试实现中必须考虑的覆盖和组合问题、边界测试、健壮性测试和其他方法。

The principle of model-based development is to use models as a “common language” comprehensible to all engineers involved in the development. Hence model-based testing should be readable and comprehensible by all of these experts too and not just by a few testing specialists.
基于模型的开发原则是使用模型作为一种“通用语言”,让所有参与开发的工程师都能理解。因此,基于模型的测试应该对所有专家具有可读性和可理解性,而不仅仅只由少数测试专家才能理解。 
分享到:
 
反对 0 举报 0 收藏 0 评论 0
沪ICP备11026917号-25