Showing posts with label Pengolahan Sinyal. Show all posts
Showing posts with label Pengolahan Sinyal. Show all posts

Wednesday, October 17, 2012

Signal Processing in a Tiny Nutshell


1. Signals and Systems

a) Periodic signals
Continuous: x(t) = x(t+T), with T = period
Discrete: x[n] = x[n+N], with N = period

b) Fundamental signals
Exponential (e) and Sinusoidal: connected through the Euler relation
Unit Impulse (d) and Unit Step (u): connected through integration and differentiation

2. Linear Time-Invariant Systems

a) Linearity means superposition.
When you add up several inputs, then you simply add up the corresponding outputs.
x1 --> [system] --> y1
x=x1+x2+... --> [system] --> y=y1+y2+...
Meanwhile, Time-Invariant means constant characteristics of the system over time. When you delay an input, then you simply also delay the output.
x1(t) --> [system] --> y1(t)
x1(t-td) --> [system] --> y1(t-td)

b) Any signal can always be represented as a sum of time-shifted impulses.
x(t) = x(t1)d(t-t1) + x(t2)d(t-t2) + ...

c) If we have an unit impulse (d) as the input signal, then the output signal is called the "impulse response" (h) of the LTI system.
d --> [system] --> h

d) By referring to 2b) and 2c), we see that any pair of input signal (x) and output signal (y) can be expressed as follows:
x(t) = x(t1)d(t-t1) + x(t2)d(t-t2) + ... --> [system] --> y(t) = x(t1)h(t-t1) + x(t2)h(t-t2) + ...
This is usually referred to as "Convolution":
Discrete system: y[n] = SUM (x[k] h[n-k]), from k=-INF to k=INF --> y[n]=x[n]*h[n]
Continuous system: y(t) = INTEGRAL (x(T) h(t-T)) dT, from T=-INF to T=INF --> y(t)=x(t)*h(t)

e) If we have an unit step (u) as the input signal, then the output signal is called the "step response" (s) of the LTI system.

u --> [system] --> s
Uniquely, the impulse response (h) and the step response (s) of any LTI system can be related with a simple relation
Discrete --> h[n] = s[n] - s[n-1]
Continuous --> h(t) = d(s(t))/dt

3. Fourier Series representation of periodic signals

a) If we have an exponential signal (e) as the input signal, then the output signal is just the same exponential signal multiplied by a multiplication factor (H).
x(t) = e^jwt --> [system] --> y(t) = H(jw) x e^jwt
H(jw)= INTEGRAL (h(T) e^-jwt) dT, from T=-INF to T=INF --> H(jw) is also called as the "Function Transfer" of the LTI system.
This unique property shows that an exponential signal is an EIGENFUNCTION of a LTI system, while the multiplication factor H is an EIGENVALUE of the LTI system.

b) Any PERIODIC signal can always be represented as a sum of COMPLEX EXPONENTIAL signals with different AMPLITUDES (a_k) and different HARMONIC FREQUENCIES (kw0).
x(t) = SUM (a_k x e^jkw0t), from k=-INF to k=INF
Conversely, we can also always determine the amplitudes a_k
a_k = 1/T x INTEGRAL (x(t) e^-jkw0t) dt, for INTEGRAL RANGE = T
The two equations above are referred to as the SYNTHESIS equation and the ANALYSIS equation, respectively.

c) The method in 3c) is not only applicable to continuous signals but also to discrete signals.
x[n] = SUM (a_k e^jkw0n), for SUM RANGE = N
a_k = 1/N x SUM (x[n] e^-jkw0n)

d) We could also represent any PERIODIC signal as a sum of sinusoidal signals with different amplitudes and different harmonic frequencies. However, by choosing to use complex exponential signals, rather than sinusoidal signals, we take advantage of the special property of exponential signals 

4. Filtering

a) Filters are LTI systems that process a signal based on its frequency, i.e. using the Fourier-series representation of the signal. In one type of applications, we would like to construct frequency-shaping filters. For example, see the frequncy shaping of electrical signals in an audio system. 

