System Modeling

Point B is the center of mass of the pendulum.

There are parameters we need to measure. Here is the parameter table:

Description Symbol Value
large pulley plus arm mass 56.1*10^(-3) kg
large pulley radius 0.035 m
arm length 0.14 m
copper rod length 0.133 m
copper rod mass 16.7*10^(-3) kg
pendulum length 0.29 m
pendulum mass 49.9*10^(-3) kg

1250 CPR encoder plus connector mass

22.1*10^(-3) kg
motor resistance R 12.486 Ohm
motor constants K 0.2665

We have

And

Thus

Select point O the datum for potential energy. So, the potential energies are:

Ignore the 3D printed structures of the arm since they are light. Thus, the arm's kinetic energy consist of the rotational kinetic energy of the large pulley, the rotational kinetic energy of the copper rod, and the translational kinetic energy of the 1250 CPR encoder (model the encoder as a point mass):

Kinetic energy for link 2 (the pendulum) is:

Total kinetic energy:

Lagrangian:

Ignore friction of the encoder shaft, we have equations of motions:

And we have

Because we ignore motor inductance, we have

The above two equations will give us

The input for the system is voltage, thus

u=V

Select states

Then

I use software Mathematica to calculate.

Note that in Taylor's approximation step, we linearize the system at the following equilibrium point:

So, the linear time invariant system is:

Where