how to find integral absolute error

90 ビュー (過去 30 日間)
bhanu kiran vandrangi
bhanu kiran vandrangi 2021 年 8 月 8 日
コメント済み: Walter Roberson 2021 年 8 月 8 日
i need to derive a cost function from one of performance indices ( i took IAE as my performance index)
my reference value(steady state) is 7.5 and my output is a function of (t,d,e) where d,e constants vary between (0.1)
how to do the integration to find integral absolute error

採用された回答

Walter Roberson
Walter Roberson 2021 年 8 月 8 日
syms d e t
f(t) = d*exp(-t^2*e)
f(t) = 
reference = 7.5;
final_time = 10
final_time = 10
IAE = int(abs(f(t) - reference), t, 0, final_time)
IAE = 
subs(IAE, [d, e], [1/5, 2/3])
ans = 
  2 件のコメント
bhanu kiran vandrangi
bhanu kiran vandrangi 2021 年 8 月 8 日
thanks
instead of substituting the values of d,e can i use 'IAE' that we got ,as cost function to optimize the values of 'd' , 'e'
Walter Roberson
Walter Roberson 2021 年 8 月 8 日
syms d e t
f(t) = d*exp(-t^2*e)
f(t) = 
reference = 7.5;
final_time = 10
final_time = 10
diff_function = f(t) - reference;
IAE = int(abs(diff_function), t, 0, final_time)
IAE = 
best_d = solve(diff_function,d)
best_d = 
diff_function2 = subs(diff_function, d, best_d)
diff_function2 = 
0
best_e = solve(diff(diff_function2, e), e)
best_e = 
0
best_d = subs(best_d, e, best_e)
best_d = 
best_f = subs(f, [d, e], [best_d, best_e])
best_f(t) = 
Which is to say that for this particular function, f(t), with d and e in that particular relationship to the function, that the best function (smallest IAE) occurs when the function is the constant function equal to the reference value.
The approach used here is the standard calculus approach: the critical points of a function are the points at which the derivative of the function are equal to 0. When the function to be optimized is an integral, then the derivative is the thing that was being integrated... so solve f(t)-reference == 0 for d and e. If the function never equals the reference over the permitted range of d and e, then the best IAE occurs at one of the boundary points.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by