MaplePrimes Questions

Hi 

I'm trying to find the equilibrium point by using DynamicSystem package here is my code:

pi := Pi; Cb := 1/(50*((1/1200)*220^2*2)*pi); ipu := 1200*10^6/(220*10^3*sqrt(3)); Fnom := 50; Rc := 0.3e-2*((1/1200)*220^2); Lc := (0.8e-1*((1/1200)*220^2))/(2*pi*Fnom); w := 2*pi*50; cf := 0.74e-1*Cb; scr := .2; z := .8; Ln := (1/1200)*z*sind(80)*220^2/(2*pi*Fnom); Rn := (1/1200)*z*cosd(80)*220^2; wlpll := 200; wb := 2*pi*50; kp1 := 1.27*ipu; kp2 := 1.27*ipu; ki1 := 14.25*ipu; ki2 := 14.25*ipu; kpll := wlpll/(3*wb); Tipll := 3^2/wlpll; kipll := kpll/Tipll; KpP := 1; KpQ := .1; Kp := 50; Kq := 5; wad := 200; Kad := 10; wlpP := 200; wlpv := 10; zv := .8; lv := (1/1200)*zv*sind(80)*220^2/(2*pi*50); rv := (1/1200)*zv*cosd(80)*220^2;
wPLL := kpll*atan2(ucqfT, ucdfT)+kipll*Gpll+w;
icdref := KpP*(u(1)-Pm/(1200*10^6))+Kp*GP; icqref := -KpQ*(u(2)-Vm/(0.17963e6))-Kq*GQ; ucdT := ucd*cos(thetaPLL)+ucq*sin(thetaPLL)-rv*(igd*cos(thetaPLL)+igq*sin(thetaPLL))+wPLL*lv*(igq*cos(thetaPLL)-igd*sin(thetaPLL)); ucqT := ucq*cos(thetaPLL)-ucd*sin(thetaPLL)-rv*(igq*cos(thetaPLL)-igd*sin(thetaPLL))-wPLL*lv*(igd*cos(thetaPLL)+igq*sin(thetaPLL)); Vd_c := ucd*cos(thetaPLL)+ucq*sin(thetaPLL)-w*Lc*icq*cos(thetaPLL)+w*Lc*icd*sin(thetaPLL)+kp1*icdref*ipu-kp1*cos(thetaPLL)*icd-kp1*sin(thetaPLL)*icq+ki1*Gd-Kad*(ucd*cos(thetaPLL)+ucq*sin(thetaPLL)-phid); Vq_c := ucq*cos(thetaPLL)-ucd*sin(thetaPLL)+w*Lc*icd*cos(thetaPLL)+w*Lc*icq*sin(thetaPLL)+kp2*icqref*ipu-kp2*cos(thetaPLL)*icq+kp2*sin(thetaPLL)*icd+ki2*Gq-Kad*(ucq*cos(thetaPLL)-ucd*sin(thetaPLL)-phiq); Vd := cos(thetaPLL)*Vd_c-sin(thetaPLL)*Vq_c; Vq := sin(thetaPLL)*Vd_c+cos(thetaPLL)*Vq_c; Upu := 0.17963e6;
icd := x__1(t); icq := x__2(t); ucd := x__3(t); ucq := x__4(t); igd := x__5(t); igq := x__6(t); Gd := x__7(t); Gq := x__8(t); thetaPLL := x__9(t); Gpll := x__10(t); ucdfT := x__11(t); ucqfT := x__12(t); GP := x__13(t); GQ := x__14(t); phid := x__15(t); phiq := x__16(t); Pm := x__17(t); Vm := x__18(t);
sys1 := [diff(x[1](t), t) = Vd/Lc-ucd/Lc-Rc*icd/Lc+w*icq, diff(x[2](t), t) = Vq/Lc-ucq/Lc-Rc*icq/Lc-w*icd, diff(x[3](t), t) = icd/cf-igd/cf+w*ucq, diff(x[4](t), t) = icq/cf-igq/cf-w*ucd, diff(x[5](t), t) = ucd/Ln-Rn*igd/Ln+w*igq-u__3(t)/Ln, diff(x[6](t), t) = ucq/Ln-Rn*igq/Ln-w*igd, diff(x[7](t), t) = icdref*ipu-icd*cos(thetaPLL)+icq*sin(thetaPLL), diff(x[8](t), t) = icqref*ipu-icq*cos(thetaPLL)-icd*sin(thetaPLL), diff(x[9](t), t) = wb*(kpll*atan2(ucqfT, ucdfT)+kipll*Gpll), diff(x[10](t), t) = atan2(ucqfT, ucdfT), diff(x[11](t), t) = ucdT*wlpll-ucdfT*wlpll, diff(x[12](t), t) = ucqT*wlpll-ucqfT*wlpll, diff(x[13](t), t) = u__1(t)-Pm/(1200*10^6), diff(x[14](t), t) = u__2(t)-Vm/(0.17963e6), diff(x[15](t), t) = wad*(ucd*cos(thetaPLL)+ucq*sin(thetaPLL))-wad*phid, diff(x[16](t), t) = wad*(ucq*cos(thetaPLL)-ucd*sin(thetaPLL))-wad*phiq, diff(x[17](t), t) = wlpP*(igd*ucd+igq*ucq)-wlpP*Pm, diff(x[18](t), t) = wlpv*(ucd^2+ucq^2)^.5-wlpv*Vm, y__1(t) = igd*ucd+igq*ucq, y__2(t) = igd*ucq-igq*ucd];
EquilibriumPoint(sys1, [u__1(t), u__2(t), u__3(t)], initialpoint = [u__1(t) = .97, u__2(t) = 1, u__3(t) = Upu, x[1](t) = 0, x[2](t) = 0, x[3](t) = 0, x[4](t) = 0, x[5](t) = 0, x[6](t) = 0, x[7](t) = 0, x[8](t) = 0, x[9](t) = 0, x[10](t) = 0, x[11](t) = 0, x[12](t) = 0, x[13](t) = 0, x[14](t) = 0, x[15](t) = 0, x[16](t) = 0, x[17](t) = 0, x[18](t) = 0]);

 

