matlab debounce,Debounce Temporal Properties

matlab debounce,Debounce Temporal PropertiesTemporalOperatorsTheSimulink®DesignVerifier™libraryprovidesthreebasictemporaloperatorblockscanbeusedtomodeltemporalproperties.Theintentofthetemporaloperatorsistosupportthe…

大家好,又见面了,我是你们的朋友全栈君。

Temporal Operators

The Simulink® Design Verifier™ library provides three basic temporal operator blocks can be used to model temporal properties. The intent of the temporal operators is to support the specification of temporal requirements, such that the modeled property has a closer co-relation to the actual textual requirement. These blocks are low-level building blocks for constructing more complex temporal properties.

Debounce Model and Requirements

Consider a debounce logic that debounces between values of 0 and 1 based on the input holding a value for a fixed number of time steps.

The debounce functionality is captured in the containing Stateflow® chart.

open_system(‘sldvdemo_debounce_to’)

open_system(‘sldvdemo_debounce_to/debounce’)

56e4f0795cf35e4d8361ab78e9761491.png

Consider two requirements of the debounce model that you would like to verify.

Requirement 1:

Whenever the input equals 1 for more than 6 steps, the output shall be equal to 2.

Requirement 2:

Whenever the input becomes 0 for more than 5 steps after the output was 2, the output shall equal 1 as long as the input stays at 0.

Property Specification

For specifying Requirement 1, you first represent the constraint that input equals 1 for more than 6 steps. This can be captured by the Detector block from the Temporal Operator Blocks Library. On detecting that the input value is 1 for 7 (or more than 6) time steps, you want to check that the output equals 2 as long as input stays equal to 1 after the detection. Use the “Synchronized” option of the Detector block followed by an Implies block to capture this.

open_system(‘sldvdemo_debounce_to/Verify True Output1’)

831c63f08e426cd8f76a897c5ad4eb78.png

Multiple temporal operator blocks can be combined to construct more complex temporal properties. Consider Requirement 2.

open_system(‘sldvdemo_debounce_to/Verify True Output2’)

3d83642ce91a6ce889855e08445257b1.png

For illustration, this requirement is broken down roughly into three pieces of interest:

After the output was 2: This is an enabling condition for your property. While checking the rest of the constraints, you want to know if this condition was true at some point in the past. This type of an enabling condition is typically followed by an Extender (either “Finite” or “Infinite”) that, in combination with other constraints, might form the first input to your implication.

The input becomes 0 for more than 5 steps and check something as long as input stays 0: For the same reason as the first property, you use a Detector with “Synchronized” output (“Time steps for input detection” = 6).

The output shall equal 1: This is the condition that you want to verify whenever the first two constraints hold. This is captured through a logical Implies block. Note that you cannot use Within Implies block here.

Property Proving

Once the temporal requirements have been modeled, you can perform property proving on these using Simulink Design Verifier.

Clean Up

To complete the example, close all the opened models.

close_system(‘sldvdemo_TOBlocks’,0);

close_system(‘sldvdemo_debounce_to’,0);

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/151555.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 手机APP测试(测试点、测试流程、功能测试)

    手机APP测试(测试点、测试流程、功能测试)1、功能测试1.1启动APP安装完成后,是否可以正常打开,稳定运行APP的速度是可以让人接受,切换是否流畅网络异常时,应用是否会崩溃:在请求超时的情况下,如果程序逻辑处理的不好,就有可能发生

    2022年7月3日
    28
  • LoadRunner11激活成功教程方法

    LoadRunner11激活成功教程方法LoadRunner11激活成功教程方法一、覆盖激活成功教程文件首先请下载LoadRunner激活成功教程文件,解压后将lm70.dll,mlr5lprg.dll覆盖LoadRunner11安装目录bin目录下的相应文件,我的目录是C:ProgramFiles\HPLoadRunner\bin,具体目录地址请根据自己安装路径来定。二、使用LoadRunner11序列号1.打开LoadRunner,点击co…

    2022年7月22日
    14
  • mysql数据库double类型_timestamp是什么数据类型

    mysql数据库double类型_timestamp是什么数据类型1、整型MySQL数据类型含义(有符号)tinyint(m)1个字节范围(-128~127)smallint(m)2个字节范围(-32768~32767)mediumint(m)3个字节范围(-8388608~8388607)int(m)4个字节范围(-2147483648~2147483647)bigint(m)8个字节范围(+-9.22*10的18次方)取值范围如果加了un…

    2022年9月20日
    0
  • C语言-链表排序_单链表的排序c语言

    C语言-链表排序_单链表的排序c语言C语言-链表排序题目描述已有a、b两个链表,每个链表中的结点包括学号、成绩。要求把两个链表合并,按学号升序排列。输入第一行,a、b两个链表元素的数量N、M,用空格隔开。接下来N行是a的数据然后M行是b的数据每行数据由学号和成绩两部分组成输出按照学号升序排列的数据样例输入235100689382495210样例输出210382…

    2022年10月11日
    0
  • python lambda表达式举例_Python中lambda表达式[通俗易懂]

    python lambda表达式举例_Python中lambda表达式[通俗易懂]一、lambda表达式形式lambda后面跟一个或多个参数,紧跟一个冒号,以后是一个表达式。冒号前是参数,冒号后是返回值。lambda是一个表达式而不是一个语句。lambda表达式可以出现在Python语法不允许def出现的地方。lambda表达式返回一个值。二、与def的区别lambda用来编写简单的函数,不会再重复利用的函数。而def用来处理强大的任务。三、举例1、fun=lambdax…

    2022年10月10日
    0
  • JS获取html对象的几种方式说明

    document.getElementById("zx");通过ID获取html元素对象,ID号在html文档当中应该是唯一的。返回的是唯一element对象。并且所有浏览器都兼容

    2021年12月20日
    46

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号