How to design MATLAB Simulink model for easy real time simulation implementation?
5 次查看(过去 30 天)
显示 更早的评论
Hello Everyone!
I am trying to simulate a three phase grid connected inverter for voltage and reactive power control purpose. After my simulation is done I want to implement it in OPAL-RT real time simulation and later do the experiment. My question is how should I design my model so that it is easily implementable in real time simulator and then later for experiment. To be specefic, what sample time I should choose? How much should be switching frequency, using discrete or continous powergui? Also, which solver should I choose? Because all of these parameters can effect the performance of my model especially when implementing on real time simulator.
0 个评论
采纳的回答
Atanda Raji
2021-8-17
You will find the answers to all your questions on the OPAL-RT website. You have to invest time in how to configure the real-time simulator hardware, how to prepare your model, how to detect and resolve overrun time, etc. Visit the site below for more information.
https://www.opal-rt.com/
更多回答(1 个)
Atanda Raji
2021-8-18
Yes,there are quite useful videos, technical presentation, peer-reviewed papers on their website.
1 个评论
Nagulapati
2024-12-28
While building my model with MPC in OPAL-RT environment, I am getting the following error. Can anyone guide me as to why I am getting this error and possible solution.
??? Error using opInitFunction>DisplaySimulinkError (line 466)
??? Simulink error :
Update diagram of Simulink model failed. Please check that the model can run offline in Simulink.
Error using opInitFunction>CompileModel (line 482)
Error evaluating 'InitFcn' callback of MPC block (mask) 'sap_LOsfb_new/SM_LO/MPC Controller'.
Callback string is 'impcblock_InitFcn'
Error in opInitFunction>GenerateModel (line 347)
CompileModel(model);
Error in opInitFunction (line 101)
GenerateModel(action, model, platform, preBuildCmd, postBuildCmd, listSub, StandAloneModel, SlxFormat, compilerVersionName); - Show complete stack trace
Caused by:
Error using opInitFunction>CompileModel (line 482)
Cannot resolve: mpc1. - Show complete stack trace
Error in opInitFunction>CompileModel (line 509)
DisplaySimulinkError(simulink_err);
Error in opInitFunction>GenerateModel (line 347)
CompileModel(model);
Error in opInitFunction (line 101)
GenerateModel(action, model, platform, preBuildCmd, postBuildCmd, listSub, StandAloneModel, SlxFormat, compilerVersionName);
??? Error preparing original model for code separation.
社区
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Electrical Block Libraries 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!