[SciPy-Dev] Pole placement
SUPSI
roberto.bucher at supsi.ch
Sat Dec 6 12:03:40 EST 2014
Pole placement without complex poles is not usable in praxis. Usaually
we put all the poles on the bandwidth circle, chhosing damping factors
to have 3%-5% of overshooting.
At present, I'm using a pole plecement routine combined with a Fortran
wrapper calling the procedures from an old slycot library. This the same
solution implemented in Scicoslab, NSP and I think scilab too.
The good conditioning of the results is demostrated by a set of
practical implementations on real plants in our laboratory at the SUPSI.
Best regards
Roberto
On 12/05/2014 06:43 PM, Irvin Probst wrote:
> Hi all,
> I have finished a new version of a tentative place function for Scipy
> with Yang Tits' algorithm (improvement over KNV method 0), the user
> can choose between both Yang Tits or KNV at runtime (method="YT" or
> method="KNV0"). See http://drum.lib.umd.edu/handle/1903/5598
>
> I think YT is what Slicot uses but this time I played it safe and I
> did not check the source code, this implementation is 100% original
> (with all that it implies regarding bugs...).
>
> Once again only real poles are supported, rough tests show that YT
> gives better conditioning of the eigen vectors of (A-BK) on 50% of my
> tests, KNV 25% and they are equal otherwise. Please not that these are
> only rough tests with dumb random matrices, it is not a claim over the
> respective performances of these algorithms in real life, and I'm
> pretty sure my implementation does not give results as clean as the
> original matlab/fortran code polished over decades does (I plan to
> test that later).
>
> Is there a documentation/tutorial anywhere about what should or should
> not be done when trying to include code into Scipy ? I mean coding
> style, patch format and so on.
>
> Regards.
>
> P.S: I did not attach my code to this email as it is not yet clean
> enough but I would be pleased to send it to anyone who requests it
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yottalab.py
Type: text/x-python
Size: 15577 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dqrdc.f
Type: text/x-fortran
Size: 7099 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dqrsl.f
Type: text/x-fortran
Size: 9141 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dqrsm.f
Type: text/x-fortran
Size: 4769 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hhdml.f
Type: text/x-fortran
Size: 6682 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polmc.f
Type: text/x-fortran
Size: 13929 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssxmc.f
Type: text/x-fortran
Size: 7918 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20141206/40002fcb/attachment-0005.bin>
-------------- next part --------------
python module _wrapper ! in
interface ! in :_wrapper
subroutine ssxmc(n,m,a,na,b,ncont,indcon,nblk,z,wrka,wrk1,wrk2,iwrk,tol,mode)
integer, required,check(shape(a,1)==n),depend(a) :: n=shape(a,1)
integer, required,check(shape(b,1)==m),depend(b) :: m=shape(b,1)
double precision intent(in, out, copy), dimension(na,n) :: a
integer, required,check(shape(a,0)==na),depend(a) :: na=shape(a,0)
double precision intent(in, out, copy), dimension(na,m),depend(na) :: b
integer intent(out) :: ncont
integer intent(out) :: indcon
integer intent(out), dimension(n),depend(n) :: nblk
double precision intent(out), dimension(na,n),depend(na,n) :: z
double precision dimension(n,m),depend(n,m) :: wrka
double precision dimension(m),depend(m) :: wrk1
double precision dimension(m),depend(m) :: wrk2
integer dimension(m),depend(m) :: iwrk
double precision :: tol
integer :: mode
end subroutine ssxmc
subroutine polmc(nm,ng,n,m,a,b,g,wr,wi,z,inc,invr,ierr,jpvt,rm1,rm2,rv1,rv2,rv3,rv4)
integer, optional,check(shape(a,0)==nm),depend(a) :: nm=shape(a,0)
integer, optional ,check(shape(g,0)==ng),depend(g) :: ng=shape(g,0)
integer, optional,check(shape(a,1)==n),depend(a) :: n=shape(a,1)
integer, optional,check(shape(b,1)==m),depend(b) :: m=shape(b,1)
double precision intent(in,out, copy), dimension(nm,n) :: a
double precision intent(in,out, copy), dimension(nm,m),depend(nm) :: b
double precision intent(in,out,copy), dimension(ng,n),depend(n) :: g
double precision dimension(n),depend(n) :: wr
double precision dimension(n),depend(n) :: wi
double precision intent(in,out,copy), dimension(nm,n),depend(nm,n) :: z
integer :: inc
integer dimension(n),depend(n) :: invr
integer intent(out) :: ierr
integer intent(out), dimension(m),depend(m) :: jpvt
double precision dimension(m,m),depend(m,m) :: rm1
double precision dimension(m,*),depend(m) :: rm2
double precision dimension(n),depend(n) :: rv1
double precision dimension(n),depend(n) :: rv2
double precision dimension(m),depend(m) :: rv3
double precision dimension(m),depend(m) :: rv4
end subroutine polmc
end interface
end python module _wrapper
More information about the SciPy-Dev
mailing list