Tuesday, March 29, 2011

Some former notes on LTI system, Laplace, Z-transform

System with memory: output y(t) at an arbitrary time t=t0 depends on input in addition to x(t0), so compute y(t0) may need t < t0 or t > t0. Capacitor: v(t0) = \ind i(t) dt.

Memoryless: only depend on t0, resistor: v(t0) = Ri(t0)

Causal: depends only on the input x(t) for t <= t0

Linear System: two requirements: Additvity:  T{x1(t)}=T{y1(t)}, T{x2(t)} = T{y2(t)}, then T{x1+x2} = T{x1(t)} + T{x2(t)} =  y1 +y2....Scaling: x(t) -> y(t), then a*x(t) -> a*y(t). Combine to the principle of superposition: x(t) = a*x1(t)+b*x2(t), must produce y(t) = a*y1(t)+b*y2(t)

Time-invariant system: if a shift in input signal cause simply a like shift in output. x(t) -> y(t), then x(t-t0) must produce y(t-t0) for any t0.

Stable system: BIBO(bounded-input/Bounded-output): if |x(t)| <= B1, then |y(t)| must <= B2, or \sum |h(n)| < infinite (ROC has to include jw axis, ROC covers unit circle)

Linear time-invariance system are stable if and only if the impulse response is absolutely summable.

Invertible system: if and only if distinct input signals produce distinct output signals, such as y(t) = x(t) ^ 3, (... ^2 is not invertible)

Analysis equation: X(jw) = \ind x(t) e^{-jw t} dt, Synthesis equation: x(t) = 1/2pi \ind X(jw) e^{jw t} dw

ROC: region of convergence. The range of values for complex vairable s for which Laplace transform converge is called ROC

Laplace: X(s) = \ind x(t) e^{-st} dt. If X(s) converges for s = jw, Fourier transform X(jw) exist (means if jw if included in ROC, Frourier transform exist) , it is a special case of Laplace

ROC: right-side, left-side. Causal signal is right-side(not reverse), antiCausal is left-side. Right-side: Re{S} > a_max, where a_ are the poles. Left-side: Re{S} < a_min. Ex: X(s) = 1/(s+a) + 1/(s+b), Re{S}> max(-a, -b}, poles are: s=-a, s=-b....Two-side signal: a1 < Re{S} < a2

if the system Both causal and stable, then all poles must be on the left of s plane

Z transform: X(z) = \sum x[n] z^{-n}. Right-side: |z|>r_max, where r is radius of all poles. Left-side: |z|<r_min. The Z-transform evaluated on the unit circle corresponds to the Fourier Transform. So if the ROC includes the unit circle, it implies convergence of z-transform for |z| = 1, also means the Fourier transform of the sequence converges.

Simple LPF: H(z) = 1 -  a*z^-1, HPF: 1/(1 - a*Z^-1) (...? is this simple FIR, IIR?)

Structured FIR: y[n] = \sum_k=0->M b_k x[n-k]

DTFT: discrete time fourier transform: X(e^ j omega) = \sum x[n] e^{-j omega n}

Absolute summability is a sufficient condition for existence of a Fourier transform representation.

Fourier transform is conjugate symmetric: X(e^jw) = X*(e^-jw)

Fourier transform real part is even: X_R(e^jw) = X_R(e^-jw)

Fourier transform imaginary part is odd

Magnitude is even: |X(e^jw)| = |X(e^-jw)|

