ULP Error Analysis for Floating-Point Simulation Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The use of floating-point data types in computer programs introduces errors such as rounding, cancellation, and mathematical approximation errors, which can accumulate and lead to anomalous or hazardous system behavior in physical systems, highlighting the need for a comprehensive method to evaluate and measure these errors in simulation models.

Innovation Solution

A system and method for evaluating simulation models using floating-point data types, involving an error analysis engine that computes the Unit in Last Place (ULP) error, which includes generating an in-memory intermediate representation of the model, accessing local ULP errors from a data storage structure, and applying rules-based analysis to determine overall ULP errors, with the ability to annotate visual presentations and provide recommendations for reducing errors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If floating-point data types are used in computer programs, then computational flexibility and range are improved, but rounding, cancellation, and mathematical approximation errors are introduced that can accumulate and lead to system failures

Engineering Contradiction:
Improvecomputational flexibilityVSAvoidsystem reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent performs error analysis and ULP error computation during the model compilation and code generation phase, before the actual system execution. By analyzing the intermediate representation of the model and computing expected ULP errors in advance, the system can identify potential error sources and generate warnings or adjustments before deployment, preventing system failures rather than reacting to them afterward.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism where the error analysis engine computes ULP errors and provides information back to the modeler and code generator. This feedback loop allows for iterative refinement of the model and generated code, enabling the system to adjust parameters, change data types, or modify algorithms to reduce floating-point errors while maintaining computational flexibility.

Inventive Principle:
Principle #23Feedback

2Measurement precision

If comprehensive error analysis is performed on simulation models, then measurement precision of errors is improved, but device complexity and analysis time are increased

Engineering Contradiction:
Improveerror measurement precisionVSAvoidanalysis system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts and analyzes only the critical paths and operations within the simulation model that are most likely to generate floating-point errors. Rather than performing exhaustive analysis on every operation, the error analysis engine focuses on extracting and evaluating the intermediate representation of specific computational paths, thereby achieving high measurement precision without requiring complete system complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies different levels of error analysis to different parts of the model based on their error susceptibility. The error analysis engine evaluates ULP errors locally at each computational step and aggregates them, allowing intensive analysis where needed (in critical computations) and lighter analysis elsewhere, thus achieving comprehensive error measurement without uniformly increasing complexity across the entire system.

Inventive Principle:
Principle #3Local quality

3Difficulty of detecting and measuring

If ULP error analysis is performed during model compilation, then error detection capability is improved, but compilation time and processing overhead are increased

Engineering Contradiction:
Improveerror detection capabilityVSAvoidcompilation time
Core Design Contradiction:
Difficulty of detecting and measuringVSLoss of time

Solution Approach 1:

The ULP error analysis is performed during the model compilation phase, which is a preliminary action before code generation and system execution. By completing the error analysis early in the development workflow, the system detects potential errors before they can cause runtime failures, and the analysis results are cached and reused during subsequent code generation, minimizing the impact on overall development time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The error analysis process is segmented into distinct phases: model compilation, intermediate representation generation, ULP error computation, and code generation. Each phase processes only the necessary information for its specific task, avoiding redundant computations. The intermediate representation serves as a segmented structure that enables efficient error analysis without requiring re-parsing of the entire model during code generation.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10936769B2Systems and methods for measuring error in terms of unit in last place
Publication Date: 2021.03.02 MATHWORKS INC
  • US10936769B2 patent drawing
  • US10936769B2 patent drawing
  • US10936769B2 patent drawing

AI summary

Systems and methods evaluate simulation models and measure floating point arithmetic errors in terms of Unit in Last Place (ULP). The simulation model may include model elements that perform numerical computations using Native Floating Point (NFP) arithmetic. The model elements may be arranged to implement a procedure. A data store may include local ULP errors predetermined for the model elements. The systems and methods may retrieve the local ULP errors for the model elements included in the model, and may apply a rules-based analysis to compute an overall ULP error of the simulation model. The systems and methods may present the overall ULP computed for the model. The systems and methods may also present intermediate ULP errors determined for portions of the simulation model. Changes may be made to the model to reduce the overall ULP error.