Professional Documents
Culture Documents
Dynamic Systems and Controls Project
Dynamic Systems and Controls Project
ME 3543.001
Parker Bradshaw
@01337418
4/29/2016
Statement and Project Objectives:
The design problem is to propose a controller Gc(s) to control the vertical height, Y(s), of rowdy
to take him from the bottom left corner to the top right corner of the graph without him bumping
into pipes on the way. The figure 2 shows the block diagram of the control system. The input
1
R(s) is a step input. The plant is given by () = (+2)(+3) . In this case the steady state error is
zero, the percent error overshoot is at 10% and the settling time should be 1.33 sec.
The objective is to design a controller, Gc(s), to meet all three specifications stated above. If a
controller with proportional specifications is not able to be performed, then a controller of choice
will be created to meet the specifications.
Technical Approach:
In order to achieve
clc
clear all
close all
num = conv(num_compensator,num_sys);
den = conv(den_compensator,den_sys);
sys = tf(num,den);
tfinal = 50;
T_closedloop = feedback(K*sys,1);
[y,t] = step(T_closedloop,tfinal);
column_scale = (1100-150)/50;
row_scale = (70-800)/1;
start_col = 150;
start_row = 750;
t_pixels = start_col+round(t*column_scale);
y_pixels = start_row+round(y*row_scale);
big=imread('background.png');
small=imread('rowdy.jpg');
[m1,n1,p1] = size(big);
[m2,n2,p2] = size(small);
%
%%%%%% move left to right %%%
figure(1)
m = length(t);
n = round(m*(1.33/50));
index = [1:2:n n+1:20:m];
set(gcf,'DoubleBuffer','on');
traj = [];
for i=1:length(index)
im = big;
traj = [traj; y_pixels(index(i))+ round((1+m2)/2), t_pixels(index(i))+ round((1+n2)/2)];
im(y_pixels(index(i))+1:y_pixels(index(i))+m2,...
t_pixels(index(i))+1:t_pixels(index(i))+n2,...
:) = small;
imshow(im);
for j=1:size(traj)
text(traj(j,2),traj(j,1),'o','Color','red','FontSize',14);
end
pause(0.001);
end