Stability Analysis (Dertermining the Limit Cycle)

조회 수: 14 (최근 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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by