Skip to content

add numerator degree m to control.pade #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jason-s opened this issue Dec 16, 2015 · 2 comments
Closed

add numerator degree m to control.pade #73

jason-s opened this issue Dec 16, 2015 · 2 comments

Comments

@jason-s
Copy link

jason-s commented Dec 16, 2015

Pade approximants to e^-sT with equal degrees for the numerator and denominator have some undesirable properties, in particular the behavior right at time t=0. Miklós Vajta has a nice paper exploring the effects of using a slightly lower degree for the numerator and it would be helpful to add an optional argument control.pade(T, n=1, m=None) where if m is None, it is set equal to n, otherwise it provides an independent degree for the numerator. (restricted to 0 ≤ m ≤ n).

I am not exactly familiar with the right numerical way to construct polynomials of this type; I have done some exploration by calculating the polynomial coefficients of the Taylor series of degree m+n for e^-sT and then using scipy.misc.pade to compute an nth-degree rational approximant. This seems to work fairly well for small degrees but I suspect it has deficiencies of numerical errors.

Here's some example plots showing the issue for (m,n) = (7,11) and (m,n) = (11,11):

image

image

The equal-degree rational approximation produces lower error after the step begins, but has a lot of oscillation during the delay time; lower degrees in the numerator produce a "quieter" delay, at the cost of a worse approxiation after the step begins.

@jason-s
Copy link
Author

jason-s commented Dec 16, 2015

Hmm, it looks like delay.py isn't doing any fancy matrix math, just expressing the coefficients recursively.

A closed-form solution to (m,n) parameterized Pade approximants to e^A are given in Moler + Van Loan's Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later, we don't need the matrix math here but it does give the coefficients. If I have time to try it out, I'll submit a pull request (I'm not too optimistic about this, though).

roryyorke added a commit to roryyorke/python-control that referenced this issue Jan 4, 2016
…rox.

As suggested by @jason-s in python-control#73

This is a relatively minimal change, and should do no worse and no
better than the previous implementation when numerator and denominator
have equal degree.
@slivingston
Copy link
Member

Closed via pull request #76.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants