Importing data for a Simulink example in MATLAB

5 次查看(过去 30 天)
Hello,
When I type 'power_microgrid' in the MATLAB command window and press enter, I access a Simulink example for a microgrid. Now, I want to know how I can add a dataset of energy consumption by a consumer and a dataset of energy generation by a solar panel to this example so that the simulation can be performed with my data.

回答(1 个)

Udit06
Udit06 2024-8-29
The above example is using a "PreLoadFcn" model callback as shown below:
load('solar_load_data_24h.mat')
The above MAT file contains four 1441x1 column vectors namely "HPD_1min", "HPT_1min", "SPD_1min", "SPT_1min" which are feeded into the model as input data.
You can see the above data being inputted into the model in the "power_microgrid>Scenario" subsystem as shown below:
In order to use your data instead of the example data, you can replace the column vectors that are loaded into the workspace in the example by your data.
I hope this helps.
  1 个评论
SNM Nima
SNM Nima 2024-8-31
Thank you for your assistance. I would like to confirm that the data labeled "HPD_1min", "HPT_1min", "SPD_1min", and "SPT_1min" represent the active and reactive power generated by solar panels and the active and reactive power consumed by loads, respectively, at a one-minute resolution. However, my data is collected at hourly intervals. Would it be feasible to input hourly data for a 24-hour period, specifically the active power, with dimensions of (24x1)? Additionally, I aim to exclude two of the loads from the simulation. Could you please provide guidance on how to accomplish these tasks?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Solar Power 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by