How can I use the voltage values taken from the electrical panel as a voltage source in Matlab?

14 次查看(过去 30 天)
Hello, I have Excel output with voltage values taken from any electric panel. The row and column parts contain data with 3457 rows (including headers) as follows. I want to print these voltage measurements to an AC voltage source, but I haven't been able to. Is there any way you can do this?
Excel Example:
Day | L1 | L2 | L3
09.08.2023 21:44:10 | 232,71 | 235,29 | 234
09.08.2023 21:44:35 | 234,67 | 231,37 | 230,16

回答(1 个)

Nihal
Nihal 2024-9-16,8:07
Hey,
According to my understanding you have some data in excel file which you want to use as an input to AC voltage Source.
In order to use the excel data as an AC voltage source you will first have to import it into your MATLAB workspace, then you can use the “From Workspace” block to load data into a “controlled voltage source” block.
Use the following command in MATLAB command window to load data into MATLAB Workspace
>> filename = enter_filename;
>> [num_data, txt_data, raw_data] = xlsread(filename);
>> L1 = num_data(:, 1);
>> L2 = num_data(:, 2);
>> L3 = num_data(:, 3);
>> time = datetime(txt_data)
You can now input voltage values into a controlled voltage source.
Please find below the link to documentation of “From Workspace” block and “Controlled Voltage Source” block.
From Workspace: https://www.mathworks.com/help/simulink/slref/fromworkspace.html
Controlled Voltage Source: https://www.mathworks.com/help/sps/powersys/ref/controlledvoltagesource.html
Please find below the link to a similar question on MATLAB answers which might be helpful.
https://www.mathworks.com/matlabcentral/answers/1952348-importing-voltage-data-to-ac-voltage-source-in-simulink?s_tid=srchtitle

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by