Sie sind auf Seite 1von 13

Control Theory - Project

Modeling and Control of 1 DOF Robot with Flexible Link

Submitted on August 13, 2010


Barbar Moawad 102713284 Brendan Dills 102724578 Juan Palacio 102352351 Lee Mitch Tome 102719640

Given
Figure 1 shows an electro-mechanical system of a Single Joint robot model with flexible link.

Figure 1: Single Joint Robot with Flexible Link It can be seen in the figure above that the dynamics of the robot are controlled by the torque output of the armature-controlled DC motor. The mechanical component of this system is characterized by a gear system that connects the driving shaft to the link. Graph 1 shows the torque-speed curve of the systems DC motor.

Graph 1: Torque-Speed Curve of the Motor It can be understood from the graph above that when the motor reaches its stall torque, it stops spinning. It also reaches its maximum rotational speed at no-load condition.

The following list of nomenclature will be needed in order to understand the different annotations for different components of this project: Ja [ kgm2 ] - Armature Inertia Da [radNms ] - Armature Damping Coefficient Ra [ ohm] - Armature Resistance La [sohm ] - Armature Inductance aI [ A ] - Armature Current Va [V ] - Armature Voltage Tstall [ Nm] - Stall Torque noload [srad ] - No-load angular velocity JL [ kgm2 ] - Load Inertia DL [radNms ] - Load Damping Coefficient Nm - Number of teeth of the input gear (motor gear) NL - Number of teeth of the output gear (load gear) kL [mN ] - Spring Coefficient Table 1 shows the useful given values: Table 1: Useful Values

The purpose of this project is: To design a controller that will monitor the robot arms dynamics. Fine tuning was made to obtain the desired output. 3

Results
Part 1: For the purpose of exclusivity, each student group had a different value for the damping of the link. This value was found us by averaging the student numbers of the group members:

Part 2: The electrical equations of the armature-controlled DC-motor are first listed:

The equation of motion of the output shaft is then found: ( )

The same equation applies to the link shaft except for a small variation: ( )

In order to get rid of any confusion, link components will have the transcript m.

Part 3: The transfer function for the output shaft is the following:

The transfer function for the link shaft is as shown below:

Part 4: Figure 2 is the block diagram for the unity feedback control system:

Figure 2: Block Diagram of the System

Part 5:

km could be found at the stall torque:

which becomes:

The next step is to find kb at the no load condition, where Tm is 0:

which becomes:

Part 6:
%% Question 6 clear all Ja = 1.14; Da = .00148; Ra = 2.1; La = .0048; Ia = 8.25; Va = 45; T_stall = 97.2; w_noload = 150; Jl = 10; Nm = 100; Nl = 150; km = 4.536; kb = .3; Dl = (102713284+102724578+102719640+102352351)/(10000000*4); Jm = Jl + (Nl/Nm)^2 * Ja; Dm = Dl + (Nl/Nm)^2 * Da;

Part 7:
%% Question 7 % we choose kl according to the loop in question 10, roots become imaginary % at around k = 2.5 kl=6; k=kl; num=km; den=[Jm*La La*Dm+Ra*Jm La*k+Ra*Dm+km*kb Ra*k]; sys=tf(num,den)

%Transfer function: % 4.536 %---------------------------------------%0.06031 s^3 + 26.44 s^2 + 22.95 s + 12.6 % Let A_s be the denominator of the transfer function % A_s = 0.06031 s^3 + 26.44 s^2 + 22.95 s + 12.6 + kp syms w kp

a0 = den(1); a1 = den(2); a2 = den(3); a3 = kp + den(4); b1 =(a1*a2 - a0*a3)/a1; kcr = double(solve(b1)); % kcr = 1.0046e+004 i=sqrt(-1); eq1 = a0*(i*w)^3+a1*(i*w)^2+a2*i*w+a3+kcr; w_found = subs(subs(solve(eq1),kp,kcr),kp,kcr); w_cr = abs(w_found(1)); % w_cr = 27.5503 Pcr = 2*pi/w_cr; % Pcr = 0.2281

