Вы находитесь на странице: 1из 2

1 Mathematical Model of TWIR

In this work, a mathematical model of TWIR in [?] is used for controller design and simulation. The
schematic diagram of a TWIR is shown in Fig. 1. The notations and parameters of the TWIR are shown
in Tab. 1, where J = mr2 /2, K = mr2 /4, I1 = I3 = M d2 /2, I2 = M l2 /2. The motion equations of the
TWIR [?] are represented as in Eq. 1, Eq. 2 and Eq. 3.

Figure 1: Schematic diagram of a TWIR

Table 1: TWIP’s notations and parameters


Notation Definition
x Position of the TWIR
θ Pitch angle of the pendulum body
ψ Yaw angle of the TWIR
d Distance from the left to right wheels
Length from the center of the pendulum
l
to the wheel axis
r Radius of wheels
M Mass of the pendulum (without wheels)
m Mass of left (right) wheel
Mass moment of inertia (MOI) of the wheel
J
with respect to (w. r. t.) the wheel axis
K MOI of the wheel w. r. t. the vertical axis
τL , τR motor’s left (right) torque
C coefficient of viscous friction on wheel axis
MOI of the pendulumn w. r. t. the frame
I1 , I1 , I1
at the center of the pendulum

2J 2 ẋ 1
(M + 2m + 2
)ẍ − M l(ψ̇ 2 + θ̇2 )sin(θ) + M lcos(θ)θ̈ + ( − θ̇) = (τL + τR ). (1)
r C r r

M lcos(θ)ẍ − (M l2 + I2 )θ̈ + (I3 − I1 − M l2 )ψ̇ 2 sin(θ)cos(θ) − M lgsin(θ) − 2C( − θ̇) = −(τL + τR ). (2)
r
[I3 + 2K + md2 /2 + Jd2 /(2r2 ) − (I3 − I1 − M l2 )sin2 (θ)]ψ̈
(3)
+ [M lẋ − 2(I3 − I1 − M l2 )]ψ̇sin(θ) + C ψ̇d2 /(2r2 ) = (τR − τL )d/(2r).
Let define state variables and inputs as

x = [x1 x2 x3 x4 x5 x6 ]T = [x θ ψ ẋ θ̇ ψ̇]T (4)


and
u = [u1 u2 ]T = [τL τR ]T (5)
respectively. Then,
ẋ = f (x, u), (6)
in which ẋ1 = x4 , ẋ2 = x5 , ẋ3 = x6 , ẋ4 = f4 (x, u), ẋ5 = f5 (x, u) and ẋ6 = f6 (x, u), where f4 (x, u) =
Ω1 +Ω2
Ω , f5 (x, u) = Ω3 +Ω

4
, f4 (x, u) = Ω
Ω6 with
5

Ω1 = r2 (M l2 + I2 ) (u1 + u2 )/r + 2C(x5 − x4 /r)/r + M lsin(x2 )(x25 + x26 ) ,


 

Ω2 = r2 M lcos(x2 ) cos(x2 )sin(x2 )(I3 − M l2 − I1 )x26 + (u1 + u2 ) + 2C(x5 − x4 /r) − M glsin(x2 ) ,


 

Ω3 = 2J + (M + 2m)r2 cos(x2 )sin(x2 )(M l2 + I1 − I3 )x26 − (u1 + u2 ) − 2C(x5 − x4 /r) + M glsin(x2 ) ,


 

Ω4 = −M lr2 cos(x2 ) (u1 + u2 )/r + 2C(x5 − x4 /r)/r + M lsin(x2 )(x25 + x26 )],

 
Ω5 = −2r2 d(u1 − u2 )/(2r) + x6 sin(x2 ) M lx4 + 2x5 cos(x2 )(M l2 + I1 − I3 ) + Cd2 x6 /(2r2 ) ,
 

Ω6 = 2I3 + 4K + md2 + 2(I1 − I3 + M l2 )sin2 (x2 ) r2 + Jd2 ,


 

and
Ω = (M lr)2 (1 − cos2 (x2 )) + 2I2 J + 2JM l2 + (I2 M + 2I2 m + 2M ml2 )r2 .

Вам также может понравиться