How do i get exact transfer function calculation?

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
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 中查找有关 동적 시스템 모델 的更多信息

Community Treasure Hunt

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

Start Hunting!