Now you are using a too big value for rmax
-->pf = pfss(h)
 pf  =


       pf(1)

    0.75 - 0.25s
    ------------
               2
     1 - 2s + s

       pf(2)

    0.25
    ----
    1 + s
Some explanation
pfss converts the transfer function to state space representation and then trie to diagonalize the state matrix using the bdiag function

-->S=tf2ss(h);
-->bdiag(S.A)
 ans  =

    1.0000000  - 1.2247449    0.
    0.                  1.                  0.
    0.                  0.               - 1.
You can see with result above that there is a 2 by 2 jordan block (for the eigenvalue 1) which exhibits a coupling between the two states
Now with
-->bdiag(S.A,1/%eps)
ans  =

    1.0000000    0.    0.
    0.                 1.    0.
    0.                 0.  - 1.
 The Jordan block has been broken

[Ab,X]=bdiag(S.A,1/%eps);cond(X)
 ans  =

    5.074D+14
bdiag has broken the jordan block using a singular "base change" so the decomposition is a non-sense.
Serge Steer

Le 21/10/2014 12:07, Tin Nguyen a écrit :
Dear Serge Steer,
Thank you very much for your response. Your code works fine.
However, I still have some problem with this pfss function. For example, I
try to decompose a fractional polynomial that has multi-order poles.
H(z) = 1  /  { (1-s)^2 * (1+s) }

You can find following from my console:
-->s = poly(0,'s');
-->h = 1 / ( (1 + s) * (1 - s)^2)
  h  =
1
     -------------
                  2   3
     1 - s - s + s
-->pf = pfss(h, 1/%eps)
  pf  =
pf(1) - 9420237.9
     -------------
   - 1.0000000 + s
pf(2) 9420237.6
     ---------
     - 1 + s
pf(3) 0.25
     ----
     1 + s

I also checked:
-->pf(1)+pf(2)
  ans  =
0.75 - 0.25s
     ------------
                      2
      1 - 2s + s

I have no idea about this situation.
Can you help me out! Thank you in advance!

--Tin Nguyen

-----Original Message-----
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Serge Steer
Sent: Tuesday, October 14, 2014 6:36 PM
To: users@lists.scilab.org
Subject: Re: [Scilab-users] Problem with partial fraction decomposition
(dfss)

You just need to tune the rmax optionnal parameter pf =
pfss(tf2ss(hz),5);length(pf)

Serge Steer
Le 13/10/2014 10:12, tinnguyen a écrit :
Hi guys,
I'm having trouble using scilab's function pfss to decompose a
polynomial in order to do inverse Z transform. Following is my code:
--> z = poly(0,'z')
--> hz = z^2 / (1 - 6*z + 11*z^2 - 6*z^3) pf = pfss(tf2ss(hz))
--> length(pf)
The fourth command returns '1'. However, I believe it should be 3. I
also did the decomposition manually and got the result as: hz =
0.5/(1-z) + -1 /
(1-2*z) + 0.5/(1-3*z).
Nevertheless, if I change the numerator of hz from z^2 to z or z^3,
pfss works correctly. I definitely have no idea!!!? :D Please take a
look and correct me if i'm wrong.
Thank you so much!




--
View this message in context:
http://mailinglists.scilab.org/Problem-with-partial-fraction-decomposi
tion-dfss-tp4031331.html Sent from the Scilab users - Mailing Lists
Archives mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to