How can I make a power load which uses different power for a day?
조회 수: 3 (최근 30일)
이전 댓글 표시
I want to make a power load which consumes different power for a day. I have a data that shows how much power was consumed by a building for a day.
So I used Dynamic load block, but I failed to load the data to the block.
How can I make it?
댓글 수: 2
Yeow Yu Leong
2024년 8월 6일
I would suggest you to insert your data in Workspace and so that matlab will send the data to your simulink by using "from workspace" block. Make sure the data in arrray is [time, data], so you will have two columns. The time is based on your step size set in "from workspace" block.
I hope this is helpful, good luck.
답변 (1개)
Umar
2024년 8월 6일
편집: Umar
2024년 8월 6일
Hi @seunghyeon,
Use the From Workspace block ( Workspace block ) to import the power consumption data by preparing your power consumption data in a variable in the Matlab workspace. Add a From Workspace block to your model. Double-click the From Workspace block and specify the variable name containing the power consumption data.Connect the output of the From Workspace block to the input of the Dynamic Load block.
Hope, this answers your question.
댓글 수: 2
Walter Roberson
2024년 8월 6일
Note that From Workspace accepts timeseries object | timetable object | structure | 2-D array | MATLAB expression . The timeseries and timetable options obviously have time encoded in them. Structure objects must be specially coded to have time in them. 2D Arrays and MATLAB expression must be arranged so that the first column is time, and the remaining columns are the values of signals at those times.
Using From Workspace is not suitable for plain blobs of numbers.
Umar
2024년 8월 6일
Hi @Walter Robertson,
That was a good tip, thanks for sharing it with us. Also, highly appreciated.
참고 항목
카테고리
Help Center 및 File Exchange에서 Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!