[MATLAB] Simple Undamped Forced Vibration Problem

In summary, the conversation discusses replicating a solution in Matlab for a problem involving a second-order linear differential equation with initial conditions and a particular solution. The code used involves the ode45 function and the forced1 function, and the conversation also mentions a theoretical solution and asks for ideas on how to correctly implement it in Matlab. The potential use of boundary conditions is also brought up.
  • #1
bugatti79
794
1
Hi Folks,

I am trying to replicate a solution in Matlab for the following problem ##\displaystyle \ddot x + \frac{k}{m}x = \frac{F_o}{m} \sin w_ot##

using 2 first order linear differential equations in Matlab as shown below


tspan=[0 4];
y0=[.02;1]; %Initial Conditions for y(1)=x and y(2)= x dot
[t,y]=ode45(@forced1,tspan,y0); %Calls forced1.m
plot(t,y(:,2)); %y(:,1) represents the displacement and y(:,2) the velocity
grid on
xlabel('time')
ylabel('Displacement')
title('Displacement Vs Time')
hold on;

function yp = forced1(t,y)

m=20;
k=800;
f=8;
w=8;
yp = [y(2);(((f/m)*sin(w*t))-((k/m)*y(1)))];

The problem is I don't know whether Matlab considers both the complementary and particular solution. THe theoretical solution is given as

##\displaystyle x=A \sin w_nt +B \cos w_nt+ \frac{\frac{F_o}{k}}{1-(\frac{w_o}{w_n})^2} \sin w_ot##

where the 3rd term is the particular solution assumed of the form ##x_p=C \sin w_o t##. I am not sure how to implement this correctly in Matlab

Any ideas?

Thanks
 
Physics news on Phys.org
  • #2
Have you confirmed that MATLAB isn't giving you this answer back? It should be easy to check the output of ode45 against that form with a few plots.

Does that particular solution arise as a result of boundary conditions?
 

What is a simple undamped forced vibration problem?

A simple undamped forced vibration problem is a mathematical model used to study the behavior of a mechanical system under the influence of an external force. It involves the use of differential equations to describe the motion of the system, and the system is assumed to have no damping, meaning there is no energy loss due to friction or other factors.

How is MATLAB used to solve a simple undamped forced vibration problem?

MATLAB is a powerful software tool that allows scientists and engineers to solve complex mathematical problems, such as simple undamped forced vibration problems. It provides a variety of functions and tools for solving differential equations and analyzing the behavior of mechanical systems, making it a useful tool for studying vibrations and other dynamic systems.

What are the key components of a simple undamped forced vibration problem?

The key components of a simple undamped forced vibration problem are the mass of the system, the stiffness of the system, and the external force being applied. These components are used to create the differential equation that describes the motion of the system and determine its behavior.

How can I visualize the solution to a simple undamped forced vibration problem in MATLAB?

MATLAB has built-in functions for plotting and visualizing the solution to a simple undamped forced vibration problem. These functions can show the displacement, velocity, and acceleration of the system over time, allowing you to better understand the behavior of the system and how it responds to the external force.

Are there any real-world applications of simple undamped forced vibration problems?

Yes, simple undamped forced vibration problems have many real-world applications, particularly in the fields of engineering and physics. They can be used to study the behavior of structures, such as bridges and buildings, under the influence of external forces, and to design systems that can withstand these forces. They are also used in the development of musical instruments, where the vibrations of strings or air columns can be modeled using similar equations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
985
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
553
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top