Bird
Raised Fist0
Signal Processingdata~10 mins

Even and odd signal decomposition in Signal Processing - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Even and odd signal decomposition
Start with signal x(n)
↓
Calculate even part: x_e(n) = (x(n) + x(-n))/2
↓
Calculate odd part: x_o(n) = (x(n) - x(-n))/2
↓
Verify: x(n) = x_e(n) + x_o(n)
↓
End
We start with a signal x(n), then find its even and odd parts using formulas, and finally check that adding these parts gives back the original signal.
Execution Sample
Signal Processing
x = [1, 2, 3, 4]
N = len(x)
x_e = [(x[i] + x[N-1-i])/2 for i in range(N)]
x_o = [(x[i] - x[N-1-i])/2 for i in range(N)]
x_reconstructed = [x_e[i] + x_o[i] for i in range(N)]
This code splits a simple signal into even and odd parts and then adds them back to check the original signal.
Execution Table
Index ix[i]x[N-1-i]x_e[i] = (x[i]+x[N-1-i])/2x_o[i] = (x[i]-x[N-1-i])/2x_e[i] + x_o[i]
014(1+4)/2=2.5(1-4)/2=-1.52.5 + (-1.5) = 1
123(2+3)/2=2.5(2-3)/2=-0.52.5 + (-0.5) = 2
232(3+2)/2=2.5(3-2)/2=0.52.5 + 0.5 = 3
341(4+1)/2=2.5(4-1)/2=1.52.5 + 1.5 = 4
------
ExitIndex reaches N=4StopAll indices processedAll indices processedOriginal signal reconstructed
💡 All indices processed, decomposition complete, original signal recovered by sum
Variable Tracker
VariableStartAfter i=0After i=1After i=2After i=3Final
x[1, 2, 3, 4][1, 2, 3, 4][1, 2, 3, 4][1, 2, 3, 4][1, 2, 3, 4][1, 2, 3, 4]
x_e[][2.5][2.5, 2.5][2.5, 2.5, 2.5][2.5, 2.5, 2.5, 2.5][2.5, 2.5, 2.5, 2.5]
x_o[][-1.5][-1.5, -0.5][-1.5, -0.5, 0.5][-1.5, -0.5, 0.5, 1.5][-1.5, -0.5, 0.5, 1.5]
x_reconstructed[][1][1, 2][1, 2, 3][1, 2, 3, 4][1, 2, 3, 4]
Key Moments - 3 Insights
Why do we use x[N-1-i] instead of x[-i] in the code?
Because x[-i] does not correctly access the mirrored element (e.g., for i=0, x[-0]=x[0] instead of x[3]), we use x[N-1-i] to access the mirrored element, as shown in the execution_table rows.
Why does adding x_e[i] and x_o[i] give back the original x[i]?
By definition, the even and odd parts split the signal so their sum reconstructs the original signal, as confirmed in the last column of the execution_table.
Can the even and odd parts have decimal values even if the original signal is integers?
Yes, because the formulas involve averaging, which can produce decimals, as seen in x_e values like 2.5 in the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the value of x_o[2]?
A-0.5
B0.5
C2.5
D-1.5
💡 Hint
Check the row where Index i is 2 and the column for x_o[i]
At which index does x_e[i] equal 2.5 for the first time?
A2
B1
C0
D3
💡 Hint
Look at the x_e[i] column in the execution_table from the first row
If the original signal x was symmetric (x[i] = x[N-1-i]), what would be the value of x_o[i]?
AZero for all i
BEqual to x_e[i]
CEqual to x[i]
DNegative of x[i]
💡 Hint
Recall x_o[i] = (x[i] - x[N-1-i])/2 and check what happens if x[i] = x[N-1-i]
Concept Snapshot
Even and odd signal decomposition:
- Even part: x_e(n) = (x(n) + x(-n))/2
- Odd part: x_o(n) = (x(n) - x(-n))/2
- Original signal = even part + odd part
- Even part is symmetric, odd part is antisymmetric
- Useful for analyzing signal properties
Full Transcript
This visual execution shows how to split a signal into even and odd parts. We start with a signal x, then for each index i, calculate the even part as the average of x[i] and its mirrored value x[N-1-i]. The odd part is half the difference between x[i] and x[N-1-i]. Adding these parts recovers the original signal. The tables track each step and variable values. Key points include why we use x[N-1-i] for reversal and how the sum of parts equals the original. The quiz tests understanding of these steps.

Practice

(1/5)
1.

What is the main property of an even signal x(t) in signal processing?

easy
A. It satisfies x(t) = -x(-t) for all t.
B. It has no negative values.
C. It is always zero at t=0.
D. It satisfies x(t) = x(-t) for all t.

Solution

  1. Step 1: Recall definition of even signal

    An even signal is symmetric about zero, meaning the value at t equals the value at -t.
  2. Step 2: Apply the property to the signal

    This means x(t) = x(-t) for every time t.
  3. Final Answer:

    It satisfies x(t) = x(-t) for all t. -> Option D
  4. Quick Check:

    Even signal = x(t) = x(-t) [OK]
