SimPower Systems and Stateflow
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 ..
0 Kommentare
Antworten (1)
Joel Van Sickel
am 1 Dez. 2020
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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Complex Logic finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!