but I got this error..

 Error, (in DynamicSystems:-EquilibriumPoint) unable to convert the system to an explicit index 1 form.

anybody faced the same problem?

Thanks,

 

Hey everyone
 

I am trying to create a procedure, which includes a part, where a function is plotted. I want to be able to declare the range of the plot within the procedure parameters as x=range - example when executing: procedureName(function,x=range). I have isolated a small part of the procedure and the different approaches I have tried:

For simplicity's sake let's call the procedure test.

test:=proc(function,{x::range:=0..1})

#I would then like to be able to plot the following:

plot(function,'x'=x);

end proc:
 

However, the single quotes do not prevent x from being evaluated within the procedure, and there interprets the second argument of 'plot' as 0..1=0..1. Another approach I tried was the following:

 

test:=proc(function,{x::range:=0..1})

local xRange:=x;

unassign('x');

plot(function,x=xRange);

end proc:

 

However, I run into the same problem as above - the elements within the single quotes are still evaluted within the procedure. A workaround would be to simply rename the range parameter, for example:

 

test:=proc(function,{xInr::range:=0..1})

plot(function,x=xInr);

end proc:

 

I would really like to be able use x as the parameter, though.

 

Thanks in advance!

Dear Maple users,

I have a big exporession in the form f(s)/g(s) where f and g are polynomial involving irrational coefficients. Both f and g consist of hundreds of terms. One way to get the inverse laplace is to factor the expression and then take the invlaplace.

The code is as follows:

with(inttrans):

p:=factor(f(s)/g(s));

sol:=invlaplace(p,s,t);

I get sol as a function of time, which gives satisfactory result for t=0 but  grows bigger and bigger with increasing value of time. From the limit theorum I see that  Limit (s*f(s)/g(s)) as s--> 0 is finite, which means that the invlaplace is not correct at very large value of time.

What is the error in the process?

Thanks,

 

 

Hi all,

 

I attached a program here and the desire is the calculation of Nu.As you could see through the attached file, the F2(r) function contains an 'integral' which makes it difficult if I want to calculate F2(r=1) and it goes the same for D(F2)(r=\phi). So I firstly corrected the F2(r) function as FF2(r) in which the parameter R is calculated in the top of the file. Afte I replace the values of \phi and 1 in the FF2(r) not in F2(r) just because of the integral. The Nu is calculated finally, but it differs from the initial guess. How could I make a loop in order to correct the initial guess by replacing the first Nu calculated in the end of the program??

Ther is a problem and that is the "k" which must be entered in this part in each loop:

 

Digits:= 10:

