Sie sind auf Seite 1von 25

ENGINEERING PHYSICS LABORATORY CHAOS

1. INTRODUCTION

1.1 WHAT IS CHAOS?

What exactly chaos is? The word “chaos” has a slightly different meaning in the scientific
context than it does in its general usage as a state of confusion, lacking any order. With
reference to the chaos theory, it refers to an apparent lack of order in a system that
nevertheless obeys particular laws or rules. The chaos theory is really about finding the
underlying order in apparently random data.

In mathematics, chaos theory describes the behavior of certain dynamical systems – that is,
systems whose states evolve with time – that may exhibit dynamics that are highly sensitive
to initial conditions popularly referred to as the butterfly effect. As a result of this sensitivity,
which manifests itself as an exponential growth of perturbations in the initial conditions, the
behavior of chaotic systems appears to be random.

1.1.1 The definition for chaos.

The word 'chaos' originates from a Greek word and its everyday meaning is 'a state without
order'. it indicates a phenomenon which is not totally disordered but disordered moderately
and shows a temporarily irregular motion. Moreover, it refers to

'An irregular oscillation governed by a relatively simple rule'.

There are lots of definitions standing for chaos.

CHAOS:
Aperiodic long-term behavior in a Deterministic system that exhibits Sensitive
dependence to initial conditions.

 Aperiodic: Trajectories do not settle down (long term) to fixed points, periodic or
quasi-periodic orbits.
 Deterministic: No randomness involved, the future is absolutely determined by the
present (but through non-linear laws, so that the past is not uniquely determined by
the present).
 Sensitive: Nearby trajectories in phase space diverge exponentially fast in time

(positive Lyapunov -exponent), so that long-term prediction becomes impossible
past some time horizon.

†:Lyapunov Exponent: The difference ("error") E(t) between the respective values of two time series of the
same system that start with some small initial difference E(0) in the initial conditions will tend to grow
exponentially in time for a chaotic system: E(t) = E(0) exp (L*t) , where L (Lyapunov exponent) will be a
positive number (with units of 1/time, or frequency) that can be obtained as the slope of the plot of ln(E(t)/E(0))
vs. t. So the value of L indicates the degree of sensitivity to the initial conditions of the chaotic system under
study. Every chaotic system has to have at least one positive Lyapunov exponent L+ ; since the attractor is
bounded there must be at least one negative L- (associated with some other variable) to keep the attractor
volume bounded.

PAGE 1 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

1.2 CHARACTERISTICS OF CHAOS

In mathematics and physics, chaos theory describes the behavior of certain nonlinear
dynamical systems that under certain conditions exhibit a phenomenon known as chaos. The
main characteristic of chaotic systems is the sensitivity to initial conditions. As a result of this
sensitivity, the behavior of systems that exhibit chaos appears to be random. Some
characteristics are given in below.

 Sensitive Dependence on Initial Conditions.


 The trajectory never repeats.
 They are nonlinear.
 The transition to chaos is preceded by infinite levels of bifurcation.
 The infinite bifurcations preceding the transition to chaos are characterized by the
Feigenbaum number.
 Fractional dimensionality.
 A Lyapunov plot of the distance between trajectories versus time will exhibit a
straight line.
 The initial points of the first return map always lie above a line making an angle of 45
degrees with the horizontal.

1.3 CHAOTIC SYSTEM

WHAT IS A A determinic system that seems to be a probabilistic system.


CHAOTIC A dynamical system in which it is Lyapunov coefficients are
SYSTEM?
oscillatory negative.
Irregular oscillatory process.
EXAMPLES Forced pendulums.
FOR A Lasers.
CHAOTIC
SYSTEM.
Some chemical reactions.(Zhabotinky’s Oscillator)
Biological models for population dynamics.
Stimulated heart cells.
FAMOUS Lorentz’s equations.
CHAOTIC Hopf Bifurcation.
SYSTEMS.
Logistic map.
Three body gravitational problem.

Table 1.1-(chaotic systems)

Chaos has already had a lasting effect on science, yet there is much still left to be discovered.
Many scientists believe that twentieth century science will be known for only three theories:
relativity, quantum mechanics, and chaos. Chaos theory has changed the direction of science.

PAGE 2 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

2. BASIC THEORIES

2.1 QUADRATIC MAP, BIFURCATION DIAGRAM, SENSITIVITY OF A


