How can i get a fixed value output after giving relatively close variable values

2 ビュー (過去 30 日間)
habib arnab
habib arnab 2019 年 10 月 5 日
回答済み: Pavel Osipov 2019 年 10 月 5 日
My demand is establishing a fixed value in SIMULINK.
Say input is 400,410,440,500,520,540,550 values. I want to get output is 500 value. What logic I have to use?
  1 件のコメント
Daniel M
Daniel M 2019 年 10 月 5 日
Since you have given no constraints this is trivial:
output = 500;
But perhaps you would like to explain your problem a little more clearer.

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

回答 (1 件)

Pavel Osipov
Pavel Osipov 2019 年 10 月 5 日
Hi, everybody. Usually the method of "Half division"is used.
1. Build an input-output table, where the inputs are taken from [a, b] with a large step h, such that the outputs cover the point C=500. Narrow the interval [a, b] so that the response of the Simulink model to input a is less than 500, and the response of the model to input b is more than 500 .
2. Divide [a, b] in half:
d=(b-a)/2;
if the response of the model to the input is less than 500, then a will assign a value of B. otherwise, we will assign a value of B.
3. let's check if a solution to Your problem has been found:
abs (response(a) - response(b) ) < 500 (+/-)*eps, where eps-little.
for example, eps=1e-6;
4. With the new interval [a, b] we proceed as in paragraph 2.
The resulting cycle is performed until we get out of it according to claim 3.
This method is stable and simple, it is used very often.

カテゴリ

Help Center および File ExchangePower and Energy Systems についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by