Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Question about the Coverage tool

2 vues (au cours des 30 derniers jours)
Benjamin
Benjamin le 23 Août 2011
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hello,
I have an issue that I don't understand with the Coverage tool.
I am doing a simulation for a converter regulation and I want to test all the different case of my control.
The coverage tool is working pretty well (I have a lot of conditions and relationnal operators) but something strange happened with a saturation block.
To make it simple , I have a ramp starting at -10 and finishing at 10 that is supposed to saturate at 0 and 1. Everything is working fine in my control and I know it always saturate at a moment of my simulation for both low and high saturation.
But when I launch Coverage, all my blocks are green except this saturation block although I know the signal hits the limits.
When I put a scope before and after the saturation block to verify my signal and launch the simulation and Coverage, the signal is exactly what I expect and saturates at 0 and 1, and Coverage makes my block turns green. When I remove the wires of the scope and relaunch everything, the block turns red again ?!?
(in fact the difference happens when I put the wire scope after the limitation)
I don't have any clue why the Coverage tool reacts like that (and also my boss :) ). If anyone knows something about this, don't hesitate and tell me.
(I can't give more details about the simulation, it is confidential work)
Thank you.
Benjamin

Réponses (1)

Joachim Schlosser
Joachim Schlosser le 17 Déc 2011
If the saturation block is eliminated by block reduction, it will not receive coverage data. It might be that the scope block forces the block to be executed at simulation time, thus receiving coverage data. Check out Documentation on Simulink Optimizations and Model Coverage whether that helps.

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by