CHAOTIC SYSTEM.

2.1.1 Quadratic map

Imagine we are trying to model the population of, say, rabbits in a forest. We know that,
given what rabbits like to do, the increase in population of rabbits will be related to the
number of rabbits that we have. So we expect a term to look something like:

number (next generation) = L * number (this generation)


Here L is a constant representing the fecundity of the bunnies.
We also know that when there are too many bunnies in the forest then lack of food,
overcrowding, etc. will suppress the number of bunnies in the next generation. If at a
population of 100,000 all the bunnies die, then we need a term like:

number (next generation) = 100000 – number (this generation)


Putting these two terms together we get:
Number (next generation) = L * number (this generation) * (100000 – number (this generation))

This equation is called the Logistic equation. It is so over-simplified that it has nothing to do
with the actual dynamics of how a population of bunnies (or much of anything else) changes.
We will see further examples later of systems that get over-simplified to the point that they
have virtually no physical content, but nonetheless teach us important lessons about chaotic
systems.

2.1.1.1 Quadratic map behaviors (dependent on r)

By varying the parameter r, the following behavior is observed:

 With r between 0 and 1, the population will eventually die, independent of the initial
population.
 With r between 1 and 2, the population will quickly stabilize on the value,
independent of the initial population.
 With r between 2 and 3, the population will also eventually stabilize on the same
value, but first oscillates around that value for some time. The rate of convergence is
linear, except for r=3, when it is dramatically slow, less than linear.
 With r between 3 and (approximately 3.45), the population may oscillate between two
values forever. These two values are dependent on r.
 With r between 3.45 and 3.54 (approximately), the population may oscillate between
four values forever.
 With r increasing beyond 3.54, the population will probably oscillate between 8
values, then 16, 32, etc. The lengths of the parameter intervals which yield the same
number of oscillations decrease rapidly; the ratio between the lengths of two
successive such bifurcation intervals approaches the Feigenbaum constant δ = 4.669.
This behavior is an example of a period-doubling cascade.

PAGE 3 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

 At r approximately 3.57 is the onset of chaos, at the end of the period-doubling


cascade. We can no longer see any oscillations. Slight variations in the initial
population yield dramatically different results over time, a prime characteristic of
chaos.
 Most values beyond 3.57 exhibit chaotic behaviour, but there are still certain isolated
values of r that appear to show non-chaotic behavior; these are sometimes called
islands of stability. For instance, beginning at (approximately 3.83) there is a range of
parameters r which show oscillation between three values, and for slightly higher
values of r oscillation between 6 values, then 12 etc. There are other ranges which
yield oscillation between 5 values etc.; all oscillation periods do occur.
 Beyond r = 4, the values eventually leave the interval [0,1] and diverge for almost all
initial values.

Say we start with two thousand bunnies, and


that the constant L is 0.000028. Then it is
simple to calculate that the next generation
will have
0.000028 * 2000 * (100000 - 2000) =5488
bunnies.
The next generation after that will have
0.000028 * 5488 * (100000 - 5488) =14523
rabbits, and so on.
We can make a graph of the total number of
rabbits in the population. We see that there
are some initial small oscillations, but
eventually the population settles down to a
constant value of 64285.

Fig2.1-Quadratic map (L=0.000028)

Say we start with two thousand bunnies, and


that the constant L is 0.000029. We see that
there are some initial somewhat larger
oscillations, but eventually the population
settles down to a constant value of 65,517. So
increasing L increases the steady state number
of rabbits in the population.

Fig2.2-Quadratic map (L=0.000029)

PAGE 4 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

If we increase the fecundity of the rabbits by


setting L to 0.000031.
something very interesting happens .The
population bifurcates and in the "steady state"
oscillates between two different values.
Some ecologists now believe that such a
"boom-bust" ecological system is better than a
stable one.

Fig2.3-Quadratic map (L=0.000031)

Increasing L to 0.000032 increases the size of


the swings in the population.

Fig2.4-Quadratic map (L=0.000032)

At L equal to 0.000035 the bifurcated


population values have bifurcated once
again, and the number is now
oscillating between four different
values!

Fig2.5-Quadratic map (L=0.000035)

PAGE 5 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

At L equal to 0.0000395 the population


values are weird. In fact, the system has now
become chaotic. This means that it exhibits all
the properties of all chaotic systems. For
example, a miniscule change in the initial
number of rabbits leads to radical changes in
the number of rabbits in each succeeding
generation. It also means that the trajectory
shown to the right never repeats no matter
how many generations we calculate in the
graph.

Fig2.6-Quadratic map (L=0.0000395)

2.1.2 Bifurcation diagram


By iterating the above equation for several different values of r between 0-4 the following
graph can be obtained.

Fig2.7-Bifurcation diagram-I

We can calculate the "steady state" values of the population as a function of the fecundity
factor L, and the result of such a calculation is above. The graph is called the Logistic Map.
We see that initially, as the value of L increases, so does the size of the population. Then we
see the first bifurcation of the population, followed by the second, and finally the transition to
chaos. There are islands of stability for some higher values of L. We also see a hint in the
figure that after the second bifurcation, yet another bifurcation occurs; this in fact occurs. If
we zoomed in on the region just before the first transition to chaos, we would see further
levels of bifurcation occurring. In fact, it can be shown that these bifurcations occur to an
infinite level.

PAGE 6 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

2.1.3 Sensitivity of a chaotic system

2.2 NUMERICAL ANALYSIS AND GRAPHICAL INTERPRETATION OF


ATTRACTORS.

 Mathematically we only need two differential equations to get chaos.


 Many of the laws of physics are expressed in terms of differential equations. Hence,
modeling physical systems require knowledge in solving differential equations
numerically.
 Runge-Kutta method is a special numerical method widely used in computational
physics to obtain approximate solutions to differential equations.
 Runge-Kutta schemes of higher order can be derived by using better formula’s to
approximate the integral than other numerical methods.
 So for the purpose of that we have used 4th order Runge-Kutta method for this
simulation of attractors.

 4th order Runge-Kutta algorithm

k 1  hf ( x n , y n );

k 2  hf ( x n  h / 2 , y n  k 1 / 2 );

k 3  hf ( x n  h / 2 , y n  k 2 / 2 );

k 4  hf ( x n  h , y n  k 3 );

1
y n 1  y n  k 1  2 k 2  2 k 3  k 4   O ( h 5 )
6

PAGE 7 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

2.3 CHUA’S CIRCUIT

PAGE 8 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3. DESIGN, PROCEDURE, OBSERVATIONS.

3.1 EXPERIMENT ONE

3.1.1 Quadratic map

 I have carefully read the theories in the lab sheet and then try to develop a MATLAB
source code to simulate the quadratic map.
 The source code developed based on the logistic equation.
 I have obtained number of graphs to get a clear idea about the quadratic map.

3.1.1.1 MATLAB graphs for various ‘r’ values and initial conditions.

A. 0 < r < 1.0 situation

r = 0.5 & x(1) = 0.7 r = 1.0 & x(1) = 0.7

r = 1.0 & x(1) = 0.5 r = 1.0 & x(1) = 0.3

Fig3.1- Quadratic maps (0 < r < 1)

It can be clearly observed that Xn tends to 0 after a few iterations for any initial value.

PAGE 9 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

B. 1.0 < r < 2.0 situation

r = 1.5 & x(1) = 0.7 r = 2.0 & x(1) = 0.7

r = 1.5 & x(1) = 0.5 r = 1.5 & x(1) = 0.3

r = 1.5 & x(1) = 0.7(zoomed) r = 2.0 & x(1) = 0.7(zoomed)

Fig3.2- Quadratic maps (1 < r < 2)

So It is clear that 1 < r < 2 Xn quickly stabilizes of the value (r-1)/r independent of the initial
value.

PAGE 10 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

C. 2.0< r < 3.0 situation

(a) (b)

r = 2.5 & x(1) = 0.7

(a) (b)
r = 2.9 & x(1) = 0.7

(a) (b)
r = 3.0 & x(1) = 0.7
Fig3.3- Quadratic maps (2 < r < 3)

PAGE 11 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

D. 3.0 < r < 3.5 situation

(a) (b)
r = 3.2 & x(1) = 0.7

(a) (b)
r = 3.3 & x(1) = 0.7

(a) (b)
r = 3.4 & x(1) = 0.7
Fig3.4- Quadratic maps (3 < r < 3.5)

It is obvious that for 3 < r <3.45, Xn tends to a nonzero constant value after some iterations.

PAGE 12 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

E. 3.5 < r < 4 situation

(a) (b)
r = 3.5 & x(1) = 0.7

(a) (b)
r = 3.55 & x(1) = 0.7

(a) (b)
r = 3.59 & x(1) = 0.7

Population tends to oscillate between 2,4,8....values.(oscillation doubles when r increasing).

PAGE 13 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

Fig3.18 - r = 3.6 & x(1) = 0.7 Fig3.19 - r = 3.65 & x(1) = 0.7

Fig3.20 - r = 3.69 & x(1) = 0.7 Fig3.21 - r = 3.70 & x(1) = 0.7

Fig3.22 - r = 4. 0& x(1) = 0.7 Fig3.23 - r = 4.4 & x(1) = 0.7

Fig3.5- Quadratic maps (3.5 < r < 4.5)

At r approximately 3.7 is the onset of chaos, at the end of the period-doubling cascade. We
can no longer see any oscillations. Slight variations in the initial population yield
dramatically different results over time, a prime characteristic of chaos.

PAGE 14 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.1.2 Bifurcation diagram

 After plotting a set of quadratic maps, then I have to summarize them.


 This summarized diagram has a specific name and it is called bifurcation diagram.
 It clearly indicates how chaos happens and period (oscillations) doubling and some
important characteristics of chaos.
 MATLAB source has been developed to obtain this diagram.

3.1.2.1 MATLAB graph for Bifurcation diagram

Fig3.6 – Bifurcation Diagram

 For 0<r<1, Xn tends to zero after a few iterations for any initial value.
 For 1<r<3.5, after some iterations, Xn tends to a nonzero constant value. In both these
cases, the variable Xn is said to be attracted to a fixed point.
 For 3.5<r<4.0, Xn starts to oscillate. Because the variation has a fixed period, the
variable Xn is said to be attracted to a period of one orbit. When r is further increased
more complicated oscillations, such as period 4, period 8 etc and eventually chaotic
orbits can be observed.
 For 3.65<r chaos occurs.
 We can realize those r values by analyzing the bifurcation diagram.
 Further analyzing the quadratic map is chaotic when r=3.84

PAGE 15 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.1.3 Sensitivity of the chaotic system

 The sensitivity of Xn to initial conditions is checked by plotting about 50 iterates of Xn vs n


with several slightly different initial values.
 Chose the r = 3.84 as the chaotic value.
 Here again sensitivity analysis is also done by developing a MATLAB source code.

3.1.3.1 MATLAB graphs for the sensitivity analysis.

Fig3.7 – Sensitivity analysis for various initial conditions for x (1).

PAGE 16 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.2 EXPERIMENT TWO

3.2.1 Runge-Kutta method

 In this experiment we have to simulate chaos by following numerical methods.


 First have to solve given differential equations and then develop MATLAB source
code for the simulation.
 4th order Runge-Kutta method has been used to solve those O.D.Es.

3.2.2 Chua’s circuit and the differential equations.

L C C N
2 1

L: inductor, C 1, 2: capacitors, N: nonlinear resistor @@@: variable resistor

Fig3.8 – Chua’s circuit

 Differential equations.
1. C1 = G(Vc 2 ( V1 −2 ) G( V1−
g
2. Cc =G( V1 2 ( Vc − )
3. )2 ( Vc

= & G( +− iL( + 1 c Gi 1 2 i c − G( + −2 G( +2 −

 Initial conditions.
1. VC1(0) = 0.1V
2. VC2(0) = 0.15V
3. iL(0) = 0.5mA

 Circuit components values.


1. C1 = 10nF
2. C2 = 100nF
3. L = 10mH
4. m1 = -8/7000S
5. m0 = -5/7000S
6. Bp = 1V

PAGE 17 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.2.3 MATLAB graphs for the simulation of the attractor patterns.

R = 1290 R = 1284

R = 1282 R = 1280

R = 1290 R = 1284

Fig3.9 – Simulation of the attractor patterns.

PAGE 18 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.3 EXPERIMENT THREE

3.3.1 Electronic Work Bench simulation

 In this experiment we have to simulate above attractor patterns by using EWB or


PSpice software and Circuit designed by referring the diagrams in the lab sheet.

3.3.2 Chua’s circuit diagram

Fig3.10 – Chua’s circuit in EWB simulation.

3.3.3 EWB oscilloscope out puts for the attractor patterns

R = 2K R = 1.88K

R = 1.85K R = 1.84K

PAGE 19 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

R = 1.825K R = 1.79K

R = 1.74K R = 1.40K

Fig3.11 – Attractor patterns in EWB simulation.

3.3.4 Attractor patterns comparison in experiment two & three.

Experiment two Experiment three


Simulation was done by using Simulation was done by using EWB
MATLAB s/w and it is more like to 5.12 s/w.
be a calculation s/w. This s/w is more like to be a real
time simulation s/w.
It was very difficult to find most Much more easily than when
suitable values for “R” to observe selecting values for “r”.
the relevant patterns.
I have to write a very correct source I have to do nothing but have to
code to develop the Runge-Kutta design the Chua’s circuit in EWB
method and there are several 5.12 which is very much easier than
debugging has been done to achieve a developing a source code.
correct results.
Table 3.1-Attractor pattern comparison in exp-ii &iii

 Finally, I was able to observe those relevant patterns by using both of those
techniques.
 I preferred the EWB 5.12 simulation is the most suitable one to use for obtain those
attractor patterns with time consuming.

PAGE 20 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

3.4 EXPERIMENT FOUR

3.4.1 Chua’s circuit.

 Now this is the real component simulation of Chua’s circuit and following is the
procedure.
 Connect V1 & V2 terminals in to the channel 1 & 2 of the oscilloscope.
 Set the power supply to (+9V)-0V-(-9V) using dual power supply.
 Now configure the oscilloscope.
 Set both channels in to “dual mode”.
 Set time base to XY-mode.
 Power up the circuit & vary †VR (variable resistor) extremely slowly to obtain the
attractor patterns.

3.4.2 Circuit diagrams.

Fig3.12 – Chua’s circuit-ii. Fig3.13 – Chua’s circuit with resistor box.

†: I have used a resistor box instead of the variable resistor in the circuit. I was able to vary resistance up to 1
ohm minimum at a time due to the replacement.

3.4.3 Oscilloscope out puts.

VR = 2.00K VR = 1.79K

PAGE 21 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

VR = 1.75K VR = 1.73K

VR = 1.64K VR = 1.63K

VR = 1.55K VR = 1.53K

VR = 1.53K

PAGE 22 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

4. DISCUSSION

4.1 Experiment one.

 This is almost a numerical interpretation of a chaos system. Simulations were done for
Quadratic map, Bifurcation diagram.
 Finally, I have checked about the sensitivity of the chaotic system.
 I have got a much idea about what is a chaotic system by analyzing the quadratic
maps.
 Bifurcation diagram shows the whole summary of those quadratic maps.
 Faced some difficulties when developing the source codes for relevant plots.

4.2 Experiment two.

 Objective of this experiment is use a numerical methods to obtain the attractor


patterns which is more likely to be a mathematical simulation.
 I have used to use Runge-Kutta method to solve those differential equations.
 Develop a correct source code after few debugging steps.
 I have used the knowledge that i have gained from the course (computational
techniques physics) which is following in this semester to develop this source code.
 Obtained attractor patterns very similar to the lab sheets ones.
 Here I have faced problem how to select the correct range to the variable resister
values.

4.3 Experiment three

 This one is for the PC simulation of the Chua’s circuit.


 No errors or any other problems obtain using EWB 5.12 simulation software.
 We have two alternatives for simulation. 1) EWB simulation 2) PSpice simulation.
 I am not familiar with the second option. So i have used the first option to do this.
 But i suggest that if we have to do the simulation using both softwares it is a good
way to be familiar with both softwares.
 I have worked out it. But stop using PSpice s/w due to lack of time to complete the
practical.
 Attractor patterns obtained by this simulation are identical to the previous exp’s ones.
But the resistance values are not same in those patterns.
 Difficulties occur when selecting the range of the resistor to obtain those patterns.

4.4 Experiment four

 This exp leads to obtain the attractor patterns using real component circuit.
 I have faced some difficulties when using a variable resistor to change the ‘r’ values.
 Solution has been noticed under the exp.
 Also i propose to design your own Chua’s circuit to do this exp.

PAGE 23 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

5. APPENDIX

5.1 MATLAB code for the ‘Quadratic map’

close all;clc;
clear all;
x(1) = 0.7;
n = 200;
r = 4.4;
for i=1:n
x(i+1) = r*x(i)*(1-x(i));
end
a = (0:n);
plot(a,x,'r','LineWidth',2);
xlabel('n');
ylabel('Xn');
grid on;
title(sprintf('Xn vs n (X(1) = %.2f r = %.2f)',x(1),r ));

5.2 MATLAB code for the ‘Bifurcation diagram’


clc; clear;
xn = 0.1;
for r=2.4:0.001:4
for i=1:200
if (i>150)
plot(r,xn,'g.', 'MarkerSize', 1);
hold on;
end
xn = r*xn*(1-xn);
end
end
xlabel('r');ylabel('Xn');title('Graph of Xn vs r');

5.3 MATLAB code for the ‘Sensitivity analysis’.

close all;
clc;
clear all;
r=3.84;
n=50;
x(1)=0.9000;
for i=1:n
x(i+1) = r*x(i)*(1-x(i));
end

nn=(0:n);
plot(nn,x,'g','LineWidth',2);
xlabel('n');
ylabel('xn');
grid on;
title(sprintf('X vs n ( X(1) = %.5f )',x(1)));

PAGE 24 OF 25
ENGINEERING PHYSICS LABORATORY CHAOS

5.4 MATLAB code for the ‘Runge-Kutta method’.


clc; clear;

%Values for the circuit components in the Chua's circuit

c1 = 10e-9; c2 = 100e-9; L = 10e-3;


m1 = (-8/7000); m0 = (-5/7000); Bp = 1;

% G = 1/R; where R is a variable


G = 1/1268; h = 0.000002;

%Initial Conditions
vc1(1) = 0.1;
vc2(1) = 0.15;
iL(1) = 0.5e-3;

%Runge Kutta Method

for i=1:10000

k11 = (G*(vc2(i)-vc1(i))-(m0*vc1(i)+0.5*(m1-m0)*(abs(vc1(i)+Bp)-
abs(vc1(i)-Bp))))/c1;
k21 = (G*(vc1(i)-vc2(i))+iL(i))/c2;
k31 = (-vc2(i))/L;

k12 = (G*((vc2(i)+(h/2)*k21)-(vc1(i)+(h/2)*k11))-
(m0*(vc1(i)+(h/2)*k11)+0.5*(m1-m0)*(abs((vc1(i)+(h/2*k11))+Bp)-
abs((vc1(i)+(h/2)*k11)-Bp))))/c1;
k22 = (G*((vc1(i)+(h/2)*k11)-
(vc2(i)+(h/2)*k21))+(iL(i)+(h/2)*k31))/c2;
k32 = (-(vc2(i)+(h/2)*k21))/L;

k13 = (G*((vc2(i)+(h/2)*k22)-(vc1(i)+(h/2)*k12))-
(m0*(vc1(i)+(h/2)*k12)+0.5*(m1-m0)*(abs((vc1(i)+(h/2*k12))+Bp)-
abs((vc1(i)+(h/2)*k12)-Bp))))/c1;
k23 = (G*((vc1(i)+(h/2)*k12)-
(vc2(i)+(h/2)*k22))+(iL(i)+(h/2)*k32))/c2;
k33 = (-(vc2(i)+(h/2)*k22))/L;

k14 = (G*((vc2(i)+(h)*k23)-(vc1(i)+(h)*k13))-
(m0*(vc1(i)+(h)*k13)+0.5*(m1-m0)*(abs((vc1(i)+(h*k13))+Bp)-
abs((vc1(i)+(h)*k13)-Bp))))/c1;
k24 = (G*((vc1(i)+(h)*k13)-(vc2(i)+(h)*k23))+(iL(i)+(h)*k33))/c2;
k34 = (-(vc2(i)+(h)*k23))/L;

vc1(i+1) = vc1(i)+ (h/6)*(k11+2*k12+2*k13+k14);


vc2(i+1) = vc2(i)+ (h/6)*(k21+2*k22+2*k23+k24);
iL(i+1) = iL(i)+ (h/6)*(k31+2*k32+2*k33+k34);

end

plot(vc1,vc2); title('Vc2 Vs Vc1');


xlabel('vc1'); ylabel('vc2');
grid on;

PAGE 25 OF 25

Das könnte Ihnen auch gefallen