How can I make a power load which uses different power for a day?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Yeow Yu Leong
am 6 Aug. 2024
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.
Antworten (1)
Umar
am 6 Aug. 2024
Bearbeitet: Umar
am 6 Aug. 2024
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 Kommentare
Walter Roberson
am 6 Aug. 2024
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
am 6 Aug. 2024
Hi @Walter Robertson,
That was a good tip, thanks for sharing it with us. Also, highly appreciated.
Siehe auch
Kategorien
Mehr zu Blocks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!