Part 8:
%% Question 8 %% P controller kp1 = 0.5*kcr; % kp1 = 5.023028647379596e+03 syscl_P = feedback(kp1*sys,1); step(syscl_P); S_P = stepinfo(syscl_P,'RiseTimeLimits',[0.1 0.9]) %{ S_P = RiseTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: %} NaN NaN NaN NaN NaN NaN Inf Inf

Graph 2: Step Response from the P-Controller


%% PI controller kp2 = 0.45*kcr; % kp2 = 4.520725782641636e+03 Ti2 = Pcr/1.2; ki2 = kp2/Ti2; % ki2 = 2.378679255049765e+04 control_PI = tf([kp2 ki2], [1 0]); syscl_PI = feedback(control_PI*sys,1); step(syscl_PI); S_PI = stepinfo(syscl_PI,RiseTimeLimits,[0.1 0.9]) %{ S_PI = RiseTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: %} NaN NaN NaN NaN NaN NaN Inf Inf

Graph 3: Step Response from the PI-Controller


%% PID controller kp3 = 0.6*kcr; % kp3 = 6.027634376855515e+03 Ti3 = 0.5*Pcr; Td3 = 0.125*Pcr; ki3 = kp3/Ti3; % ki3 = 5.285953900110588e+04 kd3 = kp3*Td3; % kd3 = 1.718345300944181e+02 control_PID = tf([kd3 kp3 ki3], [1 0]); syscl_PID = feedback(control_PID*sys,1); step(syscl_PID); S_PID = stepinfo(syscl_PID,'RiseTimeLimits',[0.1 0.9]) %{ S_PID = RiseTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: 0.0270 0.4346 0.7904 1.4796 47.9589 0 1.4796 0.0775

%}

Graph 4: Step Response from the PID-Controller Part 9:


%% Question 9 (Tuned PID controller) kp_t = 186; ki_t = 40; kd_t = 200; control_t = tf([kd_t kp_t ki_t],[1 0]); syscl_t = feedback(control_t*sys,1) step(syscl_t) S_t = stepinfo(syscl_t,'RiseTimeLimits',[0.1 0.9]) %{ S_t = RiseTime: SettlingTime: SettlingMin: SettlingMax: Overshoot: Undershoot: Peak: PeakTime: %} 0.0586 0.1052 0.9047 1.0000 0.0024 0 1.0000 0.2253

10

Graph 5: Step Response from the Tuned PID-Controller Part 10:


%% Question 10 for i=0:1:20 kl = i; k=kl; num=km; den=[Jm*La La*Dm+Ra*Jm La*k+Ra*Dm+km*kb Ra*k]; sys=tf(num,den); [wn,Z,P] = damp(sys); eival = imag(P(1)); eivaln = imag(P(2)); plot(k,eival,'bx',k,eivaln,'rx') title('Immaginary roots as the value of kl is increased') xlabel('Value of kl') ylabel('Immaginary value') hold on end hold off

11

Graph 6: Systems Roots for 0 <= k <= 10

Gtaph 7: Imaginary Roots Along kL

12

There are no imaginary roots up around a 2.5 value of kL, from there and on one of the roots increases while the other decreases in a symmetric fashion along the horizontal axis as shown in graph 7.

Conclusion
This project proved how an electro-mechanical problem link can be controlled using computer programming. The process was done by first finding all the useful characteristics, then developing the equations of motion and the transfer functions. The transfer functions were then used in a Matlab code in which P, PI and PID controllers were developed. It could be seen from the three graphs that the P and PI controllers were very unstable, witnessing an exponential increase in oscillation. The PID controller, on the other hand, showed a greater stability and followed a desired pattern, but fine tuning was needed to make improvements in the response. The main purpose of the tuning was to only reduce the overshoot since the rise time was satisfying in the pre-tuned controller. The relation between kL and the Eigen values was found using a for-loop that yielded two comprehensive graphs. These graphs showed that as kL increased the Eigen values become imaginary. As a result the steps above reflected what controlling a robotic link using Control Theory and its tools (Matlab and Simulink) looks like.

13