Adaptive PID controller implementation

AI Thread Summary
The discussion revolves around the implementation of an adaptive PID controller using a Takagi-Sugeno fuzzy system, where the user is experiencing issues with the control signal becoming unstable. The reference signal is a square wave, but the plant's output does not track it as expected, leading to a significant deviation. Suggestions include adjusting the derivative gain to zero and not initializing the proportional and integral gains to zero, with a recommendation to use the Zeiger-Nichols method for setting initial values. The user is encouraged to simplify the model by removing the adaptive components until stable tracking is achieved. The conversation highlights the importance of proper gain initialization and tuning in PID controller design.
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
what do you mean by your control system blows up. please provide screen shots or a more detailed explanation
 
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.
 
post a screenshot of your code and the model
 
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
 
Back
Top