Bode plot for nonlinear equation

Hello,
I want to plot the bode diagram for nonlinear equation. The equation is:
dxdt_2 = -c*x(2)-k*x(1)-b*(x(1)^3)+ F*sin(w*t+phi)
I have used this code:
t = 0:0.001:250; % time scale
c = 0.1;
k = 1;
b =0.5;
x0 = 0.1;
v0 = 0.1;
F=0.2;
phi=0;
w=10;
i= 0;
[t,x] = ode45( @rhs, t, [x0,v0]);
function dxdt=rhs(t,x)
dxdt_1 = x(2);
dxdt_2 = -c*x(2)-k*x(1)-b*(x(1)^3)+ F*sin(w*t+phi) ;
dxdt = [dxdt_1 ; dxdt_2];
end
How can I plot the Bode Diagram for this function?
Thank you

Respuestas (1)

Aveek Podder
Aveek Podder el 24 de Nov. de 2017

0 votos

Hi,
You can use the 'fft' command of MATLAB to find the frequency analysis of the impulse response for the function and plot Magnitude and phase in 'semilogx' plot. But the response will be dependent on the initial conditions.

Preguntada:

el 8 de Nov. de 2017

Respondida:

el 24 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by