SimPower Systems and Stateflow

4 次查看(过去 30 天)
Wayne
Wayne 2013-9-9
Greetings,
I am having an issue with Stateflow that has me completely baffled, and I suspect it is related to SimPower Systems.
I have an abc-to-dq SimPowerSystems block - that is feeding a f(u) block, which takes the RMS value. The equation in the f(u) block is sqrt(u(1)^2+u(2)^2)/sqrt(2). That (double) output is being fed into a stateflow block, which does some calculations and changes states based on that value being over a threshold for a certain amount of time. I have that same output feeding a standard scope. The output on the scope looks normal - it fluctuates between .49 and .51. When I view it in Stateflow, it tracks normally, but then for one brief moment the value skyrockets to 193919841805095.500000. Since the Simulink scope reads the data fine but Stateflow does not, this makes me think there is a data type miscommunication. I have tried using standard math blocks instead of the f(u), and I get the same issue (though it is a smaller number, around 8 instead of 1.9 gigazillion). I've tried using a convert block (to double), but that doesn't help.
Any insight here would be appreciated, becasue I am stumped ..

回答(1 个)

Joel Van Sickel
Joel Van Sickel 2020-12-1
The data type will not be randomly changing. There is potentially a bug in the stateflow model or the f(u) block that is hitting overlow or something else.
This answer is part of a MATLAB Answers cleanup effort for unanswered questions that are outstanding.

类别

Help CenterFile Exchange 中查找有关 Complex Logic 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by