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

조회 수: 1 (최근 30일)
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 CenterFile Exchange에서 Power and Energy Systems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by