Plotting Input Signal for Transfer Function

4 ビュー (過去 30 日間)
Alejandro Urbina
Alejandro Urbina 2016 年 4 月 29 日
回答済み: Azzi Abdelmalek 2016 年 4 月 29 日
I have the following for a transfer function and also the following input signals represented as fourier series.
%%Transfer Fuction
f = 5000; %filtering frequency
w = 2*pi*f; %angular frequency
n = -50:50;
s = 1i*w.*n; %apparently it's easier to work with s than jw
R = 100; %Resistor Value
C = 1./(2.*pi.*f.*R); %Capacitor Value
o = .95; %Sigma Value
H = ((R.^2).*(C.^2).*(s.^2)+ 1) ./ (((R.^2)*(C.^2).*(s.^2)) + (4.*R.*C.*s.*(1-o)) + 1);
%Transfer Function
tcos1 = linspace(-.5,.5,1000); %Timespace for fs1
tcos2 = linspace(-.07,.07,1000); %Timespace for fs2
tcos3 = linspace(-.005,.005,1000); %Timespace for fs3
tcos5 = linspace(-.00005,.00005,1000); %Timespace for fs5
tcos6 = linspace(-.000005,.000005,1000);%Timespace for fs6
fs1 = exp(1i.*10.*pi.*tcos1); %5Hz
fs2 = exp(1i.*100.*pi.*tcos2); %50hz
fs3 = exp(1i.*1000.*pi.*tcos3); %500hz
fs4 = exp(1i.*10000.*pi.*tcos1); %5khz
fs5 = exp(1i.*100000.*pi.*tcos5); %50khz
fs6 = exp(1i.*1000000.*pi.*tcos6); %500khz
fs7 = exp(1i.*10000000.*pi.*tcos1); %5Mhz
What im trying to figure out is how to input the signal into the transfer function and graph it output with repsect to the timespace its given.
i was trying to use
lsim(H,fs1,tcos1);
for example but it dosent work,
ill really appreciate if someone could show me how to make this work or a method to plot the output for the one of the function so i can repeat the process with the rest of them. any help will be appreciated thanks!

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 29 日
H should be a transfer function. In your case, H is a vector of complex numbers.

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by