Professional Documents
Culture Documents
Pre Lab
Pre Lab
Pre Lab
VI Ciclo
Lab N° 05
REPORT
XXX
YYY
2019 – 1
Report
Introduction:
1. Read plants [4] and [9] manuals corresponding to the Qube and SRV02 devices
2. Read the Plant used in the paper “2DOF PID Control of the Angular Position of a Rotary
Torsion Plant”.
Objetives:
Safety:
Students must wear pants (no shorts) and shoes (no sneakers) to be admitted into the lab.
3) Using Matlab into Simulink blocks, design and simulate a speed control system for plants
[4] and [9], employing the discrete-time velocity PID control algorithm. (load disk)
% pidvelocity.m PID POSITION CONTROL OF THE ROBOT ARM OF
1DOF
clear all; close all; clc; s=tf('s');
Gp=178.4615/(s+7.6923); pidtune(Gp,'PID')
% SAMPLING TIME AND PID PARAMETERS
T = 0.01; Kp=0.936;Ki=67; Kd = 0;
a1=39.52569;b=60.4743;
% INITIAL CONDITIONS
e_1 = 0; x1 = 0; x1p=0; v=0;
% ******** CONTROL LOOP *********
Mm = 10000; T = 0.01; Nn = 10; ulow = -5; uhigh = 5; A=1;
for k = 1:Mm
if(k >= 0 && k <= Mm/4), r = A;
elseif(k >= Mm/4 && k <= Mm/2), r = 0.5*A;
elseif(k >= Mm/2 && k <= 3*Mm/4), r = 1*A;
elseif(k >= 3*Mm/4 && k <= Mm), r = 0.1*A;
end
R(k) = r; e = r - x1;
v = v + Kp*(e-e_1)+T*Ki*e+Kd*(e-2*e_1);
if(v < ulow), u = ulow; elseif( v > uhigh), u = uhigh; else
u = v;
end
U(k) = u;
% MODELO DE SEGUNDO ORDEN DEL PROCESO (DISCRETIZACI?ON
DIRECTA)
x1 = x1 + T*(a1*x1+b*u); Y(k) = x1;
e_1 = e;
end
% PLOTS
ejex = linspace(0,Mm*T,Mm); subplot(2,1,1)
plot(ejex,R,'b',ejex,Y,'r'); grid; ylabel('Posicion angular
(rad)')
subplot(2,1,2); plot(ejex,U); grid; ylabel('Se?al de
control u (V)')
xlabel('TIME [s]'); print -f -deps pidvelocity
Planta 4
PLANTA 9
4) Using Simulink, design and simulate a PID position control systems for plants [4] and [9].
You may use the known transfer function K/(T*s + 1) of the plant. (load disk)
Planta 9:
5) Using Matlab into Simulink blocks, design a PID position position control system for
plants [4] and [9], employing the discrete-time improved PID control algorithm. (load
disk)
planta 4:
Planta 9:
6) Using Matlab into Simulink blocks, design and simulate a position control system for
plants [4] and [9], employing the discrete-time velocity PID control algorithm. (load disk)
Planta 4:
Planta 9:
Evaluation Rubric