Hint: Even signals mirror values at positive and negative times [OK]
Common Mistakes:
  • Confusing even with odd signal definitions
  • Thinking even signals must be zero at t=0
  • Assuming even signals cannot have negative values
2.

Which of the following is the correct formula to find the odd part x_o(t) of a signal x(t)?

easy
A. x_o(t) = (x(t) + x(-t)) / 2
B. x_o(t) = (x(t) - x(-t)) / 2
C. x_o(t) = x(t) * x(-t)
D. x_o(t) = x(t) / x(-t)

Solution

  1. Step 1: Recall formula for odd part of a signal

    The odd part is defined as half the difference between the signal and its time-reversed version: x_o(t) = (x(t) - x(-t)) / 2.
  2. Step 2: Verify the formula matches the odd signal property

    This formula ensures x_o(-t) = -x_o(t), which is the odd signal condition.
  3. Final Answer:

    x_o(t) = (x(t) - x(-t)) / 2 -> Option B
  4. Quick Check:

    Odd part = (x(t) - x(-t))/2 [OK]
Hint: Odd part uses subtraction of reversed signal, then divide by 2 [OK]
Common Mistakes:
  • Using addition instead of subtraction for odd part
  • Multiplying signals instead of subtracting
  • Dividing by wrong number or not dividing at all
3.

Given a discrete signal x = [2, 3, 4, 3, 2] indexed from -2 to 2, what is the even part x_e of this signal?

Use the formula x_e[n] = (x[n] + x[-n]) / 2.

medium
A. [2, 3, 4, 3, 2]
B. [2, 3.5, 4, 3.5, 2]
C. [2, 3, 4, 4, 2]
D. [2, 3.5, 4, 3, 2]

Solution

  1. Step 1: Identify signal values and indices

    Signal x indexed from -2 to 2 is: x[-2]=2, x[-1]=3, x[0]=4, x[1]=3, x[2]=2.
  2. Step 2: Calculate even part using formula

    Calculate each x_e[n] = (x[n] + x[-n]) / 2: - n=-2: (x[-2]+x[2])/2 = (2+2)/2=2 - n=-1: (x[-1]+x[1])/2 = (3+3)/2=3 - n=0: (x[0]+x[0])/2 = (4+4)/2=4 - n=1: (x[1]+x[-1])/2 = (3+3)/2=3 - n=2: (x[2]+x[-2])/2 = (2+2)/2=2 But note the signal is symmetric, so values are same as original except at n=1 and n=-1 where average is 3.
  3. Final Answer:

    [2, 3, 4, 3, 2] -> Option A
  4. Quick Check:

    Even part averages signal and its mirror [OK]
Hint: Average signal values at n and -n for even part [OK]
Common Mistakes:
  • Not averaging values correctly
  • Mixing indices n and -n
  • Using odd part formula instead
4.

Consider the Python code below to compute the odd part of a signal x:

def odd_part(x):
    return [(x[i] - x[-i]) / 2 for i in range(len(x))]

What is the main error in this code?

medium
A. The range should start from 1, not 0.
B. The formula uses addition instead of subtraction.
C. Indexing with negative indices -i is incorrect for this context.
D. The division by 2 is missing.

Solution

  1. Step 1: Understand indexing in Python lists

    Python negative indices count from the end, so -i does not correspond to -n time index but to list end positions.
  2. Step 2: Identify correct indexing for signal symmetry

    For signal indexed from negative to positive, indexing must map i to -i properly, which this code does not do because list indices are 0-based and -i accesses wrong elements.
  3. Final Answer:

    Indexing with negative indices -i is incorrect for this context. -> Option C
  4. Quick Check:

    Python negative indices ≠ signal negative time [OK]
Hint: Python negative indices count from list end, not negative time [OK]
Common Mistakes:
  • Assuming -i indexes negative time correctly
  • Ignoring zero-based indexing
  • Confusing addition/subtraction in formula
5.

You have a signal x(t) = t^3 + 2t. Decompose it into even and odd parts. What is the even part x_e(t)?

hard
A. x_e(t) = 0
B. x_e(t) = t^3
C. x_e(t) = 2t
D. x_e(t) = t^3 + 2t

Solution

  1. Step 1: Identify even and odd nature of terms

    The term t^3 is an odd function because (-t)^3 = -t^3. The term 2t is also odd because 2(-t) = -2t.
  2. Step 2: Calculate even part using formula

    Even part is x_e(t) = (x(t) + x(-t)) / 2. Substitute: x_e(t) = (t^3 + 2t + (-t)^3 + 2(-t)) / 2 = (t^3 + 2t - t^3 - 2t) / 2 = 0.
  3. Final Answer:

    x_e(t) = 0 -> Option A
  4. Quick Check:

    Sum of odd functions is odd, so even part is zero [OK]
Hint: Sum of odd functions has zero even part [OK]
Common Mistakes:
  • Assuming polynomial terms are even by default
  • Mixing odd and even function properties
  • Forgetting to apply formula correctly
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard