Peak observer in simulink?

조회 수: 2 (최근 30일)
Murat
Murat 2014년 4월 20일
답변: ZHENGHAN 2019년 12월 28일
hi i want to make a peak observer in Simulink. the system i'm working on is aboıut Fuzzy Logic Parametric Adaptive control. I need to observe the maxima after overshoot then regulate the parameters for Integral and Derivative. then again below the reference i need to observe the minimum so regulate those parameters again. Is there any block in simulink that i can observe? another question, can Matlab Functions send and receive data from workspace in real time? Please help me it's important... the last one the code below is that i wrote to sense the peak but it never goes to the loop it supposed to be... this is the matlab fuction in simulink and in every look it supposed to come this function and do the loops. Please help meeeeeeee
diff = abs(1-y); lambda = 1; while (b == 0) lambda = 1; if (a == 1) lambda = 1; if (y < 1) lambda = 1; elseif (y > 1) a = 2; lambda = 1; end break; end if (a == 2) =>>>>>>>>> it never reaches these loops after here. lambda = 1; if ((diff-fark)>0) lambda = 1; elseif ((diff - fark)<0) a = 3; lambda = fark; end break; end if (a == 3) lambda = 1; if(y > 1) lambda = 1; elseif (y<1) lambda = 1; if ((diff - fark) > 0) lambda = fark; a = 4; end end break; end if ( a == 4) lambda = 1; if (y < 1) lambda = 1; elseif (y > 1) lambda = 1; if ((diff-fark) < 0) lambda = fark; a = 5; end end break; end b = 1; end l = lambda; a_k2 = k2/l; a_beta = l*beta; a_kontrol1 = 0; a_fark = diff; a_kontrol = a; end
thanks for your help in advance.

채택된 답변

Murat
Murat 2014년 4월 20일
the code before i attached here doesn't seem good so i attache the txt file here please help meeeeee

추가 답변 (1개)

ZHENGHAN
ZHENGHAN 2019년 12월 28일
Hello, have you solved this problem? I have the same question to ask.thank you!

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by