jrive

150 Reputation

5 Badges

1 years, 284 days

MaplePrimes Activity


These are replies submitted by jrive

@Carl Love  thanks for your help.  Not sure how it works, but "parametric" did the trick.

 

Thanks!

Jorge

 

@acer --this is exactly what I wanted to do.  Great.  - and thanks for raising my awareness about potential roundoff erros due to the combinations of large and small values.

Thank you.

@acer thank you again.!  Let me see if I cna follow what you did in the worksheet....

 

@acer did you mean to attach the  variants you mentioned?

@acer  -- I have a lot of learning to do!

 

Thank you!

Jorge

 

@acer following your previous example, I tried the following: 
 

(C1+C2)^(1/2)/(C1^(1/2)*C2^(1/2)*L1^(1/2))

(16)

``

S1 := sqrt(Ceq) = sqrt(C1)*sqrt(C2)/sqrt(C1+C2)

Ceq^(1/2) = C1^(1/2)*C2^(1/2)/(C1+C2)^(1/2)

(17)

S2 := (1/rhs = 1/lhs)(S1)

(C1+C2)^(1/2)/(C1^(1/2)*C2^(1/2)) = 1/Ceq^(1/2)

(18)

tmp := subs(S2, `ωres`)

(C1+C2)^(1/2)/(C1^(1/2)*C2^(1/2)*L1^(1/2))

(19)

rationalize(tmp)

(C1+C2)^(1/2)/(C1^(1/2)*C2^(1/2)*L1^(1/2))

(20)
>  
 

  I was expecting to be able to get the answer down to  1/(sqrt(Ceq) sqrt(L1)) per the substitutions above.  It would be better still if I could get the final answer to display 1/(sqrt(Ceq L1)).

 

Thanks again!
 

Download new_filter_solution.mw

 

@acer  -- perfect, thank you!!!

@acer thank you.

There's something I don't get...I have three unknowns (assuming C1=C2), so not sure why I can't use the inequality.  I occurs to me I could instead use C1=C2 in the system of equations (restricting the gain to 1)  - maybe that'll work. 

I still need to look at this further, though.   The solution for  R1 results in an imaginary value which shouldn't be the case....

 

Thank you for your help!

@acer what you're seeing are typos when I entered the data on here, since I could not cut and paste it directly from my Maple doc.

Currently, I get this error and have not been able to resolve it, no matter what I try:

sys := {`&omega;res` = 0.1635*10^8*2*Pi, simplify(z3res) = 9 + 0.000150*I, 1 <= abs(vores/vin)}

sol2 := solve(sys, {C1, C2, L1, R1})

Warning, solve may be ignoring assumptions on the input variables.
Error, (in unknown) invalid input: SolveTools:-Inequality expects its 1st argument, eqns, to be of type ({list, set})({`<`, `<=`, `=`}), but received [C2 < 0, And(-(-1+signum(0, C1+C2, 1))*Pi <= Pi, -Pi < -(-1+signum(0, C1+C2, 1))*Pi)]

