16 views (last 30 days)
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
• upsampling
• filtering
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?
kale on 4 Jan 2023
p(t) is what is theoretically referred to as the 'pulse' for the PAM signal, i.e. I have chosen (as is often the case) the root raised cosign.
I didn't actually define it explicitly on Matlab, I wrote these steps:
M = 8;
psklev = exp(1j*2*pi*(0:M-1)/M); % M-PSK levels
l = randi([0 M-1], Nsym, 1); % generate Nsym random M-ary symbols
[lg, ~] = togray(l, mb); % Gray mapping
seq = psklev(lg+1);
coeff = rcosdesign(a=0.35, L=30, Ns=10, 'sqrt') % it's discrete, in fact I use the 'stem' command to print it out)
seq_upsample = upsample(seq, Nc=Ns)
seq_filt = filter(coeff, 1, seq_upsample); % this signal is ready to be transmitted, it does not contain ISI
These are the salient steps, but I can send you the whole live script if you need it.
To the seq_filt signal I must add intersymbol interference ... and the professor recommended me to delay the impulse p(t), already creating it with echoes. For example like this: p(t)+a1*p(t-Ts) with Ts=symbol interval.
In the code I have, I do not understand what p(t) is and how I should proceed to achieve this.

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
rng(100);
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
subplot(211);plot([y y3])
subplot(212);plot(y+y3)
##### 2 CommentsShowHide 1 older comment
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.

### Categories

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!

Translated by