## Description

1. Write a MATLAB code to compute the matrix P as defined in the the (KYP-lemma)PR-lemma,

and to check whether a system is (strictly) positive-real.

Consider the transfer functions given below:

G0(s) = 10

s + 4

G1(s) = 4

(s + 1)(0.5s + 1)( s

3 + 1)

G2(s) = s + 2

s

2 + 2s + 1

G3(s) = s

2 + 8s + 15

s

2 + 6s + 8

(a) Analyse the passivity of G1, G2, G3 using the code you have written.

(b) Using your code, check which combination of these systems in a negative feedback interconnection give (i) a passive system, (ii) a strictly passive system. (Check all the 6 combinations

with G1, G2, G3)

(c) Check if the system GiGj (cascaded) is passive, for i, j ∈ {1, 2, 3}, i ̸= j.

(d) How can you validate whether the code that you have written is correct?

Hint: YALMIP, Passivity.

2. Consider the model of a single-link manipulator with flexible joints:

x˙ 1

x˙ 2

x˙ 3

x˙ 4

=

x2

−MgL

J1

sin(x1) −

k

J1

(x1 − x3)

x4

k

J2

(x1 − x3)

+

0

0

0

1

J2

u

1

where J1, J2 are the inertia constants, M the mass of the arm, k the torsional spring constant, and

L the length of the arm. x1 and x3 are the states corresponding to the flexible link angles. Take

all constants M, L, J1, J2, k as unity and g = 10 m/s2

(a) Design an output function such that the zero dynamics of the system is of the order 0,1,2 and

3.

(b) Is the system fully feedback-linearizable(with appropriate output)? If yes, design a full-state

feedback-linearization control law such that the output tracks a reference r(t) = sin(t). If no,

then do the partial-feedback linearization of the system, with the output tracking the reference

r(t) = sin(t). Simulate the system using MATLAB and plot the state trajectories w.r.t. time,

and also the zero-dynamics(if present).

(c) Assume the output measured is the angle x3. Is the system minimum phase? Justify your

answers by appropriate analysis(Lyapunov) and plots(state trajectories vs time, or phase portraits).

3. Consider the second-order system below:

x˙ 1 = x1 + (1 − a)x2

x˙ 2 = bx2

2 + x1 + u

y = x1

It is known that the value of a = 0.5 and 1 ≤ b ≤ 2. Use a sliding-mode controller to stabilize

the system. Plot the trajectory on the phase plane x2(t) vs x1(t) and also the control signal u(t)

vs time. Is there chattering in the control signal? If yes introduce a boundary layer to eliminate

chattering and plot the control signal as well as the trajectories in the phase plane x2(t) vs x1(t).

Hint: Diffeomorphism(Change of coordinates).

4. Consider the nonlinear affine system

x˙ = f(x) + g(x)u

y = h(x)

Does the relative degree and zero dynamics remain invariant under a feedback transformation of

the form u = α(x) +β(x)v. Based on this result, comment whether the below systems can be made

passive via feedback.

Justify your answers

(a)

x˙ =

x3 − x

2

2

−x2

x

2

1 − x3

+

0

−1

1

u

y = x1

(b)

x˙ =

x

3

1

cos x1 cos x2

x2

x +

−1

1

0

y = x2

(c) Based on the above two observations, check if one can design an appropriate passivity based

control law that asymptotically stabilizes the system to its equilibrium point

x˙ 1 = x

2

1×2

x˙ 2 = u

Hint: Choose a quadratic storage function and identify an output function y = h(x) that makes

the system passive via appropriate state feedback

Figure 1: Cart-pendulum

5. Consider the cart-pendulum system shown in figure 1. The dynamics of the system is given by:

x˙ = v

v˙ =

−m2L

2

gcos(θ)sin(θ) + mL2

(mLω2

sin(θ) − δv) + mL2u(t)

mL2(M + m(1 − cos2(θ)))

˙θ = ω

ω˙ =

(m + M)mgLsin(θ) − mLcos(θ)(mLω2

sin(θ) − δv) − mLcos(θ)u(t)

mL2(M + m(1 − cos2(θ)))

Where x(t) is the position of the cart, v(t) the cart velocity, θ(t) the pendulum angle measured as

shown in the figure, and ω(t) the pendulum angular velocity. M, m, L, g, δ are the cart mass, pendulum mass, pendulum length, acceleration due to gravity, and the damping constant respectively.

Assume we have sensor that measures the pendulum angle θ. Take m = 1 Kg, M = 5 Kg, L =

2 m, g = −10m/s2

, δ = 1;

(a) What is the relative degree of the system?

(b) Feedback-linearize the system (partially or fully) and find the linearizing control-law u(t).

(c) Does the system have any zero-dynamics? Is the system minimum-phase?

(d) Simulate the system dynamics with the control law that you have found, and plot the trajectories of x(t), v(t), θ(t), ω(t) vs time and report your inferences.

6. Consider the second order nonlinear system

x˙ 1 = x2

x˙ 2 = −x1 + x2(1 − x

2

1 − x

2

2

)

(a) Discuss the stability of the origin.

(b) What happens to the trajectories that do not start from the origin?

Hint: Use Lyapunov stability theory and LaSalles principle for the analysis