Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Assignment-2, Due date: 31/03/24

EE3060 - Control Engineering


Department of Electrical Engineering, IIT Palakkad

Submission: Combination of handwritten notes and Codes. The assignment is divided into Tasks. Where-ever blue
colored tasks appear, you are supposed to provide the answers in handwritten notes form, and where-ever red colored
tasks appear, you are supposed to provide code/plots and there is no restriction on the programming language to use.
Overall, the report should be scanned and uploaded in pdf format only, with clearly stating your name and roll number.
The neatness of the submission would also be considered.

Note: The equation numbers (except starting with E) comply with reference [R1] provided to maintain the consistency.

1 Introduction
In Assignment-1, a modeling of a self balancing robot is considered. In this assignment, control design would be ad-
dressed. You have to start solving from Task-7 onwards.

A figure shown below describes a schematic of a self balancing robot. It consists of three parts: pendulum attached,
wheels and the motors that drive the wheels. The overall objective is to keep the pendulum in vertical position while
moving.

Figure 1: Schematic of a self balancing robot

1
2 Mathematical model of self balancing robot
By combining wheel dynamics, inverted pendulum dynamics and motor dynamics, a mathematical model of a self
balancing robot is given as (30) in [R1].

where xw is horizontal position of the center of mass of the wheel, xb is horizontal position of the center of mass of the
body, θb is angular displacement of the body, θw is angular displacement of the wheel, yw is vertical position of the center
of mass of the wheel, yb is vertical position of the center of mass of the body as shown in the figure below

All the other parameters in equation (30) are given in page-7 of [R1].

Task-1 (Hand-written)

a) Clearly derive all the steps in arriving at equation (30) of [R1].


b) Is (30) a linear system or a non-linear system? If non-linear why is it so?

Hint: It is given in Section 2.1 of [R1]

The mathematical model presented in (30) is linearized as (31):

2
Task-2 (Hand-written)

dx √
a) Briefly explain how to linearize a general non-linear system dt = −2x2 + u, where u(t) is the control input.
(Reach out to internet/books)
b) Explain clearly how (30) is linearized to (31). It is to be noted here that the linearization towards (31) is a
very simple way of linearization.

Hint: see Section 2.2 of [R1]

Task-3 (programming)

For the example given in Task-2 (a), write a code to verify the unit step response of linear and nonlinear systems.
What do you comment?

3 State Space representation


The linearized mathematical model is also represented by a state space representation

where the input u = vm , which is the motor inputvoltage and the output
 y = θb , which is the angular displacement of the
0 1 0 0
⊤ 0 a22 a23 a24 
 , B = 0 b21 0 b41 ⊤ , (47) can be rewritten as
  
body. By defining x = ẋw ẍw θ̇b θ̈b , A =  0 0 0 1 
0 a42 a43 a44

ẋ = Ax + Bu (E1)
y = Cx. (E2)

Task-4 (Hand-written)

Clearly derive all the steps in arriving at (E1) and (E2). What is input u and the output y considered here?

Hint: see Section 2.2 of [R1]

The next step is obtaining the parameters given in (E1) and (E2). The different values of parameters are given by

3
Figure 2: Value of the parameters used in the model

Task-5 (programming)

Using the parameters given in Figure 2 above, write a code to obtain the matrices A and B in (E1).

Hint: Use equations (38), (41) and (46) of [R1]

4 Transfer function
Using the state space representation (E1) & (E2), the transfer function of the overall system is obtained as (53)

Task-6 (programming)

ˆ Using the state space representation (E1) and (E2) & the values of A and B obtained in Task-4, write a
code to obtain the transfer function. Verify your answer with (53).

Hint: In MATLAB it is ‘ss2tf ’, you may look for the equivalent in other programming languages, and verify the
result in Section 2.3 of [R1]

5 Root locus and control design


Task-7 (Hand-written)

ˆ Does the overall transfer function obtained in (53) a stable system? If unstable, could you justify what is
the physical meaning of instability for the open loop self balancing robot ?

Hint: Try to understanding what falling of a robot means

Consider a closed loop control of a self balancing robot as shown below

4
Figure 3: Closed loop control system

where G(s) is given by (53), which is the plant.

Task-8 (Hand-written)

a) In Figure-3, what are the physical parameters representing input, output, input and output terminals of
controller, input and output terminals of G(s)?

b) What does stability physically mean for this overall closed loop controlled system?
c) Consider the controller as a proportional controller K and obtain the root locus of the overall system in
Figure-3.
d) From the root locus, is it possible to stabilize the system using Proportional controller? Also does the steady
state error between input and output goes to zero for finite gains

Now consider the controller be a PID controller, which is given by


KI
Controller: Kp + + KD s (E3)
s

Task-9 (Hand-written)

a) Using the PID controller given in (E3) for Figure 3 above, by clearly deriving all the steps, design Kp , KI
and Kd such that the overall system would be stable with the overall required transfer function as

−90s
Overall required transfer function:
(s + 475.1)(s + 5.657)(s + 3)

Hint: see Section 3.2.1 of [R1]


b) For the closed loop system in Figure 3, does the steady state error between input and the output goes to
zero? Does the robot not fall down when the error reaches to zero as it seems that the controller block will
have 0 input? Justify your answers.

5
6 Verifying the time response
Task-10 (programming)

ˆ Using the (E3) and the gains obtained in Task-9 a), obtain the plot of controller u(t) (output of the controller
block to be fed to G(s)) for the closed loop system such that the desired body angle θb to be 0
ˆ For the u(t) obtained above, plot the corresponding body angle θb (t). By observing the response of θb (t),
what conclusions are to be made
ˆ Also plot the xw (t) for the same input above. (Here it can be seen that state-space representation would be
useful in obtaining this response)

7 Your observations
Task-11 (Hand-written)

ˆ In brief steps, clearly write what have you learnt in this assignment

References:
R1) Silfver, Toni, “Control Synthesis for Balancing Robots”, 2018. https://drive.google.com/file/d/1ZJYYqA_
Aj0lDJFgIMsAzRvg9DW-Oj-0z/view?usp=sharing

You might also like