C.T. signals convolution in Matlab

12 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)
Thanks!
JS

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)
Producing:
y(t) =
4*exp(-t) - 2*exp(-2*t) - 2
  2 Comments
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.
Thanks!
Star Strider
Star Strider on 15 Jan 2020
Yes.
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.
This:
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)
produces:
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)
produces:
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!

Community Treasure Hunt

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

Start Hunting!