Phase is odd: angle (X(e^jw)) = - angle(x(e^-jw)

Decimator (downsampling) : signal -> LPF -> downsample

Interpolation (upsampling) : signal -> upsample -> LPF

in All-pass filter, each pole  is paired with a conjugate reciprocal zero

The poles of the system function for a causal and stable IIR filter must lie inside the unit circle

To design FIR, we often impose the constraint of a linear phase.

The simplest method of FIR filter design is called the window method. It begins with an ideal desired frequency response

the difference between the actual analog value and quantized digital value due is called quantization error. This error is due either to rounding or truncation. The error is sometimes considered as an additional random signal called quantization noise

FIR: if the input becomes zero at any time, then the output will eventually become zero as well, as soon as enough time has passed so that all the delayed inputs are zero, too. Therefore, the impulse response lasts only a finite time, and this is the reason for the name finite impulse response. A discrete-time transfer function of such a filter contains only poles at the origin (i.e., delays) and zeros; it cannot have off-origin poles.

A FIR filter is linear-phase if and only if its coefficients are symmetrical around the center coefficient, that is, the first coefficient is the same as the last; the second is the same as the next-to-last, etc. (A linear-phase FIR filter having an odd number of coefficients will have a single coefficient in the center which has no mate.) The formula is simple: given a FIR filter which has N taps, the delay is: (N - 1) / (2 * Fs), where Fs is the sampling frequency. So, for example, a 21 tap linear-phase FIR filter operating at a 1 kHz rate has delay: (21 - 1) / (2 * 1 kHz)=10 milliseconds.

the most popular alternative is "minimum phase". Minimum-phase filters (which might better be called "minimum delay" filters) have less delay than linear-phase filters with the same amplitude response, at the cost of a non-linear phase characteristic, a.k.a. "phase distortion".

What is the Z transform of a FIR filter?

For an N-tap FIR filter with coefficients h(k), whose output is described by:

      y(n)=h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + ... h(N-1)x(n-N-1),

the filter's Z transform is:

      H(z)=h(0)z-0 + h(1)z-1 + h(2)z-2 + ... h(N-1)z-(N-1) , or


What is the frequency response formula for a FIR filter?

The variable z in H(z) is a continuous complex variable, and we can describe it as: z=r·ejw, where r is a magnitude and w is the angle of z. If we let r=1, then H(z) around the unit circle becomes the filter's frequency response H(jw). This means that substituting ejw for z in H(z) gives us an expression for the filter's frequency response H(w), which is:

     H(jw)=h(0)e-j0w + h(1)e-j1w + h(2)e-j2w + ... h(N-1)e-j(N-1)w , or

Using Euler's identity, e-ja=cos(a) - jsin(a), we can write H(w) in rectangular form as:

     H(jw)=h(0)[cos(0w) - jsin(0w)] + h(1)[cos(1w) - jsin(1w)] + ... h(N-1)[cos((N-1)w) - jsin((N-1)w)] , or


Are FIR filters inherently stable?

Yes. Since they have no feedback elements, any bounded input results in a bounded output.

IIR: if the input is set to 0 and the initial conditions are non-zero, then the set of time where the output is non-zero will be unbounded; the filter's energy will decay but will be ever present. Therefore, the impulse response extends to infinity, and the filter is said to have an infinite impulse response. There are no special restrictions on the transfer function of an IIR filter; it can have arbitrary poles and zeros, and it need not be expressible as a rational transfer function

Why is the impulse response "infinite"?

The impulse response is "infinite" because there is feedback in the filter; if you put in an impulse (a single "1" sample followed by many "0" samples), an infinite number of non-zero values will come out (theoretically).

What are the advantages of IIR filters (compared to FIR filters)?

IIR filters can achieve a given filtering characteristic using less memory and calculations than a similar FIR filter.

DFT: N^2

FFT: N*log2(N)

What are the disadvantages of IIR filters (compared to FIR filters)?
  • They are more susceptable to problems of finite-length arithmetic, such as noise generated by calculations, and limit cycles. (This is a direct consequence of feedback: when the output isn't computed perfectly and is fed back, the imperfection can compound.)
  • They are harder (slower) to implement using fixed-point arithmetic.
  • They don't offer the computational advantages of FIR filters for multirate (decimation and interpolation) applications.

DTFT: the input function is discrete and the output is periodic. X(w) = \sum _{-inf, +inf} x[n] e^{-jwn}. It is a continuous Fourier transform.

DFS (Discrete Fourier Series): X(k) = \sum 0~(N-1) x(n) e^-j(2pi kn/N)

Relation to Z-transform: DFS represents N evenly spaced samples of the Z-transform X(z) around the unit circle.

Relation to DTFT(Discrete-Time Fourier Transform): DFS is obtained by evenly sampling the DTFT by 2pi/N intervals.

DFT is the primary interval of DFS, X(k) = \sum n = 0~N-1 x[n] e ^{-j 2pi kn/N}, 0<= k <= N-1

in DFT: zero-padding gives a high-density spectrum  but does not give high-resolution spectrum because no new information is added to the signal. To get the high-resolution spectrum, one has to obtain more data from experiment.

IIR filter structure:

Direct form: y(n) = \sum m=0~M bm x(n-m) - \sum m=1~N am y(n-m)

Cascade form: H(z) = b0 + b1Z^-1 + b2Z^-2 + ...+ bM Z^{-M) / 1 + a1Z^-1 + aN Z^-N

Linear phase form: the impulse response has symmetry conditions.

FIR filter structure:

Direct form: y(n) = b0 x(n) + b1 x)n-1) + ... + bM-1 x(x- (M-1)

Cascade form: H(z) = b0 + b1Z^-1 + b2Z^-2 + ...+ bM-1 Z^{-M-1)

Linear phase form: the impulse response has symmetry conditions.

Passband ripple and stop band attenuation.

Advantage of Linear Phase response:

design problem contains only real arithmetic and not complex arithmetic

provide no delay distortion and only fixed amount of delay
for the filter of length M(or M-1), the number of operation are M/2

No comments:

Post a Comment