this project has three Tasks which is requiered Reports and MATLAB codes. I have old files which is %85 correct. I need the expert in control System to do it %100 correct- without any Playparism- to do the Report and the MATLAB codes. I attached the main project , please reade it before contact to me. after that I will send to the old files answer to do it correctly. i need the Report in Word only.

Nonlinear Systems and Control

- Sliding Mode Control Warm-Up We will work on the system

*x*˙_{1 }= *x*_{2 }+ *ax*_{1 }sin(*x*_{1})

*x*˙_{2 }= *bx*_{1}*x*_{2 }+ *u *(1)

where*a *and *b *are unknown constants, but we know that 0 ≤ |*a*| ≤ 2 and 1 ≤ |*b*| ≤ 3.

- Show that this system is state feedback linearizable. Assume that
*a*ˆ = 1 and^{ˆ}*b*= 1*.*5 are nominal values of*a*and*b*that you will use for your feedback linearizing controller; furthermore, assume for now that*a*=*a*ˆ and*b*=^{ˆ}*b*. Simulate your controller by regulating the states to zero. - Now suppose that
*a*6=*a*ˆ and*b*6=^{ˆ}*b*, and that the real values of*a*and*b*are*a*= −1,*b*= 2. Using Matlab, plot the phase portrait of the open-loop system (1), and identify the regions where the system exhibits different behaviors. - Explain why it is not possible anymore to use your controller from (a) when
*a*6=*a*ˆ and*b*6=^{ˆ}*b*and guarantee convergence to zero. In particular pay attention to the diffeomorphism and the controller itself. Verify by setting*a*= −1,*b*= 2 in your simulation with the same*u*and diffeomorphism you got in (a).*Hint: be sure to use**a*ˆ = 1*and*^{ˆ}*b*= 1*.*5*to do your coordinate transformation and to compute your controller, since you assume not to know the real values for control design purposes! At the same time, use the*real*a*= −1*and**b*= 2*values in your simulation.* - Instead of feedback linearization, you will now implement a sliding mode controller. The approach is to figure out what
*x*_{2 }should be if we considered it as an input to the*x*˙_{1 }equation so that*x*_{1 }is driven to zero. Design a*linear*manifold of the form*s*=*cx*_{1 }+*x*_{2 }that does the job by considering what happens when*s*= 0. Next, analyze the dynamics of*s*and determine a sliding mode controller that drives*s*to zero (and consequently*x*to zero). - Simulate your sliding mode design. Note that if you use the “sign” function in Matlab, ode45 will take a very long time to run. Instead, it is suggested that you use the approximation , where

if*y *≥ 1

satif− 1 *< y <*1

if*y *≤ −1

Tune to understand the trade-off involved.

- Sliding Mode Control for the van der Pol Equation The controlled van der Pol system is given by

*x*˙_{1 }= *x*_{2}

where and *µ *are positive constants, and *u *is the control input.

- Pick values for and
*µ*, and verify via simulation that for*u*= 1 the van der Pol system exhibits a stable limit cycle outside the surface , and that for*u*= −1 there exists an unstable limit cycle outside the same surface. - Define the sliding manifold, where
*r <*1*/µ*. Show*analytically*that if we restrict the motion of the system to the surface*s*= 0 (that is, we force*s*(*t*) ≡ 0), then the resulting behavior is that of the linear harmonic oscillator

*x*˙_{1 }= *x*_{2 }*x*˙_{2 }= −*ω*^{2}*x*_{1}*,*

which exhibits a sinusoidal oscillation of frequency *ω *and amplitude *r*.

- Design a sliding mode controller that drives all trajectories whose initial condition is withinthe region {
*x*∈ R^{2 }: |*x*_{1}|*<*1*/µ*} to the manifold*s*= 0, and then has the states slide on that manifold towards the origin. Simulate your controller and verify that it is able to regulate the state to zero. Show your plots of*x*vs time and*x*_{2 }vs*x*_{1 }to demonstrate your design.

- MIMO Control of a Two-Link Planar Arm

The robot arm in Figure 1 consists of two links. The first one mounted on a rigid base by means of a frictionless hinge and the second mounted at the end of link one. The joint axes *z*_{0 }and *z*_{1 }are normal to the page. We establish the base frame *x*_{0}*y*_{0}*z*_{0 }as the work space frame, which means the arm moves within the *x *− *y *plane. The inputs to the system are always the torques *τ*_{1 }and *τ*_{2 }applied at the joints.

Figure 1: Two-link planar manipulator.

A dynamic model of this system can be derived using Lagrangian equations and is given by

* ,*

where

*H*11 = *I*1 + *I*2 + *m*1*l**c*21 + *m*2[*l*12 + *l**c*22 + 2*l*1*l**c*2 cos(*θ*2)]*,*

*H*22 = *I*2 + *m*2*l**c*22*,*

*H*12 = *H*21 = *I*2 + *m*2[*l**c*22 + *l*1*l**c*2 cos(*θ*2)]*, h *= *m*_{2}*l*_{1}*l _{c}*