K:=Nu->( k )

 

I do not know whether or not it is possible to change it so that the program identify the 'k' and replace it in the "K:=Nu->( k )" for k.

 

SolveCode.mw
 

Download SolveCode.mw

 

Hi,

I am collecting first order terms in psi and phi in the following expression.

Basically I want to keep coefficients for which (power of phi + power of psi) < 2 and ignore the rest.

Here, H, a, psi, phi are all functions, not variabels.

I tried following answer but it doesn't work due to derivatives.

https://www.mapleprimes.com/questions/37228-Ignore-Terms-Above-Particular-Orderpower

(Error, selecting function must return true or false)

Thanks a lot,

Rahul

Dear all

How can I finish the attached code and I plot   the set of points (x[i],y[j], U[i,j]) 

U[i,j] represent the value of U at the position  (x[i],y[j])

Many thanks for your help

Plotsetofpoint.mw

 

Before Maple 2015, units were enlosed in [[ double brackets ]] when displaying 2D input and output. In later versions these brackets are displayed only when editing input, and never in output, which in my opinion detracts from readability. Does anybody know if it is possible to revert to the old behaviour?

Here is my code:

with(DEtools): with(plots): with(linearAlgebra):

DE1 := diff(y(x), x) = d^3*y(x)/dx^3+3*d^2*y(x)/dx^2+4*d*y(x)/dx+12*y(x);

DEplot(DE1, [y(x), x = 0 .. 5][[y(0) = -3, (D(y))(0) = 0, ((D^(2)(y))(0) = 0, ((D^(3)(y))(0)]]);

I get the Error message: Error, (in DEtools/DEplot) called with too few arguments

Any help would be greatly appreciated, thanks.

Hi I have a function i d live to plot and integrate but maple tells me there is a probleme with the range when i want to plot and will not give me a numerical value of the integral :

 

 

What am i doing wrong ??

I am trying to repeat the 'first example' in Stephani & MacCullum, Differential equations see chapter 16 and (16.5).  The differential equation is,

pde := b1(x, y)*(diff(u(x, y), x))+b2(x, y)*(diff(u(x, y), y)) = 0

and I would like to compute DeterminingPDE.  The textbook answer is linear in b1 and b2 (as my 'by hand calculation' is) but Maple's,

DeterminingPDE(pde)

contains quadratic terms such as b1^2, b1*b2 etc.  I don't understand the appearance of the quadratic terms.  Is it possible for Maple to return an answer which is linear in b1 and b2?

In the link below to my worksheet I have attempted to construct the Fourier series for the function 1-x.  I should mention that the I often interchnge the variables x & t (probably a bad habit).  It appears that I am getting something close, but my term for n=0 appears to be undefined.  Given the plot I generated the term for n=0 should be approximately 1/4 to get the base of the triangle to intersect the t or x axis.

So I thought if I can get another set of eyes on my work maybe someone can point out what I have incorrect.

Appreciate any assistance

asymmetric_triangle_fourier_series.mw

I'm learning Maple with the provided user manual, and it clearly says to use ctrl+= to display inline results. It simply doesn't work on  my system. Running Maple 2017.3. Is this a bug?

 

deq := diff(f(z), z$2)-(2*z^2+z-a-1)/z*diff(f(z), z)-((2*a+4)*z+a+1)/(2*z)*f(z):

DETools:-formal_sol(subs(a = .1, deq), f(z), order = 3)[1];
                        1+.5000000000*z+.6845238095*z^2+O(z^3)

evalf[20](DETools:-formal_sol(subs(a = .1, deq), f(z), order = 3)[1]);
                        1.+.50000000000500000000*z+.68452380953750000000*z^2+O(z^3)

The second output is padded to 20 digits, but only the first 10 digits are correct, apparently taking the cached values from the first computation. I think that's really wrong.

Numerical evaluation of HeunBPrime fails if abs(z)>1:

HeunBPrime(.2, .3, .4, .5, 1.5);
Warning, breaking the computation of HeunBPrime after 20000 terms, the series is not converging
                      9.604689581*10^15896

while this gives the correct value:

subs(z = 1.5, convert(series(HeunBPrime(.2, .3, .4, .5, z), z = 0, 40), polynom));
                          15.37195056

 

How can solve system of equations by cramer's rule or LUDecomposition method in maple

First 897 898 899 900 901 902 903 Last Page 899 of 2427