Skip to content

University project. Pendulum visual simulation along with its properties applied on plots. Given initial angle, its task is to reach target angle in finite amount of time. Written in Python using Vpython and Matplotlib packages.

Notifications You must be signed in to change notification settings

tomasz-pucka/pendulum-simulation

Repository files navigation

Pendulum simulation

University project for "Basics of automation". Pendulum visual simulation along with its state applied on plots written in Python 2 using Vpython and Matplotlib packages. Given initial angle, its task is to reach the target angle in a finite amount of time.

Prerequisites

  • Python 2.7
  • Vpython 6.11
  • Matplotlib

Configuration

Parameter Description
end_time Simulation duration
dt Time step
initial_angle Initial pendulum angle (-PI, PI)
target_angle Target pendulum angle (0, PI)
damping Pendulum damping
accuracy Pendulum accuracy <1;--)
mass Mass of ball
length Length of rod
gravity Gravity force

Accuracy is proportional to the time needed to reach target angle [more accuracy = more time = more precise final angle].

Output

Variable name Description
angle_list list of angles
max_angle_list list of maxiumum angles
velocity_list list of velocities
additional_velocity_list list of additional velocities
time_list list of discrete time values

Screenshots

screenshot

screenshot

screenshot

About

University project. Pendulum visual simulation along with its properties applied on plots. Given initial angle, its task is to reach target angle in finite amount of time. Written in Python using Vpython and Matplotlib packages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages