Package simulation :: Module Pendulum :: Class Pendulum
[hide private]
[frames] | no frames]

Class Pendulum

source code


Simulation of a pendulum.

Instance Methods [hide private]
 
__init__(self)
Initialize the simulation.
source code
 
doStep(self, dT)
Do one step of time dT.
source code
 
doSmallStep(self, dT)
Simulate a small step of not more than 0.02s.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  NO_MOVEMENT = 1e-05
lower limit of velocity.
Instance Variables [hide private]
  X
position [m]
  dX_dT
velocity [m/s]
  Phi
angle [rad]
  dPhi_dT
angle velocity [rad/s]
  a
acceleration [m/s²]
  l
length of pendulum [m]
  m
mass of pendulum [kg]
  M_P
friction of bearing of pendulum expressed as torque [kgm²/s²=Nm]
  a_W
friction of car expressed as acceleration [m/s²]
  W
gain for incoming acceleration value
  Z
disturbance
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialize the simulation.

Overrides: object.__init__

doStep(self, dT)

source code 

Do one step of time dT. If dT is too large it is subdivided in smaller steps.


Class Variable Details [hide private]

NO_MOVEMENT

lower limit of velocity. Smaller values of velocity are considered as no movement.

Value:
1e-05