Skip to content
MathWorks - Mobile View
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
MathWorks
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
  • MathWorks アカウントへのサインインMathWorks アカウントへのサインイン
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト

ビデオ・Webセミナー

  • MathWorks
  • ビデオ
  • ビデオ ホーム
  • 検索
  • ビデオ ホーム
  • 検索
  • 営業へのお問い合わせ
  • 評価版
3:19 Video length is 3:19.
  • Description
  • Full Transcript
  • Related Resources

How to Generate an AUTOSAR Lookup Table Using Lookup Table Optimization

Designing a lookup table involves various choices: fixed-point or floating-point data, size of the table, evenly spaced data or uneven spacing, and other algorithm settings such as the interpolation method. The Lookup Table Optimizer app solves this problem by generating an efficient lookup table that minimizes the RAM memory. You can also generate a Lookup Table block that maps to AUTOSAR library routines and generate AUTOSAR compliant C code. 

A lookup table is a key construct for embedded designs and this video highlights a couple ways of generating efficient lookup tables. Lookup tables are primarily used to model algorithmic components with complex input/output relationships using empirical or recorded data.

But they are also used to speed up the run-time execution of some parts of your algorithm at the expense of increased memory.

Common use cases are replacing a complex function like a trig function with a lookup table or a complete subsystem with a more efficient lookup table implementation or from data – when you have data, say, from calibration or testing that you want to model as a lookup table.

So, let’s consider a simple model with an exponential function which can be more efficiently implemented using a lookup table, or consider the subsystem entirely.

The Lookup Table Optimizer app solves this optimization problem for you, once you specify the constraints like the:

  • desired input and output data types
  • range of the output
  • threshold on the approximation of the output.

Now, for automotive applications, AUTOSAR is a popular, open, and standardized software architecture for ECU software development. Complying with it is an additional constraint and you can specify this as an option for optimization.

Once you start the optimization, you will notice the runs with different table sizes, word lengths, different breakpoint spacing options and once we find the most efficient solution, we can generate the AUTOSAR compliant lookup table to replace the original lookup table in our model.

The generated lookup table is an AUTOSAR Map block from AUTOSAR Blockset.

AUTOSAR blockset provides capabilities to model and develop AUTOSAR Classic and Adaptive software in simulink.

Now, in the other use case where you have raw data, such as calibration data from the CDF file in the example model here, you can load the data into a lookup table.

We then repeat the same steps as we did earlier, using the lookup table optimizer app to specify the constraints and then run the optimization to generate an AUTOSAR compliant lookup table from your data.

You can use the comparison plot to verify that the error is within tolerance – by looking at the plot on the right here. You can then replace the original LUT with the Optimized AUTOSAR compliant LUT in your model.

To generate code that maps to the AUTOSAR IFX library routine, you can use the AUTOSAR component designer app, make sure that you have the right code configuration settings and last but not least, match the datatypes of the breakpoints to the respective inputs.

Once you generate code, here is the generated code for the AUTOSAR Map block showing the corresponding IFX routine.

To see more examples and to learn more about optimizing LUTs in your design, Please refer to additional links below the video.

Related Products

  • Fixed-Point Designer
  • AUTOSAR Blockset
  • Embedded Coder
  • Simulink

3 Ways to Speed Up Model Predictive Controllers

Read white paper

A Practical Guide to Deep Learning: From Data to Deployment

Read ebook

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Deep Learning and Traditional Machine Learning: Choosing the Right Approach

Read ebook

Hardware-in-the-Loop Testing for Power Electronics Control Design

Read white paper

Predictive Maintenance with MATLAB

Read ebook

Electric Vehicle Modeling and Simulation - Architecture to Deployment : Webinar Series

Register for Free

How much do you know about power conversion control?

Start quiz
Related Information
Related Information
Learn more about lookup table optimization

Feedback

Featured Product

Fixed-Point Designer

  • Request Trial
  • Get Pricing

Up Next:

1:07:31
Generate C Code from MATLAB Functions Using the Embedded...

Related Videos:

51:27
Best practices for Converting MATLAB Code to Fixed Point...
2:46
Fixed-Point Net Slope Computation Using Division
3:12
Generate Code from Variant Sink and Source Blocks
5:38
AUTOSAR Client-Server SIL Simulation

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • 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
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 営業へのお問い合わせ
  • 評価版

MathWorks

Accelerating the pace of engineering and science

MathWorksはエンジニアや研究者向け数値解析ソフトウェアのリーディングカンパニーです。

ディスカバー…

製品を見る

  • MATLAB
  • Simulink
  • 学生向けソフトウェア
  • ハードウェア サポート
  • File Exchange

製品評価版の入手または製品の購入

  • ダウンロード
  • 評価版ソフトウェア
  • 営業へのお問い合わせ
  • 価格とライセンス
  • MathWorksストア

使い方を学ぶ

  • ドキュメンテーション
  • チュートリアル
  • 例
  • ビデオ・Webセミナー
  • トレーニング

サポートを受ける

  • インストールのヘルプ
  • MATLAB Answers
  • 技術コンサルティング
  • ライセンスセンター
  • サポートへのお問い合わせ

MathWorks について

  • 採用情報
  • ニュースルーム
  • 社会貢献
  • ユーザー事例
  • MathWorks について
  • Select a Web Site United States
  • トラストセンター
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

MATLAB を語ろう