How to find the exact period for given equation?

7 次查看(过去 30 天)
I have an periodic equation, but i can't find the exact period of this equation with analytic method.
Can i derive the exact period of this equation using matlab?? (surely, solving equation with very small time interval, i can derive approximated time, but this is not enough.
  3 个评论
JaeSung Choi
JaeSung Choi 2018-6-6
Rossler attractor, for c=4(period 1) or c=2(period 2). And since I need to test lots of cases, I want to know the method even if I have to study a lot. If you know any general method to derive exact period for given equations, please let me know~!!

请先登录,再进行评论。

回答(1 个)

Shreshth
Shreshth 2023-12-6
Hello JaeSung,
Yes, you can find the period of a periodic function numerically using MATLAB if an analytic solution is difficult or impossible to obtain. While a numerical solution may not give you the exact period, it can provide a highly accurate approximation.
Here is a general approach you could use in MATLAB to find the period of a function:
  1. Define the function in MATLAB.
  2. Use a numerical solver to find two consecutive points where the function crosses a specific value (often zero) with the same slope direction. These points are one period apart.
  3. Calculate the difference in the x-values (time) of these points to estimate the period.
Here's an example MATLAB script that demonstrates this process for a hypothetical function f(t):
% Define the function as an anonymous function
f = @(t) ...; % Replace with your actual function
% Define the time span to search for zero crossings
tspan = [0, 100]; % This is an example; adjust as needed for your function
% Find zero crossings of the function
% You may use a numerical solver or the 'findchangepts' function for this
options = optimset('TolX',1e-6);
t1 = fzero(f, tspan(1), options);
t2 = fzero(f, t1 + eps, options);
% The period is the difference between the two zero crossings
period = t2 - t1;
% Display the period
fprintf('The estimated period of the function is %f\n', period);
Keep in mind that this script assumes the function f(t) is continuous and differentiable, and that it crosses zero at least once per period. If the function crosses a different value than zero, you would need to adjust the function accordingly (e.g., by defining a new function g(t) = f(t) - c, where c is the value it crosses periodically).
Also, the initial guesses for the fzero function are crucial. You should have a rough idea of the period to set a proper range for the initial guesses. If the function has multiple zero crossings within a period, you'll need to ensure that t1 and t2 are indeed one period apart, not just any two consecutive zero crossings.
Thank You,
Shubham Shreshth
  1 个评论
Walter Roberson
Walter Roberson 2023-12-6
Note that this approach will not work if the function has multiple crossings per period. Consider for example multiplication of two sine waves: you need to use Lowest Common Multiple / Greatest Common Divisor calculations to calculate the period of the modulated signal.
Also this approach does not work for cases that do not have true periods. An example of this is bessel functions: they approach period of 2 pi but they do not reach it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by