Live Debugging of Stateflow Charts While Running on ECU
Mohammad Raouf, Valeo
Amjad Elshenawy, Valeo
Model-Based Design has become one of the most important topics in automotive domain. On the development side, engineers usually use Model-Based Design with tools such as MATLAB®, Simulink®, and Stateflow®, to implement the specifications and algorithms of the system. They simulate to verify their implementation, and finally generate the code.
On the testing side, engineers usually perform activities such as model-in-the loop (MIL), software-in-the-loop (SIL), and hardware-in-the-loop (HIL) testing. After all of these testing phases, there could be still some wrong behavior detected when the code is flashed to the ECU and tested on the host vehicle. At this point, there is a need to efficiently deeply debug the code arises.
Debugging code generated from Simulink models and running on ECUs is possible by means of commercial calibration and validation tools (e.g. INCA). These tools acquire signals, display them in physical representation, and record them for further processing. This method is useful for Simulink signals representing mathematical calculations, but does not work for Stateflow state charts. The developer needs to create a variable representing the current active state, and even a plot of this variable does not help so much if the state chart is really big.
This presentation shows a new concept for debugging the code generated from Stateflow while it is running on the ECU in the host vehicle directly. This is achieved via external communication between Simulink and the ECU using the CAN protocol on the physical CAN bus. Using this method, the engineer can analyze code generated from Stateflow running on the ECU by observing the animated state charts within the MATLAB, Simulink, and Stateflow environment, which represents the current situation in the software. This idea is also applicable to LIN, Flexray, and other vehicle communication protocols.
Recorded: 24 Sep 2015
Featured Product
MATLAB
Up Next:
Related Videos:
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)