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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 优化器Optimizer

    目前最流行的5种优化器:Momentum(动量优化)、NAG(Nesterov梯度加速)、AdaGrad、RMSProp、Adam,所有的优化算法都是在原始梯度下降算法的基础上增加惯性和环境感知因素进

    2021年12月30日
  • mysql中phpmyadmin安装教程_安装phpMyAdmin图文教程

    mysql中phpmyadmin安装教程_安装phpMyAdmin图文教程phpmyadmin的安装配置已经是老生常谈的话题了,网络上到处都可以找到相关的配置教程。但是,那些大多都是手动配置的,稍不留神,容易出错。因此站长今天在这里介绍的是,被很多phpmyadmin用户所忽略的phpmyadmin自带的安装程序,下面我们就开始一步一步来安装phpmyadmin。1、首先下载phpmyadmin3.4.11,这是目前最稳定无bug的版本,点击下载2、在你的web根目录新…

    2022年6月1日
  • List初始化、集合复制

    List初始化、集合复制List集合复制User类classUser{privateStringa;privateStringb;}1.通过循环遍历复制List集合List<User>userList=newArrayList<>();Useruser0=newUser(“a0″,”b0”);userList.add(user0);userList.add(newUser(“

    2022年10月22日
  • 十大经典排序算法-快速排序算法详解

    十大经典排序算法-快速排序算法详解一、什么是快速排序1.概念快速排序(QuickSort)是从冒泡排序算法演变而来的,实际上是在冒泡排序基础上的递归分治法。快速排序在每一轮挑选一个基准元素,并让其他比它大的元素移动到数列一边,比它小的元素移动到数列的另一边,从而把数列拆解成了两个部分2.算法原理这是一个无序数列:4、5、8、1、7、2、6、3,我们要将它按从小到大排序。按照快速排序的思想,我们先选择一个基准元素,进行排序我们选取4为我们的基准元素,并设置基准元素的位置为index,设置两个指针left和right,分别指向最左

    2022年7月26日
  • “帮助企业做好MaxCompute成本优化的实践” 主题分享 6月21日 18:30不见不散

    “帮助企业做好MaxCompute成本优化的实践” 主题分享 6月21日 18:30不见不散

    2021年6月5日
  • 搭建自己的git服务器_自建服务器

    搭建自己的git服务器_自建服务器在服务器端:新建一个空git仓库sudogitinit–baresample.gitsudochown-Rgit:gitsample.git在本地:添加remotegitremoteaddmyservergit@server_ip:/path-to-git-repo把本地内容push上去gitadd.gitcommit-m”xxx”…

    2022年10月5日

发表回复

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

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