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

5 views (last 30 days)
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

Answers (1)

Hornett
Hornett on 16 Sep 2024
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

Categories

Find more on Electrical Block Libraries in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!