All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
https://www.youtube.com/watch?v=9eK6gPRihUw The program is used to analyze the vibration and system parameters for a simple pendulum. As this pendulum motion is SHM so the equation of motion is second order differential equation and solving this manually is time-consuming. So here we use two techniques 1 State-space consideration…
Anantha Padmanabhan
updated on 07 Jan 2020
https://www.youtube.com/watch?v=9eK6gPRihUw
The program is used to analyze the vibration and system parameters for a simple pendulum.
As this pendulum motion is SHM so the equation of motion is second order differential equation and solving this manually is time-consuming. So here we use two techniques
1 State-space consideration
2 Numerical analysis of the differential equation
State-space is nothing but the breaking down higher-order DE to single order DE ie Our equation will be in XY coordinates and we are shifting this equation and analyzing it in a different plane which will help in easy identification of a solution.
In the numerical analysis, we describe an approximate solution for the DE which is taken into consideration. Here solver used is ODE 45 as this will give more number of integrtion points while solving.
System parameters used:
b=0.5; damping
g=10; gravity
l=0.75; Length of string
m=1; mass
theta_0=[0;5]; Intial ang disp and ang velocity ie Intial condition for the system.
The above are the initial condition used in analysing the system. So by using the both methods, we will get an array of values for the simple -pendulum\'s angular velocity and angular displacement. With this system result, these are plotted and the plot is as shown below.
In addition to that, the motion of the pendulum is captured using the method of creating a series of plots by varying the angular displacement values and the position for the pendulum is given by the coordinates associated with them.
Note: Here i have used marker face color to highlight it as bob and increase the line width to highlight the string attached to the bob.
Function
function [derivation] =ode_function_pendulum(t,theta,b,g,l,m)
theta1=theta(1);
theta2=theta(2);
derivation= [theta2; ((-b/m)*theta2-((g/l)*sin(theta1)))];
end
Main PGM
%system definition%
clear all
close all
clc
b=0.5;
g=10;
l=0.75;
m=1;
theta_0=[0;5];
tspan=linspace(0,10,400);
[t,r]=ode45(@(t,theta) ode_function_pendulum(t,theta,b,g,l,m),tspan,theta_0);
ct=1
for i=1:length(r)
x0=0;
y0=0;
x1=l*sin(r(i,1));
y1=-l*cos(r(i,1));
plot([x0 x1],[y0 y1],\'linewidth\',6,\'color\',\'k\')
hold on
plot(x1,y1,\'o\',\'MarkerSize\',30,\'Markerfacecolor\',\'red\')
hold off
axis([-1 1 -1.5 1.5])
pause(0.005)
M(ct)= getframe(gcf)
ct=ct+1;
end
movie(M)
videofile = VideoWriter(\'pendulumspec3\',\'uncompressed AVI\')
open(videofile)
writeVideo(videofile,M)
close(videofile)
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Underbody Coating
Undercoating is the sprayed application of a wax or rubber-based composite onto the entire underside of the vehicle. It’s designed to create a rust-proof layer between the underside of the vehicle and the water, ice, and salt of the road. Here in Canada, the roads we drive on can be tough on the underside of our…
05 Oct 2020 07:21 AM IST
Benchmarking
Reqirements : 5 Seater Small car Good Milleage and comfort Price range 8 to 10 lacs Swift Dzire Hyundai Aura Kia Sonet Hyundai Venue Ford Ecosport Looks Power / Torque 1197bhp 1197 1000 1397 1000 Brakes Disc disc disc disc disc Mileage 23 20 20 23 20 Cost…
05 Oct 2020 07:05 AM IST
Machine learning Basics
1. The difference in the formula for the standard deciation and Variance because the variance is for entire population set and the sample is a subset of the Population and we are taking this sample to analyze the population. The sample size from the population can be 1%, 10% or 60% max not equal to ti 100%. If it…
29 Mar 2020 11:09 AM IST
Parsing NASA thermodynamic data
Aim: Write a function that extracts the 14 coefficients and calculates the enthalpy, entropy and specific heats for all the species in the data file. You will be reading this file NASA thermodynamic data(Tip: use fopen and fgetl). The formulae are shown below. Here R is the universal gas constant, T…
14 Jan 2020 07:20 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.