ilayn / harold

An open-source systems and controls toolbox for Python3
MIT License
173 stars 19 forks source link

bode plot optimal frequency grid selection #6

Closed ilayn closed 7 years ago

ilayn commented 9 years ago

matlab's 4 level of granularity is not optimal for freqresp computation. The scheme that harold implements is quite better but that is also not optimal. Especially when two points of interest are close to each other it doesn't handle well the distinction.

Currently it works as finding the region of interest and increasing the level of detail around the poles and zeros.

This is a pretty academic problem and I'll see if I can convert it to a conference paper. Since we have bokeh based interactive plots, the complexity ~O(n^2+n) is still too expensive. I need to find a way to reduce it further.

If someone has a good implementation with proper analysis of the complexity, I'm all ears.

ilayn commented 7 years ago

Some progress has been made. Instead of bokeh, matplotlib is the default backend. But frequency points reduced significantly (for simple plants around 80 points) without giving away too much from visual smoothness. Will be polished before v.0.1.1 is out.

astrojuanlu commented 7 years ago

Awesome! Looking forward to the release :)