Design Specification v0 1
Design Specification v0 1
Design Specification
Editor: Klas Gudmundsson
Version 0.1
Status
Reviewed
Approved
PROJECT IDENTITY
Group members
Name Responsibility Phone Email
Linnea Faxén Project Manager (PM) 073-829 65 09 [email protected]
Klas Gudmundsson Documentation Manager (DM) 072-714 06 66 [email protected]
Eskil Jörgensen Chief of Design (CoD) 076-222 53 72 [email protected]
Stefan Lundström Hardware Specialist 070-379 80 79 [email protected]
Ema Becirovic Test Manager (TM) 073 564 15 73 [email protected]
Javier Preciado Software Specialist +34 647 92 61 38 [email protected]
1 Introduction 1
1.1 Purpose of BAM! . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Hardware 3
3.1 Central Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1.1 Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1.2 Expansion Box . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.3 Distribution Box . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.4 Cross-coupling board . . . . . . . . . . . . . . . . . . . . . 5
3.1.5 Digital Boards . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Signal Splitters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 L/M Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Software 9
5 API 10
5.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1.1 Assignment of Arrays and Terminals . . . . . . . . . . . . 11
5.1.2 From MATLAB via USB to Master Arduino . . . . . . . 11
5.1.3 From Master Arduino via I2C to Arduino Slaves . . . . . 12
5.1.4 From MATLAB to L/M units . . . . . . . . . . . . . . . . 12
5.2 Data Acquisition Library . . . . . . . . . . . . . . . . . . . . . . 13
5.2.1 DAL Function "init" . . . . . . . . . . . . . . . . . . . . 14
5.2.2 DAL Function "transmit" . . . . . . . . . . . . . . . . . 14
5.2.3 DAL Function "record" . . . . . . . . . . . . . . . . . . . 14
5.2.4 Running DAL from MATLAB . . . . . . . . . . . . . . . 14
5.2.5 Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6 Application 14
6.1 Background theory . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.1.1 Mathematical notation . . . . . . . . . . . . . . . . . . . . 15
6.1.2 Linear beamforming precoders . . . . . . . . . . . . . . . 16
6.1.3 Channel Estimation . . . . . . . . . . . . . . . . . . . . . 18
6.1.4 Equalization . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2 Directive Sound Transmission . . . . . . . . . . . . . . . . . . . . 18
6.2.1 Pilot generator . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.2 Channel estimator . . . . . . . . . . . . . . . . . . . . . . 20
6.2.3 Precoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.2.4 Main program . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
References 23
A user will interact with the MAB via a user interface on a computer. Us-
ing the MAB the user can control which antennas should be in the array or
in the terminals and what data to transmit. The antennas in the MAB will
be 64 combined loudspeaker and microphone units (L/M units). Since the
MAB will beamform audio, transmitting a signal corresponds to playing it in
a loudspeaker. Receiving a signal corresponds to recording the sound, using a
microphone.
To demonstrate the powers of massive MIMO in a pedagogic manner, two
different sounds will be played at two different terminals in a room. The sounds
are played from the array but through beamforming only one of the sounds is
heard at one terminal and the other sound at the other terminal. This will
demonstrate the abilities of massive MIMO to direct signals to different users.
Application API
Hardware
Software
As can be seen in Figure 3, the hardware will have a central unit that directs
the data to send and control signals from the computer to the L/M units with
the help of two expansion boxes and a distribution box. It will also direct the
received data from the L/M units to the computer. The cables carrying the
signals to and from the 64 speakers are connected to the central unit. There are
16 cables, going out from the distribution box which are split into 4 new cables
each at the signal splitters. A power supply will also be located in the central
unit. The power is then split with power splitters and distributed to all L/M
units. The rest of this chapter will describe each part of the hardware.
3.1.1 Computer
The computer is a Windows PC. Each of the two expansion boxes will be con-
nected via a DVI cable connected to a PCI-Express card on the motherboard
230V
Digital digital on front
3A −
GND boards
panel
Power inlet 3 3 3 12V + +12V +12V
230V
module with fuse
1.2A − To
and mains switch 1 Analog
analog
GND
3 12V + boards
230V
Ground to chassis Analog
1.2A − −12V GND
8x8
37 2x16
DB37 - female
Connection −12V
Rear panel. 37 2x16 board 1 +5V
DB37 - female
330
8x8
To DB37 - female
37 2x16
10 Digital
board 1
Digital
cross
connection 8x8
board
10 Digital
board 2
8x8 16x16
8 25
DB25 - female
DB25 – male 18 10 Analog
A-A board 1 8 25
DB25 - female
8 25
DB25 - female
DB25 – male 18 10 Analog
A-B board 2 8 25
DB25 - female
8 25
DB25 - female
DB25 – male 18 10 Analog
B-A board 3 8 25
DB25 - female Front panel.
8 25
DB25 - female
18 10
Rear panel. DB25 – male
B-B
Analog
board 4 8 25 To signal
DB25 - female
splitter and
8 25
To 18 10
DB25 - female from there
DB25 – male Analog
A/D cards C-A board 5 8 25
DB25 - female
to
8 25
loudspeaker
DB25 – male 18 10 Analog
DB25 - female
boxes.
C-B board 6 8 25
DB25 - female
8 25
DB25 - female
DB25 – male 18 10 Analog
D-A board 7 8 25
DB25 - female
8 25
DB25 - female
DB25 – male 18 10 Analog
D-B board 8 8 25
DB25 - female
16x1
To chassis as close as possible to the connectors.
Dig GND
RX A/C
SDA
TX A/C
NC
SCL
TX B/D
RX B/D
+5V
I2C
1 2 ¼ CD4070 ¼ CD4070 8 7
Signal Splitter
Overview
6 DB9
to speaker
6 DB9
to speaker
DB25
from 24
distribution
box
6 DB9
to speaker
6 DB9
to speaker
OBS!
6 1
9 5
1k2
Eller tvärt om.
Power indication
This is a 4-pole connector. One pole outside of the board.
Send indication
Figure 7: Loudspeaker
4 Software
The software for the system will be used to control all speakers. It consists
of two parts: API and Application. The API is the interface to the hardware
and provides functions to use in the Application. The Application is the user
interface and the signal processing needed to perform beamforming. The API
is intended to be easy to use so that different applications (for example from
other projects) can use the same API but perform different signal processing.
This will make it easy for later projects to implement different signal processing
projects on the MAB. An overview of the software, and what interfaces it has
to the hardware is presented in Figure 8.
Computer Arduino
I2C
USB I2C
Arduino Arduino
I2C
Arduino
PCI Express
Distribution
Expansion box box
PCI Express
Expansion box
The following chapters will discuss the planned design for the Application
and the API.
5 API
The purpose of the API is to provide three simple functions to the Application:
initialization, transmission of a signal and reception of a signal. The initial-
ization will select L/M units to use in array and terminal as well as setup the
A/D- and D/A-converters. This setup consists of setting sampling frequency,
sampling clock and triggers. In addition to this, the Application should be able
to specify a signal to transmit at an array or a terminal. The recorded signals
should then be returned to the Application. These functions are summarized in
Table 3.
5.1 Implementation
To perform initialization, transmission of a signal and reception of a signal,
the API must communicate with the hardware. This will be done using three
different interfaces which can be seen in Figure 8. The Universal Serial Bus
(USB) interface is used to instruct the master Arduino of which L/M units
that will be used as terminals. The indexes of the L/M-units are then directed
to the affected Slave Arduinos via Inter-Integrated Circuit (I2C). Peripheral
Component Interconnect (PCI) Express is the interface to the expansion boxes
that contain the A/D- and D/A-boards. The following subsections will describe
how each interface will be implemented: MATLAB to Master Arduino, Master
Arduino to Slave Arduinos and MATLAB to L/M units.
MATLAB MATLAB
Data Acquisition Toolbox Application
Hardware Hardware
5.2.5 Risks
The original idea was to use ML-DAQ and the Data Acquisition Toolbox. How-
ever, forcing the MAB to use an older version of MATLAB would put limitations
on later projects. The MAB would also be an inflexible system. Therefore the
idea is to write a new DAL which will take more time than learning to use the
existing ML-DAQ. A simple DAL will be implemented to start with to see if it
is feasible to do. Thereafter, the amount of time put into implementing it can
be reviewed. If the implementation takes more than 20 hours, the ML-DAQ
will be used instead, together with the Data Acquisition Toolbox, as depicted
in the left part of Figure 9.
6 Application
The Application (APP) is the software system built on top of the API which
consists of two parts, the first part performs some desired audio beamforming
function and the second part provides a convenient user interface. The MAB
system has a great potential for a wide variety of beamforming APPs. Most
of these possible APPs will consist of some basic signal processing and beam-
forming subroutines that are similar. For this reason, some basic MIMO theory
will be introduced in the following section. The theory section is followed by a
section describing the actual APP of this project: directive sound transmission.
Uplink
…………………
Downlink
Y = (GΦ)T + N (4)
W = ... .. .. (6)
. .
1 M
wK . . . wK
be the precoder matrix.
This gives one sample of the signals to transmit as:
x = qW (7)
Table 8: Precoders
Precoder W Description
Maximum ratio (MR) GH MR of signal energy to given terminal
Zero-forcing (ZF) GH (GGH )−1 Completely inverting channel
Regularized ZF GH (GGH + λI)−1 Compromise of the two above
Ĝ = YT ΦH ≈ GΦΦH = G (9)
where Y is the received matrix. Pilots should be sent from the terminals to the
arrays. This will make orthogonality easier to achieve since the terminals are
fewer and thus require fewer pilots.
After estimation, the channel frequency response is quantized and subdivided
into flat-fading sub-bands, each having a complex channel matrix and thus a
precoding matrix.
6.1.4 Equalization
Equalization is methods of dealing with frequency-selective fading or frequency-
selective transmission. This is automatically dealt with if unnormalized ZF pre-
coding (see Table 8) is used. Since different APPs have different requirements,
they might use different equalization schemes. In the APP of this project, the
equalization has to be done at transmitter side since directed sound transmission
should work without a terminal units listening.
Application
Terminals transmit pilots to array
Pilot generator
Channel estimate
Notice that p is the rate of which pilot frequencies are sampled from the complete
set of orthogonal frequencies. Otherwise, there will be substantial fading that
is not taken into account.
Terminal 1
Terminal 2
Static channel
UL DL
Pilots Sound
Dynamic channel
UL DL UL DL UL DL
Pilots Sound Pilots Sound Pilots Sound
Time
The pilot generator in the Application will have one function that is de-
scribed in Table 9.
6.2.3 Precoder
To avoid overhearing, the ZF-precoder should be used. However, complete zero-
forcing is only possible with perfect channel state information. If highly accurate
channel estimation is hard to obtain or if the time coherence due to moving
people is far too small, then ZF-precoder might not be the best choice for our
APP. Therefore, ZF-precoding will be implemented and tested. Should the
scenario prove to be too demanding for ZF-precoding, a new solution will be
implemented using MR-precoding. In this case, the precoder of each subband
needs to be scaled to account for frequency-selective fading. The precoder part
of the Application will have two functions described in Table 11.
Run functions
Runs the BAM!. Channel is estimated by
Run BAM! pilots. The chosen sound is beamformed to
the terminals.
[5] Thomas L. Marzetta, Erik G. Larsson, Hong Yang, Hien Quoc Ngo, in
Fundamentals of Massive MIMO, 1st ed. Cambridge University Press, 2016