How can I make a power load which uses different power for a day?

1 Ansicht (letzte 30 Tage)
seunghyeon
seunghyeon am 6 Aug. 2024
Kommentiert: Umar am 6 Aug. 2024
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
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.
Umar
Umar am 6 Aug. 2024
Hi @Yeow Yu Leong,
I do agree with your comments.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Umar
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
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
Umar am 6 Aug. 2024
Hi @Walter Robertson,
That was a good tip, thanks for sharing it with us. Also, highly appreciated.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by