# About chua circuit numerical solutions

• chastiell
In summary, the conversation discusses a problem with excessive slope growth in a numerical solution for the Chua circuit set of differential equations. The individual is using the RK4 method and has provided their awk code for solving the problem. Suggestions are given to tune the circuit and change certain parameters, as well as providing a LTspice model and Freebasic code for reference.
chastiell
hi all !
i'm trying to solve numerically the chua circuit set of differential equations , I am using the equations showed in this pdf:
http://nonlinear.eecs.berkeley.edu/chaos/RobustOpAmpRealizationOfChuaCircuit.pdf

i have the real circuit mounted and I'm using its parameters for the numerical solution

i'm using the RK4 method solving this system , but i got a really big problem calculating the k slopes :

these all grow really fast without control! i found that the problem is caused by the term (RC_i)^{-1} i=1,2 since the capacitances used are really small compared to the resistance used

this is my awk code for solving this problem:

awk '
function abs(value){
return (value<0?-value:value)
}
function g(MN1,M0,M1,BPK1,BKP2,VOLT1){
return MN1*VOLT1+0.5*(M0-MN1)*(abs(VOLT1+BKP1)-abs(VOLT1-BKP1))+0.5*(M1-M0)*(abs(VOLT1+BKP2)-abs(VOLT1-BKP2))
}
function tvc1(RE,C1,MN1,M0,M1,BPK1,BKP2,VOLT1,VOLT2){
return (1/(RE*C1))*(VOLT2-VOLT1-RE*g(MN1,M0,M1,BPK1,BKP2,VOLT1))
}
function tvc2(RE,C2,VOLT1,VOLT2,INTL){
return (1/(RE*C2))*(VOLT1-VOLT2+RE*INTL)
}
function til(LE,VOLT2){
return -VOLT2/LE
}
{}
END{
#variable parameters of the circuit
R=1.2e3
RL=2.14e3
#fixed parameters in the circuit
r1=220.
r3=2.2e3
r4=22.0e3
r6=3.3e3
c1=10.e-9
c2=100.e-9
#equivalent inductance given by gyrator circuit
r8=1.e3
r9=1.e3
r10=100.
c3=100.e-9

L=(r10*r8*c3*RL)/r9

#parameters for the function of chua diode
Esat=8.3
mn1=1/r1+1/r4
m0=1/r4-1/r3
m1=-1/r6-1/r3
bp1=r3*Esat/(r3+r1)
bp2=r6*Esat/(r6+r4)

print mn1,m0,m1,bp1,bp2
#USING THE RK4 METHOD FOR SOLVING THE SYSTEM OF DIFFERENTIAL EQUATIONS
#real life time of circuit simulation
T=0.01
#number of temporal points
n=1000.
#size of temporal points
h=T/n
#initial time
t=0.
#initial conditions
v1=3.
v2=1.
il=1.
print v1,v2,il
#inicializating variables
vn1=0.
vn2=0.
iln=0.
print (1/(R*c1))*(v2-v1-R*g(mn1,m0,m1,bp1,bp2,v1))
while(t<T){
#finding slopes with the k's
# k1
kvn11=tvc1(R,c1,mn1,m0,m1,bp1,bp2,v1,v2)
kvn21=tvc2(R,c2,v1,v2,il)
kiln1=til(L,v2)

# k2
kvn12=tvc1(R,c1,mn1,m0,m1,bp1,bp2,v1+kvn11*h/2.,v2+kvn21*h/2.)
kvn22=tvc2(R,c2,v1+kvn11*h/2.,v2+kvn21*h/2.,il+kiln1*h/2.)
kiln2=til(L,v2+kvn21*h/2.)
# k3
kvn13=tvc1(R,c1,mn1,m0,m1,bp1,bp2,v1+kvn12*h/2.,v2+kvn22*h/2.)
kvn23=tvc2(R,c2,v1+kvn12*h/2.,v2+kvn22*h/2.,il+kiln2*h/2.)
kiln3=til(L,v2+kvn22*h/2.)
# k4
kvn14=tvc1(R,c1,mn1,m0,m1,bp1,bp2,v1+kvn13*h,v2+kvn23*h)
kvn24=tvc2(R,c2,v1+kvn13*h,v2+kvn23*h,il+kiln3*h)
kiln4=til(L,v2+kvn23*h)

#finding new points
vn1=v1+(1./6.)*(kvn11+2*kvn12+2*kvn13+kvn14)*h
vn2=v2+(1./6.)*(kvn21+2*kvn22+2*kvn23+kvn24)*h
iln=il+(1./6.)*(kiln1+2*kiln2+2*kiln3+kiln4)*h
#terminal print of new set of points
print vn1,vn2,iln
#next iteration preparation
v1=vn1
v2=vn2
il=iln
t=t+h
}
}
' \$1

