Adaptive PID controller implementation

In summary, the person's code does not match the reference signal, and the derivative gain needs to be set to 1 in order to initialize the values correctly.
  • #1
zoom1
65
0
Hello,

I am trying to implement a simple adaptive PID controller paper. However, I am having some problems which I could not find out due to what..

Paper is the following;
http://www.aedie.org/9CHLIE-paper-send/337_CHAINHO.pdf

Quite simple. Using the Tagaki-Sugeno fuzzy system, in accordance with the error percentage, P and I parameters are adjusted. I implemented everything conforming to the paper. However, my control signal blows up immediately.

I have been looking for days where I am doing wrong but could not find any mistake.

I would really appreciate if you check the simulation files and make comments.

Attached the simulation files.
P.S. initialize.m must be run before running the simulink model.

Thank you.
 

Attachments

  • simulation.zip
    8.9 KB · Views: 300
Engineering news on Phys.org
  • #2
what do you mean by your control system blows up. please provide screen shots or a more detailed explanation
 
  • #3
donpacino said:
what do you mean by your control system blows up. please provide screen shots or a more detailed explanation

Hello,

What I mean is, given reference signal is not tracked as expected.

Here is the reference signal. Just a square wave.
in.png


And the output of the plant as the response (I just limited it to 1 second, it goes with the same fashion up to 10 seconds)
out.png


So the tracking is way out of the reference signal.
 
  • #4
post a screenshot of your code and the model
 
  • #5
donpacino said:
post a screenshot of your code and the model

All the files related to simulation were already attached my first post but anyways here's the screenshot of the model

model.png


Here's the function that runs inside the interpreted MATLAB function block

function [out] = fuzzy(input)

global Kp
global Ki
global v
global nu

if input(1) >= 4 | input(1) <= -4
Kp = Kp + v*input(2)*nu;

elseif (input(1) >= 1 & input(1) < 4) | (input(1) <= -1 & input(1) > -4)
Ki = Ki + v*input(2)*nu;
end

out(1) = Kp;
out(2) = Ki;

end

And those are the initializations;

global Kp
global Ki
global v
global nu

Kp = 0;
Ki = 0;
v = 0.5;
nu = 0.5;
 
  • #6
Why do you set the derivative gain to 1? try setting it to zero
also you initial values for your P and I values should not be zero.

try using zeiger-nicolas to set the initial values, and strip the adaptive part.
once you get that working, add the adaptive portion
 

FAQ: Adaptive PID controller implementation

1. What is an Adaptive PID controller?

An Adaptive PID (Proportional-Integral-Derivative) controller is a type of feedback control system used in engineering and robotics that continuously adjusts its parameters in response to changes in the system it is controlling. This allows it to adapt to varying conditions and improve overall performance.

2. How does an Adaptive PID controller work?

An Adaptive PID controller works by continuously measuring the error between the desired output and the actual output of the system, and then using this error to adjust its parameters. The controller uses a combination of proportional, integral, and derivative actions to minimize the error and maintain stability.

3. What are the advantages of using an Adaptive PID controller?

The main advantage of using an Adaptive PID controller is its ability to adapt to changing conditions, such as system disturbances or varying operating conditions. This allows for more precise and efficient control, leading to improved performance and stability. Additionally, an Adaptive PID controller can often handle complex and nonlinear systems, making it a versatile choice for many applications.

4. How is an Adaptive PID controller implemented?

An Adaptive PID controller is typically implemented using a microcontroller or a digital signal processor (DSP). The controller's parameters are continuously adjusted using a variety of algorithms, such as the recursive least squares (RLS) or least mean squares (LMS) methods. These algorithms use feedback from the system to determine the optimal parameter values for the current conditions.

5. What are some common applications of Adaptive PID controllers?

Adaptive PID controllers are commonly used in industrial automation, robotics, and control systems for various processes, such as temperature, pressure, and flow control. They are also used in automotive and aerospace systems, as well as in household appliances and consumer electronics. Any system that requires precise and dynamic control can benefit from an Adaptive PID controller.

Similar threads

Back
Top