jrive

185 Reputation

5 Badges

3 years, 228 days

MaplePrimes Activity


These are questions asked by jrive

Not sure what  I did, but now  the typsetting rule assistant pops up every time I executre my document (twice!).  Searching the internet, I found that I should be able to turn it off by "expanding the blocks" (?) and then finding the call to this assistant.  Problem is, I can't find this "Expand block"  -- it is not under View it they claim it is in various posts.  Also, if I step through the worksheet, I can't find it ; it only pops up when I execute the entire worksheet.  I attached it here for someone to guide me on how to find where/why this is happening.

 

Thanks!coupled_network.mw
 

restart

with(Syrup)

interface('displayprecision' = 4)

SyrupDefaults:-infolevel := 1; SyrupDefaults:-subscript_params := true

 

 

Circuit Netlist

 

ckt1

Definitions

 

Cp := 1/(`ω0p`^2*Lp)

1/(`ω0p`^2*Lp)

(1.2.1)

Cs := 1/(`ω0s`^2*Ls)

1/(`ω0s`^2*Ls)

(1.2.2)

M := k*sqrt(Ls*Lp)

k*(Ls*Lp)^(1/2)

(1.2.3)

assumptions := `and`(`and`(`and`(`and`(`and`(`and`(`ω0p` > 0, `ω0s` > 0), Lp > 0), Ls > 0), k > 0), Rp > 0), Rs > 0), omega > 0NULL

0 < `&omega;0p` and 0 < `&omega;0s` and 0 < Lp and 0 < Ls and 0 < k and 0 < Rp and 0 < Rs, 0 < omega

(1.2.4)

NULL

 

Simplifications

 

`&omega;0p` := `&omega;0p`

`&omega;0p`

(1.3.1)

`&omega;0s` := `&omega;0s`

`&omega;0s`

(1.3.2)

Rs := Rs

Rs

(1.3.3)

Rp := Rp

Rp

(1.3.4)

Lp := Lp

Lp

(1.3.5)

Ls := Ls

Ls

(1.3.6)

Not On Resonance

 

 

w := omega

omega

(1.3.1.1)

 

Solve System

 

sol, rest := `assuming`([Solve("ec:ckt1", analysis = ac, 'returnall')], [assumptions])

NULL

Solution

 

 

s := I*w

I*omega

(1.5.1)

vin := eval(v[N03], sol)

vin

(1.5.2)

Secondary Current

I2sol := `assuming`([simplify(eval(i[L2], rest))], [assumptions])

omega^3*k*Ls^(1/2)*Lp^(1/2)*vin/(Lp*Ls*(k-1)*(k+1)*omega^4+I*(Lp*Rs+Ls*Rp)*omega^3+(Ls*(`&omega;0p`^2+`&omega;0s`^2)*Lp+Rp*Rs)*omega^2+I*(-Lp*Rs*`&omega;0p`^2-Ls*Rp*`&omega;0s`^2)*omega-Ls*Lp*`&omega;0p`^2*`&omega;0s`^2)

(1.5.3)

NULL

sol1 := solve(I2sol = I2, k)[1]

(1/2)*(Lp^(1/2)*Ls^(1/2)*vin*omega+(4*I2^2*Lp^2*Ls^2*omega^4-4*I2^2*Lp^2*Ls^2*omega^2*`&omega;0p`^2-4*I2^2*Lp^2*Ls^2*omega^2*`&omega;0s`^2+4*I2^2*Lp^2*Ls^2*`&omega;0p`^2*`&omega;0s`^2-(4*I)*I2^2*Lp^2*Ls*Rs*omega^3+(4*I)*I2^2*Lp^2*Ls*Rs*omega*`&omega;0p`^2-(4*I)*I2^2*Lp*Ls^2*Rp*omega^3+(4*I)*I2^2*Lp*Ls^2*Rp*omega*`&omega;0s`^2-4*I2^2*Lp*Ls*Rp*Rs*omega^2+Lp*Ls*vin^2*omega^2)^(1/2))/(I2*Lp*Ls*omega^2)

(1.5.4)

Coupling

kcoup := `assuming`([simplify(sol1)], [assumptions])

(1/2)*(vin*omega+(-4*(omega+`&omega;0p`)*I2^2*(omega-`&omega;0p`)*((-omega^2+`&omega;0s`^2)*Ls+I*Rs*omega)*Lp-4*(I*(omega+`&omega;0s`)*Rp*I2^2*(omega-`&omega;0s`)*Ls+omega*(I2^2*Rp*Rs-(1/4)*vin^2))*omega)^(1/2))/(Ls^(1/2)*Lp^(1/2)*I2*omega^2)

(1.5.5)

 

Zmutual

Zmutual := `assuming`([expand(abs(vin/I2sol))], [assumptions])

