How to design MATLAB Simulink model for easy real time simulation implementation?
6 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Atanda Raji
on 17 Aug 2021
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/
More Answers (1)
Atanda Raji
on 18 Aug 2021
Yes,there are quite useful videos, technical presentation, peer-reviewed papers on their website.
1 Comment
Nagulapati
on 28 Dec 2024
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.
Communities
More Answers in the Power Electronics Control
See Also
Categories
Find more on Electrical Block Libraries in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!