1

I need to generate two chaotic sequences based on chen's hyperchaotic system.It has to be generated from the following four formulas

X=ay-x;
Y=-xz+dx+cy-q;
Y=xy-bz;
Q=x+k;

where a,b,c,d,x,y,z,q are all initialised as follows. I need only X and Y where

  X=[x1,x2,...x4n]
  Y=[y1,y2,...y4n]
  a=36 ;
  b=3 ;
  c=28 ;
  d=16 ;
  k=0.2 ;
  x=0.3 ;
  y=-0.4 ;
  z=1.2 ;
  q=1 ;
  n=256 ;

I tried the following code but i'm not able to get it properly.

clc

clear all

close all

w=imread('C:\Users\Desktop\a.png');

[m n]=size(w)

a=36;

b=3;

c=28;

d=16;

k=0.2;

x(1)=0.3;

y(1)=-0.4;

z(1)=1.2;

q(1)=1;

for i=1:1:4(n)

  x(i+1)=(a*(y(i)-x(i)));

  y(i+1)=-(x(i)*z(i))+(d*x(i))+(c*y(i))-q(i);

  z(i+1)=(x(i)*y(i))-(b*z(i));

  q(i+1)=x(i)+k;

end

disp(x);

disp(y);

pls help. thanks in advance.

  • As far as I can tell, you are trying to integrate a system of ordinary differential equations. It is not normally a good idea to implement the numerical integration yourself. Instead, have a look at Matlab's [built-in functionality](http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html). – A. Donda Aug 16 '14 at 13:17

2 Answers2

6

Your code isn't even close to doing what you want it to. Fortunately, I'm vaguely interested in the problem and I have a bunch of spare time, so I thought I'd try and implement it step by step to show you what to do. I've left a few gaps for you to fill in.

It sounds like you want to integrate the hyperchaotic chen system, which has various definitions online, but you seem to be focusing on

enter image description here

So let's write a matlab function that defines that system

function vdot = chen(t, v, a, b, c, d, k)

    % Here you unpack the input vector v -
    x = v(1); y = v(2); z = v(3); q = v(4);

    % Here you need to implement your equations as xdot, ydot etc.
    %   xdot = ...
    %   ydot = ...
    % I'll leave that for you to do yourself.

    % Then you pack them up into an output vector -
    vdot = [xdot; ydot; zdot; qdot];

end

Save that in a file called chen.m. Now you need to define the values of the parameters a, b, c, d and k, as well as your initial condition.

% You need to define the values of a, b, c, d, k here.
%    a = ...
%    b = ...
% You also need to define the vector v0, which is a 4x1 vector of your
% initial conditions
%    v0 = ...
%

This next line creates a function that can be used by Matlab's integration routines. The first parameter t is the current time (which you don't actually use) and the second parameter is a 4x1 vector containing x, y, z, q.

>> fun = @(t,v) chen(t,v,a,b,c,d,k)

Now you can use ode45 (which does numerical integration using a 4th order runge-kutta scheme) to integrate it and plot some paths. The first argument to ode45 is the function you want to be integrated, the second argument is the timespan to be integrated over (I chose to integrate from 0 to 100, maybe you want to do something different) and the third argument is your initial condition (which hopefully you already defined).

>> [t, v] = ode45(fun, [0 100], v0);

The outputs are t, a vector of times, and v, which will be a matrix whose columns are the different components (x, y, z, q) and whose rows are the values of the components at each point in time. So you can pull out a column for each of the x and y components, and plot them

>> x = v(:,1);
>> y = v(:,2);
>> plot(x,y)

Which gives a reasonably chaotic looking plot:

enter image description here

Chris Taylor
  • 46,912
  • 15
  • 110
  • 154
1

@Abirami Anbalagan and Sir @Chris Taylor, I have also studied hyperchaotic system up to some extent. According to me, for system to be chaotic, values should be like a= 35; b= 3; c= 12; d= 7; v(n) = [-422 -274 0 -2.4]transpose where v(n) is a 4*1 Matrix.