I am a beginner in digital communications and I have a question on the pulse shaping filter.

For example, I have an orthogonal family $ \{s_1,...,s_N \}$. Can we preserve the orthogonality with a pulse shaping filter $g$ as a raised cosine filter, that is to say the family $ \{ g(n) \ast s_1(n),...,g(n) \ast s_N(n) \}$ is orthogonal?

  • $\begingroup$ What is your definition off an orthogonal family? Please do not reply with a flippant answer such as "$s_i$ and $s_j$ are orthogonal for $I\neq j$" but incorporate real details into your question explaining how exactly they are orthogonal with details of the inner product ($\langle s_i, s_j\rangle = 0$ is not enough). $\endgroup$ Commented Mar 25, 2019 at 13:52

2 Answers 2


Lets say you had two signals, assume that they use the same pulse shaping filter $p(t)$, and assume that their codes, $\mathbf{s}_1$ and $\mathbf{s}_2$, are orthogonal ($<\mathbf{s}_1,\mathbf{s}_2>=0$) and length $N$. The two pulse shaped signals are $x_1(t)=\sum_n s_1[n]p(t-nT)$ and $x_2(t)=\sum_ks_2[k]p(t-kT)$, where the notation $s_1[n]$ means the $n^{th}$ element of the vector $\mathbf{s}_1$. So we want to test if the pulse shaped signals are orthogonal, we need to compute the inner product:

$<x_1(t), x_2(t)>=\int x_1(t)x_2^*(t)dt=\int \bigg[\sum_{n=1}^N s_1[n]p(t-nT)\bigg]\bigg[\sum_{k=1}^N s_2[k]p(t-kT) \bigg]^* dt$

Pull the integral inside and distribute the conjugate:

$=\sum_n \sum_k s_1[n] s_2^*[k] \int p(t-nT)p^*(t-kT) dt$

Assuming we have zero-ISI, that is $\int p(t-nT)p^*(t-kT)dt=0$ for all $n \neq k$, and by letting the energy of the pulse be $E_p$ we get:

$=NE_p \sum_n \sum_k s_1[n] s_2^*[k]$

We need to see if this can ever be equal to zero. First, it is clear that $NE_p \neq 0$ so now we check when can $\sum_n \sum_k s_1[n] s_2^*[k]=0$? We can factor this out like: $\sum_n s_1[n] \sum_k s_2^*[k]$. If $\sum_k s_2^*[k] =0$, then we are all set, and the whole thing goes to $0$. For a code with $\pm1$ elements, this amounts to there being an equal amount of $1$'s as $-1$'s.

This is not the case for all orthogonal codes though. Take any Hadamard matrix, one of its codes is the all $1$'s code and the rest have equal amount of $1$'s as $-1$'s by design.

How can the all 1's code be a part of the orthogonal set? This is where the factored term $\sum_n s_1[n] \sum_k s_2^*[k]$ helps. Say that $\mathbf{s}_2$ is the all $1$'s code (so the sum $\neq 0$, lets call the sum value $S_2^*$), the other code $\mathbf{s}_1$ "saves" the orthogonality because then we'll have $\sum_n s_1[n] S_2^*=S_2^* \sum_n s_1[n]=0$.


Adding some code that helps to get the point across. It is helpful to look at the correlation matrices so you can see visually the amount of "leaked" interference. The rectangular pulse is just about perfect as you expect and the RRC lets through a small amount on the off-diagonal elements. Increasing the filter length can further push down these to the point where the RRC and rectangular pulse are behaving similarily. MATLAB code:

% parameters
sps = 10;
span = 6;
rolloff = 0.25;
codeLength = 4;
H = hadamard(codeLength)/sqrt(codeLength); % normalize so that unit norm
H_up = upsample(H, sps);
rrcPulse = rcosdesign(rolloff, span, sps, 'sqrt'); % pulse filter
rectPulse = rectpulse(1, sps)/sqrt(sps); % normalize

% x(:, n) is the n^th pulse shaped signal
for n = 1:codeLength
   x1(:, n) = conv(rrcPulse, H_up(:, n)); % RRC pulse shaped
   x2(:, n) = conv(rectPulse, H_up(:, n)); % rectangular pulse shaped

R1 = x1'*x1; % correlation matrix for RRC pulse
val = maxk(R1(:), codeLength+1);
maxOffDiagonalVal1 = val(end); % this is the max interference from a different code

R2 = x2'*x2; % correlation matrix for rectangular pulse
val = maxk(R2(:), codeLength+1);
maxOffDiagonalVal2 = val(end); % this is the max interference from a different code

xlabel('Signal #')
ylabel('Signal #')
title('Correlation Matrix (RRC)')
c = colorbar;
c.Label.String = 'Correlation';

xlabel('Signal #')
ylabel('Signal #')
title('Correlation Matrix (Rect)')
c = colorbar;
c.Label.String = 'Correlation';
  • $\begingroup$ This is interesting- I could test this with a larger code set and eliminate the first row from the set, which wouldn't be a huge loss (for example a set of 63 usable codes instead of 64 for $H_{64}$. $\endgroup$ Commented Mar 23, 2020 at 19:03
  • $\begingroup$ Nice! I further confirmed with correlating row 2 to row 4 in my answer that they do indeed have a low cross correlation consistent with your theory here (if you exclude row 1 it will form an orthogonal set). I had first suspected there would still be a larger correlation with the two -1's next to each other creating a larger summed pulse, but in the correlation this is multiplied by the balanced -1 1 from row 2 which zeros it out, as you explain above. Good answer! $\endgroup$ Commented Mar 23, 2020 at 19:47
  • $\begingroup$ Its not that you need to remove the all 1's row since all the other codes do have an equal amount of 1's and -1's, that is the last part in my answer $\endgroup$
    – Engineer
    Commented Mar 23, 2020 at 21:17
  • $\begingroup$ I am confused by your last comment. If you remove the all ones row, the rest of the set is balanced and therefore an orthogonal set. What do you mean "Its not that you need to remove the all 1's row." Or are you saying "It's not that. You need to remove....". It's not what? I am agreeing that you need to remove the all 1's row. Or are you not agreeing with that? $\endgroup$ Commented Mar 23, 2020 at 21:44
  • 1
    $\begingroup$ Could be rectangular pulse as well. $g(t)=1$ for $|t| < T/2$ and zero otherwise $\endgroup$
    – Engineer
    Commented Mar 23, 2020 at 22:37

In general for a pulse shaping filter and any orthogonal code family: No.

UPDATE: See @Engineer's answer which I confirmed by excluding the first row in the set of Walsh codes (the all 1 row) the remaining rows which have a balance of 1's and 0's are indeed all orthogonal.

*SECOND UPDATE: @MBaz has pointed out here that with Root-Raised Cosine filtering the entire code set will remain orthogonal: Orthogonal Codes for Band Limited Channel

A detailed mathematical proof along with the criteria where orthogonality can be maintained would be a much better answer, but since no one has submitted one I am at least providing here a simulation result that demonstrates a specific example of an orthogonal family where after pulse shaping with a raised cosine filter the orthogonality was not maintained. (The original signal can of course be extracted at the sampling locations with no distortion given the zero-ISI property of a raised-cosine filter, so that extracted signal would still be orthogonal after sampling, but the question was specifically on the orthogonality of the pulse shaped waveform itself ($g(n)*s_n(n)$)

The formal definition for orthogonal signals is that their inner product (also called the dot product) is zero.

Consider a simple case of the Hadarmard $H_4$ matrix, with each row forming a set of four orthogonal Walsh codes:

$\begin{bmatrix}1 & 1 & 1 & 1\\1 & -1 & 1 & -1\\1 & 1 & -1 & -1\\1 & -1 & -1 & 1\end{bmatrix}$

Before pulse shaping it is easy to confirm orthogonality, for example between row 1 and row 2 using the dot product of index by index product and sum:

$$(1\times1)+(1\times-1)+(1\times1)+(1\times-1) = 0$$

And likewise betweeen row 1 and row 4: $$(1\times1)+(1\times-1)+(1\times-1)+(1\times1) = 0$$

The result of a simulation of this set with a raised cosine filter suggests that orthogonality is maintained in the case of the first two rows, but is not between row 1 and row 4. The resulting waveforms from the first two rows after upsampling by 10 and pulse shaping with a raised cosine filter are shown in the figure below (the sample locations for decoding the original signal are at samples 50, 60, 70 and 80):

pulse shaped row 1 and row 2

The computed dot product for these two waveforms was $4.4E-16$. (Close enough to zero so orthogonal).

Row 1 vs Row 3 is similarly quite low at $9.1E-16$ (again orthogonal).

However Row 1 vs Row 4 was $-0.465$ which is a very strong correlation and clearly no longer orthogonal.

The plot showing the pulse-shaped Row 1 and Row 4 is shown below.

pulse shaped row 1 and row 4

The dot product is the sample by sample product and then the sum (or integration) of the result. Plot of the product of each of the waveform pairs gives further insight into the loss of orthogonality. Note how the product of the pulse-shaped row 1 and row 2 is very symmetric with similar positive and negative areas under the curve, while the product or the pulse shaped row 1 and row 4 has a significantly larger negative area, thus destroying orthogonality in that case:

product row 1 and row 2

product row 3 and row 4

  • $\begingroup$ So after pulse shaping they are no longer perfectly orthogonal, but at the receiver we still do the correlations then choose the largest magnitude? $\endgroup$
    – Engineer
    Commented Mar 23, 2020 at 15:03
  • $\begingroup$ It shows the challenges in doing that when they are transmitted simultaneously - -in this case the other code would only be -6.6 dB down. Would be interesting to see longer codes such as length 64 to understand the extent of the issue in practical applications. $\endgroup$ Commented Mar 23, 2020 at 15:09
  • $\begingroup$ I think it is interesting and makes me curious about availability of orthogonal code sets that have the desirable bandwidth limiting properties such as raised-cosine pulse waveforms but are orthogonal. Will ask as a question. $\endgroup$ Commented Mar 23, 2020 at 15:11
  • $\begingroup$ Already asked here: dsp.stackexchange.com/questions/50290/… $\endgroup$ Commented Mar 23, 2020 at 15:12
  • $\begingroup$ (Actually question was limited to "codes" as DFT and did not get good answers so will put in another question in the context of this post) $\endgroup$ Commented Mar 23, 2020 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.