Hi, i have some problem about transfer function calculation it's my code,
Y_5 = R_IN^2*C_F^2*s^2*R_N*R_P - Y_1*B_3*R_IN*C_F*s - R_N*R_M*Y_3*R_IN*C_F*s
Y_6 = R_P*R_M*Y_3*R_IN*C_F*s
Y_8 = B_4*Y_3*R_IN*C_F*s + Y_1*R_N*R_M*R_IN*C_F*s - R_IN^2*C_F^2*s^2*R_N*R_P;
Y_9 = R_P*R_M*Y_3*R_IN*C_F*s;
Y_11 = B_3*Y_1*R_IN*C_F*s + Y_3*R_N*R_M*R_IN*C_F*s - R_IN^2*C_F^2*s^2*R_N*R_P;
Y_12 = R_P*R_M*Y_1*R_IN*C_F*s;
Y_14 = R_IN^2*C_F^2*s^2*R_N*R_P - Y_3*B_3*R_IN*C_F*s - R_N*R_M*Y_1*R_IN*C_F*s;
Y_15 = R_P*R_M*Y_1*R_IN*C_F*s;
P_1 = minreal(Y_6/Y_5);
P_3 = minreal(Y_9/Y_8);
P_5 = minreal(Y_12/Y_11);
P_7 = minreal(Y_15/Y_14);
P_9 = minreal(zpk(P_3/P_1 - P_7/P_5))
P_9_X = minreal(zpk((P_3*P_5 - P_7*P_1)/(P_1*P_5)))
Above transfer function is so complex and, i have got result that P_9 and P_9_X are not equal.
How do i get exact result??

 채택된 답변

John D'Errico
John D'Errico 2017년 11월 22일
편집: John D'Errico 2017년 11월 22일

0 개 추천

You will NEVER get an exact result using floating point computation. NEVER.
If you want exact results, you need to use symbolic computation, so the symbolic toolbox. Or, you need to learn to not need exact results.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 동적 시스템 모델에 대해 자세히 알아보기

질문:

2017년 11월 22일

편집:

2017년 11월 22일

Community Treasure Hunt

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

Start Hunting!