Unable to supply a 1D array of current to the input of the controlled current source block

1 回表示 (過去 30 日間)
Hello,
This is regarding the Simulink Simscape controlled current source block and I face an issue with the current input parmater
I have a 1D array of current supply/demand per second for 608400 timesteps (1x608400 dimension array) in my matlab workspace.
I have a generator and a battery that supplies the demand made by the load. Since I plan to use a 240V system voltage, I am dealing with only current flows to and fro the system.
I am unable to use my current array as an input for the controlled current source block as shows me a dimension error.
I request a solution to this problem or another way of solving it.
I use Matlab version R2020b. I am not sure if this question is asked somewhere, but I hope I get answers for the above problem.
Thanks

採用された回答

Juan Sagarduy
Juan Sagarduy 2021 年 3 月 16 日
Hi Raiyan
I believe that you should use From Workspace blocks. But these need the following format: [time_trace data_trace] so that the temporal aspect is brought to the simulation in addition to the data itself.
Good luck / Juan
  3 件のコメント
Juan Sagarduy
Juan Sagarduy 2021 年 3 月 18 日
Hi Raiyan,
Maybe the link: Create timeseries object - MATLAB (mathworks.com) is what you are looking for.
Then, you can use timeseries as data type in the From Workspace block
/Juan
Raiyan Shaikh
Raiyan Shaikh 2021 年 3 月 18 日
Thank you so much Juan
This works a lot better now

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTroubleshooting についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by