any suggestion for the code ? or to solve my problem of excessive slope grow ?
thanks for reading my post :)

BKP1 or BPK1 in function g() definition ?
function g(MN1,M0,M1,BPK1,BKP2,VOLT1){
function g(MN1,M0,M1,BKP1,BKP2,VOLT1){

Are awk variable names case sensitive ?

I think h needs to be closer to 1e-6
Start with T = 0.001 and t = 1000
You must tune the circuit. Change R to about 2000.
Use x and y range from -10 to +10. The plot of V1 against V2 shows the double scroll.

Last edited:
Attached is the LTspice model and plot file. To run it, remove the .txt extensions.
Likewise rename the file extension to run the Freebasic code.

#### Attachments

• Chuas_LTspice.asc.txt
2.8 KB · Views: 411
• Chuas_LTspice.plt.txt
298 bytes · Views: 437
• FBcode_2.txt
5 KB · Views: 443

## 1. What is a Chua circuit?

A Chua circuit is a nonlinear electronic circuit that exhibits chaotic behavior. It was first proposed by Leon O. Chua in 1983 and is based on a system of three differential equations. It is used as a model for various physical systems, such as chemical reactions and biological systems.

## 2. How is a Chua circuit solved numerically?

A Chua circuit can be solved numerically by using numerical methods, such as Euler's method, Runge-Kutta method, or the fourth-order Adams-Bashforth method. These methods involve breaking down the differential equations into smaller steps and approximating the solution at each step.

## 3. What are the applications of Chua circuit numerical solutions?

Chua circuit numerical solutions have applications in various fields such as chaos theory, control theory, and electronic circuit design. They are also used in studying the dynamics of physical and biological systems, and in developing new technologies such as chaos-based communication systems.

## 4. What are the challenges in solving Chua circuit numerically?

The main challenge in solving Chua circuit numerically is the sensitivity to initial conditions. A small change in the initial conditions can lead to significantly different solutions. This requires careful selection of numerical methods and parameters to get accurate and stable results.

## 5. Are there any limitations to Chua circuit numerical solutions?

Yes, there are some limitations to Chua circuit numerical solutions. As mentioned earlier, the sensitivity to initial conditions can affect the accuracy of the results. Additionally, the numerical solutions may not accurately reflect the behavior of the real physical system due to simplifications and assumptions made in the model. Therefore, it is important to compare the numerical solutions with experimental data to validate the results.

### Similar threads

• Electrical Engineering
Replies
20
Views
2K
• Introductory Physics Homework Help
Replies
5
Views
5K
• Engineering and Comp Sci Homework Help
Replies
12
Views
2K
• Engineering and Comp Sci Homework Help
Replies
6
Views
1K
• Introductory Physics Homework Help
Replies
5
Views
1K
• Introductory Physics Homework Help
Replies
11
Views
8K
• Engineering and Comp Sci Homework Help
Replies
6
Views
2K
• Introductory Physics Homework Help
Replies
5
Views
17K
• Introductory Physics Homework Help
Replies
2
Views
5K
• Beyond the Standard Models
Replies
39
Views
5K