Clear Filters
Clear Filters


This question is closed. Reopen it to edit or answer.

How to synchronize between the MATLAB Model and Embedded MATLAB Block use for optimization algorithm coding

1 view (last 30 days)
I have a MATLAB Microgrid power system frequency control model run for 5-sec. where the sampling time is 20e-6 sec. In that model, I sense sense the frequency deviation and implementing PSO-optimization algorithm to reduce the frequency deviation to tune the PID-controller parameters.
I speed of PSO-optimazation depends on the number of particles and iteration. When frequency deviation happens in the model, the optimization algorithm takes sometime to search the optimization value. The model sampling time may different from the search time of optimization algorithm. If both MATLAb-model sampling time and search time of optimization algorithm sampling time are different, then we can't get the optimization value when frequency deviation happens in the MATLAB-model due to optimization algorithm takes some time to search the optimization value. Please, tell me thathow can we make synchronize between the MATLAB model and optimization algorithm at same time. I am waiting for your valuable comments..

Answers (0)

Community Treasure Hunt

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

Start Hunting!