Hello
i want to simulate using multiple oscillators.
following figure is showing what i want to do ..
the following code is having only one oscillator. I want to simulate using 2 or more oscillators. anyone is having idea how to do simulate with multiple oscillator ?
///////////////////////////////////////////
adaptive hopf oscillator function (instead of 1 i want to use 2 same function)
///////////////////////////////////////////
function dz = myeqd(t,y,ti,xd)
dz = zeros(3,1);
mu=0.2;
r= sqrt(y(1)^2 + y(2)^2);
K=100;
F=interp1(ti,xd,t);
dz(1)= (mu – r^2)*y(1) – y(3)*y(2) +K*F;
dz(2) = (mu – r^2)*y(2) + y(3)*y(1);
dz(3) = (-K*F) * (y(2)/sqrt(y(1)^2 + y(2)^2));
///////////////////////////////////////////////////
main code
///////////////////////////////////////////////////
Tspan= 0:0.001:20; % time vector
f0=100;
f1=400;
fi = chirp(Tspan,f0,20,f1,'quadratic');
ti=Tspan;
[T,Y]=ode45(@(t,y) myeqd1(t,y,ti,fi),Tspan,[1;1;90]);
plot (T,Y(:,3));
Best Answer