Cookies: Our site uses cookies in order to deliver better content. By continuing you accept these cookies.

Ok

MF4 (MDF4) Explained Simple (2022)

Updated at 03 Dec, 2021

— The MF4 (MDF4) was created as an ASAM standard file format to fulfill the specifications of i.e., ASAP2, to assist the automobile industry.

MF4 (MDF4) Explained Simple (2022)
Find the perfect solution service for your business

All solutions are customizable and designed to meet all your needs.

Find the solution

ASAM MDF was created to fulfill the specifications of ASAM MCD-2 MC (ASAP2) and other standards. It is a helpful and reliable standard format based on the widely acknowledged MDF 3.x format that is suitable for todays and future demands.

Note: ASAP2 defines the description format of the internal ECU variables used in measurement and calibration.

What is a MF4 file (MFD4)?

Measurement data format version 4 (MDF4) is an ASAM standard file format for storing measurement data in binary file format that is used by the automobile industry.

It captures CAN, CAN FD, LIN bus data, and sensor data from an engine control unit (ECU), and it is interoperable with many other CAN tools. It contains raw measurement data as well as the meta-data required to comprehend that raw data.

This comprises data for turning raw data into physical values, as well as the ASAM-compliant signal name. The data fields offered in MDF are specifically tailored to the needs of the automobile sector. You may also store your own comments and binary data in the MDF file's accessible data fields.

MDF's capacity to store measurement data very efficiently, i.e., memory space-saving and quick storage, is an essential aspect contributing to its success. Furthermore, read access to data in the file can be improved. To do so, the file must be "sorted" once if necessary (e.g., when opening it for the first time). This allows for indexed data and hence faster access to the data.

MDF files may now be written as sorted files starting with MDF 4.0, with no discernible speed cost.

Advantages of Using MDF

  • Designed to be quick

  • Excellent performance when it comes to writing and reading measurement data. Because it is index-based, it is exceedingly fast.

  • Many strong and free applications and APIs are available

  • MDF4-Lib. A free C++ library for reading and writing ASAM-MDF4 files.

  • Used to communicate data across different tools

  • Many tools on the market make extensive use of it.

  • Allows for the creation of files of arbitary size

  • ASAM measurement data format support MDF 4.x supports the creation of files of any size (264 bytes). In addition, it is ASAM standard since version 4.0, future-proofed by open disclosure of the specification version 3.3.

  • It offers compression, which significantly decreases file size

  • This will cause an increasing SD card capacity, server cost, and 3G/4G upload expenditures. Starting with MDF 4.1, optional payload data compression enables for further file size reduction.

  • compatiple with previous MDF versions

  • MDF 4.x supports the writing of previously sorted measurement files. This avoids the need for time-consuming sorting of very large measurement files at the end of a measurement or when the file is viewed for the first time.

  • Open standard with extensive CAN bus recording functionality, as well as raw bus logging and physical values

  • MDF 4.1 is able to store raw messages and classification results for established bus systems (CAN, LIN, Flexray, Automotive Ethernet) in MDF files in a standard-compliant way. Aside from the bus messages, the signals being transferred may also be saved, allowing for both signal-based and message-oriented assessment with a single file.





The MDF4 Block Hierarchy

An ASAM MDF file (file extension *.mf4) is arranged in binary blocks, with each block consisting of many contiguous bytes that may be seen as a record or data field structure.

There are several sorts of blocks, and the type of block determines the function and content of the block. Each block type is shortened with two uppercase characters that are also used to identify the block.

MDF4 Block Hierachy

  • The Identification Block (ID) of the file identifies it as an MDF file and defines its version. In MFD4 file format, it is 64 bytes long with a fixed location and appears just once.

  • The MDF file's header blocks (HD) offer a general description. It serves as a file root and connects to each Data. It only appears once and has a fixed location in the MDF file.

  • Channel Block (CN) is a collection of channels that define the data structure and signals, i.e., information about the measured signal and how the signal values are kept.

  • Channel Group Block (CG) specifies the record arrangement, i.e., channels that are always measured together.

  • Data Group Block (DG) comprises a description of the data block, which may relate to one or more channel groups, as well as measurement data, which includes Data Blocks and Channel Groups.

  • A Data Block (DT) is a collection of data records including signal values, such as CAN frames.

