Add delay to signal
16 views (last 30 days)
Show older comments
kale on 3 Jan 2023
Commented: Paul on 5 Jan 2023
I would like to simulate on Matlab a PAM signal which, travelling on a time-dispersive communication channel, contains intersymbol interference (ISI).
I have 'built' the transmitter by generating:
- M-PSK signal/sequence
- designing the impulse response p(t) of a root of raised cosine
So I have the signal ready to transmit ... but without ISI. Now I want to simulate/insert 'L' echoes of the time-dispersive channel.
In the transmission I don't want to have p(t) but a delayed version of it .. so I want the impulse p(t) to be born already with echoes .. for example like this: p(t)+a1*p(t-Ts) with Ts=symbol interval. Therefore I must linearly combine 2 or 3 appropriately delayed replicas of the impulse response in the absence of ISI. But how do I achieve it?
The professor advised me to use "the function that implements the filter impulse response with delay "... but what function is he talking about?
Any advice is helpful. Thanks!
Paul on 4 Jan 2023
Maybe this will help:
Let's assume we have a simple FIR filter that takes the average of the current and two previous samples of a signal. That filter would have a transfer function of
H(z) = (1 + z^-1 + z^-2)/3;
In Matlab, we represent this as:
b = [1 1 1]/3; a = 1;
Suppose we have some input sequence, u[n]. Then we know that
Y(z) = H(z)*U(z)
Here we just use a random sequence
u = randn(100,1);
The output of our filter, y[n], in response to u[n] is
y = filter(b,a,u);
Suppose we want to delay the output y by 3 samples. Well, that means that the z-transform of the delayed output is z^-3*Y(z), or
z^-3*H(z)*U(z). So can mutiply H(z) by z^-3 and then run u through that. z^-3 is represented by
z3 = [0 0 0 1]; % 0 + 0*z^-1 + 0*z^-2 + 1*z^-3;
Polynomial multiplication is implemented with conv. So the delayed signal is
y3 = filter(conv(z3,b),1,u);
Plot the output and delayed output, and their sum
Paul on 5 Jan 2023
Maybe it's just a terminolgy thing, but I don't understand what you mean by delaying coefficients of a filter. Signals get delayed, not filter coefficients.
Anyway, it sounds like you have a signal u[n] going through a filter H(z) = b(z)/a(z)
y = filter(b,a,u);
Now you want to take that output, and delay it by 8 samples.
b8 = [0 0 0 0 0 0 0 0 1]; % 0 + 0*z^-1 + 0*z^-2 + 0*z^-3 ... 1*z^-8;
y8 = filter(b8,1,y);
It sounds (pun intended) like you want to add y and y8 together to get some sort of echo effect on the original signal. But I'm not really sure what you're trying to do.
More Answers (0)
Find more on z-transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!