How to implement network of 'n' coupled adaptive Hopf oscillators ?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
1 commentaire
Praveen Kumar Pakkiri Samy
le 21 Jan 2021
I have implemented a similar adaptive oscillator using matlab and simulink. It can be found here:
Good luck!!
Réponses (2)
Hmayag Partamian
le 20 Août 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 commentaires
Praveen Kumar Pakkiri Samy
le 21 Jan 2021
you can check this
https://github.com/Prajonty/Adaptive-Oscillators
Hmayag Partamian
le 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
tangjia zhang
le 25 Avr 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.
0 commentaires
Voir également
Catégories
En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!