MATLAB Answers

C.T. signals convolution in Matlab

4 views (last 30 days)
Hi, I have 2 continues time signals (exp decay & step), is it possible to convolute them in MATLAB?
I am working with symbolic variables ‘s’ and ‘t’ since I have obtained a transfer function H(s) analyticlay then converted it to h(t) using ilapalce() function, hence now I need to obtain y(t) where y(t) = h(t)*x(t). x(t) = u(t) a step input and h(t) = exp(-2 t) 4 - 4 exp(-t)


Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 15 Jan 2020
One approach:
syms h(t) x(t) s t
Fcn1 = h(t) == exp(-2*t)*4 - 4*exp(-t);
Fcn2 = x(t) == heaviside(t);
convlap = laplace(Fcn1, t, s) * laplace(Fcn2, t, s);
Y(s) = simplify(rhs(convlap), 'Steps',250)
y(t) = ilaplace(Y, s, t)
y(t) =
4*exp(-t) - 2*exp(-2*t) - 2


Joshua Scicluna
Joshua Scicluna on 15 Jan 2020
are you using Y(s)=H(s)X(s)?
I need to do time domain convoltion using the equation i mentiond befor.
Star Strider
Star Strider on 15 Jan 2020
I did the convolution in the complex s-domain because (1) that is the only way it is possible to do it, and (2) I got the impression that was the process you described as desiring.
syms h(t) x(t) s t T tau
h(t) = exp(-2*t)*4 - 4*exp(-t);
x(t) == heaviside(t);
y(t) = simplify(int(h(t)*x(t-tau), tau, -T, T), 'Steps',250)
y(t) =
-4*exp(-2*t)*(exp(t) - 1)*int(x(t - tau), tau, -T, T)
that appears to be the best result available. There is no specific convolution function in the Symbolic Math Toolbox. (I used symmetric integration limits because similar terms cancel each other, considerably simplifying the expression.)
Using asymmetric limits:
y(t) = simplify(int(h(t)*x(t-tau), tau, 0, T), 'Steps',250)
y(t) =
-4*exp(-2*t)*int(x(t - tau), tau, 0, T)*(exp(t) - 1)

Sign in to comment.

More Answers (1)

Joshua Scicluna
Joshua Scicluna on 16 Jan 2020
Agreed, Thanks for your help!

  1 Comment

Star Strider
Star Strider on 16 Jan 2020
As always, my pleasure!

Sign in to comment.

Sign in to answer this question.