Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %q1=dlmread('D:\F19\MTE360\Lab1\Lab 1\lab1_q2_0_3.txt')
- %q1=dlmread('D:\F19\MTE360\Lab1\Lab 1\lab1_q2_0_6.txt')
- q1=dlmread('D:\F19\MTE360\Lab1\Lab 1\lab1_q2_2_1.txt')
- %W_n=19.368;
- %Z=0.210;
- %W_n=27.391;
- %Z=0.148;
- W_n=51.243;
- Z=0.079;
- figure(2)
- subplot(2,1,1);
- plot(q1(:,[1]),q1(:,[2]))
- hold on
- plot(q1(:,[1]),q1(:,[4]))
- xlim([0 4])
- ylim([-2 2])
- legend({'Measured', 'Command'})
- title('Closed Loop Position Step Response Kp=0.6');
- ylabel('Position [mm]');
- xlabel('Time [s]');
- subplot(2,1,2);
- plot(q1(:,[1]),q1(:,[3]))
- xlim([0 4])
- ylim([-5 5])
- title('Control');
- ylabel('Control [V]');
- xlabel('Time [s]');
- legend({'Input'})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement