필터 지우기
필터 지우기

Initfcn callback wont update during the sensitivity analysis of my model

조회 수: 1 (최근 30일)
Angelo Cheli
Angelo Cheli 2019년 6월 28일
Hello everyone,
I've come across a strange problem concerning the sensitivity analysis tool and the initialization callback of my Simulink model. The initfcn callback uses some of the parameters in the parameter set of the sensitivity analysis session. When I run the sensitivity analysis the callback doesn't see that the parameters are changing, it uses the same values (the default values in the base workspace) for each iteration.
OCVmine, OCVmaxe, lrStarte, lrEnde, me, pOCVmide are the variables in the base workspace that are being varied in the sensitivity analysis and this is my initfcn callback:
[SoCe, Vse] = pwp(OCVmine, OCVmaxe, lrStarte, lrEnde, me, pOCVmide);
set_param([gcs '/Battery/Cell 1'], 'SoC', 'SoCe', 'OCV', 'Vse');
[~, ix] = min(abs(SoCe - lrEnde/100));
Vinitiale = Vse(ix);
The variables are actually changing because the blocks in my model that use them see that they are changing, it's only the callback that doesn't seem to notice.
The top window shows the various samples of the sensitivity analysis session being evaluated, while the bottom window shows the baseworkspace.
Screenshot 2019-06-28 at 20.00.26.png
Does anyone have any clue what may be causing this problem?
Thank you and enjoy your day.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Control Design in Simulink에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by