controlsHeaven
controlsHeaven

Reputation: 69

How to format nonlinear constraints of PID design in optimization for python scipy?

I am trying to tune PID controller to satisfy the robustness constraint which is defined by a circle in the Nyquist plot. The result of optimization is optimal PID constants (Kp,Ki,Kd), cost function is -Ki (we are searching for maximum integral gain), and constraint is the robustness circle in the nyquist plot. As summary :

Optimization variables :

x = Kp,Ki,Kd

Cost function :

def costFunPID(x):
    Kp,Ki,Kd = x
    return -Ki

Constraint :

enter image description here

My problem is how to set the constraint function for this problem. More explanation about the method can be found in the article :

https://web.stanford.edu/~boyd/papers/pdf/pid_tuning_ecc.pdf

There is a linearization section for the method but I would like to skip that step by constraining problem with geometrical approach as I think it would be easier.

Thank you in advance

Upvotes: 0

Views: 98

Answers (0)

Related Questions