Carefully answer the code according to the passage and question while answering question no. d(i) and d(ii).
1) The equations for a nonholonomic integrator are given by:
x = U1
x = U2
X3 = X2U1
a) Show that this system is differentially flat for the flat output z = (x, x).
b) Assume the system moves from initial time t = 0 to final time tf = T. Assume the following initial conditions: At t = 0, x1(0) = 1, x2(0) = x3(0) = 0. At tf = T, x1(T) = 1.
Using four basis functions: φ1 = 1, φ2 = t, φ3 = t^4, φ4 = t^3, write down the matrix-vector equations for this system. [Hint: Slide 22 in the differential flatness presentation might be helpful]
c) Repeat part b), but this time use six basis functions: φ1 = 1, φ2 = t, φ3 = t^4, φ4 = t^3, φ5 = t^4, φ6 = t^5.
d) Plot the differentially flat trajectory for this system for the following initial conditions. Use four basis functions. Submit your code and screenshots. Repeat again using three basis functions.
i) At t = 0, x1(0) = 1, x2(0) = 1, x3(0) = 0. At tf = 10, x1(10) = 5, x2(10) = 5, x3(10) = 1.
ii) At t = 0, x1(0) = 1, x2(0) = 1, x3(0) = 0, x1(0) = 1. At tf = 15, x1(15) = 10, x2(15) = 10, x3(15) = 5, x1(5) = 1.