contents

3.0 Theory

3.1 PAL Demodulation

The method that was used to demodulate is to multiply the incoming PAL signal with sine and cosine values from a memory table in a microprocessor. This produces the original modulating signal and other products. By filtering the non-useful sine and cosine products are removed, leaving only the modulating signals.

This is shown below.

From Y hr and hb, R, G and B can be easily reproduced.

The cut off frequency is chosen so that any alternating luminance data added to the chrominance data is also removed. Ref[3,PAL,11.10]

See Appendix F for Phase Alternate Line detail.

 

3.2 Implementing a digital filter.

 

Any periodic function can be represented by a Fourier series. The frequency response of a digital filter is periodic, where the period is equal to the sampling rate [see appendix]. However the signal being sampled never exceeds half the sampling frequency, as this would cause aliasing.

In order to use the Fourier series to represent the frequency response of a filter it is necessary to use the complex form of the Fourier series. The complex representation is shown below.

The standard Fourier series is:

where,

However the Fourier series can also be represented in its complex form.

where,

 

Coefficients cn are complex.

The above formulas show how to represent f(x) as a complex Fourier series, where P is the period and x is the variable.

In order to use Fourier series to represent a digital filter it is necessary to view the frequency response of the filter as h(f), where the period is equal to the sampling rate F. Thus as the input frequency (f) changes the value of h(f) changes, according to the response defined by the Fourier series.

The response that will be used is a low pass filter thus the Fourier series coefficients will be determined by the graph below.

 

Therefore the Fourier series will be defined by

From be above definition it can be seen that when the input frequency is less than fp h(f) = 1 and when the input frequency is greater than fp, h(f) =0.

Thus the integral need only be evaluated between -fp and fp.

However h(f)=1 when f<fp , therefore

Using Eulers rule it can be shown that

 

Thus,

 

If a cut of frequency of 2.25 MHz is required the following coefficients are derived using the formula above. A frequency response graph for these coefficients are shown below.

 

n

C(n)

-4

0.024

-3

0.090

-2

0.157

-1

0.206

0

0.225

1

0.206

2

0.157

3

0.090

4

0.024

 

However it is shown below that a sliding window FIR filter of nine coefficients, all equal to one, produces an almost equal result. This is shown below.

n

C(n)

-4

1

-3

1

-2

1

-1

1

0

1

1

1

2

1

3

1

4

1

Note the graphs do not have a visible scale. I developed the filter analysis software used, and scaling was an optional extra that adds no functional value when comparing the response waveforms, if all comparisons use the same frequency scale.

From above it can be seen that a good filter can be made by using all equal coefficients of one, the sliding window filter will therefore be used in the decoding algorithm.

See Appendix G for sampling theory detail.Ref[5,FIR,5]

 

next