# How to tune the PID parameters using Fuzzy Logic?

Tags:
1. Nov 4, 2014

### MHR-Love

I previously used the Ziegler method to tune the parameters of my PID controller to control my robot's position. I then implemented fuzzy logic for self-tuning the parameters. I have two inputs to the fuzzy logic controller; one is the position error and the error rate.

I know that my problem might be due to not understanding the effect of each parameter very well.

The problem is that I am confused in setting up the fuzzy rules. When do I need to use high and low values for Kp, Kd and Ki to achieve the best tuning? Is it that Kp must be very low when the error is almost zero (hence, the robot is at the desired position)? The same question applies for all of the three parameters.

2. Nov 9, 2014

### Greg Bernhardt

Thanks for the post! Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?

3. Nov 9, 2014

### Baluncore

4. Nov 11, 2014

### MHR-Love

Yes, I've seen it. My problem is more into PID than fuzzy logic. I understand the exact mechanism and logic behind fuzzy logic. My problem is in determining the values that are most suitable for Kp, Ki, and Kd for different error values, putting in mind that I can dynamically change their values while the system is running. For example take this scenario, suppose that the system has reached the desired state and, hence, the error is almost zero, am I to reduce the values of these parameters or increase them for better system response? Another scenario would be when the error is so high, am I to increase the values for the parameters?

5. Nov 12, 2014

### Baluncore

I believe you should start with best guesses for Kp, Ki, and Kd. Then slowly refine those values, possibly using fuzzy logic. Those coefficients should then remain reasonably fixed.

If the difference is high, then the system needs to respond to eliminate that error. It does that by controlling the system through use of stable PID coefficients, not by suddenly changing those coefficients.

The system response is determined by the system's physical characteristics. The PID coefficients are used in the control loop and so in a way characterise the system. If the physical characteristics of the system were to change, such as the mass of a fuel tank, then the fuzzy logic should gradually adapt the PID coefficients to suit the new physical configuration.

6. Nov 12, 2014

### dlgoff

Not to go off topic, but this worked for me when implementing Automatic Generation Control (software PID control) for this (X 3) and the other energy center's generators. And slowly is the key word here.