Question

Question:

CODE:

>> %% PID controller design

Kp = 65.2861;

Ki = 146.8418;

Kd = 4.0444;

Gc = pid(Kp,Ki,Kd);

% close-loop TF

T = feedback(G*Gc,1);

%% checking the design obejective

a_pid = stepinfo(T);

% Settling Time

tp_pid = a_pid.SettlingTime

% Overshhot

OS_pid = a_pid.Overshoot

%% steady-state error

[yout_pid,tout_pid] = lsim(T,stepInput,t);

% steady-state error

ess_pid = stepInput(end) - yout_pid(end);

>> %% Effect of P in G

Kp = 65.2861;

Ki = 0;

Kd = 0;

Gc = pid(Kp,Ki,Kd);

% close-loop TF

T_p = feedback(G*Gc,1);

[yout_p,tout_p] = lsim(T_p,stepInput,t);

%% Effect of I in G

Kp = 0;

Ki = 146.8418;

Kd = 0;

Gc = pid(Kp,Ki,Kd);

% close-loop TF

T_i = feedback(G*Gc,1);

[yout_i,tout_i] = lsim(T_i,stepInput,t);

%% Effect of D in G

Kp = 0;

Ki = 0;

Kd = 4.0444;

Gc = pid(Kp,Ki,Kd);

% close-loop TF

T_d = feedback(G*Gc,1);

[yout_d,tout_d] = lsim(T_d,stepInput,t);

%% plot the above response with PID control

figure(1)

plot(t,yout_p,'r')

hold on

plot(t,yout_i,'g')

hold on

plot(t,yout_d,'m')

hold on

plot(t,yout_pid,'b')

grid

legend('P','I','D','PID')

xlabel('Time(sec)')

ylabel('Amplitude')

title('Comparison study')

OUTPUT:

Figure 1 File Edit View Insert Tools Desktop Window Help I New Figure Comparison study 6 5 D PID 4 ليا 2. Amplitude -1 1 2 3

PART A:

See the above matlab code and output explain your observation in a detailed in Theoratically basically its a design of PID controller

PART B :

Mathematically find the values of Kp ,Ki and Kd also find settling time , peak time ,rise time ,phase angle and overshoot your results must meet with the values given below in a picture

Tuned response, Plant Tuned response, G Controller Parameters Кр Ki Kd TF Tuned 65.2861 146.8418 4.0444 Performance and Robus

Motor transfer function will be:

s = tf('s');                                                                      

%% parameters

R = 1; % in ohm

L = 0.5; % in Henry

J = 0.01; % in kg.m^2

b = 0.1; % in Nms

K = 0.01; % in Nm/A

% compute transfer function

G = K/((J*s+b)*(L*s+R)+K^2)

G =

             0.01

----------------------------------------

0.005 s^2 + 0.06 s + 0.1001

your results will be like kp=65.2861, ki=146.8418 ,kd= 4.0444, rise time=0.174sec ,overshoot= 4.55% ,settling time=0.66 sec ,peak time =1.05

noted :Please solve mathematically in full steps that was easily understandable

0 0
Add a comment Improve this question Transcribed image text
Answer #1

0.01 Peak time time 0.66 su; 6.01 The TF of the System G(S) = -OT KP, kif Kd Such that rise times 00119 Soy yos: 4.554. f Bet

The following matlab code can be used to validate the above answer

clear all
clc
s = tf('s');
%% parameters
R = 1; % in ohm
L = 0.5; % in Henry
J = 0.01; % in kg.m^2
b = 0.1; % in Nms
K = 0.01; % in Nm/A
% compute transfer function
G = K/((J*s+b)*(L*s+R)+K^2);
% PID controller
Kp = 75.89;
Ki = 299.3;
Kd = 4.06;
Gc = pid(Kp,Ki,Kd);

% close-loop TF
T = feedback(G*Gc,1);

%% checking the design obejective
a_pid = stepinfo(T);
% Settling Time
tp_pid = a_pid.SettlingTime
% Overshhot
OS_pid = a_pid.Overshoot

Computing the above code, we would get the folloiwng output

tp_pid =

    0.6165


OS_pid =

   15.1031

Add a comment
Know the answer?
Add Answer to:
Question: CODE: >> %% PID controller design Kp = 65.2861; Ki = 146.8418; Kd = 4.0444;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT