Stability Analysis (Dertermining the Limit Cycle)

10 ビュー (過去 30 日間)
Macaulay Wright
Macaulay Wright 2020 年 4 月 1 日
コメント済み: Star Strider 2020 年 4 月 1 日
I am wanting to use a simple stability analysis technique to determine the limit cycle stability for mu< 0, for my Van Der Pol oscillator. I was ideally attempting to use a phase portrait but I don't know how to produce this in code.
The matlab code I currently have produced for the Van Der Pol oscillation can be seen below.
Any guidance would be greatly appreciated.
% Simulation parameters
DT = 0.01; % Time step
N = 10000; % Number of discrete time points
% Equation parameter
mu = 0.1;
% Declare array to store discrete time samples
x = zeros(1,N);
% Set boundary conditions
x(1) = -0.01;
x(2) = 0.0;
% Simulate using recurrance relation
for i = 3:N
phi = mu*DT/2*(x(i-1)^2-1);
x(i) = x(i-1)*(2-DT^2)/(1+phi) - x(i-2)*(1-phi)/(1+phi);
end
% Plot
plot((1:N)*DT,x,'r')
% Calculating angular frequency (omega) using period
[pks,pktimes] = findpeaks(x, (1:N)*DT);
Period = mean(diff(pktimes))
Omega = (2*pi)/Period

採用された回答

Star Strider
Star Strider 2020 年 4 月 1 日
The phase portrait is usually plotted as the function against its derivative. Use the gradient function to calculate the derivative:
figure
plot(x, gradient(x))
grid
Another way is to plot the vector against a delayed version of itself:
Ofst = 5;
figure
plot(x(1:end-Ofst), x(Ofst+1:end))
grid
Both of these produce a reough phase portrait. The gradient version is likely more accurate.
  2 件のコメント
Macaulay Wright
Macaulay Wright 2020 年 4 月 1 日
Thank you again! You're a real help. It worked perfectly and it was exactly what I was trying to produce.
Star Strider
Star Strider 2020 年 4 月 1 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by