In addition, the CN 2 (signal) or CAN Data Frame. This is divided into seven sections/subchannels.

MDF4 CAN Data Frame

MDF Characteristics

These characteristics make MDF excellent for cloud analytics and telematics applications including CAN, CAN FD, LIN, J1939, OBD2, CANopen, and other protocols.

Technical Content of MDF blocks

MDF4 Technical Content

Record Layout

The channels in a record's channel group determine the architecture of a data block. Each record comprises signal values that were captured or "sampled" at the same time. A DT block lacks a link section; thus records must be kept without "gaps."

MDF4 Record Layout

Sorted and Unsorted MDF

Before and after sorting, the data block structure within an MDF file. When a data group only has one child channel group, its data block can only include records with the same layout.

The record ID can be dropped for a sorted data group, allowing for rapid index-based access. Before accessing an unsorted MDF file for reading, most programs prefer to "sort" it.

MDF sorting is a lossless process that separates records from unsorted data groupings. This eliminates the need to buffer the recordings when recording.

Sorted and Unsorted

MDF was created in the 1990s as a proprietary file format by Vector Informatik GmbH and Robert Bosch GmbH. The phases of development are depicted here. Designed for use in the automobile sector, particularly for ECU development, calibration, and testing. Stability and compatibility may have contributed to the format's success.

MDF 2.0 was the first public release in 1991. In 2002, MDF 3.0 was released. Only incremental expansions were added throughout the years. MDF 3.3, the latest non-ASAM version, is completely backward compatible with all MDF 2.x and 3.x versions. The proprietary MDF 3.x format, on the other hand, has a file size restriction of 4 GB due to the use of a 32-bit data byte type for file internal connections.

At the beginning of the 2000s, there were an increasing number of demands for an upgrade to MDF to handle greater file sizes and satisfy current needs. Furthermore, OEMs indicated a wish to see MDF become an official industry standard.

The ASAM working group was established in 2008 with the goal of revising and standardizing MDF. In 2009, ASAM MDF 4.0 was released. ASAM MDF 4.0 overcomes the size constraints of the previous MDF 3.x version and introduces a number of new capabilities such as XML-based extension, custom signal grouping, events, and attachments.

However, owing to fundamental changes such as a 64-bit data format for connections, MDF 4.x is no longer backwards compatible with MDF 3.x. Nonetheless, MDF 4.0 was swiftly accepted by the industry and is backed by a growing number of tools.

ASAM MDF 4.1 in 2012 introduced: measurement data compression, memory-efficient storage for channels with constant or variable data length, storage of bus, traffic for common bus systems, storage of classification results, and storage of additional measurement environment information.

MDF 3.3.1 and MDF 4.1.1 was released in 2014 with updates. The latest version MDF 4.2.0 was introduced in 2019, with e.g., new layout options (in addition to unsorted/sorted). Optimized for reading of single signals/small groups of signals and can be used to store “column oriented”.

History of MDF

Article by

Dragoş Ionescu

Software Developer / Support

Like what we do? Contact us.

Find the perfect solution service for your business

All solutions are customizable and designed to meet all your needs.

Find the solution

Other posts you will like

No. 1 IoT Platform For Your Vehicle
No. 1 IoT Platform For Your Vehicle
What is a Docker Container?
What is a Docker Container?
What is Geofencing And How Do I Create a Geofence?
What is Geofencing And How Do I Create a Geofence?

STILL HAVE QUESTIONS?

Get in touch with us – We're ready to answer any and all questions.

* Mandatory fields

Email our engineers

We are here to help!