Rainflow counting function in Simulink

5 ビュー (過去 30 日間)
Chulhoon Lee
Chulhoon Lee 2020 年 8 月 20 日
回答済み: Kiran Felix Robert 2020 年 8 月 26 日
I want to make modeling Rainflow Counting calculation in Simulink with clock signal.
Below model is simple Rainflow counting model in Simulink by using Matlab Function block.
But, It is not working because it is more data(minimum 3 samples) at starting time to calculate Rainflow counting in Simulink.
Please, let me know how to fix it. Thanks.
Fig. 1) Simulink model
Code. 1) Matlab Function Code in Simulink Model
function [y_range, y_count] = fcn(input, time)
c = rainflow(input, time);
y_range = c(:,2);
y_count = c(:,1);
end
Error 1) Error Message
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Function 'MATLAB Function' (#803. . .), line 3, column 5: "rainflow(input, time)"

回答 (1 件)

Kiran Felix Robert
Kiran Felix Robert 2020 年 8 月 26 日
Hi Chulhoon,
There are a few issues which might cause the above error.
All of those cases are clearly explained with their suggested resolution steps in this answer.
Specifically, for your issue refer to Approach 1 and 2.
Kiran Felix Robert

カテゴリ

Help Center および File ExchangeVibration Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by