How do I work with timeseries as input for my model?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I am quite new to the Simulink and Simscape environment and the work with it.
In my model I want to model a rainwater harvesting system. I have daily based precipitation data and demand (outpur) [d^-1]. Between input and output the water tanks and water treatment units are running on a second based time step.
If I create a normal time series with values every 86400 seconds (one day) Simulink interpolates the data for the time steps inbetween and uses them as input, too. Therefore, I have more incoming rain than intended.
Is there a way to conect those two time steps?
Every help or recommendation is appreciated. Thank you.
댓글 수: 0
답변 (1개)
Sebastian Castro
2015년 1월 30일
Hi Joel,
If you're using an Inport block to load the data, there's an "Interpolate data" option that will give you a staircase signal instead of interpolating.
However, why should Simulink's interpolation affect your results? If you are using precipitation data, shouldn't the amount of water falling be accumulated over time with some sort of Integrator block? In that case, it shouldn't really matter whether you sample your signal "too often".
Another thing you can do if you want to avoid additional time steps is to explicitly set the sample time of the input signal to match that of your data. However, I wouldn't necessarily recommend this since you may then have to make the sample times sync up with the rest of your model (depending on what blocks you have).
참고 항목
카테고리
Help Center 및 File Exchange에서 Troubleshooting에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!