Question (a)
clc;
clear;
close all;
Kp = 1;
Kd = 1;
Ki = 0;
s = tf('s');
P = 1/((s + 1)*(s + 2)*(s + 59));
C = pid(Kp, Ki, Kd);
sys = feedback(C*P, 1);
disp('The closed loop transfer function is :');
sys
t = 0:0.0001:5;
u = ones(size(t));
y = step(sys, t);
e = u - y';
plot(t, y, 'k', 'linewidth', 2);
grid
xlabel('Time, t (sec)');
ylabel('Amplitude');
title('Step Response');
figure
plot(t, e, 'k', 'linewidth', 2);
grid
xlabel('Time, t (sec)');
ylabel('Amplitude');
title('Error');
ess = 1 - y(end);
fprintf('The steady state error will be %f \n', ess);
After executing we get
In the command window we get
The closed loop transfer function is :
sys =
s + 1
--------------------------
s^3 + 62 s^2 + 180 s + 119
Continuous-time transfer function.
The steady state error will be 0.991597
>>


Question (b)
clc;
clear;
close all;
s = tf('s');
P = 1/((s + 1)*(s + 2)*(s + 59));
pidTuner(P)
After executing we get

The parameters

We can see that the steady state error is 0
Kp = 2701, Ki = 3161, Kd = 515.2
Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r)...
Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r) is a magnitude1 step. Plant is given by 1 (s+1)(3+2)(s+5 ) controller plant + 14 y C(s) P(S) a) Calculate Closed Loop characteristics and steady-state error(unity feedback and Kp=1, Kd=1, Ki=0)) 2.Using automatic PID tuning function, reduce steady-state error=0 and report Kp=?, Kd=? And Ki=?
We want to control output(y) using PID control in Kds2+KpS+Ki C(s) S Input(r) is a magnitude1 step. Plant is given by 1 (s+1)(s+2)(s+5) controller plant Y C(s) P(s) a) Calculate Closed Loop characteristics and steady-state error(unity feedback and Kp=1, Kd=1, Ki=0)) 2.Using automatic PID tuning function, reduce steady-state error=0 and report Kp=?, Kd=? And Ki=?
Please answer all the questions with MATLAB and also upload the
code. Thanks.
3 Experiment - Matlab controller complexity and steady-state 3.1 Consider the satellite-attitude control problem shown in following figure where the normalized parameters are J 10 spacecraft inertia; N-m-sec2 /rad erreference satellite attitude; rad actual satellite attitude; rad Hy 1 sensor scale; factor volts/rad Hr = 1 reference sensor scale factor ; volts/rad w= disturbance torque: N-m H, D(s) Js Figure 4: Satellite attitude control Suppose kP =...
PLEASE DO IN MATLAB
Problem 8 (PID feedback control). This problem is about Proportional-Integral-Derivative feedback control systems. The general setup of the system we are going to look at is given below: e(t) u(t) |C(s) y(t) P(s) r(t) Here the various signals are: signal/system r(t) y(t) e(t) P(s) C(s) и(t) meaning desired output signal actual output signal error signal r(t) y(t) Laplace transform of the (unstable) plant controller to be designed control signal Our goal is to design a controller...
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...
Solve C & D please slide 3
is the one with the pendulum
...use the Matlab command C pid (Kp, Ki, Kd, Tf) to create your PID controller for Tr 0.5, KI = Kp = 0.5, and 1 < Kp < 10. c. (20 POINTS) REFER TO SLIDE 3: Create your frequency-domain plant as a state-space object, such that Mss1 ss (A,B,C,D) where D = 0.Similarly, Mss2 = ss (GC) d. (20 points) Use the feedback command to connect your...
part 2 & part 3 please...
Tutorial -On PID control (Control System: Instructor slides and lab) Consider a second order mass-force system to study its behavior under various forms of PID control xtn fon force In Disturbance force: 50) (i.e. wind force) Part I (dealing with the plant/process) 1. What is the model of this system, in other words, write the ODE of the system 2. Derive the transfer function of the above system from Fls) to X(s) 3. What...
Exercise: Given the mass-damper-spring network below: x(t) flt) m- 1kg; X(s) F(s) (s2 +10s + 20) b-10N-m/s 20N/m; f(t)-1 N Show how each of the controller gain, Kp, Kd and Ki contributes to obtain Fast rise time Minimum overshoot i. No steady state error MATLAB code S-tf('s') Sys 1/(sA2+10*s+20) Step Proportional Controller: Kp 300 % for faster reponse Gpspid(Кр) sys_p-feedback(sys Gp, 1) t-0:0.01:2 step(sys, sys p) Proportional-Derivative Controller: Kp 300 Kd-10 Gpdspid(Kp,0,Kd) sys pd feedback(Gpd sys, 1) step( sys, sys_p,...
Consider the feedback sy PID COntroller Plant R(S) Y(s) the closed-loop transfer function T(s) = Y controller (Kp Find er p 1, Ks K ) and show that the system is marginally stable with two imaginary roots. (s)/R(s) with no sabl thosed-loop transfer function T(s) Y (S/R(s) with the (three- term) PID controller added to stabilize the system. suming that Kd 4 and K, -100, find the values (range) of Kp that will stabilize the system.
PROBLEM 4 A unity feedback closed loop control system is displayed in Figure 4 (a) Assume that the controller is given by G (s)-2. Based on the lsim function of MATLAB, calculate and obtain the graph of the response for 0,(1)-a. Here a ; 0.5%, Find the height error after 10 seconds, (b) In order to reduce the steady-state error, substitute G. (s) with the following controller: K2 This is a Proportional-Integral (PI) controller. Repeat part (a) in the presence...