MATLAB problem with Kapitsa pendulum

You would make your code into a function file like I showed you above but instead of calling the function 'F' like I did above you would call your function name 'plotTrajectory' or something like that.
  • #1
lahuxixi
8
0

Homework Equations


Theory for Kapitsa pendulum predicts that the motion consists of 2 parts:
x(t)=X(t)+ x˜(t)
(1)
With fast oscillations:
x˜(t)=−AX(t)sin(wt) /(w^2)
(2)
and a slowly varying motion X(t) which satisfies the following equation,
X''=(1−(A^2)/(2w^2))X
(3)

Homework Statement


1. Find the analytical solution of the equation (3) and derive the criterion of stability of the
point X = 0 in terms of the parameters A and w.For the stable case, nd the period
of oscillations of X(t) in terms of A and w, and the shape of the trajectory in the phase
plane. For the unstable case, nd the growth rate of deviation from the equilibrium point
and nd the trajectory in the (X; X') phase plane.
2. Rewrite the equation x''=x(1+Asin(wt)) as a system of two rst order ODE's so that the Matlab programme ode45 could be used. Create a function le for the right-hand-side of this system to be used by ode45 to solve it.
3.Consider the stable trajectories, with emphasis on the values of w close to the critical value wcrit. Find approximate periods for X(t). For this, you will need to run solutions for different time intervals and find for the interval which leads to the first approximate return of the trajectory to the initial phase-space point (not necessarily an exact return, because recurrence in X does not imply exact recurrence in x). Do these periods agree with the analytical formula you obtained above (in part 1)? What happens to the period when w tends to its critical value?

The Attempt at a Solution


Ok,this is what i currently have:
After solving the first question, i know that:
x(t)=x(0)cos(sqrt(A^2/(2w^2)-1)*t)
I know that if A^2/(2w^2)-1 is less than 0, then it is unstable, otherwise it is stable
The period seems to be 2*pi/sqrt(A^2/(2w^2)-1)
But i don't know how to find the shape of the trajectory in the phase plane, from what i know, i have to insert the formula into Matlab to obtain the graph .
For the unstable case, find the growth rate of deviation(i don't know what the growth rate of deviation is and how to find it) from the equilibrium point and find the trajectory in the (X; X') phase plane.( please help me with this too)

2. Rewrite the equation x''=x(1+Asin(wt)) as a system of two rst order ODE's so that the Matlab programme ode45 could be used.
For this, i can split it into two part:
x'=y
y'=x(1+Asin(wt))
But i don't know how to create a function file for the right-hand-side of this system to be used by ode45 to solve it.
 
Last edited:
Physics news on Phys.org
  • #2
Hi lahuxixi.

Welcome to the forums!

You need to show an attempt at a solution before we can help you. Why don't you start by doing part 1 and the first half of 2. Those parts of the question have nothing to do with computers.
 
  • #3
Ok,this is what i currently have:
After solving the first question, i know that:
x(t)=x(0)cos(sqrt(A^2/(2w^2)-1)*t)
I know that if A^2/(2w^2)-1 is less than 0, then it is unstable, otherwise it is stable
The period seems to be 2*pi/sqrt(A^2/(2w^2)-1)
But i don't know how to find the shape of the trajectory in the phase plane, from what i know, i have to insert the formula into Matlab to obtain the graph .
For the unstable case, find the growth rate of deviation(i don't know what the growth rate of deviation is and how to find it) from the equilibrium point and find the trajectory in the (X; X') phase plane.( please help me with this too)

2. Rewrite the equation x''=x(1+Asin(wt)) as a system of two rst order ODE's so that the Matlab programme ode45 could be used.
For this, i can split it into two part:
x'=y
y'=x(1+Asin(wt))
But i don't know how to create a function file for the right-hand-side of this system to be used by ode45 to solve it.
 
  • #4
The best thing to do when you're learning MATLAB is to find an example online and change it. So here is an example I found for ode45. In MATLAB go to file -> new -> function and then copy and past the below code into the file that comes up and save it as F.m. Of course you'll need to change the actual function to suit your needs.

Code:
function xp=F(t,x)
xp=zeros(2,1); % since output must be a column vector
xp(1)=x(2);
xp(2)=-t*x(1)+exp(t)*x(2)+3*sin(2*t); % don’t forget ; after each line
 
  • #5
lahuxixi said:
But i don't know how to find the shape of the trajectory in the phase plane, from what i know, i have to insert the formula into Matlab to obtain the graph .

The command for plotting in MATLAB is 'plot'. Why don't you try finding a plotting example online and see if you can change it to suit your needs. If you run into trouble go ahead and post.
 

1. What is a Kapitsa pendulum in MATLAB?

A Kapitsa pendulum is a mathematical model used in MATLAB to study the behavior of a pendulum with a rapidly oscillating pivot point. It was first introduced by Russian physicist Pyotr Kapitsa in the 1930s and has been used in various fields such as physics, engineering, and mathematics.

2. What is the purpose of using a Kapitsa pendulum in MATLAB?

The purpose of using a Kapitsa pendulum in MATLAB is to study the effects of a rapidly oscillating pivot point on the behavior of a pendulum. This model allows researchers to analyze the complex dynamics of the pendulum and understand the underlying principles of its motion.

3. How does MATLAB handle the Kapitsa pendulum problem?

MATLAB has various built-in functions and tools that can be used to simulate and analyze the Kapitsa pendulum. These include the ODE solvers, which can solve the differential equations that govern the motion of the pendulum, and the animation tools, which can be used to visualize the motion of the pendulum.

4. What are some common challenges when working with the Kapitsa pendulum problem in MATLAB?

One of the main challenges when working with the Kapitsa pendulum problem in MATLAB is accurately modeling the rapidly oscillating pivot point. This requires careful selection of parameters and understanding of the underlying physics. Another challenge is ensuring numerical stability of the solution, as the pendulum's behavior can become chaotic for certain parameters.

5. Can the Kapitsa pendulum problem be extended to real-world applications?

Yes, the Kapitsa pendulum problem can be extended to real-world applications in various fields, such as robotics, control systems, and mechanical engineering. The insights gained from studying the pendulum's behavior in MATLAB can be applied to design and optimize real-world systems that involve rapid oscillations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
951
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
815
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Introductory Physics Homework Help
Replies
9
Views
636
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
13K
Back
Top