(Lp^2*Ls^2*k^4*omega^8-2*Lp^2*Ls^2*k^2*omega^8+2*Lp^2*Ls^2*k^2*omega^6*`&omega;0p`^2+2*Lp^2*Ls^2*k^2*omega^6*`&omega;0s`^2-2*Lp^2*Ls^2*k^2*omega^4*`&omega;0p`^2*`&omega;0s`^2+Lp^2*Ls^2*omega^8-2*Lp^2*Ls^2*omega^6*`&omega;0p`^2-2*Lp^2*Ls^2*omega^6*`&omega;0s`^2+Lp^2*Ls^2*omega^4*`&omega;0p`^4+4*Lp^2*Ls^2*omega^4*`&omega;0p`^2*`&omega;0s`^2+Lp^2*Ls^2*omega^4*`&omega;0s`^4-2*Lp^2*Ls^2*omega^2*`&omega;0p`^4*`&omega;0s`^2-2*Lp^2*Ls^2*omega^2*`&omega;0p`^2*`&omega;0s`^4+Lp^2*Ls^2*`&omega;0p`^4*`&omega;0s`^4+2*Lp*Ls*Rp*Rs*k^2*omega^6+Lp^2*Rs^2*omega^6-2*Lp^2*Rs^2*omega^4*`&omega;0p`^2+Lp^2*Rs^2*omega^2*`&omega;0p`^4+Ls^2*Rp^2*omega^6-2*Ls^2*Rp^2*omega^4*`&omega;0s`^2+Ls^2*Rp^2*omega^2*`&omega;0s`^4+Rp^2*Rs^2*omega^4)^(1/2)/(omega^3*k*Ls^(1/2)*Lp^(1/2))

(1.5.6)

plot([subs(L = 34*exp(1)-6*omega0 and 34*exp(1)-6*omega0 = 2*Pi*0.85e5, R = 0.1e-1, omega = 2*Pi*85000, Zmutual), subs(L = 0.34e-4, omega0 = 2*Pi*0.85e5, R = 0.1e-1, omega = 2*Pi*79000, Zmutual)], k = 0 .. 1, numpoints = 1000)

plot([subs(Lp = 34*exp(1)-6, Ls = 60*exp(1)-6, omega0 = 2*Pi*85000, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*85000, Zmutual), subs(Lp = 34*exp(1)-6, Ls = 60*exp(1)-6, omega0 = 2*Pi*85000, Rp = 0.1e-1, Rs = 0.1e-1, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*79000, Zmutual)], k = 0 .. 1, numpoints = 1000)

plot(subs(L = 0.34e-4, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, k = .25, Zmutual), omega = 0.79e5 .. 0.90e5, numpoints = 1000)

NULL

Primary Current

I1sol := `assuming`([simplify(eval(i[L1], rest))], [assumptions])

-I*omega*vin*(-Ls*omega^2+`&omega;0s`^2*Ls+I*Rs*omega)/(Lp*Ls*(k-1)*(k+1)*omega^4+I*(Lp*Rs+Ls*Rp)*omega^3+(Ls*(`&omega;0p`^2+`&omega;0s`^2)*Lp+Rp*Rs)*omega^2+I*(-Lp*Rs*`&omega;0p`^2-Ls*Rp*`&omega;0s`^2)*omega-Ls*Lp*`&omega;0p`^2*`&omega;0s`^2)

(1.5.7)

at resonance

I1sol_res := simplify(eval(I1sol, [omega = omega0, `&omega;0s` = omega0, `&omega;0p` = omega0]))

vin*Rs/(Lp*Ls*k^2*omega0^2+Rp*Rs)

(1.5.8)

NULL

Self Impedance

Zpself := simplify(vin/I1sol)

(I*Lp*(k+1)*Ls*(k-1)*omega^4+(-Lp*Rs-Ls*Rp)*omega^3+I*(Ls*(`&omega;0p`^2+`&omega;0s`^2)*Lp+Rp*Rs)*omega^2+(Lp*Rs*`&omega;0p`^2+Ls*Rp*`&omega;0s`^2)*omega-I*Lp*Ls*`&omega;0p`^2*`&omega;0s`^2)/(omega*(-Ls*omega^2+`&omega;0s`^2*Ls+I*Rs*omega))

(1.5.9)

NULL

at resonance

zpself_res := simplify(eval(Zpself, omega = omega0))

(I*Lp*(k+1)*Ls*(k-1)*omega0^4+(-Lp*Rs-Ls*Rp)*omega0^3+I*(Ls*(`&omega;0p`^2+`&omega;0s`^2)*Lp+Rp*Rs)*omega0^2+(Lp*Rs*`&omega;0p`^2+Ls*Rp*`&omega;0s`^2)*omega0-I*Lp*Ls*`&omega;0p`^2*`&omega;0s`^2)/(omega0*(-Ls*omega0^2+`&omega;0s`^2*Ls+I*Rs*omega0))

(1.5.10)

 

Normalized

