How can I add my own electrical supply data to the PEMElectrolysisSystem simulation?

5 ビュー (過去 30 日間)
Raz
Raz 2025 年 1 月 27 日
編集済み: Shivam Gothi 2025 年 2 月 7 日
I have on my workspace my own data of voltage and current that I would like to use as an Electrical Supply for the Electrolyzer. The data is type: double, size: 934906 x 1. I would like to understand how do I use my data and connect it in the Simulink model? I have tried using the 'From Workspace' block after adjusting my data to be in 'timeseries' class, but with no success. I would like to understand what class should my data be in, what block to use and where to connect my inputed data?
Thanks in advance!

回答 (1 件)

Shivam Gothi
Shivam Gothi 2025 年 1 月 28 日
Hello @Raz,
As per my understanding, you are trying to utilise the voltage data stored in the workspace, to power the "Electrolyser" block.
There are different ways to load data from the base workspace using the "From Workspace" block. They are documented in a very well manner in the below attached documentation:
As you have tried with "timeseries" format, I will also follow the similiar approach. I am suggesting one of the methods which you may find usefull to load data from workspace.
In order to demonstrate the method, I have defined the voltage vector having 934906 elements in it. This is a simple sine wave.
%Define the time vector for demo
sampleTime = 0.01;
numSteps = 934906;
time = sampleTime*(0:numSteps-1);
time = time';
%define the Voltage vector for demo
voltage = 100*sin(2*pi/3000*time);
%form the time series data
simin = timeseries(voltage,time);
In order to illustrate the use of "From workspace" block, I have created a blank simulink model with an "electrolyser" block. as shown below:
The waveforms recorded in the scope is:
The blocks added from the library browser are:
You can do the similiar thing for loading electrical current data from workspace. For that purpose, you can use Controlled current source: https://www.mathworks.com/help/sps/powersys/ref/controlledcurrentsource.html
I hope you find this usefull !
  3 件のコメント
Raz
Raz 2025 年 2 月 4 日
At the output of the "mdotH2", did you get a value different than 0?
I have tried my own voltage input and also your example, but get 0 in the hydrogen output...
Do you have any recommendation of what to put as the input to get a value greater than 0?
Thanks in advance!
Shivam Gothi
Shivam Gothi 2025 年 2 月 7 日
編集済み: Shivam Gothi 2025 年 2 月 7 日
Hello @Raz,
I also got a value of "zero" at the output of "mdotH2". As I have not used the block "Electrolyser" before, I will not be able to give any suggestions, but referring to the shipped example, might help you to understand the system better.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSensors and Transducers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by