IPEN2pu, IPEN3pu – N-link inverted pendulum on cart - Dynamic parameters

Block SymbolsLicensing group: MODEL
Qt SVG Document Exported by REXYGEN Studio a R1 d1 d2 x dd1 dd2 dx E IPEN2pu Qt SVG Document Exported by REXYGEN Studio a R1 d1 d2 d3 x dd1 dd2 dd3 dx E IPEN3pu

Function Description
The IPEN2pu and IPEN3pu blocks simulate the dynamics of double and triple inverted pendulums on a cart, respectively. These models enable users to conduct experiments with various control strategies, making them suitable for both educational and research purposes.

For both models, the primary input is an analog signal a, which denotes the acceleration of the cart [ms2]. The R1 signal is used to reset each model to its initial configuration.

Both models can be precisely configured with using the system’s dynamic parameters p1 - p11 and the initial state of the system (positions d_0, velocities dd_0). The dynamic parameters can be determined using the physical parameters defined in the IPEN2 and IPEN3 blocks and the equations listed below. The model details are thoroughly described in the literature [8].

For the IPEN2pu model, the dynamic parameters are defined as follows:

p1 = m1a12 + m2 l12 + J1 m2a2l2l1 ,p2 = a22l22m2 + J2 m2a2l2l1 ,p3 = m1a1 + m2 m2a2l2 , p4 = 1 l1,p5 = b1 m2a2l2l1,p6 = b2 m2a2l2l1.

For the IPEN3pu model, the dynamic parameters are defined as follows:

p1 = l1(m2a2 + m3) a3l3m3 ,p2 = l1 l2,p3 = m1a12 + m2 + m3 l12 + J1 a3l3m3l2 , p4 = (m2a22 + m3)l22 + J2 a3l3m3l2 ,p5 = a32l32m3 + J3 a3l3m3l2 ,p6 = l1(m1a1 + m2 + m3) a3l3m3l2 , p7 = a2m2 + m3 a3l3m3 ,p8 = 1 l2,p9 = b1 a3l3m3l2,p10 = b2 a3l3m3l2,p11 = b3 a3l3m3l2.

This block does not propagate the signal quality. More information can be found in the 1.4 section.

Input

a

Acceleration of cart [m/s2]

Double (F64)

R1

Block reset

Bool

Parameter

p1..p11

Dynamic model parameter (see model equation)  1.0

Double (F64)

d1_0

Initial angle of pendulum [rad]  1.0

Double (F64)

d2_0

Initial angle of pendulum [rad]  1.0

Double (F64)

d3_0

Initial angle of pendulum [rad]  1.0

Double (F64)

x_0

Initial position of cart [m]  1.0

Double (F64)

dd1_0

Initial angular velocity of pendulum [rad/s]  1.0

Double (F64)

dd2_0

Initial angular velocity of pendulum [rad/s]  1.0

Double (F64)

dd3_0

Initial angular velocity of pendulum [rad/s]  1.0

Double (F64)

dx_0

Initial velocity of cart [m/s]  1.0

Double (F64)

Output

d1

Angle of pendulum [rad]

Double (F64)

d2

Angle of pendulum [rad]

Double (F64)

d3

Angle of pendulum [rad]

Double (F64)

x

Position of cart [m]

Double (F64)

dd1

Angular velocity of pendulum [rad/s]

Double (F64)

dd2

Angular velocity of pendulum [rad/s]

Double (F64)

dd3

Angular velocity of pendulum [rad/s]

Double (F64)

dx

Velocity of cart [m/s]

Double (F64)

E

Error indicator

Bool

2024 © REX Controls s.r.o., www.rexygen.com