Peak observer in simulink?
显示 更早的评论
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.
采纳的回答
更多回答(1 个)
ZHENGHAN
2019-12-28
0 个投票
Hello, have you solved this problem? I have the same question to ask.thank you!
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!