AssertSignal

Navigation:  Library > Signal > Signal Processing >

AssertSignal

Previous pageReturn to chapter overviewNext page

Library

Signal\Signal Processing

Use

Domains: Continuous. Size: 1-D. Allowed in: Block Diagrams.

Introduction

The AssertSignal model can be used to test if model gives the correct outcome (test) during a simulation, by comparing it with a known signal (valid). If the difference is smaller than a preset tolerance, the output boolean signal testResult is true. If the difference is larger than the tolerance, the boolean signal testResult becomes false and stays false until the end of the simulation run. In combination with the Scenario Manager you can use this for test automation.

Description - Default

This model compares a test input signal with a valid input signal. If both signals are the same within a given tolerance, the testResult is true:

 

if abs(valid -test) < tolerance

 testresult  = true

 timeAtFailure = -1

else

 testresult  = true

 timeAtFailure = first time when condition failed

Description - Boolean

This model compares a test input signal with a valid input signal. If both signals are the same, the testresult is true:

 

if valid  = test

 testresult  = true

 timeAtFailure = -1

else

 testresult  = true

 timeAtFailure = first time when condition failed

Interface

Inputs

Description

test

 

valid

 

 

Outputs

 

testResult

boolean

timeAtFailure

time at which

 

Parameters

 

tolerance

> 0