_{2 }sin(

*θ*

_{2})

*,*

*g*_{1 }= *m*_{1}*l _{c}*

_{1}

*g*cos(

*θ*

_{1}) +

*m*

_{2}

*g*[

*l*

_{c}_{2 }cos(

*θ*

_{1 }+

*θ*

_{2}) +

*l*

_{1 }cos(

*θ*

_{1})]

*, g*

_{2 }=

*m*

_{2}

*l*

_{c}_{2}

*g*cos(

*θ*

_{1 }+

*θ*

_{2})

*.*

In this project, we use the following parameter values: *m*_{1 }= 1*.*0*kg*, mass of link one; *m*_{2 }= 1*.*0*kg*, mass of link two; *l*_{1 }= 1*.*0*m*, length of link one; *l*_{2 }= 1*.*0*m*, length of link two; *l _{c}*

_{1 }= 0

*.*5

*m*, distance from the joint of link one to its center of gravity;

*l*

_{c}_{2g }= 0

*.*5

*m*, distance from the joint of link two to its center of gravity;

*I*

_{1 }= 0

*.*2

*kgm*

^{2}, lengthwise centroidal inertia of link one;

*I*

_{2 }= 0

*.*2

*kgm*

^{2}, lengthwise centroidal inertia of link two; and

*g*= 9

*.*804

*m/s*

^{2}, acceleration of gravity.

- First, you will do joint space MIMO control of the arm, where the inputs are the two torquesand the outputs are the joint angles
*θ*_{1 }and*θ*_{2}. Write a MIMO state space representation of the system dynamics. Then design the MIMO state feedback controllers (*τ*_{1 }and*τ*_{2}) for this system that regulate all the states to zero, and simulate the closed loop system for the initial conditions . Make sure you tune well the parameters of controllers, plot your controllers and all the states versus time, and provide an interpretation of your plot. - Second, we want to control the end-effector of the arm to generate a path in
*x*−*y*The outputs are the position coordinates*x*and*y*(*z*is always zero) of the end-effector. One way to approach this problem is to formulate the system directly into the end-effector coordinates. Let*f*:*Q*→ R^{2 }be a smooth and invertible mapping between the joint vector Θ = [*θ*_{1}*,θ*_{2}]^{>}∈*Q*and the workspace variables*X*= [*X*_{0}*,Y*_{0}]^{>}∈ R^{2}. The space*Q*is a suitably chosen range of angles for*θ*_{1 }and*θ*_{2}, and*X*= [*X*_{0}*,Y*_{0}]^{>}is the position of the end-effector on the (*x*_{0 }−*y*_{0}) plane. In other words,

*X *= *f*(Θ)*,*

so that the position of the end-effector can be computed from the two joint angles.

The mapping *f *is known as the arm’s forward kinematics, and it can lead us directly into so-called work space control, which you will perform instead of joint space control as done in part (a). There exists a relationship between the vector of linear velocities of the end-effector *X*˙ and the vector of velocities of joint variables Θ˙ , given by *X*˙ = *J*Θ˙ , where *J *is known as the Jacobian matrix.

Derive the forward kinematic function *f *:*Q *→ R^{2 }using trigonometry, and then show that the Jacobian is given by

*.*

Next, derive the new MIMO state space representation of the system dynamics, where now the state vector is *X*, instead of Θ. Design the MIMO state feedback controllers (*τ*ˆ_{1 }and *τ*ˆ_{2}) for this system that track the reference path below

*,*

and verify your design with a simulation for the initial conditions *θ*_{1}(0) = 0, *θ*^{˙}_{1}(0) = 0, *θ*_{2}(0) = 0*.*2, *θ*^{˙}_{2}(0) = 0. Plot your control signals and all the states versus time, and demonstrate an animation of the arm’s motion (use the example MATLAB code provided on Isidore).

(c) Finally, consider that normally the two-link arm has two configurations (i.e., elbow up and elbow down) for a particular non-singularity position of the end-effector. However, your closed-loop system always picks one solution from the two possible solutions. Why is this?

Warning: During your work space MIMO control, there exist some singularity positions when *θ*_{2 }= *kπ*, where *k *= 0*,*±1*,*±2*,*···. The Jacobian matrix is not invertible and the controllers will be infinitely large at such positions. Please avoid these positions when you try to test your controllers!

General notes and hints:

- The report to be turned in should be typed. I expect a professional-looking report, technically sound and easy to read.
- Provide plots for all simulations that are requested. Make sure your plots are clear (do not use jpg files!), with relevant titles and axes labeled, and using a legend whenever several signals are plotted together.
*Any unclear or hard to read plot will cause you to lose points.* - Keep your report succinct and to the point. Proofread it and spell check it.
*Poor English in your report will cause you to lose points.* - Turn in your report via Isidore as a PDF file (no other format will be accepted), and upload your code uncompressed.