Adaptive PID controller implementation

Click For 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
 
What mathematics software should engineering students use? Is it correct that much of the engineering industry relies on MATLAB, making it the tool many graduates will encounter in professional settings? How does SageMath compare? It is a free package that supports both numerical and symbolic computation and can be installed on various platforms. Could it become more widely used because it is freely available? I am an academic who has taught engineering mathematics, and taught the...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 8 ·
Replies
8
Views
8K
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 16 ·
Replies
16
Views
13K