SimPower Systems and Stateflow
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
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
답변 (1개)
  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.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

