how to debug a property proving counterexample video -凯发k8网页登录
property proving with simulink design verifier™ is a static analysis technique that uses formal methods to prove whether a given property will always be valid. this technique can help you formally verify that specific requirements implemented in your design will always be met. if a property is invalidated, a counterexample will be automatically generated for debugging.
learn how to perform property proving with simulink design verifier and see how to debug an automatically generated counterexample with the model slicer tool from simulink check™.
some requirements are difficult to verify completely through simulation-based tests.
let’s use four requirements for a simplified airplane thrust reverser system to demonstrate. thrust reversers are used to slow the airplane down on the runway after landing.
we need to make sure that the thrust reversers are not deployed during certain unsafe conditions. therefore, there are four safety requirements which define when to prohibit thrust reverser deployment.
notice the use of “shall not” in each requirement? the use of “shall not” in a requirement may indicate that the requirement is difficult to verify completely. how can you be sure you have accounted for unusual conditions?
with simulation-based testing, we would need to create many, many test cases to accomplish this goal, if that is even possible!
this is where property proving can help.
property proving with simulink design verifier is a static analysis technique that uses formal methods to prove whether a given property will always be valid. this technique can help you formally verify that specific requirements implemented in your design will always be met.
this video will walk you through an example which shows you how to use simulink design verifier and the model slicer feature in simulink check to formally verify these four thrust reverser safety requirements and debug an automatically generated counterexample.
this simulink model contains logic defined in a stateflow state chart to determine when to deploy thrust reversers after the airplane has landed.
four properties have been defined to verify the safety requirements; one property per requirement. the properties have been defined in a verification subsystem, which does not generate code. properties can be defined using simulink blocks, stateflow state charts, or matlab code in a matlab function block.
let’s look at the weight-on-wheels requirement’s property as an example. the weight-on-wheels, or “wow”, sensors are used to determine when the airplane is on the ground.
the property description for the wow safety requirement is shown as an annotation in the verification subsystem: “if two wow sensors are false, deploy cannot be true.” in other words, if the airplane is in the air, the thrust reversers should not be deployed.
the wow property definition uses an implies block from the simulink design verifier library. the implies block lets you specify a condition to produce a given response. the assertion block from the simulink model verification library is also used, which lets simulink design verifier know that a property has been defined.
let’s run simulink design verifier in property proving mode to verify that all four of the safety requirements are being met by the design.
simulink design verifier was able to invalidate three of the four properties.
a counterexample test vector for each property violation has been automatically generated for debugging.
counterexamples can be difficult to debug because simulink design verifier will try to find a violation in as few time steps as possible, and the tool does not have any knowledge of what is physically realistic in your overall system.
you need to provide the engineering insight. one way to do this is to use proof assumptions to limit a signal’s range, rate of change, or other characteristics. simulink design verifier will use these assumptions when analyzing the model.
we don’t want to add assumptions quite yet as to not rule anything out.
instead, let’s use model slicer from simulink check to debug a counterexample. let’s start with the wow property.
this is as simple as selecting the assertion block in the wow property subsystem, then clicking “debug” in the design verifier results window.
model slicer is automatically set up to help us step through the counterexample for the wow property.
model slicer allows you to step through a simulation to see which parts of a model are active and what the signal values are during any step within a simulation.
if we step back and then forward through the short counterexample simulation, we can see that there is a specific transient condition wherein a sudden change in the airspeed and wheel speed sensor values can violate the wow requirement. this is an unusual scenario but represents the type of condition which would be difficult to define in a simulation-based test.
after analyzing the counterexamples for the other properties, and by using my own engineering experience designing similar logic, i can see that the design does not adequately account for sudden changes in signal values after landing.
there are many ways we could address this. i’ve decided to add a new requirement which will add a short delay to enable thrust reverser deployment after the appropriate conditions are met. this short delay will not affect the physical performance of the thrust reversers.
let’s open the fixed model and run property proving again.
all set!
this example showed how to use simulink design verifier and model slicer from simulink check to use property proving to analyze safety requirements and debug a counterexample.
you can also link proof objectives to requirements in requirements toolbox to manage verification results for property proving in addition to simulation-based tests.
visit the simulink design verifier product page or the simulink check product page to request a trial.
featured product
simulink design verifier
up next:
related videos:
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)