How to implement network of 'n' coupled adaptive Hopf oscillators ?

4 views (last 30 days)
I am trying to implement network of adaptive coupled Hopf oscillators which is able to learn any periodic input signal (F(t)).
Each oscillator is given by 5 state variables, 2 oscillatory motion that assure structural stability ( xi, yi), one for learning the frequency (wi), one for amplitude (ai) and one for phase relations (oi).
The network summarizes in the following equations, where i represent the oscillator is the (except for oscillator 0):
whereas for oscillator 0 only first four equations are considered with 'tau*sin(Ri - oi) = 0'.
My code for oscillator 0 is as follows:
function dz = myeqd(t,x,fi,ti, epsilon, mu, gamma, eta)
%gamma - speed of convergence
%mu - radius of limit cycle
%epsilon & eta - coupling constant
F_t = interp1(ti,fi, t);
k = gamma*(mu - (x(1)^2 + x(2)^2))*x(1) - x(3)*x(2) + epsilon*(F_t) ;
y = gamma*(mu - (x(1)^2 + x(2)^2))*x(2) + x(3)*x(1) ;
w = -epsilon*(F_t)*x(2)/(x(1)^2 + x(2)^2) ;
a = eta*x(1)*(F_t);
dz = [k;y;w;a] ;
end
In the command window
ti = 0:0.1:2000 ;
t = ti ;
fi = sin(40*t) ;
[t,x] = ode45(@(t,x)myeqd(t,x,fi,ti,0.9, 1,17, 0.9), t , [1 0 45 1] ) ;
*The problem is the amplitude does not converge to a proper value but the frequency does and the amplitude keeps increasing after time when the oscillator has learned the correct frequency.
Also I want expand this code for n oscillators represented by the above equations by proper coupling between oscillators to ensure phase relations.

Answers (2)

Hmayag Partamian
Hmayag Partamian on 20 Aug 2019
Hello Shritej,
I have been recently trying to implement the same application as well and I have stumbled into the same problem where the Amplitude keeps on increasing.
Have you managed to find a solution to the problem?
I appreciate your help in case you solved the issue.
nb. in your code sqrt was missing.
w = -epsilon*(F_t)*x(2)/sqrt(x(1)^2 + x(2)^2) ;
Regards,
Hmayag Partamian
  2 Comments
Hmayag Partamian
Hmayag Partamian on 21 Jan 2021
Thank you Praveen.
Is there an article we can refer too just in case (mathematical formulations, experiements, citing for code if used,..) ?
Thanks again

Sign in to comment.


tangjia zhang
tangjia zhang on 25 Apr 2022
Hi,Shritej
there are two problem for your code,(1)the time step you should get smaller,like 0.001,(2)the input should be F=F_t-x(1),use this one to replace your F_t in your code.

Community Treasure Hunt

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

Start Hunting!