I read several papers which proposed a method to identify modal parameters. such as natural frequency and damping ratio.I've tried to implement those methods by Matlab.but I couldn't get the result.It seems I missed something.anyway it must be some problem with my codes.Please check it and see what's the problem. here you can access to the paper which I've tried to implement its method. here you can see the brief relationships to identify damping and frequency. and here is the code. please look and see if I am doing these relationships right or not.also if you have another method to extract the damping of a mode,please do tell me. Best regards.
t=linspace(0,30,300);
Fs=ceil(inv(t(2)-t(1))); % sampling freq
x=sin(2*pi*t*0.1).*(t<10)+sin(2*pi*t*0.3).*...
(t<30)+sin(2*pi*t*0.6).*(t<10).*exp(-t*.1); % my signal[0.1Hz,0.3Hz,0.6Hz]
wname = 'cmor20-1'; % define wavelet name
scales = 1:1:256; % scales range
freq = scal2frq(scales,wname,1/Fs);
coefs = cwt(x,scales,wname,'lvlabs'); % Get coefs of x
abscof=abs(coefs); % |coefs|'
logcof=log(abscof); % Ln|Wx(a,b)|
argcof=angle(coefs); % arg[Wx(a,b)]
%--calculating linear regression to get alpha & omega--
for j=1:256 % for all scales
n=length(t);
aa(j)=-((n*sum(t.*logcof(j,:))-sum(t)*... % its alpha
sum(logcof(j,:))))/(n*sum(t.^2)-(sum(t))^2);
ba(j)=mean(logcof(j,:))-aa(j)*mean(t);
aw(j)=-((n*sum(t.*argcof(j,:))-sum(t)*... %its omega
sum(argcof(j,:))))/(n*sum(t.^2)-(sum(t))^2);
bw(j)=mean(argcof(j,:))-aw(j)*mean(t);
f(j)=aw(j)/(2*pi);
dmp(j)=-aa(j)/sqrt(aa(j).^2+aw(j).^2);
end
%%
% this bit will give me freq of all modes in the signal.but i must get these
%information with f(j) too. however my main problem is getting the damping.
figure;
modI=max(abscof'); % get max |coefs| coresponde to freqs of x
modI=modI/max(modI); % scale each clumn 0-1
plot(freq,modI) % Plot all modes. contain all
grid on
axis([0 3 0 max(modI)*1.1]) % seting the axis
xlabel('Pseudo-Frequency (Hz)'); ylabel('abs(coefs)'); % seting the axis
No comments:
Post a Comment