EE 5351 UMD SPRING 2016 HW 2: 25 Points (You may use ANY software to perform this work) 1. For the robotic arm below, use math software to model the Denavit-Hartenberg matrices that describe it. Calculate the position of the end effector, P, when joint angles are a1 = -45 degrees, a2 = -30 degrees, a3 = +30 degrees. 2. Perform Problem 3-1 in Siegwart: “Suppose a differential drive robot has wheels of differing diameters. The left wheel has a diameter of 2 and the right has a diameter of 3. L = 5 for both wheels. The robot is positioned at Theta = pi/4. The robot spins both wheels at a speed of 6. Compute the robot’s instantaneous velocity in the global frame. Specify x’, y’ and theta’.” 3. A differential drive robot shown below has the following characteristics: L = 8 cm, Theta = 0 degrees, phi-1 = 3 rad/sec, phi-2 = 6.5 rad/sec, and wheel radius is 4.5 cm for each drive wheel. Using math software, write a program to calculate and plot the X-Y position of the robot with respect to the fixed (global) frame for a run of 10 seconds. Sample code is provided at the end of this assignment as a starting point. S.Norr EE 5351 UMD SPRING 2016 (FOR GRAD CREDIT): Write a MATLAB (or other software) program to calculate and plot theta, omega and alpha for problem 3 above, a 10 second run. (theta is the angle between the robot’s local frame and the fixed frame, omega is the angular velocity of that angular difference, and alpha is the angular acceleration) Plot alpha on a normal basis with g (that is plot alpha as a ratio with g, 9.81 m/sec) 4. Use difference equations in a Math program to model the solution to the following initial value problem of a second order differential equation: X’’ + 2X’ + 5X = 60; X(0) = 8 , X’(0) = 0 a. Form a state-space description using first order equations of the form: X’ = Ax + Bu b. Plot the solution at an appropriate time step c. Solve the equation by hand or using math software, plot the exact solution and compare with the difference equation plot from a. S.Norr EE 5351 UMD SPRING 2016 Example code for Problem 3: // Example of robot forward kinematics // constants r1=6;r2=6;l=10;ph1=4;ph2=2;a=%pi/4; // Since wheel velocities are held constant, robot velocity // vector, edot, is also constant: (if not constant, then this // must be continually updated in the WHILE Loop) edot=[(r1*ph1+r2*ph2)/2;0;(r1*ph1-r2*ph2)/(2*l)]; // Set up iteration counter and timestep: i=1;dt=0.1; // Initial Robot position vector: Er(:,1)=[0;0;0]; // Initial Rotation/Translation matrix for global frame R=[cos(a) -sin(a) 0;sin(a) cos(a) 0;0 0 1]; // J matrix that describes the standard differential drive // configuration: Jinv=[.5 .5 0;0 0 1;1/(2*l) -1/(2*l) 0]; //Initial position vector for robot in global frame: Ei(:,1)=R*Er(:,1); while i < 101 Er(:,i+1)=Er(:,i)+dt*edot; Ei(:,i+1)= Ei(:,i) + dt*[cos(a+Er(3,i)) -sin(a+Er(3,i)) 0; sin(a+Er(3,i)) cos(a+Er(3,i)) 0; 0 0 1]*Jinv*[r1*ph1; r2*ph2; 0 ]; i=i+1; end S.Norr