Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
A Simple Communication System Design Lab #1 with MATLAB Simulink
1. - 1/16 -
Instructor : Junil Ahn and Jaewook Kang
At CSNL-GIST
E-mail: jwkkang@gist.ac.kr
2011, Mar. 11th~ Apr. 8th
A Simple Communication System
Design Lab with MATLAB Simulink
- Syllabus
2. - 2/16 -
PurposesPurposes
v 1) To understand how a basic communication system works.
v 2) To know how to use MATLAB Simulink to implement
communication systems.
v 3) To train your communication signal processing skill.
3. - 3/16 -
SchedulesSchedules
Place: IC203
Weeks Time Hour Instructor
1 week
Lab. #0
3.11
(13:00~
16:00)
3
- Overview of Development with Simulink
- QPSK Model with AWGN Channel/ Rayleigh Fading
Channel
- Development Example: Interference Cancellation for Satellite Communi
Junil Ahn
2 weeks
Lab. #1
3.18
(13:00~
14:20)
1.5 - Basic OFDM Junil Ahn
3.18
(14:30~
16:00)
1.5
- Introduction
- How to use Simulink with interleaver
implementation
Jaewook Kang
3 weeks
Lab. #2
3.25
(13:00~
16:00)
3
- QAM mapper and demammper
- Upsampling and Downsampling
Jaewook Kang
4 weeks
Lab. #3
4.1
(13:00~
16:00)
3
- PSF and Matched filter design
- Phase splitter
Jaewook Kang
5 weeks
Lab. #4
4.8
(13:00~
16:00)
3
- Up conversion and down conversion
- BER evaluation
Jaewook Kang
4. - 4/16 -
Instructor : Jaewook Kang
At CSNL-GIST
E-mail: jwkkang@gist.ac.kr
2011, Mar. 18th
A Simple Communication System Design
Lab with MATLAB Simulink
- Lab #1: - Introduction
- How to implement S-function blocks
- Convolutional-Interleaver block implementation
5. - 5/16 -
Properties of SimulinkProperties of Simulink
v 1) Schematic based language.
v 2) Simulink process signal/data dynamically like hardware.
v 3) Provide various kind of toolsets for the programming (Each is not
free).
v 4) Simulink can immediately generate HDL codes for
implementations.
v 5) Compatible with M-code, C/C++ as S- function.
6. - 6/16 -
Order of today’s proceedingOrder of today’s proceeding
v An example: A conventional QAM system (10 min)
v Preliminary : A (7,4) Hamming coded QPSK system using the
communi. blockset ( 1 hour )
§ How to use scope blocks ? (scope, scatter plot, and spectrum scope)
§ To understand signal type and framing
§ How to deal with the simulink using M-file.
v Our target system (15 min)
v Lab #1: Convolutional interleaver block implementation (2 hours)
§ Why interleaver ?
§ Operation of Convolutional interleaver
§ How to use S-function ?
7. - 7/16 -
Conventional PAM/QAM transmission systemsConventional PAM/QAM transmission systems
vTransmitter part
vReceiver part
The figure is borrowed
from Konkon univ.
8. - 8/16 -
An exampleAn example
v Basic communication system using the Simulink blockset
v Let’s run the simulink !
12. - 12/16 -
Preliminary (2/12)Preliminary (2/12)
v A (7,4) Hamming coded QPSK system Implementation
using the given communi. Blockset
§ 1) Let’s compose the simplest testbench of QPSK system first.
Let’s make it !!
13. - 13/16 -
Preliminary (3/12)Preliminary (3/12)
v Some notice when you make it
1) At random integer block
§ Determine “M-ary number” according to the
system specification.
§ In this case, QPSK àM= 4 à 2^BitperSym
§ Check “Frame-based output”
2) Error rate calculation block
§ Receive delay: Total latency in the
received signal via signal processing
§ Check a condition to stop the simulation
§ Select output data as “Port”
§ Target number of error =200 is enough
14. - 14/16 -
Preliminary (4/12)Preliminary (4/12)
v Some notice when you make it
3) Discrete- time scatter plot scope block
§ Specify the block setup
according to your taste.
15. - 15/16 -
Preliminary (5/12)Preliminary (5/12)
vLet’ see the signal flow
§ At the scope block: integer from {0,1,2,3} are randomly generated.
§ The QAM modulator maps those integer to symbols in the constellation.
§ After AWGN channel, the points are scattered.
Mapping
AWGN
16. - 16/16 -
Preliminary (6/12)Preliminary (6/12)
v Let’s add (7,4)-Hamming code to the testbench
§ Change the source block to “Bernoulli Binary block”
§ Add a pair of Hamming en- and de-coder.
§ Change to frame-based processing
§ Change AWGN block and QAM block pair setup
17. - 17/16 -
Preliminary (7/12)Preliminary (7/12)
v With respect to (7,4) Hamming codes
§ A linear block channel codes
§ Perfect codes
§ The codes can correct 2^4-1 kinds of error pattern in codeword.
§ The codes have all 7 error patterns on Hamming sphere of radius t=1.
§ No performance loss even with bounded distance decoder.
§ The input message bit is k=4 and length of the codewords is n=7.
(6,3) linear block codes (7,4) Hamming codes
t=1 Hamming sphere
t=2 Hamming sphere
Cannot be corrected
Using t=1 bounded
Distance decoder
C C
18. - 18/16 -
Preliminary (8/12)Preliminary (8/12)
v Frame-based processing
§ Simulink supports the frame-based processing which makes
simulations faster as increasing the signal dimension.
§ Ex) <1x1> à <n X 1>
§ Some blocks only support the frame-based processing.
§ By using “buffer” and “un-buffer” block, we can control the dimension
size of the flowing signal.
Block Block
< Sample-based proc. > < Frame-based proc. >
19. - 19/16 -
Preliminary (9/12)Preliminary (9/12)
v Frame-based processing
§ Check “frame-based outputs” in the source block and specify the number of the
sample per a frame.
v Change the SNR expression in AWGN block based on
v Change the input and output type of the QAM block pair to “BIT”.
2logb c
o
E R MS
N N W
=
20. - 20/16 -
Preliminary (9/12)Preliminary (9/12)
v Buffer and unbuffer block
§ Very important block to adjust rate in the frame-based processing.
§ Let Mi denote the size of input and Mo denote the size of output.
§ 1) Buffer block
Ø If Mi < Mo the latency is Mo.
Ø In case of Mi > Mo
– 1) When Mi is mutiple of Mo à No latency
– 2) otherwise, à the latency is Mo.
§ 2) Un-buffer block
Ø No latency
§ But, sometime the latency calculation is not useful.
§ In such case, check the latency directly using scope block.
21. - 21/16 -
Preliminary (10/12)Preliminary (10/12)
v Draw BER curve using Simulink with M-file
§ Let’s make a comparison of the coded and uncoded system.
§ 1) Use simout block to output the result to workspace.
§ 2) Put all parameter using variable in workspace.
24. - 24/16 -
Our target systemOur target system
vTx part
vRx part
Tx Source Interleaver
QAM
Mapper
PSF X
NCO
↑4
Phase
Splitter
Matched
filter
QAM
DemapperX
NCO
↓4
De-
Interleaver
Rx Source
:Real
:Complex
25. - 25/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
v Why do we employ interleaver ?
§ Error usually occurs in burst manner.
§ Conventionally, channel coder is designed against a random and independent
error.
§ Interleaver is introduced to scatter the burst or packetized data in a time domain.
§ Deinterleaved data show almost random and independent errors.
§ Channel Decoder can handle such error.
v Two type of interleanver
§ Block interleaver:
Ø Simple concept, easy to implement.
Ø Needs more memory, and cause a large latency
§ Convolutional interleaver:
Ø Require half memory of block interleaver, causing a small memory.
Ø Most communication system employs this for its attractive features.
26. - 26/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
v Why do we employ interleaver ?
§ Error usually occurs in burst manner.
§ Conventionally, channel coder is designed against a random and independent
error.
§ Interleaver is introduced to scatter the burst or packetized data in a time domain.
§ Deinterleaved data show almost random and independent errors.
§ Channel Decoder can handle such error.
v Two type of interleanver
§ Block interleaver:
Ø Simple concept, easy to implement.
Ø Needs more memory, and cause a large latency
§ Convolutional interleaver:
Ø Require half memory of block interleaver, causing a small memory.
Ø Most communication system employs this for its attractive features.
28. - 28/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
v Specification of Conv.-interleaver
§ The Number of row : R
§ Interleaver length: L
§ The latency through inter and de-interleaver:
§ The required memory for each block :
L=2
R=4
< Interleaver side > < De-interleaver side >
2
( )R R L- ´
2
( )
2
R R L- ´
30. - 30/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
vS-function builder block
§ Let’s make R=4, L=1 convolutional interleaver.
§ The size of the required buffer:
2
( ) (16 4) 2
6
2 2
R R L- ´ - ´
= =
The Size of the memory
And the initial condition
31. - 31/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
vS-function builder block
§ Date properties
R
L
32. - 32/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
vS-function builder block
§ Output – specify what the current output data is in C language
33. - 33/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
vS-function builder block
§ Discrete Update – Describe operation for memory inside the block, such as
buffer shift at each time instance.
§ Array wrt. the memory denoted by xD[]
34. - 34/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
vSimulation
§ You can check your block using interleaving block given by MATLAB
simulink.
35. - 35/16 -
Lab #1: Convolutional interleaver block implementationLab #1: Convolutional interleaver block implementation
v What about de-interleaver block ?
§ Implementation of de-inleaver block is assignment of this week.
§ I’ll provide the code at next lecture.
§ It’s very similar with conv-inverleaver block.
§ Make it by yourself !!!
§ Does it work correctly ? Check by yourself like the below figure.
36. - 36/16 -
Wrapping upWrapping up
v How to implement a simple coded QAM system using the given
blocks
v Learned about way to use some block in simulink
§ Scope, Digital scatter, Random sources, AWGN, error rate calculation, Buffer etc.
v How to simulate BER performance with M-file in simulink.
v How to use S-function builder block
v Convolutional interleaving and de interleaving block pair.
37. - 37/16 -
Next weekNext week
v I’ll provide the source code of de-interleaving block
v Please do the assignment to be good at S-function.
Weeks Time Hour Instructor
1 week
Lab. #0
3.11
(13:00~
16:00)
3
- Overview of Development with Simulink
1) QPSK Model with AWGN Channel/ Rayleigh Fading
Channel
2) Basic OFDM
3) Development Example: Interference Cancellation for Satellite Communi.
Junil Ahn
2 weeks
Lab. #1
3.18
(13:00~
16:00)
3
- Introduction
- How to use Simulink with interleaver
implementation
Jaewook Kang
3 weeks
Lab. #2
3.25
(13:00~
16:00)
3
- QAM mapper and demammper
- Upsampling and Downsampling
Jaewook Kang
4 weeks
Lab. #3
4.1
(13:00~
16:00)
3
- PSF and Matched filter design
- Phase splitter
Jaewook Kang
5 weeks
Lab. #4
4.8
(13:00~
16:00)
3
- Up conversion and down conversion
- BER evaluation
Jaewook Kang