b) In another type of applications, we would like to construct various frequency-selective filters: lowpass, highpass, bandpass, bandstop. We can construct a continuous Lowpass filter using a simple RC electrical circuit (Section 3.10.1). We can also construct continuous Highpass filters using a simple RC electrical circuit (Section 3.10.2). The same methods can also be applied for constructing discrete filters in digital systems 

c) REVIEW. So far we have understood how to represent PERIODIC signals as Fourier series. Most of signals, however, are non-periodic. Next week we will see how to deal with these non-periodic signals.

5. Fourier Transform representation of aperiodic signals

a) Fourier showed us that any APERIODIC signal can be approximated as a PERIODIC signal, with the period T approaching INF. As T become sufficiently large, the distance between a_k coefficients in the frequency spectrum become sufficiently small such that the a_k spectrum become more continuous. Eventually, the ANALYSIS and SYNTHESIS equations then become the FORWARD and INVERSE Fourier Transform equations, respectively.
x(t) = 1/2pi INTEGRAL (X(jw) e^jwt) dw, from w=-INF to w=INF
X(jw) = INTEGRAL (x(t) e^-jwt) dt, from t=-INF to t=INF
Hence, any APERIODIC continuous signal can be represented with the Fourier Transform. Note that all signals (both periodic and non-periodic) can be represented as a Fourier Transform, but only periodic signals can be represented as a Fourier series.

b) The convolution and multiplication properties of the Continuous Fourier Transform makes your life much easier. The complicated procedure of convolution in the time-domain can now be replaced by a simple procedure of multiplication in the frequency-domain.
y(t)=x(t)*h(t) <--> Y(jw)=X(jw)H(jw)
Conversely, a multiplication in the time-domain corresponds to a convolution in the frequency-domain.
y(t)=x(t)h(t) <--> Y(jw)= 1/2pi (X(jw)*H(jw))

c) The methods described in 5a) and 5b) can also be applied for discrete signals.
x[n] = 1/2pi INTEGRAL (X(e^jw) e^jwn) dw, for w=2pi
X(e^jw) = SUM (x[n] e^-jwn), from n=-INF to n=INF
y[n]=x[n]*h[n] <--> Y(e^jw)=X(e^jw)H(e^jw)
y[n]=x[n]h[n] <--> Y(e^jw)= 1/2pi INTEGRAL (X(e^jTHETA) H(e^j(w-THETA))) dTHETA, for THETA=2pi

d) There is a DUALITY between the Fourier Series and Transforms; see Table 5.3 in page 396 for details. There also exist a useful duality between Fourier Transform pairs; examples: top-hat <--> sinc; flat(constant) <--> single pulse; sinusoidal <--> train of pulses 

6. Time and frequency characterization

a) The Fourier Transform of any signal has a magnitude-phase representation.
Continuous: X(jw) = |X(jw)| e^jPHASE_X(jw)
Discrete: X(e^jw) = |X(e^jw)| e^jPHASE_X(e^jw)
Similarly, the frequency response of a LTI system also has a magnitude-phase representation.
Y(jw) = H(jw)X(jw)
|Y(jw)| = |H(jw)||X(jw)| --> this leads to a magnitude amplification
PHASE_Y(jw) = PHASE_H(jw) + PHASE_X(jw) --> this leads to a phase shift

b) If the phase shift at the frequency domain is a linear function of the frequency w, then the consequence in the time domain is straightforward, i.e. a time shift. However, in many applications, the phase shift is a nonlinear function of the frequency w, resulting in a non-straightforward consequence in the time domain.

c) An LTI system with |H(jw)| = 1 and PHASE_H(jw) = 0 is a system that do nothing, as if it does not exist.

