why i am getting weird results when giving input as a chirp signal ?
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I am doing simulation with chirp signal. I am giving chirp signal as an external input to adaptive hopf oscillator.
first time i have set F0 = 100 hz and F1 = 400 hz and for 0 to 20 secs i have simulated. The initial condition i have given for hopf oscillator frequency is 90 hz ... ok results are satisfactory but when i am changing parameters like starting frequency or target frequency or simulation time ... results are changing.. for example if i am giving F0 = 100 hz and F1 = 300 hz then the graph is showing some weird results. Its not adapting frequency. why this is happening ? its not adapting frequency when parameter change ...
the folloing is my code ...
***************************
Tspan= 0:0.001:20; % time vector
f0=100;
f1=400;
fi = chirp(Tspan,f0,20,f1,'linear');
ti=Tspan;
[T,Y]=ode45(@(t,y) myeqd1(t,y,ti,fi),Tspan,[1;1;90]);
plot (T,Y(:,3));
************************************************
function
**********************************************
function dz = myeqd1(t,y,ti,fi)
dz = zeros(3,1);
mu=0.3;
r= sqrt(y(1)^2 + y(2)^2);
K=500;
F=interp1(ti,fi,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));
***************************************************
The following figure showing for F0=100, F1 = 400 for Timespan is 20 secs...the graph showing it is going from 90hz (initial value) to adapted value 400 hz
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
but the second fugure shows for F0=100 and F1= 300 and simulation time is 20 secs.... the graph is going from 90 hz (initial value) to some wierd value above 1800 hz .
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!