% P. Cunningham % 4 May 2008 % ES 205 - Lesson 27 - Intro to Controls % P & PD Control of Simplified DC Motor Model clear all close all clc % Plant Parameters J = 0.025; % (kg-m^2) B = 0.05; % (N-s/rad) % Set Performance Specifications POS = 10; % (%) Ts = 2; % (s) % Proportional Controller % Only Percent Overshoot Constraint is Used % Cannot Change Settling Time with P-Controller z1 = -log(POS/100)/sqrt(log(POS/100)^2+pi^2); Kp_1 = B^2/4/z1^2/J; wn1 = sqrt(Kp_1/J); Ts_a = 4/z1/wn1; sim('le27_Pcontroller_example_sim',[0 10]) figure plot(time,theta_p) grid on xlabel('Time (sec)') ylabel('\theta (rad)') title('ES 205 - Proportional Controller, C(s)=Kp')