Control Theory Project Writeup
Control Theory Project Writeup
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 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:
Part 4: Figure 2 is the block diagram for the unity feedback control system:
Part 5:
which becomes:
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
%}
10
11
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