필터 지우기
필터 지우기

Frequency input to Transform Function

조회 수: 7 (최근 30일)
Nerma Caluk
Nerma Caluk 2022년 8월 12일
답변: Paul 2022년 8월 13일
I have developed set of transfer functions, with the final one being the acceleration. I have ran it successfully for an arbitary angular frequency range from 0.01 to 100 rad/s. Now I am trying to input a specific frequency response I have extracted using Fourier Transform, into the final Transfer function. I am not sure how to do this. I have tried using the function "freqresp", but I keep getting errors and weird graphs. Does anyone recommend any changes to the existing function or another function?
This is the code of the transfer functions and attempt signal input:
%%%%%Given Values
K_1 = 500000; % gain of the displacem transducer (V./m)
K_2 = 0.000016; % coil-magnet transfer function (m./s.^2)./V
K_3 = 31.6; % amplifier gain of the feedback output
omega_a = 0.0628; % output high pass cut-off angular frequency (rad./s)
omega_l = 8.72665; % output low pass cut-off angular frequency (rad./s)
f_l0 = 0.06667; % responant frequency of the pendulum (Hz)
h = 0.85; % damping constant
omega_d = 47.62; % demodulator low-pass cut-off angular frequency (rad./s)
omega_f = 0.000997; % feedback low-pass cut-off angular frequency (rad./s)
K = 208.4; % Conversion from V/(m/s^2) to DU/(m/s^2) [DU/V]
omega_f0 = 2*pi*f_l0;
%%%%Flat-Response Mode of the Long-Period Seismometer
% Transfer function of single-pole high-pass filter in the output amplifier
numerator_Fa = [1, 0];
denominator_Fa = [1, omega_a];
F_a = tf(numerator_Fa, denominator_Fa);
%Traner function of the feedback low-pass filter
numerator_Ff = [omega_f];
denominator_Ff = [1, omega_f];
F_f = tf(numerator_Ff, denominator_Ff);
% Tranfer function of the demodulator low-pass filter
numerator_Fd = [omega_d];
denominator_Fd = [1, omega_d];
F_d = tf(numerator_Fd, denominator_Fd);
% Transfer function of the seismometer for accleration
numerator_Sf = [1];
denominator_Sf = [1, 2*h*omega_f0, (omega_f0)^2];
S_f = tf(numerator_Sf, denominator_Sf);
% Transfer function of the feedback component of the seismometer
numerator_Fsf = K_1*S_f*F_d;
denominator_Fsf = 1 + K_1*K_2*S_f*F_d*F_f;
F_sf = numerator_Fsf/denominator_Fsf;
% Transfer function of 8-pole output low-pass anti-aliasing filter
numerator_Fla = [omega_l^2];
denominator_Fla = [1, 2*cos(pi/8)*omega_l,omega_l^2];
F_la = tf(numerator_Fla, denominator_Fla);
numerator_Flb = [omega_l^2];
denominator_Flb = [1, 2*cos((3*pi)/8)*omega_l,omega_l^2];
F_lb = tf(numerator_Flb, denominator_Flb);
F_l = [(F_la)^2] * [(F_lb)^2];
% Input of Frequnecy response (w) through the transfer functions
A_LPF_DU = K*K_3.*F_a*F_l*F_sf; % [DU/(m/s^2)]
s = j.*w;
[resp,freq] = freqresp(A_LPF_DU,s);
resp2 = abs(squeeze(resp))
figure (4)
loglog(freq,resp2)
xlabel('Frequency');
ylabel('Magnitude of Frequency Response');
Thank You!

답변 (1개)

Paul
Paul 2022년 8월 13일
Hi Nerma,
Check freqresp. The second argument should be a real vector of frequencies (typically > 0). The multiplication by 1j is done inside the function.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by