Want to find Transfer function in frequency domain and convert Transfer funct.(T.F) to time domain so that following condition satisfy: X=Y*T.F(time domain).

9 ビュー (過去 30 日間)
Amit
Amit 2014 年 11 月 17 日
編集済み: Amit 2014 年 11 月 17 日
Matlab Code: % objective:To get Transfer function in time domain and check that Input signal =convolution (output Signal,Transfer function) in time domain
clear
>>z=.13;
>>t=(0:0.0005:10);
>>y=3*sin((3*t)+4*cos(7*t+2))-3*sin(t+2*z)-(2+z)*cos(t); %clean signal(Input Signal)
>>freq = 1/(t(2)-t(1));
>>op= 23*cos(3*t+5)+5*sin(14*t)-51*sin(z);%disturbed signal(output Signal)
>>A=mean(y);
>>B=y-A;
>>C=mean(op);
>>D=op-C;
>>B_1=fft(B);
>>D_1=fft(D);
>>n = size(B_1,1)/2;% 2nd half are complex conjugates
>>f = (0:4096)/(2*n*0.0005); % abscissa viewing window
>>TFunct=B_1./D_1;%transfer function in frequency domain
>>figure
>>plot(f,TFunct)
>>TFunct_time=ifft(TFunct);
>>P=conv(D,TFunct_time); _ % is it correct or not? _
%to compare between the undisturbed signal(P) obtained by Transfer function and Input signal(B)
>>figure
>>plot(t,P,'b') %how to obtain t of same size as of *P??????????????*
>>hold on
>>plot(t,B,'r')%h ow to obtain time=t after all the stuff for plotting both signals????
>>grid on

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by