0% found this document useful (0 votes)
5 views

Spider Tronix Laterals Induction Task

Uploaded by

R.Sanjay Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Spider Tronix Laterals Induction Task

Uploaded by

R.Sanjay Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

SPIDER TRONIX LATERAL 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

Figure 1: Simple Pendulum (with external torque)


You need to derive equations of motion of this system with state outputs as x1(dot) and x2(dot) and
use it in the code
Open the file Simple_Pendulum.m using Octave.
In this file you will find the following functions defined:

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.

y0 is the initial condition of the system.


Line 4 integrates the differential equation defined in the pendulum_dynamics() function
across the length of tspan with initial condition y0. Line 4 returns an output
[t, y]. t is the time step
array.
y is the solution array where each element in y is the solution of the first order differential
equation and corresponds to an element in t.
[t,y] is returned as output of the sim_pendulum() function.
You are not allowed to make any changes to this function.

4.Pendulum_AB_matrix():
This function returns the A and B matrices for the system.

Declare the A and B matrices for the Simple Pendulum 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

Your task is to make the system stable.


The required behaviour of the pendulum due to the two functions
can be seen here at this link.
6.simple_pendulum_main()
This function is used for testing our code by calling the various functions.
This function can be used to test out the 2 functions sim_pendulum() and
pole_place_pendulum() individually by uncommenting one function and commenting out
the rest.
You can modify the system parameters like mass, gravity, length of pendulum etc.
Line 9 - runs a for-loop to animate the pendulum behavior on a 2D plot.

Note: In order to execute simple_pendulum_main() from the Octave command


window, first run the Simple_Pendulum script in the command window. This
will enable Octave to recognize the functions defined in Simple_Pendulum.
These functions can then be directly called from the command window.

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. ]

You might also like