Not simplifying to a usable answer

조회 수: 8 (최근 30일)
Andrew Piotrowski
Andrew Piotrowski 2023년 2월 15일
댓글: Andrew Piotrowski 2023년 2월 16일
I am trying to get matlab to do the number crunching for an operational amplifier that has some parallel impedances.
This is how z1 and z2 are supposed to simplify according to the answer booklet, but matlab isn't simplifying anything. I don't get why it wouldn't as the answer booklet did it by hand somehow. Any advice?
  댓글 수: 4
Andrew Piotrowski
Andrew Piotrowski 2023년 2월 15일
but that's the thing, zeq is not 4*10^5*s+0.25*10^6;
zeq is represenative of the bottom parralel impedance, zeq2 is representative of the top parralel impedance.
1/zeq = 1/(6*10^5) + 1/(1/(4*10^-6*s)) via parrallel rule
z1 = zeq + 4*10^5
which the answer document simplified to 10^11/s/[math] somehow. I am trying to get matlab to do that simplification for me.
Star Strider
Star Strider 2023년 2월 15일
A somewhat different approach yielding a different result —
syms s
Z_1 = 4E+5 + (1E+11/s) / (4E+5 + 0.25E+6/s);
Z_2 = 6E+5 + (27.5E+9/s) / (110E+3 + 0.25E+6/s);
Z = vpa((Z_1+Z_2) / Z_1)
Z = 
Zs = simplify(Z, 500)
Zs = 
Zsf = simplifyFraction(Z)
Zsf = 
[n,d] = numden(Zsf);
Zsf = n / expand(d)
Zsf = 
.

댓글을 달려면 로그인하십시오.

채택된 답변

Paul
Paul 2023년 2월 16일
Hi Andrew,
The answer key for Z1 appears to be incorrect. Also, I don't follow the equations you posted in the question. Anyway, based on the diagram in the comment showing the non-inverting amplifier circuit, I get:
syms s
% elements on "the bottom"
zR2 = sym(400e3); % series resistor impedance
zC1 = 1/s/sym(4)/sym(1e-6); % parallel capacitor impedance
zR1 = sym(600e3); % parallel resistor impedance
% total bottom impedance
Z1 = zR2 + zR1*zC1/(zR1 + zC1)
Z1 = 
% answer key, doesn't match
Z1ans = sym(4e5) + sym(1e11)/s/(sym(4e5) + sym(0.25e6)/s)
Z1ans = 
% elements on "the top", or the feedback
zR2 = sym(600e3);
zC1 = zC1;
zR1 = sym(110e3);
% total top impedance
Z2 = zR2 + zR1*zC1/(zR1 + zC1)
Z2 = 
% answer key, matches
Z2ans = sym(6e5) + sym(27.5e9)/s/(sym(110e3) + sym(0.25e6)/s)
Z2ans = 
% circuit gain, matches the answer key
Z = simplify((Z1 + Z2)/Z1)
Z = 
  댓글 수: 1
Andrew Piotrowski
Andrew Piotrowski 2023년 2월 16일
Your answer seems to make sense.
I am confirming with the prof

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by