Spider Tronix Laterals Induction Task
Spider Tronix Laterals Induction Task
Deadline:19/12/24
Task Instructions
TASK-1
In this task, you will be implementing Pole Placement Controller on Simple Pendulum. You will be
required to find out the equations of motion for each of the simple pendulum and modify code as
instructed in order to simulate each of the physical systems in a proper manner. You are also required
to answer a set of questions relating to simple pendulum so as to ensure us that you have thoroughly
understood the task given. You should should submit this think and answer individually.
OCTAVE CODE:
https://drive.google.com/file/d/1iJV7cBKBMuVaCbau-_gG1_32gOy8LJ-b/view?usp=sharing Physical
System 1 - Simple Pendulum with external torque T applied
1.draw_pendulum()
2.pendulum_dynamics()
3.sim_pendulum()
4.pendulum_AB_matrix()
5.pole_place_pendulum()
6.simple_pendulum_main()
1.Draw_pendulum():
This function is used to draw the pendulum on a 2D plot. You are not allowed to make any
changes to this function.
2.Pendulum_dynamics():
This function is used to define the dynamics of the system by using the equations of motion
you have derived for this system.
In this function, y - denotes the state vector. The state vector consists of 2 state
variables y(1) and y(2). y(1) corresponds to x1 (or theta) in the system of equations.
y(2) corresponds to x2 (or theta_dot) in the system of equations. dy(1,1) corresponds
to _1 (or theta_dot) in the system of equations. dy(2,1) corresponds to _2 (or
theta_dot_dot) in the system of equations. m is the mass of pendulum bob.
g is the acceleration due to gravity.
L is the length of pendulum bob. u
is the input to the system.
Line 4 denotes the first equation of motion for the system of equations
You are required to complete Line 5 by filling in the second equation of motion in the space
provided.
3.Sim_pendulum():
This function simulates the Simple Pendulum with no input.
4.Pendulum_AB_matrix():
This function returns the A and B matrices for the system.
5.Pole_place_pendulum()
This function simulates the Simple Pendulum with u = -Kx input. K matrix is calculated pole
placement
y0 is the initial state or initial condition of the system. Which means the system will start
from this state.
y_setpoint is the final required state of the system. The pole placement controller will try
to drive the system to this state. Here the y_setpoint is (π,0) which is an equilibrium point
Line 6 integrates the differential equation defined in the pendulum_dynamics() function
across the length of tspan with initial condition y0 and u = -Kx
PYBULLET TASK
TASK-2
Simulate 3 DOF robotic arm by drawing the shape of the triangle using the end
effector of the arm in Pybullet, write with proper controller to optimize the
shape of the triangle and precision of it. Describe why choose this controller over
others. [Note it is required for you do it without using predefined function in
Pybullet for Drawing triangle as well as implementing controller logic,We are
expecting manual code. ]