How to find the exact period for given equation?

8 Ansichten (letzte 30 Tage)
JaeSung Choi
JaeSung Choi am 5 Jun. 2018
Kommentiert: Walter Roberson am 6 Dez. 2023
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 Kommentare
JaeSung Choi
JaeSung Choi am 6 Jun. 2018
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~!!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Shreshth
Shreshth am 6 Dez. 2023
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 Kommentar
Walter Roberson
Walter Roberson am 6 Dez. 2023
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Quadratic Programming and Cone Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by