ZselfN := collect(simplify(`assuming`([expand(simplify(I2sol/I1sol))], [assumptions])), Ls)

I*omega^2*k*Ls^(1/2)*Lp^(1/2)/((-omega^2+`&omega;0s`^2)*Ls+I*Rs*omega)

(1.5.11)

 

Normalized Magnitude

`assuming`([MagZpselfN = simplify(eval(I2sol/I1sol, [`&omega;0p` = omega0, `&omega;0s` = omega0]))], [assumptions])

MagZpselfN = I*omega^2*k*Ls^(1/2)*Lp^(1/2)/(-Ls*omega^2+Ls*omega0^2+I*Rs*omega)

(1.5.12)

Plots

 

Zself as a function of Coupling Coefficient

plot(subs(L = 0.34e-4, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*85000, Zpself/Zmutual), k = 0 .. 1, numpoints = 1000)

plot(subs(Lp = 34*exp(1)-6, Ls = 60*exp(1)-6, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*85000, abs(Zpself/Zmutual)), k = 0 .. 1, numpoints = 1000)

 

Normalized - Off Resonance

plot(subs(L = 0.34e-4, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*79000, Zpself/Zmutual), k = 0 .. 1, numpoints = 1000)

plot(subs(Lp = 34*exp(1)-6, Ls = 60*exp(1)-6, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, omega = 2*Pi*79000, abs(Zpself/Zmutual)), k = 0 .. 1, numpoints = 1000)

 

Normalized, at a given coupling

plot(subs(L = 0.34e-4, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, k = .25, Zpself/Zmutual), omega = 0.79e5 .. 0.90e5, numpoints = 1000)

plot(subs(Lp = 34*exp(1)-6, Ls = 60*exp(1)-6, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, k = .25, abs(Zpself/Zmutual)), omega = 0.79e5 .. 0.90e5, numpoints = 1000)

 

Not Normalized, at a given coupling

plot(subs(Lp = 0.34e-4, Ls = 0.60e-4, omega0 = 2*Pi*0.85e5, Rp = 0.1e-1, Rs = 0.1e-1, R = 0.1e-1, k = .25, abs(Zpself)), omega = 0.79e5 .. 0.90e5, numpoints = 1000)

NULL

 

 

NULL

Solution2

   


 

Download coupled_network.mw

 

I'm trying derive the equation for a matching resistor pad.  In order for me to get a solution (eg for R2), I had to "manually" solve the one equation and then substitute the resulting value in the other.  Why doesn't solve do the same thing?  

restart

NULLeq1 := (R2+Rhi)*R1/(R1+R2+Rhi) = Rlo

(R2+Rhi)*R1/(R1+R2+Rhi) = Rlo

(1)

NULL

eq2 := R1*Rlo/(R1+Rlo)+R2 = Rhi

R1*Rlo/(R1+Rlo)+R2 = Rhi

(2)

``

R1sol := solve(eq2, R1)

-Rlo*(R2-Rhi)/(R2-Rhi+Rlo)

(3)

R2sol := solve(subs(R1 = R1sol, eq1), R2)

(Rhi^2-Rhi*Rlo)^(1/2), -(Rhi^2-Rhi*Rlo)^(1/2)

(4)

restart

NULLeq1 := (R2+Rhi)*R1/(R1+R2+Rhi) = RloNULL

(R2+Rhi)*R1/(R1+R2+Rhi) = Rlo

(5)

 

NULLeq2 := R1*Rlo/(R1+Rlo)+R2 = RhiNULL

R1*Rlo/(R1+Rlo)+R2 = Rhi

(6)

s := `assuming`([solve({eq1, eq2}, {R1, R2})], [`and`(Rhi > 0, Rlo > 0)])

{R1 = RootOf((Rhi-Rlo)*_Z^2-Rhi)*Rlo, R2 = -(RootOf((Rhi-Rlo)*_Z^2-Rhi)*Rhi-RootOf((Rhi-Rlo)*_Z^2-Rhi)*Rlo-Rhi)/(RootOf((Rhi-Rlo)*_Z^2-Rhi)-1)}

(7)
 

``

Download for_help.mw

Given this simplified solution, 

sol1 := (-vin + sqrt(-4*I2^2*R^2 + vin^2))/(2*I2*omega0*L)

how do I bring the denominator back under the radical?

I have solution to system of equations that results (I assign it to) in:

I2sol := -I*omega0*k*L*vin*1/(L^2*k^2*omega0^2 + R^2)

I then try to solve it for k by doing

solve(I2sol = I2, k)

but that doesn't work.  What is the "right" Maple way to rearrange I2 such that the expression is the solution(s) for k?

I can't figure out what Maple is complaining about with this error.  In fact, this is an exact copy/paste from another section in my document that runs fine.  This section, however, generates the error, "Error, missing operator `;`.

I appreciate any help!

for_mapleprimes_help.mw

1 2 3 4 5 6 Page 1 of 6