Sort formulas in Mathematica according to derivative or exponential level

I have an impedance equation that I passed to Mathematica in the hope of simplifying it. It is representative of the circuit, and the impedance of the circuit (Z, from V = iZ) is a large part of several terms in the s-plane.

As a shortened example, this might look like this:

 L0s + (R1/(1 + R1 C1 s) + R3b + L3s + V3/s)/(R2a L2a s/(R2a + L2a s))

I would like to modify the data as follows:

k1*s^-1 + k2*s^0 + k3*s^1 ...  

with all values krepresenting redundant data (fractions of different R-, L- and C-values).

What formulas are best used to create these types of structures?
.
.
.
I believe that a function Collectcannot handle the separation of things according to s exponents, even if the equation is simplified, and then ExpandAll-ed due to the level of divisions between members - there are several levels of unresolved fractions.

Being interested in this, I was also curious that if I converted everything into a time domain, can I sort by prime numbers (the number of times based / integrated)?

S c0 + c1 + d/dt*c2 + d^2/dt^2*c3 ...
+3
source share
2 answers

s s^(-1). , , , s==0, . , SeriesCoefficient:

In[80]:= SeriesCoefficient[
 L0*s + (R1/(1 + R1*C1*s) + R3b + L3s + V3/s)/(R2a*
     L2a*(s/(R2a + L2a*s))), {s, 0, n}]

Out[80]= Piecewise[{
          {(R1*((-C1)*R1)^n*(L2a - C1*R1*R2a))/(L2a*R2a), n > 1}, 
          {L0 + (C1*R1^2*(-L2a + C1*R1*R2a))/(L2a*R2a), n == 1}, 
          {((-C1)*R1^2*R2a + L2a*(L3s + R1 + R3b))/(L2a*R2a), n == 0}, 
          {V3/L2a, n == -2}, 
          {(L3s*R2a + R1*R2a + R2a*R3b + L2a*V3)/(L2a*R2a), n == -1}
         }, 0]

, .

+4

. . , , .

myeqn = Expand[L0 s + (R3b + L3 s + V3/s)/(R2a L2a s/(R2a + L2a s))]

:

enter image description here

Select, FreeQ MemberQ k0, k1... :

k0 = Select[myeqn, FreeQ[#, s] &]

enter image description here

:

k1 = Expand[Select[myeqn, MemberQ[#, s] &] 1/s];

km1 = Expand[Select[myeqn, MemberQ[#, 1/s] &] s];

km2 = Expand[Select[myeqn, MemberQ[#, 1/s^2] &] s^2];

True ( , - )

Expand[k0 + k1 s + km1/s + km2/s^2] == myeqn

, :

scoeff = SeriesCoefficient[myeqn, {s, 0, n}];

, ,

k0alt = First@scoeff[[1, 2]] 
+1

Source: https://habr.com/ru/post/1793701/


All Articles