Assignment 1- Eng Control Fall 2024
Assignment 1- Eng Control Fall 2024
t=[0:0.1:10];
n=length(t);
x=zeros(1,n);
zeta=[0.1 0.25 0.5 0.75 0.9];
for m=1:5
for k=1:n
x(k)=(1/4*zeta(m)) *cos(2*t(k)-1.571);
plot(t,x);
end
hold on;
end
legend('Zeta=0.1','Zeta=0.25','Zeta=0.5','Zeta=0.75','Zeta=0.9');
xlabel("Time(Sec)")
ylabel("x(t)")
t=[0:0.1:10];
n=length(t);
x=zeros(1,n);
omega=[0.1 0.5 1 2 4 8];
for m=1:6
for k=1:n
A(m)= 1/sqrt((4-omega(m)^2)^2+(0.8*omega(m))^2);
theta(m)=atan(0.8*omega(m)/(4-omega(m)^2));
x(k)=A(m) *cos(2*t(k)-theta(m));
plot(t,x);
end
hold on;
grid on;
end
legend('w=0.1','w=0.5','w=1','w=2','w=4','w=8');
xlabel("time(Sec)")
ylabel("x(t)")
(b) Free response simulation
(c) forced response simulation