jrive

150 Reputation

5 Badges

2 years, 209 days

MaplePrimes Activity


These are questions asked by jrive

How do I simplify :

Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);
 

so that there are no imaginary terms in the denominator?  

I've tried, 

assum := Rin::real, omega::real, L::real, RL::real, 0 < Rin, 0 < omega, 0 < RL, 0 < L
Zin := Rin + omega*L*I + (omega*L)^2/(RL + omega*L*I);
 
(simplify(Zin) assuming assum);

but this doesn't work.

I'm trying to solve a coupled inductor problem.  All I'm trying to do is solve for the currents (which I could do), then solve for resonance by setting the imaginary part of I1 to 0 and solving for omega.  I then want to plug this resonant frequency back into I1 and evaluate it for some component values and coupling coefficient.

The problem is that even though I define the various variables as real,  Maple doesn't seem to recognize them as such.  I suspect I've failed to define one of them, and that is why it is responding like it is, but I can't find it.  

I'm also getting some weird behavior.....for example if I type :  wres0, I get the value I assigned to it --that's fine.  But then, when I type : wres0/(2*pi), I get an error, "Error, unable to parse 'mverbatim"   --- what does this mean?

This should be a pretty straight forward calculation on Maple, but at this point, I think I may be better off doing it by hand!  I appreciate any help you can provide.  Thank you.

reflected_load.mw

 I can't seem to figure out how to use arctan on a complex number in Maple.  I expect arctan(a+jb) assuming a and b are real to return atan(b/a).  Instead, returns arctan(a+Ib).  How do I do this?

restart

````

assum := R1::real, C1::real, omega::real, vab::real

R1::real, C1::real, omega::real, vab::real

(1)

Pab := expand(rationalize(vab/(R1-I/(omega*C1))))``

vab*omega^2*C1^2*R1/(C1^2*R1^2*omega^2+1)+I*vab*omega*C1/(C1^2*R1^2*omega^2+1)

(2)

Pabmag := `assuming`([abs(Pab)], [assum])

(vab^2*omega^4*C1^4*R1^2/(C1^2*R1^2*omega^2+1)^2+vab^2*omega^2*C1^2/(C1^2*R1^2*omega^2+1)^2)^(1/2)

(3)

Pabang := `assuming`([arctan(Pab)], [assum])

arctan(vab*omega^2*C1^2*R1/(C1^2*R1^2*omega^2+1)+I*vab*omega*C1/(C1^2*R1^2*omega^2+1))

(4)

``

test out how to use arctan....

`assuming`([arctan(a+I*b)], [a::real, b::real])

arctan(a+I*b)

(5)

``

Download complex_power_RC.mw

Hello, 

I use Syrup to solve for the transfer function of a circuit, and in particular, the voltage at a given node.   If I use the "trans" option, the solution generates the expected result, in the expected format.  Syrup solves the differential equations and the resulting time domain equation is as expected.

If I then use the 'AC'  option, I get the result in the s-domain.  I then solve for the step response, and take the inverse Laplace transform.  The solution is given in terms of sinh and cosh.   

If I plot the voltage in either solution as a function of time, the plots are identical.  So, the sinh/cosh solution must be somehow simplifiable so that it "looks" like the time domain solution I get from the transient analysis.
 

restart

with(inttrans)

with(Syrup)NULL

with(DynamicSystems)

interface('displayprecision' = 8)

with(plots)

NULL

assum := R1::real, C1::real, R2::real, C2::real, R1 > 0, R2 > 0, C1 > 0, C2 > 0, t::realvin::real, vin > 0

vin::real, 0 < vin

(1)

ckt := [vin(5), Rm(1.0*10^7), Cm(1.8*10^(-11), ic = 0), `&//`(R1(9.*10^6), C1(1.5*10^(-11), ic = 0)), `&//`(R2(1.*10^6), C2(1.5*10^(-11), ic = 0))]

[vin(5), Rm(10000000.0), Cm(0.1800000000e-10, ic = 0), `&//`(R1(9000000.), C1(0.1500000000e-10, ic = 0)), `&//`(R2(1000000.), C2(0.1500000000e-10, ic = 0))]

(2)

NULL

NULL

ckt1 := [vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

[vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

(3)

Draw(ckt)

Solution doing Transient Analysis

deqs, rest := Solve(ckt, 'tran', 'returnall')

sol1 := dsolve(deqs):

Reassign rest to include the solution.

rest := eval(rest,sol1):

Compute the voltage across the capacitor Cm.

tmp1:=simplify(eval(v[Cm](t), sol1));

(1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t)

(4)

evalf[5]((1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t))

-2.4070*exp(-6389.4*t)+2.5000-0.92993e-1*exp(-45461.*t)

(5)

solve(tmp1=2.5*(1-exp(-1)),t)

p10 := plot(tmp1, t = 0 .. 0.00050000, color = 'blue', linestyle = 'dash')

p10 := plot(tmp1, t = 0 .. 0.5e-3, color = 'blue', linestyle = 'dash')

 

Solution from AC analysis:

sol, rest := Solve(ckt, 'returnall')

vnode2 := eval(v[2], sol)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(7)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(8)

``

NULLNULL

Impulse Response

temp1 := invlaplace(vnode2, s, t)

(1000000/24123)*exp(-(700000/27)*t)*(3*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+473*cosh((100000/459)*t*8041^(1/2)))

(9)

"(->)"

41.454*exp(-25926.*t)*(269.02*sinh(19536.*t)+473.*cosh(19536.*t))

(10)

Step Response

temp2 := invlaplace(vnode2/s, s, t)

5/2-(5/16082)*exp(-(700000/27)*t)*(83*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+8041*cosh((100000/459)*t*8041^(1/2)))

(11)

p1 := plot({temp2, (1-exp(-1))*2.5}, t = 0 .. 0.5e-3)

temp3 := solve(temp2 = (1-exp(-1))*2.5, t)

0.1505875131e-3

(12)

p2 := plot([temp3, temp3], [0, 2.5])

display({p1, p10, p2})

 
   

``

What is going on?  Where are the sinh and cosh terms in the solution coming from and why wont it simplify so that it looks like the other solution if they are identical?  Is there something special I need to do when using the invlaplace function?

Thanks!

Download help_maple.mw

 

 

How (can I?) display the value in a legend in Engineering format -- 10^3, 10^-6, etc?

Lres := 1/((2*Pi*freq)^2*Cres);
ftest := 10e6;
p1 := plot(eval(subs(freq = ftest, Lres)), Cres = 0.10000000 .. 0.10000000, labels = [Cres, 'Lres'], legend = ftest, color = red, title = 'Inductance*Value*as*a*Function*of*Resonant*Capacitance', axis = [gridlines = [default]]);

I would like the legend to display 10^6 rather than 1^7.

I've tried changing the default number format for the whole worksheet to Engineering, but that doesn't seem to apply to legends.

 

thank you.

1 2 3 4 Page 1 of 4