Stability Analysis (Dertermining the Limit Cycle)

16 Ansichten (letzte 30 Tage)
Macaulay Wright
Macaulay Wright am 1 Apr. 2020
Kommentiert: Star Strider am 1 Apr. 2020
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

Akzeptierte Antwort

Star Strider
Star Strider am 1 Apr. 2020
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 Kommentare
Macaulay Wright
Macaulay Wright am 1 Apr. 2020
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 am 1 Apr. 2020
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by