(I can't figure out how to copy Maple input onto here --the formatting gets all messed up.)  Please see attached file.

Thanks for any pointers!  filter.mw

restart

assume(vin, real)

assume(C1, real)

assume(C2, real)

assume(L1, real)

assume(R1, real)

assume(omega, real)

assume(vin, real)

z1 := R1/((I*omega*C1)*(R1+1/(I*omega*C1)))

-I*R1/(omega*C1*(R1-I/(omega*C1)))

(1)

simplify(-I*R1/(omega*C1*(R1-I/(omega*C1))), 'size')

I*R1/(-R1*omega*C1+I)

(2)

 

 

z2 := z1+I*omega*L1

-I*R1/(omega*C1*(R1-I/(omega*C1)))+I*omega*L1

(3)

z3 := z2/((I*omega*C2)*(z2+1/(I*omega*C2)))

-I*(-I*R1/(omega*C1*(R1-I/(omega*C1)))+I*omega*L1)/(omega*C2*(-I*R1/(omega*C1*(R1-I/(omega*C1)))+I*omega*L1-I/(omega*C2)))

(4)

simplify(-I*(-I*R1/(omega*C1*(R1-I/(omega*C1)))+I*omega*L1)/(omega*C2*(-I*R1/(omega*C1*(R1-I/(omega*C1)))+I*omega*L1-I/(omega*C2))))

(I*C1*L1*R1*omega^2+omega*L1-I*R1)/(-I-C1*C2*L1*R1*omega^3+I*C2*L1*omega^2+R1*(C1+C2)*omega)

(5)

 

voc := vin/((I*omega*C1)*(R1+1/(I*omega*C1)))

-I*vin/(omega*C1*(R1-I/(omega*C1)))

(6)

simplify(-I*vin/(omega*C1*(R1-I/(omega*C1))))

I*vin/(-R1*omega*C1+I)

(7)

zthev := simplify(z1)

I*R1/(-R1*omega*C1+I)

(8)

vounloaded := voc/((I*omega*C2)*(zthev+I*omega*L1+1/(I*omega*C2)))

-vin/(omega^2*C1*(R1-I/(omega*C1))*C2*(I*R1/(-R1*omega*C1+I)+I*omega*L1-I/(omega*C2)))

(9)

simplify(-vin/(omega^2*C1*(R1-I/(omega*C1))*C2*(I*R1/(-R1*omega*C1+I)+I*omega*L1-I/(omega*C2))))

-I*vin/(-I-C1*C2*L1*R1*omega^3+I*C2*L1*omega^2+R1*(C1+C2)*omega)

(10)

simplify(-vin/(omega^2*C1*(R1-I/(omega*C1))*C2*(I*R1/(-R1*omega*C1+I)+I*omega*L1-I/(omega*C2))))

-I*vin/(-I-C1*C2*L1*R1*omega^3+I*C2*L1*omega^2+R1*(C1+C2)*omega)

(11)

 

 

sol1 := solve(Im(vounloaded) = 0, omega)

Warning, solve may be ignoring assumptions on the input variables.

 

0, (C1*C2*L1*(C1+C2))^(1/2)/(C1*C2*L1), -(C1*C2*L1*(C1+C2))^(1/2)/(C1*C2*L1)

(12)

`&omega;res` := sol1[2]

(C1*C2*L1*(C1+C2))^(1/2)/(C1*C2*L1)

(13)

vounloaded

-vin/(omega^2*C1*(R1-I/(omega*C1))*C2*(I*R1/(-R1*omega*C1+I)+I*omega*L1-I/(omega*C2)))

(14)

vores := simplify(subs(omega = `&omega;res`, vounloaded))

-C1*vin/C2

(15)

``

NULL

z3res := simplify(subs(omega = `&omega;res`, z3))

(C1^2*R1-I*(C1*C2*L1*(C1+C2))^(1/2))/C2^2

(16)

simplify((C1^2*R1-I*(C1*C2*L1*(C1+C2))^(1/2))/C2^2)

(C1^2*R1-I*(C1*C2*L1*(C1+C2))^(1/2))/C2^2

(17)

 

sys := {abs(vores/vin) >= 1, `&omega;res` = (0.1356e8*2)*Pi, simplify(z3res) = 9+I*0.150e-3}

{(C1^2*R1-I*(C1*C2*L1*(C1+C2))^(1/2))/C2^2 = 9.+0.150e-3*I, (C1*C2*L1*(C1+C2))^(1/2)/(C1*C2*L1) = 85199992.78, 1 <= abs(C1/C2)}

(18)

``

sol2 := solve(sys, {C1, C2, L1, R1})

Warning, solve may be ignoring assumptions on the input variables.

 

Error, (in unknown) invalid input: SolveTools:-Inequality expects its 1st argument, eqns, to be of type ({list, set})({`<`, `<=`, `=`}), but received [C2 < 0, And(-(-1+signum(0, C1+C2, 1))*Pi <= Pi, -Pi < -(-1+signum(0, C1+C2, 1))*Pi)]

 

sol := sol2[3]

sol2[3]

(19)

R1sol := sol2[4]

sol2[4]

(20)

C1sol := sol2[1]

sol2[1]

(21)

``

Solution

subs(C2 = 0.10e-10, L1sol)

sol2[3]

(22)

subs(C2 = 0.10e-10, R1sol)

sol2[4]

(23)

``

 

@Kitonum thank you.  What did you change to get it to solve for you?  I never was able to get the solution you got; is it because you entered the formulas into sys, as opposed to the variables to which they were assigned?  (eg. you entered 1<=abs(C1/C2, instead of abs(vores/vin)>=1? 

Thanks again

 

1 2 3 Page 3 of 3