Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Creating a discrete-time signal as a linear combination of multiple complex sinudoids

Status
Not open for further replies.

Ehsan Mamakani

Newbie level 1
Newbie level 1
Joined
Jan 13, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
8
I want to know how to create a discrete time signal as a linear combination of multiple complex sinusoids. And then how to draw signal in Matlab. Finally, if I have a LTI system impulse response, what should I do to find the output of the system?
Any help is so much appreciated, it would be so helpful if answered with a useful link or examples.
 

You can perform Discrete-time Fourier transform on your ideal waveform to generate , and try to simulate it as an sum of sinus signalq with extracted frequency components and their magnitute.
 

You can perform Discrete-time Fourier transform on your ideal waveform to generate , and try to simulate it as an sum of sinus signalq with extracted frequency components and their magnitute.
Yes, to extend axcdd's answer, if you type "help fft" into Matlab, you will find:

fft.png

So, writing that out in Matlab:
Code:
close all; clear all; clc;

% Some random example data
N = 100;
x = randn(N,1);

% Compute FFT
X = fft(x);

% Inverse FFT is sum of complex sines
x_sum = zeros(N,1);
for n = 1:N
    for k = 1:N
        x_sum(n) = x_sum(n) + X(k)*exp(1j*2*pi*(k-1)*(n-1)/N);
    end
end
x_sum = x_sum/N;

% The same as x_sum, but in compact matrix form
x_sum2 = ifft(eye(N))*X;

% Plot results
plot(x,'k'); hold on; grid on;
plot(real(x_sum), '--r');
plot(real(x_sum2), ':g');  
legend('Original Input','Sum of complex sines', 'Matrix expression');

where exp(jx) = cos(x) + jsin(x).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top