Adaptive PID controller implementation

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 3K views
zoom1
Messages
63
Reaction score
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

Engineering news on Phys.org
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.
 
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;
 
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