Monte Carlo type of simulation in Simulink using USS block?
古いコメントを表示
Here are the basics - I've got a model with a computed distance between 2 objects. The likelihood that object A will detect object B is a probability dependent on distance (and its a cumulative lognormal curve).
I want to include a probability function based on that computed distance. So that at X meters, the probability of detection is 20%. At Y distance its 50% etc. At each step of the model, the distance will be different, so it needs to redo its random draw from the probability function and output whether or not object B was detected.
I was under the impression that the uncertain state block within the robust control toolbox was the direction to go, but so far I haven't been able to decipher the "help" information to learn how to use and apply it. (And as far as I can understand, it would be ideal b/c I can also run the model varying all the uncertain variables a certain number of times from the command line).
HELP PLEASE!!!
4 件のコメント
Michelle
2012 年 7 月 12 日
Ryan G
2012 年 7 月 12 日
If your model is not state space already I would recommend not going that route. There is a demo showing how to do monte carlo with USS but there are many ways to do it without a state space.
If you can post a screenshot of roughly what you're modeling I can make some recommendations. You can use a service like imgur.com or whatever works for you.
Michelle
2012 年 7 月 13 日
回答 (1 件)
There are Uniform and Normal Random Number blocks in Simulink you can use to create a random draw (assuming you want this to change with each step). You can setup a comparison for random detection (1's and 0's) like this in simulink:
Unfiform Random Number block with minimum set to 0 -> Quantizer with interval set to one
This will output 1's and 0's with 50% chance of either.
To achieve a 20% detection rate you could do copy what's above, set the max of uniform random number to 4 and after the quantizer use a compare to zero block setup as ==0
Since the odds of a zero out of the quantizer should be 1/5 the output of the compare to zero should be true 20% of the time. You can repeat a similar process for any % you want.
2 件のコメント
Michelle
2012 年 7 月 13 日
Ryan G
2012 年 7 月 13 日
In the library under Signal Library there is a multiport switch, which is essentially a selector. The first input to the switch would be the distance selection, ie if distance == 1 choose 1 if distance == 2 choose to, the rest of the inputs would correspond to the random values as described above.
カテゴリ
ヘルプ センター および File Exchange で Uncertain Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!