dareimert

25 Reputation

3 Badges

6 years, 291 days

MaplePrimes Activity


These are questions asked by dareimert

How do I extract harmonics and plot a spectrum from a piecewise function?
 

The function is "Ia" shown below near the bottom in the "Plot Line Current" section.


 

NULLNULL

NULL

Parm_List := [Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490]

[Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 120*Pi, R = 5, Idc = 22.3, mu = .5490]

(1)

NULL

NULL

Va := sqrt(2)*Vrms*sin(theta)Vmax =  RmsMS phase to neutral voltage

Vb := sqrt(2)*Vrms*sin(theta-2*Pi*(1/3))

Vc := sqrt(2)*Vrms*sin(theta+2*Pi*(1/3))

Vab := Va-Vb

Vbc := Vb-Vc

Vca := Vc-Va

NULL

com0 := rhs(simplify(solve({Vb = Vc, -Pi < theta and theta < 0}, theta, allsolutions))[1]) = -(1/2)*PiNULL

com1 := rhs(simplify(solve({Vc = Va, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/6)*PiNULL

com2 := rhs(simplify(solve({Vb = Vc, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/2)*PiNULL

com3 := rhs(simplify(solve({Va = Vb, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (5/6)*PiNULL

com4 := rhs(simplify(solve({Va = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (7/6)*Pi 

com5 := rhs(simplify(solve({Vb = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (3/2)*Pi 

com6 := rhs(simplify(solve({Va = Vb, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (11/6)*PiNULL

NULL  NULL 

with(plots)

PlotVpn := plot(subs(Vrms = 100, [Va, Vb, Vc]), theta = -(1/2)*Pi .. 3*Pi)

PlotVpp := plot(subs(Vrms = 100, [Vab, Vbc, Vca]), theta = -(1/2)*Pi .. 3*Pi, linestyle = dot, thickness = 1)``

display({PlotVpn, PlotVpp})

 

 

 

 

NULL

NULL

 

plot(subs(Vrms = 100, [Va, Vb, Vc, Vab, Vbc, Vca]), theta = -(1/2)*Pi .. 3*Pi)

 

 

 

 

 

 

 

 

 

The  #1 diode is forward biased and switches on when Va>Vc (Va=Vc). The voltage VD will be equal to Va-Vb until diode #2 turns on when Vc< Vb. Then VD will equal Vc-Vc.

The switching angle for the diodes is given above. If phase control is used all commutation is delayed by the angle α.

NULL``

Without phase delay the average (DC) voltage applied to the laod is the average value of the 6 commutation periods over one cycle:

 

NULL

NULL

Van := sqrt(2)*Erms*sin(theta)Emax =  RmsMS phase to neutral voltage

Vbn := sqrt(2)*Erms*sin(theta-2*Pi*(1/3))

Vcn := sqrt(2)*Erms*sin(theta+2*Pi*(1/3))

NULL

   
Eq1 := Vdo = 6*(int(Van-Vbn, theta = com1 .. com2))/(2*Pi)

Vdo = 3*3^(1/2)*2^(1/2)*Erms/Pi

(2)

 

   

NULL

Eq2 := Vdc = 6*(int(Van-Vbn, theta = com1+alpha .. com2+alpha))/(2*Pi)

Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi

(3)

    

 

Commutation

The switching between diodes can not occur instantaneously because the supply circuit is inductive. Current can not change instantaneously in and inductive circuit.
The transfer of load current from the out-going phase to the incomming phase is accomplshed by a period of symultaneous conduction of the two adjacent diodes the creation of a circulating current between these two phases that resembles short circuit between the two phases.

The circulating current produces equal voltage drop with opposid polarities in each phase. In the out-going phase the drop adds to the soruce voltage and in the incomming phase the drop subtracts from the source voltage. Only the drop in the incomming phase effects the DC output voltage.

NULL

 

NULL

 

 

 

 

During commutation intervil com1 to com2 phases a and c are shorted while Id is transfered from phase c to phase a. During this time voltage Va-Vb minus the voltage drop in a phase caused by the commutation. This voltage drop is 1/2 the Vac voltage.   

`&Delta;e` := 1/2*(Van-Vcn)

(1/2)*2^(1/2)*Erms*sin(theta)-(1/2)*2^(1/2)*Erms*cos(theta+(1/6)*Pi)

(4)

and      Va=Vc at π/6

`&Delta;E__Avg` = 6*(int(`&Delta;e`, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu))/(2*Pi)

`&Delta;E__Avg` = 3*((1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha)+(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha)-(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu)-(1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu))/Pi

(5)

"(=)"

`&Delta;E__Avg` = (3/2)*2^(1/2)*Erms*(cos((1/6)*Pi+alpha)+sin((1/3)*Pi+alpha)-sin((1/3)*Pi+alpha+mu)-cos((1/6)*Pi+alpha+mu))/Pi

(6)

"(=)"

`&Delta;E__Avg` = (3/2)*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-(3/2)*Erms*2^(1/2)*3^(1/2)*cos(alpha)*cos(mu)/Pi+(3/2)*Erms*2^(1/2)*3^(1/2)*sin(alpha)*sin(mu)/Pi

(7)

"(=)"

`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))*3^(1/2)/Pi

(8)

combine(`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))*3^(1/2)/Pi, trig)

`&Delta;E__Avg` = (1/2)*(-3*Erms*2^(1/2)*3^(1/2)*cos(alpha+mu)+3*2^(1/2)*Erms*3^(1/2)*cos(alpha))/Pi

(9)

"(=)"

`&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(10)

NULL

DC output voltage

NULL

V__D = Vdc-`&Delta;E__Avg`

V__D = Vdc-`&Delta;E__Avg`

(11)

subs([Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi, `&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi], V__D = Vdc-`&Delta;E__Avg`)

 

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi+(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(12)

"(->)"

 

V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)+cos(alpha+mu))/Pi

(13)

 

NULL

Equating the intigral of the voltage drop between the phase A and C  to the intigral of the voltage rise across the two phase inductances (thes intigrals represent eqivalent flux).

 

int(Van-Vcn, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu) = int(2*L*omega, theta = 0 .. Id)

2^(1/2)*Erms*cos((1/6)*Pi+alpha)+2^(1/2)*Erms*sin((1/3)*Pi+alpha)-2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu)-2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu) = 2*L*omega*Id

(14)

"(=)"

2^(1/2)*Erms*3^(1/2)*cos(alpha)-2^(1/2)*Erms*3^(1/2)*cos(alpha)*cos(mu)+2^(1/2)*Erms*3^(1/2)*sin(alpha)*sin(mu) = 2*L*omega*Id

(15)

"(=)"

-((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu))*3^(1/2)*2^(1/2)*Erms = 2*L*omega*Id

(16)

``

combine(-((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu))*3^(1/2)*2^(1/2)*Erms = 2*L*omega*Id, trig)

-Erms*2^(1/2)*3^(1/2)*cos(alpha+mu)+2^(1/2)*Erms*3^(1/2)*cos(alpha) = 2*L*omega*Id

(17)

"(->)"

cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms

(18)

"(->)"

cos(alpha+mu) = -(1/3)*3^(1/2)*2^(1/2)*L*omega*Id/Erms+cos(alpha)

(19)

NULL``

``

``

NULL

subs(cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms, V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)+cos(alpha+mu))/Pi)

V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)-(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms)/Pi

(20)

"->"

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-3*L*omega*Id/Pi

(21)

NULL

NULL

``

 

 

 

 

``

NULL

 

``

``

``

``

``

``

``

``

Line Currents

  

``

NULL NULL

 

 

Commutation Intervals

   

``

Plot Line Currents

 

NULL

Ia := piecewise((-Pi)*(1/6)+alpha < theta and theta <= (-Pi)*(1/6)+alpha+mu, Ia__Int1, (-Pi)*(1/6)+alpha+mu <= theta and theta <= (1/6)*Pi+alpha, Ia__Int2, (1/6)*Pi+alpha < theta and theta <= (1/6)*Pi+alpha+mu, Ia__Int3, (1/6)*Pi+alpha+mu < theta and theta <= (1/2)*Pi+alpha, Ia__Int4, (1/2)*Pi+alpha < theta and theta <= (1/2)*Pi+alpha+mu, Ia__Int5, (1/2)*Pi+alpha+mu < theta and theta <= 5*Pi*(1/6)+alpha, Ia__Int6, 5*Pi*(1/6)+alpha < theta and theta <= 5*Pi*(1/6)+alpha+mu, Ia__Int7, 5*Pi*(1/6)+alpha+mu < theta and theta <= 7*Pi*(1/6)+alpha, Ia__Int8, 7*Pi*(1/6)+alpha < theta and theta <= 7*Pi*(1/6)+alpha+mu, Ia__Int9, 7*Pi*(1/6)+alpha+mu < theta and theta <= 3*Pi*(1/2)+alpha, Ia__Int10, 3*Pi*(1/2)+alpha < theta and theta <= 3*Pi*(1/2)+alpha+mu, Ia__Int11, 3*Pi*(1/2)+alpha+mu < theta and theta <= 11*Pi*(1/6)+alpha, Ia__Int12, 11*Pi*(1/6)+alpha < theta and theta <= 11*Pi*(1/6)+alpha+mu, Ia__Int13)                Ib := piecewise((-Pi)*(1/6)+alpha < theta and theta <= (-Pi)*(1/6)+alpha+mu, Ib__Int1, (-Pi)*(1/6)+alpha+mu <= theta and theta <= (1/6)*Pi+alpha, Ib__Int2, (1/6)*Pi+alpha < theta and theta <= (1/6)*Pi+alpha+mu, Ib__Int3, (1/6)*Pi+alpha+mu < theta and theta <= (1/2)*Pi+alpha, Ib__Int4, (1/2)*Pi+alpha < theta and theta <= (1/2)*Pi+alpha+mu, Ib__Int5, (1/2)*Pi+alpha+mu < theta and theta <= 5*Pi*(1/6)+alpha, Ib__Int6, 5*Pi*(1/6)+alpha < theta and theta <= 5*Pi*(1/6)+alpha+mu, Ib__Int7, 5*Pi*(1/6)+alpha+mu < theta and theta <= 7*Pi*(1/6)+alpha, Ib__Int8, 7*Pi*(1/6)+alpha < theta and theta <= 7*Pi*(1/6)+alpha+mu, Ib__Int9, 7*Pi*(1/6)+alpha+mu < theta and theta <= 3*Pi*(1/2)+alpha, Ib__Int10, 3*Pi*(1/2)+alpha < theta and theta <= 3*Pi*(1/2)+alpha+mu, Ib__Int11, 3*Pi*(1/2)+alpha+mu < theta and theta <= 11*Pi*(1/6)+alpha, Ib__Int12, 11*Pi*(1/6)+alpha < theta and theta <= 11*Pi*(1/6)+alpha+mu, Ib__Int13)

 

NULL

NULL

IaPlot := plot(subs([Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490], Ia), theta = -(1/6)*Pi .. 3*Pi)

 

IbPlot := plot(subs([Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490], Ib), theta = -(1/6)*Pi .. 3*Pi)

NULLNULL

NULL

NULL

NULL

NULL

``

``

``

Line Rms Current

   

``

with(OrthogonalSeries)

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``


 

Download Graetz_Bridg7b.mw


 

``Can anyone explain why 'subs' will sbstitute 'a' and 'c' but not 'b' (equations 2.3 and 2.4) in the attached document. 

 

``I have tried everything I can think of but nothing works.

 

If I cut and paste 2.3 and 2.4 to a clean document it works.  I tried coying the whole document t a clean sheet but that does not fix the problem. 

NULLNULL

NULL

Va := sqrt(2)*Vrms*sin(theta)Vmax =  RmsMS phase to neutral voltage

Vb := sqrt(2)*Vrms*sin(theta-2*Pi*(1/3))

Vc := sqrt(2)*Vrms*sin(theta+2*Pi*(1/3))

Vab := Va-Vb

Vbc := Vb-Vc

Vca := Vc-Va

NULL

com1 := rhs(simplify(solve({Vc = Va, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/6)*PiNULL

com2 := rhs(simplify(solve({Vb = Vc, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/2)*PiNULL

com3 := rhs(simplify(solve({Va = Vb, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (5/6)*PiNULL

com4 := rhs(simplify(solve({Va = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (7/6)*Pi 

com5 := rhs(simplify(solve({Vb = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (3/2)*Pi 

com6 := rhs(simplify(solve({Va = Vb, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (11/6)*PiNULL

NULL  NULL 

NULL

NULL

NULL``

NULL

NULL

NULL

 

plot(subs(Vrms = 100, [Va, Vb, Vc, Vab, Vbc, Vca]), theta = 0 .. 3*Pi)

 

 

 

 

The  #1 diode is forward biased and switches on when Va>Vc (Va=Vc). The voltage VD will be equal to Va-Vb until diode #2 turns on when Vc< Vb. Then VD will equal Vc-Vc.

The switching angle for the diodes is given above. If phase control is used all commutation is delayed by the angle α.

NULL``

Without phase delay the average (DC) voltage applied to the laod is the average value of the 6 commutation periods over one cycle:

 

NULL

NULL

Van := sqrt(2)*Erms*sin(theta)Emax =  RmsMS phase to neutral voltage

Vbn := sqrt(2)*Erms*sin(theta-2*Pi*(1/3))

Vcn := sqrt(2)*Erms*sin(theta+2*Pi*(1/3))

NULL

   
Eq1 := Vdo = 6*(int(Van-Vbn, theta = com1 .. com2))/(2*Pi)

Vdo = 3*3^(1/2)*2^(1/2)*Erms/Pi

(1)

 

   

NULL

Eq2 := Vdc = 6*(int(Van-Vbn, theta = com1+alpha .. com2+alpha))/(2*Pi)

Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi

(2)

    

 

Commutation

The switching between diodes can not occur instantaneously because the supply circuit is inductive. Current can not change instantaneously in and inductive circuit.
The transfer of load current from the out-going phase to the incomming phase is accomplshed by a period of symultaneous conduction of the two adjacent diodes the creation of a circulating current between these two phases that resembles short circuit between the two phases.

The circulating current produces equal voltage drop with opposid polarities in each phase. In the out-going phase the drop adds to the soruce voltage and in the incomming phase the drop subtracts from the source voltage. Only the drop in the incomming phase effects the DC output voltage.

NULL

 

 

 

During commutation intervil com1 to com2 phases a and c are shorted while Id is transfered from phase c to phase a. During this time voltage Va-Vb minus the voltage drop in a phase caused by the commutation. This voltage drop is 1/2 the Vac voltage.   

`&Delta;e` := 1/2*(Van-Vcn)

(1/2)*2^(1/2)*Erms*sin(theta)-(1/2)*2^(1/2)*Erms*cos(theta+(1/6)*Pi)

(3)

and      Va=Vc at π/6

`&Delta;E__Avg` = 6*(int(`&Delta;e`, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu))/(2*Pi)

`&Delta;E__Avg` = 3*((1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha)+(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha)-(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu)-(1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu))/Pi

(4)

"(=)"

`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*(cos((1/6)*Pi+alpha)+sin((1/3)*Pi+alpha)-sin((1/3)*Pi+alpha+mu)-cos((1/6)*Pi+alpha+mu))/Pi

(5)

"(=)"

`&Delta;E__Avg` = (3/2)*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-(3/2)*Erms*2^(1/2)*3^(1/2)*cos(alpha)*cos(mu)/Pi+(3/2)*Erms*2^(1/2)*3^(1/2)*sin(alpha)*sin(mu)/Pi

(6)

"(=)"

`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*3^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))/Pi

(7)

combine(`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*3^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))/Pi, trig)

`&Delta;E__Avg` = (1/2)*(-3*3^(1/2)*2^(1/2)*Erms*cos(alpha+mu)+3*2^(1/2)*Erms*3^(1/2)*cos(alpha))/Pi

(8)

"(=)"

`&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(9)

NULL

DC output voltage

NULL

V__D = Vdc-`&Delta;E__Avg`

V__D = Vdc-`&Delta;E__Avg`

(10)

subs([Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi, `&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi], V__D = Vdc-`&Delta;E__Avg`)

 

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi+(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(11)

"(->)"

 

V__D = (3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha)+cos(alpha+mu))/Pi

(12)

 

NULL

Equating the intigral of the voltage drop between the phase A and C  to the intigral of the voltage rise across the two phase inductances (thes intigrals represent eqivalent flux).

 

int(Van-Vcn, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu) = int(2*L*omega, theta = 0 .. Id)

2^(1/2)*Erms*cos((1/6)*Pi+alpha)+2^(1/2)*Erms*sin((1/3)*Pi+alpha)-2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu)-2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu) = 2*L*omega*Id

(13)

"(=)"

2^(1/2)*Erms*3^(1/2)*cos(alpha)-Erms*2^(1/2)*3^(1/2)*cos(alpha)*cos(mu)+Erms*2^(1/2)*3^(1/2)*sin(alpha)*sin(mu) = 2*L*omega*Id

(14)

"(=)"

-Erms*3^(1/2)*2^(1/2)*((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu)) = 2*L*omega*Id

(15)

``

combine(-Erms*3^(1/2)*2^(1/2)*((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu)) = 2*L*omega*Id, trig)

-3^(1/2)*2^(1/2)*Erms*cos(alpha+mu)+2^(1/2)*Erms*3^(1/2)*cos(alpha) = 2*L*omega*Id

(16)

"(->)"

cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms

(17)

"(->)"

cos(alpha+mu) = -(1/3)*3^(1/2)*2^(1/2)*L*omega*Id/Erms+cos(alpha)

(18)

NULL``

``

``

NULL

subs(cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms, V__D = (3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha)+cos(alpha+mu))/Pi)

V__D = (3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha)-(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms)/Pi

(19)

"->"

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-3*L*omega*Id/Pi

(20)

NULL

NULL

``

 

 

 

 

``

NULL

 

``

``

``

``

``

``

``

``

Line Currents

  

``

NULL

NULL

 

A phase current intervals

   

NULL

NULL

RMS Current Line

 

Using*A*Phase*current

Using*A*Phase*current

(2.1)

NULL

I__RMS = sqrt(A/Pi)

I__RMS = (A/Pi)^(1/2)

(2.2)

``

A = rhs(A1 = -(3/16)*Erms^2*((-8*cos(mu)*sin(mu)-8*mu+16*sin(mu))*cos(alpha)^2-8*sin(alpha)*(cos(mu)-1)^2*cos(alpha)+4*cos(mu)*sin(mu)-4*mu)/(L^2*omega^2))+rhs(A2 = Idc^2*((2/3)*Pi-mu))+rhs(A3 = (1/4)*(6*(cos(mu)*sin(mu)-2*sin(mu)+mu)*cos(alpha)^2+6*sin(alpha)*(cos(mu)-1)^2*cos(alpha)-3*cos(mu)*sin(mu)+3*mu)*Erms^2/(L^2*omega^2)+Idc*((sin(mu)-mu)*cos(alpha)+sin(alpha)*(cos(mu)-1))*3^(1/2)*2^(1/2)*Erms/(L*omega)+Idc^2*mu)

A = -(3/16)*Erms^2*((-8*cos(mu)*sin(mu)-8*mu+16*sin(mu))*cos(alpha)^2-8*sin(alpha)*(cos(mu)-1)^2*cos(alpha)+4*cos(mu)*sin(mu)-4*mu)/(L^2*omega^2)+Idc^2*((2/3)*Pi-mu)+(1/4)*(6*(cos(mu)*sin(mu)-2*sin(mu)+mu)*cos(alpha)^2+6*sin(alpha)*(cos(mu)-1)^2*cos(alpha)-3*cos(mu)*sin(mu)+3*mu)*Erms^2/(L^2*omega^2)+Idc*((sin(mu)-mu)*cos(alpha)+sin(alpha)*(cos(mu)-1))*3^(1/2)*2^(1/2)*Erms/(L*omega)+Idc^2*mu

(2.3)

subs((-8*cos(mu)*sin(mu)-8*mu+16*sin(mu))*cos(alpha)^2-8*sin(alpha)*(cos(mu)-1)^2*cos(alpha)+4*cos(mu)*sin(mu)-4*mu = a, (6*(cos(mu)*sin(mu)-2*sin(mu)+mu))*cos(alpha)^2+6*sin(alpha)*(cos(mu)-1)^2*cos(alpha)-3*cos(mu)*sin(mu)+3*mu = b, (sin(mu)-mu)*cos(alpha)+sin(alpha)*(cos(mu)-1) = c, A = -(3/16)*Erms^2*((-8*cos(mu)*sin(mu)-8*mu+16*sin(mu))*cos(alpha)^2-8*sin(alpha)*(cos(mu)-1)^2*cos(alpha)+4*cos(mu)*sin(mu)-4*mu)/(L^2*omega^2)+Idc^2*((2/3)*Pi-mu)+(1/4)*(6*(cos(mu)*sin(mu)-2*sin(mu)+mu)*cos(alpha)^2+6*sin(alpha)*(cos(mu)-1)^2*cos(alpha)-3*cos(mu)*sin(mu)+3*mu)*Erms^2/(L^2*omega^2)+Idc*((sin(mu)-mu)*cos(alpha)+sin(alpha)*(cos(mu)-1))*3^(1/2)*2^(1/2)*Erms/(L*omega)+Idc^2*mu)

A = -(3/16)*Erms^2*a/(L^2*omega^2)+Idc^2*((2/3)*Pi-mu)+(1/4)*(6*(cos(mu)*sin(mu)-2*sin(mu)+mu)*cos(alpha)^2+6*sin(alpha)*(cos(mu)-1)^2*cos(alpha)-3*cos(mu)*sin(mu)+3*mu)*Erms^2/(L^2*omega^2)+Idc*c*3^(1/2)*2^(1/2)*Erms/(L*omega)+Idc^2*mu

(2.4)

``

``

``

``

``

``

``

``

``

``

``

``


 

Download subs_failed.mw

I am trying to assess stability from real roots of Eigenvalues that are returned in the RootOf from. I tried allvalues(), evalf() both return the same RootOf list. If memory serves me correctly any square matrix should have and Eigenvalue solution.

Any suggestions?

Eignevalues.mw
 

NULL

with(LinearAlgebra)

Xd := 1.81
Xq := 1.76; Xpd := .3; Xe := .65; re := 0.3e-2; et := 1.0

M := 7; Tdo := 8; Ke := 200; Te := 0.2e-1

Q := -2.7; k := 0.2e-1; m := 1; FORW := 1

D curve PointsPoints      
             
           Pt__a := 0, .66

Pt__b := .56, .55 
Pt__c := .94, .34; Pt__d := 1.0, 0; Pt__h := 1.0, 0; Pt__g := .95, -.311; Pt__f := .59, -.398; Pt__e := 0, -.428
PSS

KSTAB := 9.6

     
TW := 1.4; T1 := .154

T2 := 0.33e-1

P := 1

Q := -.5

eto := abs(et); Ipo := P/eto; Iqo := Q/eto; Eqo := sqrt((Iqo*Xq+eto)^2+(Ipo*Xq)^2); Eo := sqrt((-Ipo*re-Iqo*Xe+eto)^2+(Ipo*Xe-Iqo*re)^2); `sin&delta;o` := (eto*Ipo*(Xq+Xe)-re*Xq*(Ipo^2+Iqo^2)-eto*Iqo*re)/(Eqo*Eo); `cos&delta;o` := (eto*(eto+Iqo*(Xq-Xe)-Ipo*re)-Xe*Xq*(Ipo^2+Iqo^2))/(Eqo*Eo); iqo := (Ipo*(Iqo*Xq+eto)-Iqo*Ipo*Xq)/Eqo; ido := (Ipo^2*Xq+Iqo*(Iqo*Xq+eto))/Eqo; eqo := eto*(Iqo*Xq+eto)/Eqo; edo := iqo*Xq; A := re^2+(Xe+Xpd)*(Xq+Xe); K1 := Eqo*Eo*(re*`sin&delta;o`+(Xe+Xpd)*`cos&delta;o`)/A+iqo*Eo*((Xq-Xpd)*(Xq+Xe)*`sin&delta;o`-re*(Xq-Xpd)*`cos&delta;o`)/A; K2 := re*Eqo/A+iqo*(1+(Xq+Xe)*(Xq-Xpd)/A); K3 := 1/(1+(Xq+Xe)*(Xd-Xpd)/A); K4 := Eo*(Xd-Xpd)*(Xq+Xe)*`sin&delta;o`/A-re*`cos&delta;o`; K5 := edo*Xq*(re*Eo*`sin&delta;o`+(Xe+Xpd)*Eo*`cos&delta;o`)/(eto*A)+eqo*Xpd*(re*Eo*`cos&delta;o`-(Xq+Xe)*Eo*`sin&delta;o`)/(eto*A); K6 := eqo*(1-Xpd*(Xq+Xe)/A)/eto+edo*Xq*re/(eto*A); A4 := Matrix(6, 6, {(1, 1) = 0, (1, 2) = 377, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = -K1/M, (2, 2) = 0, (2, 3) = -K2/M, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (3, 1) = -K4/Tdo, (3, 2) = 0, (3, 3) = -1/(K3*Tdo), (3, 4) = -1/Tdo, (3, 5) = 0, (3, 6) = 0, (4, 1) = K5*Ke/Te, (4, 2) = 0, (4, 3) = K6*Ke/Te, (4, 4) = -1/Te, (4, 5) = Ke/Te, (4, 6) = 0, (5, 1) = -K1*KSTAB*T1/(T2*M), (5, 2) = 0, (5, 3) = -K2*KSTAB*T1/(T2*M), (5, 4) = 0, (5, 5) = -`#mn("1")`/TW, (5, 6) = -(T1+TW)/(T2*TW), (6, 1) = -K1*KSTAB/M, (6, 2) = 0, (6, 3) = -K2*KSTAB/M, (6, 4) = 0, (6, 5) = 0, (6, 6) = -`#mn("1")`/TW}); Eig := Eigenvalues(A4)

allvalues(Eig)

evalf(Eig[1])

RootOf(10000000000*_Z^6+(14285714290*`#mn("1")`+503236834300)*_Z^5+(5102040817*`#mn("1")`^2+718909763500*`#mn("1")`+1193248786000)*_Z^4+(256753486900*`#mn("1")`^2+1704641123000*`#mn("1")`-94259434520000)*_Z^3+(608800401100*`#mn("1")`^2-52350222800000*`#mn("1")`+1273591282000000)*_Z^2+(10698531930000*`#mn("1")`^2+632925408400000*`#mn("1")`+1000000)*_Z+226044788700000*`#mn("1")`^2-10000000)

(1)

``


 

Download Eignevalues.mw
 

 


 

Download Eignevalues.mw

 

 

At the beginning of my work sheet I used the matrix palette to create several matrix. Now when I try to use the palette this is what I get. 

`Matrix(2, 3, {(1, 1) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("1"), Typesetting:-mo(","), Typesetting:-mn("1"))), (1, 2) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("1"), Typesetting:-mo(","), Typesetting:-mn("2"))), (1, 3) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("1"), Typesetting:-mo(","), Typesetting:-mn("3"))), (2, 1) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("2"), Typesetting:-mo(","), Typesetting:-mn("1"))), (2, 2) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("2"), Typesetting:-mo(","), Typesetting:-mn("2"))), (2, 3) = Typesetting:-msub(Typesetting:-mi("n"), Typesetting:-mrow(Typesetting:-mn("2"), Typesetting:-mo(","), Typesetting:-mn("3")))})`

To get a matrix from the palette I have to create it on a new worksheet and cut and past it into the existing work sheet.

What is happening?

How do I access and plot the values from indexed tables QQ vs  PP? 
 


 

``

with(LinearAlgebra)

``

Xd := 1.6Xq := 1.55; Xpd := .32; Xe := .4; re := 0; Xe := .4; et := 1.0

M := 3; Tdo := 6.0; Ke := 5; Te := 0.5e-1

Q := -2.7; k := 0.2e-1; m := 1; FORW := 1; P := k

``

``

while `or`(P < 1.0 and FORW = 1, `and`(k > 0.1e-1, FORW = 0)) do PP[m] := k; P := PP[m]; if FORW = 1 then Q := -2.7 else Q := 3 end if; Test := 0; while `or`(Test = 0 and Q < 3 and FORW = 1, `and`(`and`(Test = 0, k > 0.1e-1), FORW = 0)) do if FORW = 1 then Q := Q+0.1e-1 else Q := Q-0.1e-1 end if; eto := abs(et); Ipo := P/eto; Iqo := Q/eto; Eqo := sqrt((Iqo*Xq+eto)^2+(Ipo*Xq)^2); Eo := sqrt((-Ipo*re-Iqo*Xe+eto)^2+(Ipo*Xe-Iqo*re)^2); `sin&delta;o` := (eto*Ipo*(Xq+Xe)-re*Xq*(Ipo^2+Iqo^2)-eto*Iqo*re)/(Eqo*Eo); `cos&delta;o` := (eto*(eto+Iqo*(Xq+Xe)-Ipo*re)-Xe*Xq*(Ipo^2+Iqo^2))/(Eqo*Eo); iqo := (Ipo*(Iqo*Xq+eto)-Iqo*Ipo*Xq)/Eqo; ido := (Ipo^2*Xq+Iqo*(Iqo*Xq+eto))/Eqo; eqo := eto*(Iqo*Xq+eto)/Eqo; edo := iqo*Xq; A := re^2+(Xe+Xpd)*(Xq+Xe); K1 := Eqo*Eo*(re*`sin&delta;o`+(Xe+Xpd)*`cos&delta;o`)/A+iqo*Eo*((Xq+Xpd)*(Xq+Xe)*`sin&delta;o`-re*(Xq-Xpd)*`cos&delta;o`)/A; K2 := re*Eqo/A+iqo*(1+(Xq+Xe)*(Xq-Xpd)/A); K3 := 1/(1+(Xq+Xe)*(Xd-Xpd)/A); K4 := Eo*(Xd-Xpd)*(Xq+Xe)*`sin&delta;o`/A-re*`cos&delta;o`; K5 := edo*Xq*(re*Eo*`sin&delta;o`+(Xe+Xpd)*Eo*`cos&delta;o`)/(eto*A)+eqo*Xpd*(re*Eo*`cos&delta;o`-(Xq+Xe)*Eo*`sin&delta;o`)/(eto*A); K6 := eqo*(1-Xpd*(Xq+Xe)/A)/eto+edo*Xq*re/(eto*A); A3 := Matrix(4, 4, {(1, 1) = 0, (1, 2) = 377, (1, 3) = 0, (1, 4) = 0, (2, 1) = -K1/M, (2, 2) = 0, (2, 3) = -K2/M, (2, 4) = 0, (3, 1) = -K4/Tdo, (3, 2) = 0, (3, 3) = -1/(K3*Tdo), (3, 4) = 1/Tdo, (4, 1) = -Ke*K5/Te, (4, 2) = 0, (4, 3) = -Ke*K6/Te, (4, 4) = -1/Te}); Eig := Eigenvalues(A3); if `and`(`and`(`and`(Re(Eig[1]) < 0, Re(Eig[2]) < 0), Re(Eig[3]) < 0), Re(Eig[4]) < 0) then Test := 1 else Test := 0 end if end do; if `and`(FORW = 1, Q > 2.8) then m := m-2; k := k-0.2e-1 else QQ[m] := Q end if; m := m+1; if FORW = 1 then k := k+.1 else k := k-.1 end if end do
``

`` 

PP[]; QQ[]; PP[() .. ()]

PP[() .. ()]

(1)

PP[9]; QQ[9]

-.70

(2)

PP()

(table( [( 1 ) = 0.2e-1, ( 2 ) = .12, ( 3 ) = .22, ( 4 ) = .32, ( 5 ) = .42, ( 6 ) = .52, ( 7 ) = .62, ( 9 ) = .82, ( 8 ) = .72, ( 11 ) = 1.02, ( 10 ) = .92 ] ))()

(3)

``

QQ()

(table( [( 1 ) = -.42, ( 2 ) = -.45, ( 3 ) = -.49, ( 4 ) = -.55, ( 5 ) = -.60, ( 6 ) = -.64, ( 7 ) = -.67, ( 9 ) = -.70, ( 8 ) = -.69, ( 11 ) = -.69, ( 10 ) = -.70 ] ))()

(4)

 

 

 

NULL

NULL


 

Download SS_Stability(Ks)_3.mw

1 2 3 Page 2 of 3