how to optimize an input variable to a function to obtain a set point output variable?
조회 수: 2 (최근 30일)
이전 댓글 표시
T_in_IC1 = 35;
T_in_DIC = 80;
T_in_a = 120;
[T_out_IC1,T_a_out_IC1] = IC1(m_w1,T_in_IC1,T_in_a);
T_a_in_IC2 = 23*T_a_out_IC1^0.5;
[T_out_IC2,T_a_out_IC2] = IC2(m_w1,T_out_IC1,T_a_in_IC2);
T_a_in_AC = 23*T_a_out_IC2^0.5;
[T_out_DIC] = DIC(m_w2,T_in_DIC,T_a_out_AC);
T_in_AC = T_out_DIC*(m_w1/(m_w1+m_w2)) + T_out_IC2*(m_w1/(m_w1+m_w2));
m_tot = m_w1 +m_w2;
[T_out_AC,T_a_out_AC] = AC(m_tot,T_in_AC, T_a_in_AC);
T_out_AC_sp = 90;
Diff = T_out_AC_sp - T_out_AC;
Basically, I want to write a code which gives me that value of m_tot for which Diff = 0, or close to 0; Also note that the input variables to AC are dependent on IC1,IC2, AND DIC. Also, one of the input to DIC1 is dependent on the output of AC
댓글 수: 0
답변 (1개)
Yogananda Jeppu
2017년 10월 1일
Hi I am not sure I fully understand the question. What are IC1(), IC2() etc. They could be some complicated functions. You can look at fminsearch for any optimization. It works very help. Try the help for this function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!