fix blank bode plot in rootlocus_pid_designer by sawyerbfuller · Pull Request #883 · python-control/python-control
Starts with a small gain rather than zero to insure that the frequency response plots appear. Addresses #686
I tried running this on the example I pointed out in #686 and when I click on the root locus, nothing changes. I then tried the same system in sisotool and that also didn't work. I'm assuming this works for others? Any clues about what I am doing wrong?
Also, why is 0.001 the right initial_gain to use? We have a default value for this (sisotool.initial_gain) that is set to 1. Shouldn't we use that instead?
Also, in looking at the code a bit, I am confused about the fact that the initial gain seems to be set using the Kp0, Ki0, and Kd0 parameters, but then it is reset to 0.001 for the gain that you choose to vary. Should you be able to override this through one of those parameters?
Regarding default gain: for rootlocus-pid-designer, in principle you are already starting with baseline nonzero kd0, kp0, and ki0, and the step responses show result of that. You are interested in any addition delta-k to one of those, so it makes sense to start that one with a small value. But a zero value erases Bose plot. Np.eps is another option but it would make a very low gain bode plot so I picked a kind of arbitrary small nonzero value.
Re non-interactive plot: doesn’t work in Jupiter, have to use magic command %matplotlib qt. Assuming you tried that, can you zoom? The way it works you have to click near one of its pre calculated points. It computes more if you zoom in.
@murrayrm On further thought based on your questions, I realized that a deltaK parameter would be useful needed for non-interactive use, so that the bode plot was usable. Added it in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters