How do create a simulink filter if I have the impulse response

2 views (last 30 days)
I have an impulse response of a system h(t) = exp(-10t)u(t). I am trying to code this in simlink. I am using an interpreted Fcn block that calls this function. I am doing something wrong, as I am getting a frame rate error.
function y = func(u)
h = exp(-10*u);
y = conv(h,u);

Answers (1)

Paul
Paul on 14 Nov 2023
Hi Joe,
Why not derive the transfer function H(s) as the Laplace transform of h(t), and then implement H(s) in the Transfer Fcn block. I assume that the that u(t) in the expression h(t) = exp(-10*t)u(t) is the unit step function and not the same as as the u input to func, which is the signal to be filtered.
  2 Comments
Joe Dombroski
Joe Dombroski on 15 Nov 2023
Yes - I actually did try that with a block of 1 / (10 +s). It throws an error because the tranfer Fcn block is a continous signal block an I am using discrete WGN as my input.
Paul
Paul on 15 Nov 2023
Driving an integrator with a discrete signal shouldn't be an error. Can you post the error message and a link to the doc page for the WGN block?

Sign in to comment.

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!