code for pid tuning genetic algorithm in matlab
#1

code for pid tuning using genetic algorithm in matlab
Reply
#2
can i get matlab coding for tuning of PID controller....
Reply
#3
How can I tune PID controller using GENETIC ALGORITHM.......????
Asked by RAJEEV KUMAR on 15 Nov 2012
Latest activity Commented on by lithika on 26 Feb 2014
num=6;
den=[48 44 12 1];
gp=tf(num,den); % PLANT TRANSFER FUNCTION
%% OVERALL TRANSFER FUNCTION
gpgcr=gp*gcr;
sysy4=feedback(gpgcr,1);
%% BY GENETIC ALGORITHM
N=5; % NO OF POPULATION
M=4;
iter=12; % no.of iterations
maxiter=1;
%% initialization of pbest and gbest
for i=1:N
for j=1:iter
for k=1:M
pbest(i,j,k)=rand;
gbest(i,j,k)=rand;
end
end
end
%% initialization of kp,kd,ki and calculation of ISE
for i=1:N
for j=1:iter
for k=1:M
kp(i,j,k)=rand;
kd(i,j,k)=rand;
ki(i,j,k)=rand;
%% controller transfer function
numgc=[kd(i,j,k),kp(i,j,k),ki(i,j,k)];
dengc=[1,0];
gc=tf(numgc,dengc); % controller T.F
g=gp*gc;
GCL=feedback(g,1); % gives c(s)/r(s)
[num,den] = tfdata(GCL,'v'); % 'V' return the numerator and denominator directly as
......row vectors rather than as cell arrays
GCL1=1-GCL; % GIVES e(s)/r(s)
[nume,dene]=tfdata(GCL1,'v');
dene1=[dene,0]; % for e(s)
[r,p,k1]=residue(nume,dene1);
n=length(p);
for y=1:n
h(y)=ilaplace(r(y)/(s-p(y)));
end
h;
q=0;
for z=1:n
q=h(1,z)+q; % gives e(t)
end
q;
q=vpa(q,5); % Variable-precision arithmetic
qsq=q^2;
lqsq=laplace(qsq); % to get laplace transform
isee=limit(lqsq,s,0);
ise=vpa(isee,5);
x(i,j,k)=ise %CAN WE TAKE IT AS FITTNESS FUNCTION..??
end
end
end
Reply
#4
how can i merge matlab code with simulink and how can i fix fitness value and minimization function
Reply
#5

how can i merge genetic code with matlab simulink and what can i choose for minimization
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: dry handling tuning of agcs systems with idiada technical reports sc, pid controller tuning with ant technique using matlab script, matlab code for pid controller tuning, pid algorithm code plc, pid cuckoo algorithm, cohen coon tuning method ppt, tuning sql statements,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  how to calculate distance in heed protocol by using matlab 1 1,887 15-06-2018, 03:54 PM
Last Post: Guest
  matlab code for incremental conductance mppt 1 1,426 02-05-2018, 02:28 PM
Last Post: eksi
  anomaly detection code in matlab 3 2,094 23-04-2018, 12:04 AM
Last Post: Guest
  matlab code for liver tumor segmentation 2 1,585 01-04-2018, 06:29 PM
Last Post: [email protected]
  matlab code for vehicle tracking using unscented kalman filter 3 16,878 26-03-2018, 08:57 PM
Last Post: fodayj
  matlab code for facial expression recognition using frequency domain 1 2,683 19-02-2018, 06:03 PM
Last Post: Guest
  matlab code shadow detection and removal in colour images using matlab 2 2,262 12-01-2018, 01:24 PM
Last Post: dhanabhagya
  simulink matlab model upqc mdl 3 6,777 18-12-2017, 09:08 AM
Last Post: jaseela123d
  matlab code for speed breaker detection 1 1,295 27-10-2017, 10:22 AM
Last Post: Guest
  skin cancer detection using neural networks matlab code 13 3,895 23-10-2017, 02:52 PM
Last Post: Guest

Forum Jump: