0
  • Equation of motion is given by:

equation ,where m, b are stationary values of mass and damping. The time varying term f(t) is excitation power and q(t) is generalized displacement.

  • I solved that:

enter image description here

enter image description here

  • And I should to solve in MatLab via [t,x]=ode23('rightside',tspan,x0).
  • f(t) and k(t) I solved in complex numbers via Fourier series like that in Matlab:

% complex fourier series for f(t)

ft=zeros(size(t)); 
for j=1:2*N+1
n= j-(N+1);    
if n==0
   f(j)=f0/2;
else
   f(j)=f0*( (exp(-i*n*2*pi)*(i*2*pi*n+1)-1)/(4*pi^2*n^2));   
   end
ft=ft+f(j)*exp(i*n*om*t);
end

% complex fourier series for k(t)

kt=k0*ones(size(t)); 
for s=1:2*N+1
    n= s-(N+1);    
    if n==0
       c(s)=k0;
    else
       c(s)=i*(k0+ktyl)/n/pi*(1-cos(n*pi));     
    end
    kt=kt+c(s)*exp(i*n*om*t);
end

  • And we know:

T=30;
dt=0.01;
t=0:0.01:5*T;
k0=1e6;
om=2*pi/T;
ktyl=0.5e6;
N=10;
m=1;
ks=1e4;
D=0.01;
OMG=sqrt(ks/m);
b=2*D*OMG*m;
f0=100;

Thank you.

  • It should be similar princip like that:

function v=prst1(t,y)
global m b k Om D F omeg
v(1)=....;
v(2)=y(1);
v=v(:);
  • and:

global m b k Om D F omeg
m=1;
b=10;
k=1000;
F=10;
Om=sqrt(k/m);
omeg=1*Om;
D=b/(2*Om*m);
x0=[0;0];
[t,x]=ode23('prst1',0:0.01:10,x0);
plot(t,x)
  • BUT I don't how to get there f(t) and k(t).
Mathew Thompson
  • 55,877
  • 15
  • 127
  • 148
MrPitivier
  • 71
  • 9

0 Answers0