d) To evaluate a frequency-selective filter, we should also be careful with its time-domain properties. For example, an ideal lowpass filter is defined as follows:
H(jw)=1 for |w|<=wc
H(jw)=0 for |w|>wc
Be careful, however that the magnitude characteristic alone is not enough. In particular, if the phase characteristic has a nonlinear function of the frequency w, then the time-domain representation of the filter might have undesired time-warped forms.
On top of that, remember that the the impulse response of an ideal lowpass filter (with a tophat form) is a sinc function. When the frequency range of the filter is made shorter, then the sinc-formed impulse response in the time-domain will get wider, which might be undesired.
Moreover, the step-response of the lowpass filter might also suffer, resulting in 'ringing'.

e) Non-ideal filters are sometimes MORE desirable than ideal filters, because they allow us to optimize between the time-domain properties and the frequency-domain properties. For instance, some transition between the bandpass region and the bandstop region may be introduced in the frequency domain to provide a trade-off that allows for a better step response (i.e. with very small ringing) in the time domain.

7. Sampling

a) By performing sampling based on impulses, any continuous signal can be converted into a discrete signal.
x_s(t) = x(t) SUM (d(t-nTs)), from n=-INF to n=INF, with Ts as the sampling period.
Conversely, any discrete signal can be converted back into a continuous signal by performing interpolation in between the discrete data.

b) The Nyquist sampling theorem states that, for any signal that is band-limited in the frequency domain (X(jw)=0 for |w|>wM), then the time-domain representation of the signal can be determined by its samples, if the sampling frequency is higher than twice the highest frequency of the signal (wS > 2wM).

c) If the sampling frequency is equal to, or lower than, twice the highest frequency of the signal to be sampled, then the frequency-domain representation of the sampled signal will not resemble the sampled signal anymore (this phenomenon is called aliasing), such that the time-domain representation will also not resemble the sampled signal anymore. A visual example regarding aliasing is provided by the stroboscope experiment;

d) In many applications, processing of continuous signal is done by the following procedure: sample the continuous signal and convert it into a discrete signal (i.e. using ADC); process the discrete signal using digital systems; interpolate data in the discrete signal and convert it back into a continuous signal (i.e. using DAC).


e) REVIEW. in the 1st week, we have seen several basic types of signals. We now understand why they are important to study LTI systems:
-) Sinusoidal: useful to develop Fourier Series and Transform.
-) Exponential (e): also useful to develop Fourier Series and Transform, but even more useful than Sinusoidal signals due to their unique property as the EIGENFUNCTION of the LTI system being analyzed. Using Exponential signals as input allows us to identify the TRANSFER FUNCTION H(jw) of the LTI system.
-) Unit Step (u): useful to identify the Step Response of the LTI System, which is frequently a very important characteristic of the LTI system in the time domain.
-) Unit Impulse (d): useful to identify the Impulse Response of the LTI system being analyzed, which in turn allows us to develop the concepts of Convolution, Fourier Series, and Fourier Transform.

f) In principle, Fourier Transform methods can be performed using either continuous systems or discrete systems. Using discrete systems, however, provide a significant advantage in industrial applications: it allows us to develop the so-called Fast Fourier Transform (FFT), which uses a special discrete algorithm that is very efficient and very fast. More details on FFT will be given after the Midterm Exam.

g) For those of you who are curious about the relations between Fourier Series, Fourier Transform, Laplace Transform, and Z-Transform, the following comparison may help:
-) Continuous Fourier Series can represent only continuous periodic signals, by using a sum of purely imaginary exponentials.
-) Discrete Fourier Series can represent only discrete periodic signals, by using a sum of purely imaginary exponentials.
-) Continuous Fourier Transform can represent both periodic and non-periodic continuous signals, by using a sum of purely imaginary exponentials.
-) Discrete Fourier Transform can represent both periodic and non-periodic discrete signals, by using a sum of purely imaginary exponentials.
-) Laplace Transform can represent both periodic and non-periodic discrete signals, by using a sum of complex exponentials (containing both real and imaginary exponentials).
-) Z Transform can represent both periodic and non-periodic discrete signals, by using a sum of complex exponentials (containing both real and imaginary exponentials).