Parfor in simulink linearization

조회 수: 5 (최근 30일)
Alberto Mora
Alberto Mora 2017년 10월 26일
댓글: Hugo Fournier 2023년 2월 13일
I need to compute a huge amount of bode analysis of a system. For this reason, from my script I have a for loop where I linearize my Simulink model, and after that I estimate the bode diagram (frequency response function - FRF). Considering that complessive computational time is quite big, is there a possibility to run this analysis in parallel mode to reduce the computational time? I tried to do it: the problem is that when one worker run a linearization of the model and at the same time another worker run the linearization of the next iteration, the second "linearization" is invalid because the first is running.
  댓글 수: 1
Hugo Fournier
Hugo Fournier 2023년 2월 13일
Hi Alberto,
I have a similar issue trying to linearize several models with Matlab. I have read https://www.mathworks.com/help/slcontrol/ug/batch-linearization-using-linearize.html?s_tid=srchtitle, but there are two main limitations to this approach
1) There does not seem to be a way to perform the batch computations with parallel computation, and the parfor loop does not help either
2) The grids of parameters only includes variations of scalars, not more complicated objects
I would be very interested if someone found a solution to these issues

댓글을 달려면 로그인하십시오.

채택된 답변

Alberto Mora
Alberto Mora 2017년 12월 12일
편집: Alberto Mora 2020년 11월 5일
I found the solution at this (<- removed page) or this reference.
In my own case, the reduction of computational time is about -35%.
  댓글 수: 2
Deukwon Ko
Deukwon Ko 2020년 11월 5일
Can I ask what did you use the command?
Alberto Mora
Alberto Mora 2020년 11월 5일
It seems that the page I wrote was deleted from Mathworks website. Anyhow, have a look to https://www.mathworks.com/help/slcontrol/ug/batch-linearization-using-linearize.html?s_tid=srchtitle or to other articles in the Matwoks website: there are many suggestion about that. Just choose the correct word for the research.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Edric Ellis
Edric Ellis 2017년 10월 30일
Perhaps you can use parsim - this makes it simpler to run Simulink simulations in parallel. As well as the reference page, there is a more detailed example here.
  댓글 수: 1
Alberto Mora
Alberto Mora 2017년 10월 30일
편집: Alberto Mora 2017년 10월 30일
Dear Mr Edric Ellis, I am not sure that is the answer, because I do not run time-simulation, but I just evaluate Frequency Response Function. According to your link, parsim comand is referred to time-simulation.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by