nonlinear analysis of a dynamic system at selected control parameter c

Contents

====================================================

close all;
clear


c=28;                              %seting of  control parameter c value

Fs=100;                         % sampling frequency [Hz]
T=[0:1/Fs:600-(1/Fs)];          % integration interval and sampling time
y0=[2.9 -1.3 25.9];             % initial conditions Lorenz
%y0=[2.0 2.0 2.0];                % initial conditions Rossler depend on DYNAMIC SYSTEM

% integration of a dyanamic system
[t,y] = ode45(@dynsys,T,y0,[],c);

ndata = 50000;                       % number of data to be analysed
y1=y(end-ndata+1:end,1);             % last  ndata for x variable
y2=y(end-ndata+1:end,2);             % last  ndata for y variable
y3=y(end-ndata+1:end,3);             % last ndata for z variable
y3D = [y1 y2 y3];                    % three dimansional vector of ndata

save dynsys_y.txt y3D -ascii -tabs           % save all three components to file dynsys_y.txt
save dynsys_yCDim.txt y3D -ascii -tabs       % save all three components to file dynsys_yCDim.txt

plot time series y1

plot(y1);
% plot(y1(1:2000));  % plot components from 1 to 2000

======================================================================== Tisean Path: Note that some TISEAN programmes add heading lines to the output files and that the comment mark is # instead of %. This requires that we change the # sign to the % sign in order to import the file into Matlab.

% Path: to TISEAN bin files)
tiseanPath = 'C:\Tisean\Tisean_3.0.0\bin\';
% ========================================================================

Calculation of autocorelation function

aoutocorelation function "tiesean_corr" (corr) calculated from the first columns c1 of file for D1000 points ... tau from 1Ts to 1000 Ts stored into file dynsys_ycorr.txt

system([tiseanPath,'tisean_corr -c1 -D1000 -o dynsys_ycorr.txt dynsys_y.txt']);
dynsys_ycorr = load('dynsys_ycorr.txt');
%
figure
plot(dynsys_ycorr(:,1),dynsys_ycorr(:,2),'k');
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\tisean_corr: Estimates the autocorrelations of a data set 
 
Using dynsys_y.txt as datafile, reading column 1 
Use 50000 lines. 
Opened dynsys_ycorr.txt for writing 

estimation of power spectrum using matlab function

using Hamming window window lenght ndata/100 Fs sampling frequency

h1 = spectrum.welch('Hamming',ndata/10);
spek1 = msspectrum(h1,y(:,1),'Fs',Fs);  % sample frequency ... Fs = 100
ps1 = spek1.Data;
f1 = spek1.Frequencies;  % frequwncy in Hz
figure
semilogy(f1,ps1,'k');

%plot(f1,ps1,'k');  % plot powerspectrum in linear scale

attractor reconstruction using time delay

delay function on input file dynsys_y.txt -M1 read one component -c1 read first column -m3 embeding dimension 3 -F3 format of embeding (xi,xi+1d,xi+2d) -d150 using time delay 150 -o store results into dynsys_delay.txt

system([tiseanPath,'delay  -M1 -c1 -m3 -F3 -d10  dynsys_y.txt -o dynsys_delay.txt']);
dynsys_ydelay = load('dynsys_delay.txt');              % reading dynsys_dela.txt
figure;                                                % ploting two dimensional projection
plot(dynsys_ydelay(:,1),dynsys_ydelay(:,2));
% plot(dynsys_ydelay(1:2000,1),dynsys_ydelay(1:2000,2));  % plot 2D reconstruction from 1 to 2000 components
% plot3(dynsys_ydelay(1:2000,1),dynsys_ydelay(1:2000,2),dynsys_ydelay(1:2000,3)); plot three 3D reconstructio
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\delay: Produces delay vectors 
 
Using dynsys_y.txt as datafile! 
Using columns: 1  
get_multi_series: first data item(s) used: 
13.533056  
Use 50000 lines. 
Opened dynsys_delay.txt for writing 

Estimation of Embeding imension via calculation of correlation dimension

