How to implement network of 'n' coupled adaptive Hopf oscillators ?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Praveen Kumar Pakkiri Samy
2021 年 1 月 21 日
I have implemented a similar adaptive oscillator using matlab and simulink. It can be found here:
Good luck!!
回答 (2 件)
Hmayag Partamian
2019 年 8 月 20 日
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 件のコメント
Praveen Kumar Pakkiri Samy
2021 年 1 月 21 日
you can check this
https://github.com/Prajonty/Adaptive-Oscillators
Hmayag Partamian
2021 年 1 月 21 日
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
2022 年 4 月 25 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!