Digital Signal Processing Reference
In-Depth Information
// BPSK_modulate.c Core program for BPSK modulation
. . .
short cos_table[4] = {1000,0,-1000,0};
interrupt void c_int11()
{
input_data = ((short)input_sample());
if(input_data>0) bpsk_signal = cos_table[i++];
else bpsk_signal = -1*cos_table[i++];
output_sample(bpsk_signal);
if(i > 3) i=0;
}
void main()
{ comm_intr(); while(1); }
FIGURE 10.32. Core C program for BPSK modulation ( bpsk_modulate.c ).
s(t)
m(t)
2
1
2
3
4
5
6
BPF,
2*fc
Frequency
Divider
LPF,
4kHz
Mixer
Mixer
FIGURE 10.33. Carrier recovery block diagram for BPSK demodulation.
source code bpsk _ modulate.c for the modulation scheme. Build the modulation
component of the project. Verify that the output is an 8-kHz sinusoidal waveform,
which becomes the input to the second DSK.
Demodulation
The second DSK simulates a pozar as a carrier recovery to demodulate the received
signal. Demodulation can occur regardless of the input phase. The carrier recovery
scheme is shown in Figure 10.33 and consists of a mixer, a bandpass filter centered
at 16 kHz, a frequency divider by 2, a second mixer, and a lowpass filter with a cutoff
frequency of 4 kHz. The output at each node is (with an input m ( t )
1V,
f m =
100 Hz):
() =
()
(
)
Node1:
Node2:
Node3:
Node4:
st
mt
cos
pq
pq
2
ft
+
c
()
(
) =+
[
(
)
]
2
2
m t
cos
2
ft
+
1
2
1
2
cos
2 2
pq
ft
+
c
c
[
]
(
)
1
2
1
2
cos
cos
22
2
pq
pq
ft
ft
+
c
(
)
+
c
(()
mt
(
)
( )
(
) =
{
[
(
)
] +
}
Node5:
1
2
cos
2
pq
ft
+
mt
cos
2
pq
ft
+
cos
22
pq
ft
+
1
c
c
c
4
()
mt
Node6:
4
Search WWH ::




Custom Search