vs radius of the sphere

d2 function -c1 reading first columns from file dynsys_y.tyt -M1,8 using one component do up to 8 time delay embeding -d150 using tiem delay 150 sampling time Ts -r0.0030 minimal radius/length scale -t500 tailor correction windov approx twice of corr(t)=0 -o write results into file dynsys_y.txt.d2; dynsys_y.txt.c2 Estimation of embeding according to embedding ocena embedding dimenzije preko korelacijske dimenzije

system([tiseanPath,'d2 -c1 -M1,8 -d10 -r0.0030 -t500 dynsys_y.txt -o']);
% smothing d2 by av-d2 reading dynsys_y.txt.d2
% av-d2 function
% -m1 minimal embeding dimension
% -M8 maximal
% -a2 number of +-averaging points
% -o output file name ab_Cdim1.txt
system([tiseanPath,'av-d2 -m1 -M8 -a2 -oav_Cdim1.txt dynsys_y.txt.d2']);  % smothing d2
[de1,de2,de3,de4,de5,de6,de7,de8] = read_av_d2('av_Cdim1.txt');    % reding average d2
[c1,c2,c3,c4,c5,c6,c7,c8] =  read_d2('dynsys_y.txt.c2');         % reading correlation integral
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\d2: Estimates the correlation sum, -dimension and -entropy 
 
Using dynsys_y.txt as datafile! 
Using columns: 1  
Use 50000 lines. 
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\av-d2: Smoothes the output of the d2 program 
 
Using dynsys_y.txt.d2 as datafile! 
Opened av_Cdim1.txt for writing 

ploting correlatin integral versus radius in loglog scale

figure
loglog((c1(:,1)),(c1(:,2)),'-')
hold on
loglog((c2(:,1)),(c2(:,2)),'-')
hold on
loglog((c3(:,1)),(c3(:,2)),'-')
hold on
loglog((c4(:,1)),(c4(:,2)),'-')
hold on
loglog((c5(:,1)),(c5(:,2)),'-')
hold on
loglog((c6(:,1)),(c6(:,2)),'-')
hold on
loglog((c7(:,1)),(c7(:,2)),'-')
hold on
loglog((c8(:,1)),(c8(:,2)),'-')

ploting correlation dimension d2 versus radius in loglog scale

figure
semilogx((de1(:,1)),de1(:,2),'-g')
hold on
semilogx((de2(:,1)),de2(:,2),'-k')
hold on
semilogx((de3(:,1)),de3(:,2),'-')
hold on
semilogx((de4(:,1)),de4(:,2),'-')
hold on
semilogx((de5(:,1)),de5(:,2),'-')
hold on
semilogx((de6(:,1)),de6(:,2),'-')
hold on
semilogx((de7(:,1)),de7(:,2),'-')
hold on
semilogx((de8(:,1)),de8(:,2),'-')

estimation of correlation dimension out of original attrcator

d2 function -M3,1 Using three components do embeding with no time lags

system([tiseanPath,'d2 -M3,1 -r0.0030 -t500 dynsys_yCDim.txt -o']);
system([tiseanPath,'av-d2 -m1 -M3 -a4 -odynsys_Cdim2.txt dynsys_yCDim.txt.d2']);
[b1,b2,b3] = read_av_d2E('dynsys_Cdim2.txt');
[d1,d2,d3] =  read_d2E('dynsys_yCDim.txt.c2');

figure
loglog((d3(:,1)),(d3(:,2)),'-')

figure
semilogx((b3(:,1)),b3(:,2),'-')
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\d2: Estimates the correlation sum, -dimension and -entropy 
 
Using dynsys_yCDim.txt as datafile! 
Using columns: 1 2 3  
Use 50000 lines. 
 
TISEAN 3.0.0 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007) 
 
C:\Tisean\Tisean_3.0.0\bin\av-d2: Smoothes the output of the d2 program 
 
Using dynsys_yCDim.txt.d2 as datafile! 
Opened dynsys_Cdim2.txt for writing