How to computer a frequency spectrum and find its largest spectral energy

1 回表示 (過去 30 日間)
PetronasAMG
PetronasAMG 2021 年 9 月 24 日
編集済み: PetronasAMG 2021 年 9 月 26 日
I am given set of equation
I am suppose to plot x1 x2 and x3 as a 3d dimensional phase, but direction wants me to omit any possible initial transient trajectory.
Please help with detail explainations!

回答 (1 件)

Chunru
Chunru 2021 年 9 月 24 日
編集済み: Chunru 2021 年 9 月 24 日
fs = 10;
tspan = [0:1/fs:100]; % specify the time points
xint = [3.0;2.0;1.0];
[t,x]= ode45(@nonlin,tspan,xint);
% remove some trainsition part of x
t = t(100:end);
x = x(100:end, :);
subplot(211); plot(t, x)
subplot(212); plot(20*log10(abs(fft(x))))
function dxdt = nonlin(t,x)
e = 2.5;
dxdt = zeros(3,1);
dxdt(1) = -(x(2)+x(3));
dxdt(2) = x(1) + ((1/5)*x(2));
dxdt(3) = (1/5)+(((x(1)-e))*x(3));
end
  2 件のコメント
PetronasAMG
PetronasAMG 2021 年 9 月 24 日
how would you remvoe the transient part in the phase portrait? not queit understanding the solution. Could it be explained more indepth?
Chunru
Chunru 2021 年 9 月 24 日
In the original code above, I did not remove the transition part. Just kept them. I update the code to remove the transistion period.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by