Professional Documents
Culture Documents
1. "Verification of linear property circular time shift property and circular frequency
shift property of DFT".
**Aim:**
The aim of this code is to demonstrate and verify three important properties of the Discrete Fourier
Transform (DFT): the linear property, circular time shift property, and circular frequency shift property. By
implementing these properties in code and performing mathematical comparisons, the code aims to show
that the DFT behaves as expected when subjected to various transformations.
**Objectives:**
1. Implement a basic Scilab script that generates a sample signal and computes its DFT.
2. Verify the linear property of the DFT by demonstrating that the DFT of the sum of two signals is equal
to the sum of their individual DFTs.
3. Verify the circular time shift property by confirming that a circular shift in the time domain results in a
phase shift in the frequency domain.
4. Verify the circular frequency shift property by confirming that a frequency-shifted signal in the time
domain corresponds to a phase-shifted DFT.
**Algorithm:**
1. Define the parameters:
- Choose the number of samples `N`.
- Create a vector of time indices `n` from 0 to `N-1`.
This algorithm implements the verification of the linear property, circular time shift property, and circular
frequency shift property of the Discrete Fourier Transform using a sample Scilab code. The objectives are
met by comparing the expected results with the computed results using norms of differences.
Code:
function x = circularShift(signal, k)
n = length(signal);
k = mod(k, n); // Ensure k is within the range [0, n-1]
x = [signal(n-k+1:n), signal(1:n-k)];
endfunction
N = 8; // Number of samples
n = 0:N-1; // Time indices
disp("Linear Property:");
disp(norm(X - X_sum)); // Check if X = X1 + X2
Conclusion:
The Scilab code demonstrated that the DFT satisfies the linear property, circular time shift property, and
circular frequency shift property, validating its fundamental properties in signal processing and analysis.
**Aim:**
The aim of this code is to compute the linear convolution of two sequences using the Inverse Discrete
Fourier Transform (IDFT). By implementing this process, the code aims to demonstrate how the
convolution operation can be performed in the frequency domain and then transformed back to the time
domain.
**Objectives:**
1. Implement a Scilab script that computes the IDFT of the product of DFTs of two sequences to achieve
linear convolution.
2. Demonstrate how linear convolution in the time domain corresponds to multiplication in the frequency
domain.
3. Verify that the result obtained using the IDFT matches the result obtained using the conventional linear
convolution operation.
**Algorithm:**
1. Define the input sequences:
- Define two input sequences, for example, `x` and `h`.
**Scilab Code:**
```scilab
// Define the input sequences
x = [1, 2, 3, 4];
h = [0.5, 0.25, 0.125];
**Aim:** Compute circular convolution using IDFT for efficient sequence convolution.
**Objective:** Implement circular convolution by multiplying sequences in frequency domain using IDFT
for accurate and faster convolution results.
**Algorithm**
Inputs:
- Two input sequences, x and h, each of length N.
2. Calculate the FFT (Fast Fourier Transform) of sequence x using the `fft` function, and store it in X.
3. Calculate the FFT of sequence h using the `fft` function, and store it in H.
6. Output the circularConvolution sequence, which represents the circular convolution of sequences
x and h.
**Code**
X = fft(x);
H = fft(h);
circularConvolution = ifft(Y);
endfunction
// Example usage
x = [1, 2, 3, 4];
h = [0.5, 0.5, 0.5, 0.5];