Peak observer in simulink?

3 次查看(过去 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 中查找有关 Sensors and Transducers 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by