Category Archives: Python代写

CS代考 IA32) generations: 8086, 286, 386, 486, Pentium, PentiumIII, Pentium4,… – cscodehelp代写

Introducti
er Architectur
2: Instruction Set
Architecture

Copyright By cscodehelp代写 加微信 cscodehelp

1 (Martin/Roth)
: Instruction Set Architectures
• Chapter 2 • Further r
pendix C (RISC)
Available from web page
• The Evolution
and Appendix D
chnology at IBM
Much of this chapter will be “on your own reading”
• Hard to talk about ISA features without knowing what they do
1 (Martin/Roth)
many of these issu
: Instruction Set Architectures
Instruction Set
1 (Martin/Roth)
Gates & Transistors
: Instruction Set Architectures
Architecture (ISA)
What is a goo
pects of ISAs
• RISC vs.
• Implementing CISC:
1 (Martin/Roth)
(instruction s
• A well-define hardw
guarantees rega
perations are
• The “contract” between software and hardware • Functional definition of operations, modes,
locations supported by hardware Precise description of how
are implemented
perations take more power
: Instruction Set Architectures
are/software interface
fast and whic
invoke, and access
and storage

guage Analogy
• Allows commu • Language:
• Many common aspects
Part of spe Common o
ISA: hardware to soft
• Need to speak
• Many different languages/ISAs
Different structure
• Both evolve over
ey differences: ISAs
1 (Martin/Roth)
person to person
e same lan
ech: verbs, nouns, adjectives, adverbs, etc. perations: calculation, control/branch, memory
explicitly engine
: Instruction Set Architectures
, many similarities,
ered and extend
unambiguous
many differences
• Easy to exp
1 (Martin/Roth)
Programmability
y to design hi
• More recently
Compatibility
ress programs effic
gh-performan
design low-power implementations? design high-reliability implementations?
design low-cost implementations
: Instruction Set Architectures
• Easy to maintain programmability (imp and programs (technology) evolves?
• x86 (IA32) generations: 8086, 286, 386, 486, Pentium, PentiumIII, Pentium4,…
lementability)
PentiumII,
vs CISC Foresh
ecall perfor
• (instructi
C (Complex Instru
ons/progra
y for assembly-level progra
“cycles/instru
• Increases “instruction/progr • Help from smart compiler
• Perhaps improve
1 (Martin/Roth)
(cycles/instruction)
ction” with
cycle time
essive implementation allowed by s
: Instruction Set Architectures
Computing)
“instructions/program” with “complex” instructions
Computing)
* (seconds/cycle)
many single-cycle instru
but hopefu
(seconds/cycle)
not as much
impler instruc
Programmability
• Easy to express programs efficiently? • For whom?
• Before 1985: human
• Compilers were terrible, most code was hand-assembled • Want high-level coarse-grain instructions
• As similar to high-level language as possible
• After 1985: compiler
• Optimizing compilers generate much better code that you or I • Want low-level fine-grain instructions
• Compiler can’t tell if two high-level idioms match exactly or not
CIS 501 (Martin/Roth): Instruction Set Architectures 8

• Proximity to a high-level language (HLL) • Closing the “semantic gap”
• Semantically heavy
Example: SPARC save/restore
Bad example: x86 rep movsb (copy Ridiculous example: VAX insque (ins
• “Semantic
tranger than fiction
• People once thought compu
• Fortunately, never materialized (but
1 (Martin/Roth)
: Instruction Set Architectures
(CISC-like)
human to program in?
insns that
“loop”, “procedure
you have many hig
ters would
string) ert-into-
mplete idio
evel languages?
language directly
keeps coming back around)
day’s Semantic
• Today’s ISAs are targeted to one language… • Just so happens that this language is very low
e C programming language
Will ISAs be different when Java/C# become dominant? • Object-oriented? Probably not
• Support for
• Support for
1 (Martin/Roth)
garbage collection? Maybe
Smart compilers instructions
Any benefit of tailo
: Instruction Set Architectures
is likely sm
guages to simple
1 (Martin/Roth)
• Low level primitives
• Wulf: “primitives
• Requires
gularity: “princi
Orthogonality One-vs.-all
from which solutio not solutions”
good at breaking complex
Not so good at combining sim
: Instruction Set Architectures
• Requires search, pattern matching (why AI is hard) Easier to synthesize complex insns than to compare them
f least astonishment”
mposability
to program in?
can be syn
uctures to simple ones
ple structures into complex
Implementability
• Every ISA can be implemented
• Not every ISA can be implemented efficiently
• Classic high-performance implementation techniques
• Pipelining, parallel execution, out-of-order execution (more later)
• Certain ISA features make these difficult
– Variable instruction lengths/formats: complicate decoding – Implicit state: complicates dynamic scheduling
– Variable latencies: complicates scheduling
– Difficult to interrupt instructions: complicate many things
CIS 501 (Martin/Roth): Instruction Set Architectures 12

mpatibility
• Very imp
1 (Martin/Roth)
M’s 360/37
Backward compatibility
• New processors must support old
ardware… if it requires new software
• Intel was the first company to realize this
• ISA ust remain compatible, no matter what
the worst designed ISAs EVER, but survives
pward) com
processors must support new New processors redefine only
e to detect
rocessors emulate new inst
: Instruction Set Architectures
0 (the first
(can’t drop
programs (with software help) previously-illegal opcodes
r specific n
instructions
low-level soft
ompatibility’s
mpatibility
• Trap:instructionmakeslow-level“functioncall”toOShandler • Nop: “no operation” – instructions with no functional semantics
• Handle rare
ly used but hard
implement “legacy” opc
ine to trap in new implementation and emulate in software Rid yourself of some ISA mistakes of the past
• Add ISA hints
1 (Martin/Roth)
: performance suffers
compatibility
• Reserve sets of trap & nop opcodes (don’ • Add ISA functionality by overloading traps
firmware patch to “add”
: Instruction Set Architectures
erloading nop
old implementation
mpatibility
asy compatibility r
• Temptation: use • Frequent outcom
1 (Martin/Roth)
equires forethought
some ISA extension for 5% performance gain e: gain diminishes, disappears, or turns to loss
continue to support gadget fo
• Example: register windows (SPARC)
Adds difficulty to out-of- Details shortly
: Instruction Set Architectures
implementations of SPARC
Aspects of ISAs
• VonNeumannmodel
• Implicit structure of all modern ISAs
• Length and encoding
• Operand model
• Where (other than memory) are operands stored?
• Datatypes and operations
• Overview only
• Read about the rest in the book and appendices
CIS 501 (Martin/Roth): Instruction Set Architectures 16

Write Output
Sequential Model
Basic • Def
called VonNeum
Value flows from insn
all modern
as output,
an, but in ENIAC befo
s A as inpu
feature: the program counter (PC) ines total order on dynamic instruction Next PC is PC++ unless insn says otherwise
Read Inputs
define computation
1 (Martin/Roth)
: Instruction Set Architectures
d Y after X
Processor logically executes loop at
• Instruction execution assumed atomic
• Instruction X finishes before insn X+1 starts
been proposed…
Example: M

• 3 formats, sim
• Q: how many instru
1 (Martin/Roth)
IPS Format
ple encoding
ctions can
Rs(5) Rt(5)
Rs(5 Rt(5)
: Instruction Set Architectures
encoded? A: 127
Rd(5) Sh(5)
• Fixed len • Most
1 (Martin/Roth)
common is 32 bits
Simple implementatio
• Variable length
– Complex impl
density: 32 bits
• Compromise: two leng
: Instruction Set Architectures
can do this in one 8-bit instruction
ementation
ute next PC usin
y decoder impleme
egister by 1?
Operand Model: Memory Only
• Where (other than memory) can operands come from? • And how are they specified?
• Example:A=B+C
• Several options
• Memory only
add B,C,A mem[A] = mem[B] + mem[C]
MEM CIS 501 (Martin/Roth): Instruction Set Architectures 20

load B add C
1 (Martin/Roth)
Accumulator: implicit single ele
: Instruction Set Architectures
ACC = mem[B]
ACC = A mem[A]
CC + mem[C] = ACC

store R1,A
oad-store: GPR and only l
store R1,A
1 (Martin/Roth)
add R1,R2,R1
: Instruction Set Architectures
er: multiple e
R1 = mem[B]
R1 = R1 + mem[C] mem[A] = R1
oads/stores access me
R1 = mem[B] R2 = mem[C]
R1 = R1 + R2
mem[A] = R1
it accumula
Stack: TOS
1 (Martin/Roth)
implicit in instru
: Instruction Set Architectures
stk[TOS++]
stk[TOS++] stk[TOS++]
em[A] = stk[–TOS]
= mem[C] = stk[–TO
+ stk[–TO
Operand Model Pros and Cons
• Metric I: static code size
• Number of instructions needed to represent program, size of each • Want many implicit operands, high level instructions
• Good ! bad: memory, accumulator, stack, load-store
• Metric II: data memory traffic
• Number of bytes move to and from memory
• Want as many long-lived operands in on-chip storage • Good ! bad: load-store, stack, accumulator, memory
• Metric III: cycles per instruction
• Want short (1 cycle?), little variability, few nearby dependences • Good ! bad: load-store, stack, accumulator, memory
• Upshot: most new ISAs are load-store or hybrids
CIS 501 (Martin/Roth): Instruction Set Architectures 24

How Many Registers?
• One reason
• Small is • Another is t
– More reg
• Upshot: trend • 64-bit x86
1 (Martin/Roth)
s faster tha
Fewer registe
es, arrays,
registers are faster is th fast (hardware truism)
hat they are directly addressed (
rs per instr
hough compilers are getting better
means more savi
have as many as possible?
r specifiers
uction or indirect addressin
put in registers
ng/restoring
to more registers: 8 (x86)!32 (MIPS) !128 (IA32) has 16 64-bit integer and 16 128-bit FP registers
: Instruction Set Architectures
putting more
1 (Martin/Roth)
• Support me
Address Size
• Alternative (wrong)
• Most critical, inescapable
processor?
irtual address size
• Determines size of addressable (usa
size of 2n
Will limit the
uire nasty hacks
• x86 evolution:
• 4-bit (4004), 8-bit (8008), 16-bit (8086),
• 32-bit + protected memory (80386)
• 64-bit (AMD’s Opteron & Intel’s EM64T Pen
: Instruction Set Architectures
32-bit or 64-bit address spaces
e of calculation operations
ble) memory
t already at) 64 bits
ISA design decision
(E.g., x86 segments)
Global regi
• Sun SPARC om the RISC I) • 32 integer registers divided
• Explicitsave/restoreinst
hardware activation
into: 8 global, 8 ructions
restore: locals zeroed, inputs ! outputs, inputs “popped” Hardware stack provides few (4) on-chip register frames
d-to/filled-from me
omatic param
– Hidden memory operations (some restores fast, o – A nightmare for register renaming (more later)
1 (Martin/Roth)
: Instruction Set Architectures
caller-saved registers
traffic on shallow (<4 deep) call graphs 8 input, 8 locals zeroed Memory Addressing • Addressing mode: way of specifying address • Used in memory-memory or load/store instructions in register ISA • Examples • Register-Indirect: R1=mem[R2] • Displacement: R1=mem[R2+immed] • Index-base: R1=mem[R2+R3] • Memory-indirect: R1=mem[mem[R2]] • Auto-increment: R1=mem[R2], R2= R2+1 • Auto-indexing:R1=mem[R2+immed],R2=R2+immed • Scaled: R1=mem[R2+R3*immed1+immed2] • PC-relative: R1=mem[PC+imm] • What high-level program idioms are these used for? CIS 501 (Martin/Roth): Instruction Set Architectures 28 Example: M I-type instructions: • Is 16-bits enough? IPS Addressing plements only displacement • Why? Experiment on VAX (I • Disp: 61%, reg-ind: 19% small displacem SA with every mode) found , scaled: 11%, mem-ind: 5%, ent or registe • Yes? VAX experiment showed 1% accesses use displacem r indirect (displacement 0) distribution other: 4% 1 (Martin/Roth) Rs(5) Rt(5) Reg+Reg mode : Instruction Set Architectures ntrol Instructi One issue: testing • Option I: compare and branch insns branch-less-than R1,10,target 1 (Martin/Roth) • Option II: implicit condition branch-neg ndition codes • Option III: condition for conditio wo ALUs: one for c set-less-than R2,R1,10 branch-not-equal-zero R2,target ditional instru : Instruction Set Architectures ctions, + o registers, separate ondition, one sets “negative” ALU per, + explicit for target address branch insns e is tricky dependence ccess alig address % si • Aligned: loa • Unaligned load-half @XX • Question: (uncommon case)? Support in hardware? M akes all accesses slow Trap to software routine? Possibility • Load, shift , load, shift, MIPS? ISA support: unaligned access using two instructio lwl @XXXX10; lwr • Big-endian: sensibl rder (e.g., MIPS, PowerPC) integer: “00000000 00000000 00000010 00000011 • Little-e integer: “00000011 00000010 00000000 00000000 • Why little endian? To different? To be annoying? Nobody knows 1 (Martin/Roth) : Instruction Set Architectures Example: MIPS Conditional Branches • MIPS uses combination of options II/III • Compare2registersandbranch:beq,bne • Equality and inequality only + Don’t need an adder for comparison • Compare1registertozeroandbranch:bgtz,bgez,bltz,blez • Greater/less than comparisons + Don’t need adder for comparison • Setexplicitconditionregisters:slt,sltu,slti,sltiu,etc. • More than 80% of branches are (in)equalities or comparisons to 0 • OK to take two insns to do remaining branches (MCCF) CIS 501 (Martin/Roth): Instruction Set Architectures 32 ntrol Instructi • Option I: PC-relative • Used for branches • Option II: Absolute • Position independent outside procedure • Used for procedure calls • Option III: Indir • Howfardo 1 (Martin/Roth) computing targets on-independe within proced ect (target found in regi for jumping to dynamic targets for returns ally not so far within a procedure (t er from one procedure to another : Instruction Set Architectures ic procedure calls, switches hey don’t get ntrol Instructi • Implicit r • Link (remember) • Directjump-and-link:jal • Indirectjump-and-link:jal 1 (Martin/Roth) support for address register is : Instruction Set Architectures calling insn + 4 程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

CS代考 COMM1822 Consultation – cscodehelp代写

Week 5 SQL Joins: Joining Data from Multiple Tables
Lecturer-in-Charge: Kam-Fung (Henry) : Tutors:
PASS Leader:

Copyright By cscodehelp代写 加微信 cscodehelp

Term 2 2022

Week 5 Welcome Video

• There are some file-sharing websites that specialise in buying and selling academic work to and from university students.
• If you upload your original work to these websites, and if another student downloads
and presents it as their own either wholly or partially, you might be found guilty of collusion — even years after graduation.
• These file-sharing websites may also accept purchase of course materials, such as copies of lecture slides and tutorial handouts. By law, the copyright on course materials, developed by UNSW staff in the course of their employment, belongs to UNSW. It constitutes copyright infringement, if not academic misconduct, to trade these materials.

UNSW Business School acknowledges the Bidjigal (Kensington campus) and Gadigal (City campus) the traditional custodians of the lands where each campus is located.
We acknowledge all Aboriginal and Islander Elders, past and present and their communities who have shared and practiced their teachings over thousands of years including business practices.
We recognise Aboriginal and Islander people’s ongoing leadership and contributions, including to business, education and industry.
UNSW Business School. (2022, May 7). Acknowledgement of Country [online video]. Retrieved from https://vimeo.com/369229957/d995d8087f

❑ Housekeeping
❑ Discussion of SQL Joins ❑ Week 5 Demo Script
❑ Week 5 Sandbox Activity

COMM1822 Consultation
Consultation with the LiC
Kam-Fung (Henry)
10.00 – 11.00 am (AEST)
Send an email to book a time:

COMM1822 PASS Class
PASS Class

10:00 – 11:00 am (AEST)
Online via
https://au.bbcollab.com/guest/734c9 39b0ddf42d2868fc2304b801d82

Assignment Group SQL Accounts
❑ A separate Oracle SQL account will be provided to each assignment group (Each assignment group will have 1 account)
❑ Complete the assignment SQL activities using the group account instead of your personal student SQL account (for part B only)
❑ Do NOT change your group SQL account login password

Thank you for all who provided the feedback in week 4. We are still collecting feedback
This is your chance to provide us with early feedback
Please do not ignore
https://forms.office.com/Pages/ResponsePage.aspx?id=pM_2PxXn20i44Qhnufn7o0KszAg PgNBAjB8ETnYCVsdUQkRGVEJTOVBEM0dDTkJGQ1hFU1RaNE5ZQS4u

❑ Housekeeping
❑ Discussion of SQL Joins ❑ Week 5 Demo Script
❑ Week 5 Sandbox Activity

Week 5 Lab Manual Discussion
1. What is the purpose of the queries and how might they be useful?
2. What new concept has been introduced?
3. What are the different types of joins?
4. In what scenarios might each type of join be useful?
5. What new clauses have been introduced?

❑ Housekeeping
❑ Discussion of SQL Joins ❑ Week 5 Demo Script
❑ Week 5 Sandbox Activity

Week 5 Demo Script
Open Week 5 Demo Script (Oracle Demo) from Moodle:
– Query 1-11
– Query 12-20

Week 5 Demo Script
Open Week 5 Demo Script (Query 1-11)

▪ Rest Breaks: https://safety.unsw.edu.au/office-safety-toolkit/rest-breaks
▪ WorkRave at UNSW: https://safety.unsw.edu.au/sites/default/files/documents/UNSW_WorkRa ve_V1.0.pdf
▪ Setting up you Workstation : https://safety.unsw.edu.au/setting-your- workstation-video
▪ Online Safety and Wellbeing Tutorial: https://student.unsw.edu.au/safety
▪ SafeWork 6 Simple stretches: https://www.safework.nsw.gov.au/resource-library/six-simple-stretches

Take a 5 minute break

Week 5 Demo Script
Open Week 5 Demo Script (Query 12-20)

❑ Housekeeping
❑ Discussion of SQL Joins ❑ Week 5 Demo Script
❑ Week 5 Sandbox Activity

Week 5 Sandbox Activity
1. Create a list that displays each dish_name and the name of the chef that cooked it. Sort the output by dish_name in descending order.
2. Produce a list of all customers who have ordered the dish “Beef Inside Skirt” after 20th March 2021. Include the customer’s name and the date of their order in the output.
3. Display a list of every drink which has been ordered by customers. Include the name of the company that supplied it, the name of the customer who ordered it, and the date when they ordered the drink.
4. Provide a list of all customers (ID + Name) who did NOT receive a discount on their order (i.e. there is no discount value).

Week 5 Sandbox Activity
1. Create a list that displays each dish_name and the name of the chef that cooked it. Sort the output by dish_name in descending order.
SELECT f.dish_name, c.name “Cooked By” FROM FOOD f
INNER JOIN COOKS ck
USING (food_ID)
INNER JOIN chef c
USING (staff_ID)
ORDER BY f.dish_name DESC;

Week 5 Sandbox Activity
2. Produce a list of all customers who have ordered the dish “Beef Inside Skirt” after 20th March 2021. Include the customer’s name and the date of their order in the output.
SELECT c.Name “Customer Name”, o.order_date “Order Date” FROM customer c
INNER JOIN orders o
USING (customer_ID)
INNER JOIN food f
USING (food_ID)
WHERE f.dish_name = ‘Beef Inside Skirt’ AND o.order_date >= ’20-MAR-21′;

Week 5 Sandbox Activity
3. Display a list of every drink which has been ordered by customers. Include the name of the company that supplied it, the name of the customer who ordered it, and the date when they ordered the drink.
SELECT d.Drink_Name, s.supplier_name, c.name “CUSTOMER_NAME”, o.order_date FROM Drinks d
INNER JOIN orders o
USING (drink_ID)
INNER JOIN customer c
USING (customer_ID)
INNER JOIN supplier s USING (supplier_ID);

Week 5 Sandbox Activity
4. Provide a list of all customers (ID + Name) who did NOT receive a discount on their order (i.e. there is no discount value).
SELECT c.customer_id “ID”, c.name “Name” FROM customer c
LEFT JOIN orders o
on c.customer_id = o.customer_id
WHERE o.Discount_ID IS NULL;

▪ No classes next week (week 6), classes resume in week 7.
▪ Start working on your Part B assignment.
▪ Any group conflicts (unequal contribution) must be raised ASAP with the LiC and the tutor.

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

代写代考 BUS 216 Online via MS Teams – cscodehelp代写

Introduction to Databases for Business Analytics
Week 2 Entity Relationship (ER) Modelling Part 2
Term 2 2022
Lecturer-in-Charge: Kam-Fung (Henry) : Tutors:

Copyright By cscodehelp代写 加微信 cscodehelp

PASS Leader:

(Tutor-in-Charge) Liam Li

Week 2 Welcome Video (Online Class Manner)

• There are some file-sharing websites that specialise in buying and selling academic work to and from university students.
• If you upload your original work to these websites, and if another student downloads
and presents it as their own either wholly or partially, you might be found guilty of collusion — even years after graduation.
• These file-sharing websites may also accept purchase of course materials, such as copies of lecture slides and tutorial handouts. By law, the copyright on course materials, developed by UNSW staff in the course of their employment, belongs to UNSW. It constitutes copyright infringement, if not academic misconduct, to trade these materials.

Acknowledgement of Country
UNSW Business School acknowledges the Bidjigal (Kensington campus) and Gadigal (City campus) the traditional custodians of the lands where each campus is located.
We acknowledge all Aboriginal and Islander Elders, past and present and their communities who have shared and practiced their teachings over thousands of years including business practices.
We recognise Aboriginal and Islander people’s ongoing leadership and contributions, including to business, education and industry.
UNSW Business School. (2022, May 7). Acknowledgement of Country [online video]. Retrieved from https://vimeo.com/369229957/d995d8087f

❑ Exercises ❑Group forming

PASS Class
Friday 10 – 11 am

On-campus BUS 216 Online via MS Teams
Starts this week! (Week 2)

❑Groups must be formed by the end of this session.
❑ At the end of this session you need to fill-in and sign the form (on Moodle under Team Assignment Section) and only the Team Leader (of each group) should email the form to your tutor. If you do not send the form, we will assume that you do not have a group and we will assign you to a group.
❑ We will start SQL in Week 3 Tutorial.
❑You will receive an email with your login details and how to access it in UNSW myAccess (or install SQL Developer on your device for Windows 64-bit OS).

❑ Exercises ❑Group forming

ER Modelling Guideline (Lecture Recap)
Draw ERD in an iterative way (draft, review, revise, review…,finalise).
Even experienced designers may need 5-7 drafts before finalising the solution.

Exercise 1
Create the ER diagram (entities, relationship, and key attributes) appropriate to the following description of a university program structure:
Business Rules:
❑ A program contains many courses.
❑ A course can be part of many programs. ❑Students enrol in many courses.
❑Students may enrol in more than one program.
Do NOT use composite entities for now.

Exercise 2
Now, break the ternary relationship from Exercise 1 up by using composite entities.

Break ❑Online Safety
▪ Rest Breaks: https://safety.unsw.edu.au/office-safety-toolkit/office-workstations/rest- breaks
▪ WorkRave at UNSW: https://safety.unsw.edu.au/sites/default/files/documents/UNSW_WorkRave_V1.0.pdf
▪ Guide to Office Workstation Set-up https://safety.unsw.edu.au/sites/default/files/documents/HS705_Guide_to_setting_up_ your_workstation_0.pdf
▪ Online Safety and Wellbeing Tutorial: https://student.unsw.edu.au/safety
▪ SafeWork 6 Simple stretches: https://www.safework.nsw.gov.au/resource-library/six- simple-stretches

Exercise 3
The entity type PERSON has three subtypes: CAMPER, BIKER and RUNNER. Draw a separate ER diagram segment for each of the following situations:
a) A person must be exactly one of these subtypes.
b) A person may or may not be one of these subtypes. A person who is one of these subtypes cannot at the same time be one of the other subtypes.
c) A person may or may not be one of these subtypes. A person could be any two (or even three) of these subtypes at the same time.
d) A person must be at least one of these subtypes.

Exercise 4
Create an ER diagram for the following entities:
❑ REGULAR_PHONE_CALL (Source_No, Destination_No, Time_Of_Day, Duration, Customer_ID)
❑ LONG_DISTANCE_CALL (Source_No, Destination_No, Time_Of_Day, Duration, Long_Distance_Carrier, Customer_ID)
❑ CELL_PHONE_CALL (Source_No, Destination_No, Time_Of_Day, Land_time, Air_time, Customer_ID) ❑ CUSTOMER (Customer_ID, Name, Address)
Indicating foreign key
Indicating PK

Group Forming

Assignment Groups
➢ Form your groups
➢ Fill in the form
➢ The Team Leader should email the form to the tutor ➢ The First name on the from will be the Team Leader
➢ Each group will be allocated a Group-ID by the tutor.
e.g. T10A-99 T10A is the tutorial session, and 99 for group number.

To do for Week 3
❑Week 3 Course Preparation
❑You will receive an email with your login details and how to access it in UNSW myAccess (or install SQL Developer on your device for Windows 64-bit OS).
❑ SQL credentials are NOT the same as UNSW credentials

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

代写代考 CIS-200 700 – cscodehelp代写

Introduction to Databases for Business Analytics
Week 2 Entity Relationship (ER) Modelling Part 2
Term 2 2022
Lecturer-in-Charge: Kam-Fung (Henry) : Tutors:

Copyright By cscodehelp代写 加微信 cscodehelp

PASS Leader:

(Tutor-in-Charge) Liam Li

• There are some file-sharing websites that specialise in buying and selling academic work to and from university students.
• If you upload your original work to these websites, and if another student downloads
and presents it as their own either wholly or partially, you might be found guilty of collusion — even years after graduation.
• These file-sharing websites may also accept purchase of course materials, such as copies of lecture slides and tutorial handouts. By law, the copyright on course materials, developed by UNSW staff in the course of their employment, belongs to UNSW. It constitutes copyright infringement, if not academic misconduct, to trade these materials.

Acknowledgement of Country
UNSW Business School acknowledges the Bidjigal (Kensington campus) and Gadigal (City campus) the traditional custodians of the lands where each campus is located.
We acknowledge all Aboriginal and Islander Elders, past and present and their communities who have shared and practiced their teachings over thousands of years including business practices.
We recognise Aboriginal and Islander people’s ongoing leadership and contributions, including to business, education and industry.
UNSW Business School. (2022, May 7). Acknowledgement of Country [online video]. Retrieved from https://vimeo.com/369229957/d995d8087f

Entity Relationship Modelling (from week 1)
 Weak Entity
Advanced Entity Relationship Modelling
 Supertype  Subtype
Convert from an Entity Relationship Model to a Relational Model

Recap: ER Modelling 1
❑ Data Modelling:
 Data model as a (relatively) simple abstraction of the complex real-world.
 One modelling technique to design a database: Entity Relationship Modelling.
❑ Entity Relationship Modelling components:  Entity Types and Entity Instances
 Attributes and Values
 Relationships
 Connectivity and Cardinality

Recap: ER Modelling 1
Foreign key (FK)
Multivalued attribute
Derived attribute
A1 E1 1 r1 M E2
Primary key (PK)
Binary relationship
1 (1,1) (1,1) 1
Unary relationship
• Entity and PK
• Attribute
• Relationship
• Connectivity
• Cardinality
Ternary relationship

Connectivity and Cardinality
(0, 3) (1, 1)
Cardinality
One-to-Many Relationship
Cardinality
Many-to-Many Relationship
How to read this?
• A professor teaches (0, 3) classes. A class is taught by (1, 1) professors.
• A student enrolls in (1, 6) classes. A class has enrolled in it (0, 30) students.

Existence Dependence and Independence

Existence Dependence and Independence
Existence dependence: Entity exists in the database only when it is associated with another related entity occurrence
e.g., parents & children
Existence independence: Entity exists apart from all of its related entities, and referred to as a strong entity or regular entity
e.g., customer & product in a supermarket

Weak (Non-identifying) Relationship
Primary key of the related entity does not contain a primary key component of the parent entity.
CRS_CODE is a primary key of Course table, and CRS_CODE is a foreign key of Class table.
CRS_CODE is a foreign key, but it is not part of the primary key of Class table.

Strong (Identifying) Relationship
Primary key of the related entity
contains a primary key component of the parent entity.
CRS_CODE is a primary key of Course table, and CRS_CODE is a foreign key of Class table.
CRS_CODE is also part of the primary key of Class table. CRS_CODE is part of the composite primary key for Class table.

Weak Entity

Weak Entity
Weak entity is an entity that relies on the existence of another (strong or independent) entity. It has a primary key (PK) that is partially or totally derived from the parent entity in the relationship.
e.g., parents & children
Weak entity meets two conditions:
Existence-dependent: Cannot exist without entity with which it has a relationship.
Has primary key that is partially or totally derived from the parent entity in the relationship.
Database designer usually determines whether an entity can be described as weak based on the business rules.

Example of a Weak Entity in an ERD
Symbol to indicate
Weak Entity
Weak Entity: DEPENDENT
As for fulling the conditions:
a. Existence-dependent: Cannot exist without entity with which it
has a relationship – in this case it is the DEPENDENT entity. A child must exist with one of his/her parents.
b. Has primary key that is
partially or totally derived from the parent entity in the relationship – in this case, EMP_NUM in DEPENDENT entity is associated with EMP_NUM of the EMPLOYEE table.
Why (1, 1)?
• A child must have one parent working in the company.
• If both parents work in the company, you only have to connect to one. E.g., UNSW childcare: it is connected to the parent who will pay childcare fees 🙂

Example of a Weak Entity (with Attributes)
Composite PK
Weak Entity
Existent-Dependent Relationship between EMPLOYEE & DEPENDENT
Strong Entity
FName LName
Other attributes

Example of a Weak Entity

Desirable Primary Key Characteristics
Unique value Cannot be null
Non intelligent Should not have embedded semantic meaning, e.g., use zID as PK
rather than name
No change over time Name, marital status may change
Remember a PK can be someone’s foreign key, multiple attributes make it hard to link tables
Preferably single-attribute
Preferably numeric To avoid typing errors; Can use auto-increment, e.g., zID
Security-compliant
Using Social Security Number (SSN) as a SID is a bad idea.

Candidate Key and Primary Key
Candidate Keys:
• PassportNum
• DriverLicenceNum
PassportNum
DriverLicenceNum

Plan: ER Modelling 2
❑Enhanced Entity Relationship Modelling ▪Composite entity (bridge entity) ▪Supertype and subtype
▪Generalisation and specialisation
▪ Constraints (completeness, disjointness) ❑ Exercise

Database Design Process Modelling
Develop Convert to
Apply normalisation
Conceptual Model
Relational Model
Logical Model
Implement DBS

Composite Entity

Composite Entity
A composite entity (bridge entity, associative entity) is an entity type that associates the instances of one or more entity types. It contains attributes that are peculiar (singular) to the relationship between those entity instances.
❑ The composite entity builds a bridge between the original entities.
❑ The composite entity is composed of the PKs of the original entities. ❑ The composite entity may contain additional attributes.
e.g., enrolment grades
STUDENT M STUDENT 1 M
N CLASS N 1 CLASS
A regular M:N Relationship
A composite entity dealing with M:N Relationship

Composite Entity
❑ M:N relationships (many-to-many relationships) should be avoided.
❑ Relational databases can only handle 1:M relationships (one-to-many relationships).
❑ M:N relationships should be decomposed (broken down) to 1:M relationships by creating a composite entity.
❑ The composite entity builds a bridge between the original entities.
❑ The composite entity is composed of the PKs of the original entities.
❑ The composite entity is existence-dependent on the original entities.
❑ The composite entity may contain additional attributes.

Composite Entity
 Relational databases can only handle 1:N relationships (one-to-many
relationships) or 1:1 relationships.
 M:N relationships (many-to-many relationships) should be avoided (via
building composite entity).
 A M:N relationship should be decomposed (broken down) to two 1:M
relationships by creating a composite entity.
STUDENT M ENROLL STUDENT 1 M
N CLASS N 1 CLASS
A regular M:N Relationship
A composite entity dealing with M:N Relationship

Without Composite Entity (Original)
CLASS_CODE
CLASS_TIME
CLASS_SECTION
Connectivity
Cardinality
Enroll Grade

With Composite Entity
CLASS_CODE
CLASS_TIME
M1 M1 (1, N) (1, 1) (1, 1) (0, N)
CLASS_SECTION
STU_NUM CLASS_CODE
Enroll Grade

Inappropriate Approach
STU_NUM STU_LNAME
CLASS_CODE
1602, 1603 1602, 2603 5992
5992, 5993
CLASS_CODE CRS_CODE PROF_NUM
1602 CIS-200 700
1603 CIS-300 510
2603 SAD-100 240
5992 GM-200 350
5993 ADB-300 120

STU_NUM STU_LNAME
Correct Approach
001 1602 001 1603 002 1602 002 2603 003 5992 004 5992 004 5993
CLASS_CODE
CLASS_CODE ClassName PROF_NUM
1602 CIS-200 700
1603 CIS-300 510
2603 SAD-100 240
5992 GM-200 350
5993 ADB-300 100

Ternary Relationship Without Composite Entity

Ternary Relationship With Composite Entity
✓ A guest can be included in many schedule records;
✓ A schedule record includes only one guest;
✓ A room can be included in many schedule records;
✓ A schedule record includes only one room;
✓ An event can have many schedule records;
✓ A schedule record is only for one event.

Advanced Data Modeling
5-1 to 5-3

Supertype and Subtype

Supertype and Subtype
“A supertype is a more generic entity type compared to its subtypes.”
“A subtype is a more specific entity type compared to its supertype.”
 A subtype entity inherits all attributes of the supertype.
 A subtype has additional, specific attributes.
 An instance (occurrence) of a subtype is also an instance (occurrence) of the supertype.
(The other way around, an instance of the supertype may or may not be an instance of one or more subtypes.)

Supertype and Subtype
Relationships in which all instances participate
Attributes shared by all entities
General entity type
and so forth
Specialised versions of supertype
Relationships in which only specialised versions participate
Attributes unique to subtype 1
Attributes unique to subtype 2

Example of Supertype and Subtype
Explain later

Generalisation and Specialisation

Generalisation and Specialisation
 Generalisation: The process of defining a general entity type from a set of specialised entity types. It is a bottom-up process from subtypes to supertypes.
 Specialisation: The process of defining one or more subtypes of the supertype. It is a top-down process from supertypes to subtypes.

Generalisation
Question: How to generalise the listed two entity types: CAR and TRUCK?

Generalisation
 What are the common attributes?
• Vehicle_ID
• Vehicle_Name (Make, Model)
• Engine Displacement
 What are the specific attributes for Car?
• No_of_Passengers
 Whatarethespecific attributes for Truck?
• Capacity
• Cab_Type

Specialisation
How to specialise the entity type PART??

Specialisation

Specialisation
How to specialise the entity type Staff?

Specialisation

Constraints

Constraints
❑ The Completeness Constraint describes whether an instance of a
supertype must also be an instance of at least one subtype.
❑ The Disjointness Constraint describes whether an instance of a supertype may simultaneously be a member of two (or more) subtypes.

Constraints
 A staff must be either an academic staff or admin staff (total specialisation rule): double line.
 An academic staff may also be an admin staff (overlap rule): o.

Constraints
Common sense tells us:
 A vehicle may be a car or truck or something else (partial specialisation): single line.
 A car must not (CANNOT) a be truck (disjoint rule): d.

Constraints
▪A part must be purchased or manufactured (total specialisation rule): double line.
▪A manufactured part may also be a purchased part (overlap rule): o.

Completeness Constraint
❑ Specifies whether each supertype occurrence must also be a member of at least one subtype
• Partial completeness: Not every supertype occurrence is a member of a
VEHICLE – Car, Truck or something else such as Bus (which is not listed out)
• Total completeness: Every supertype occurrence must be a member of any
STAFF – Academic Staff & Admin Staff

Disjoint and Overlapping Constraints
❑ Disjoint subtypes: Contain a unique subset of the supertype entity
• Known as nonoverlapping subtypes
• Implementation is based on the value of the subtype discriminator attribute in the supertype
❑ Overlapping subtypes: Contain nonunique subsets of the
VEHICLE – Car vs Truck
supertype entity set
STAFF – Academic Staff & Admin Staff
• Implementation requires the use of one discriminator attribute for each subtype

Subtype Discriminator(s)
 Subtype discriminator(s) are the attribute(s) of the supertype that determine (code, note, identify) the target subtype.
 Disjoint Constraint Rule: One attribute.
 Overlapping Constraint Rule: Composite attribute/several attributes.
A simple attribute (Vehicle_Type) with different possible values indicates the subtype (disjoint rule).
Vehicle_Type
The VEHICLE is a CAR.
The VEHICLE is a TRUCK.
The VEHICLE is neither a CAR nor a TRUCK.

Acomposite attribute (Staff_Type) with sub- attributes (with “Yes”/“No” values) indicates the subtype (overlap rule).
Staff_Type
Academic Staff
Admin Staff
The Staff is a member of the Academic Staff subtype.
The Staff is a member of the Admin Staff subtype.
The Staff is both an Academic Staff and an Admin Staff.
How about No / No?

Specialisation Hierarchy Constraint Scenarios

A simple attribute (Employee_Type) with different possible values indicates the subtype (disjoint rule).
Can the Empolyee_Type be null?

ER Modelling Guideline
❑ The data items should be put into an entity (logical group).
❑ For each entity, there should be a Primary key that uniquely identifies individual members of entity type.
❑ There should be no redundant data in the model.
❑Ask yourself the following questions:
• What are the relevant entities here?
• What are the relevant relationships here?
• Can I generalise some entities?
❑Document your assumptions as you go.
❑Leave connectivity and cardinalities until the end.

Source: canningtonvet.com.au

Public Holiday Arrangement in Week 3 ❑No lecture on Queen’s Birthday 13 June (Monday)!
❑ A lecture recording of Week 3 will be uploaded on 14 June by 12 pm.
❑Tutorials will go as usual!!

Draw an ER diagram for this situation (state any assumptions that you make). Based on the ER diagram, draw the relevant relational model.
• The firm has a number of sales offices in several states. Attributes of sales office include
Office_number (identifier) and Location.
• Each sales office is assigned one or more employees. Attributes of employee include Employee_ID
(identifier) and Employee_Name. An employee must be assigned one only one sales office.
• For each sales office, there is always one employee assigned to manage that office. An employee
may manage only the sales office to which he or she is assigned.
• The firm lists property for sale. Attributes of property include Property_ID (identifier) and Location.
Components of Location include Address, City, State, and Zip_Code.
• Each unit of property must be listed with one (and only one) of the sales offices. A sales office may
have any number of properties listed or may have no properties listed.
• Each unit property has one or more owners. Attributes of owners are Owner_ID (identifier) and
Owner_Name. An owner may own one or more units of property. An attribute of the relationship between property and owner is Percent_Owned.

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

CS代考 IEEE 802.15 projects, Bluetooth Special Interest Group (SIG), Bluetooth Ver – cscodehelp代写

Bluetooth Classic
Bluetooth Low Energy (BLE) BLE Advanced
Bluetooth 4 Bluetooth 5

Copyright By cscodehelp代写 加微信 cscodehelp

1. Bluetooth History: Wireless Personal Area Networks (WPANs) and IEEE 802.15 projects, Bluetooth Special Interest Group (SIG), Bluetooth Versions
2. Bluetooth Markets and Applications
3. Bluetooth Classic: Network Topology, Channel Structure, Modulation and Data Rates, Frequency Hopping, Packet Format, Operating States, Power Saving, Protocol Stack, Application Profiles
4. Bluetooth Low Energy (BLE): Channel Structure, Frequency Hopping, PHY, MAC
5. Bluetooth 5: PHY, Advertising, and Frequency Hopping Extensions

Wireless Personal Area Networks (WPANs)
q 10m or less 802.16e
Wide Area Network (WAN)
802.20 802.21 802.22 2G, 2.5G, 3G
Mobile Handoff WRAN Metropolitan Area Network (MAN)
802.16/WiMAX Fixed Wireless MAN
Local Area Network (LAN) 802.11 Wi-Fi
Personal Area Network (PAN)
802.15.1 802.15.4 802.15.6 Bluetooth ZigBee Body Area Networks

WPAN: Design Challenges
q Battery powered: Maximize battery life. A few hours to a few years on a coin cell.
q Dynamic topologies: Short duration connections and then device is turned off or goes to sleep
q No infrastructure: No access point or base station
q Avoid Interference due to larger powered LAN devices
q Simple and Extreme Interoperability: Billions of devices. More variety than LAN or MAN
q Low-cost: A few dollars

IEEE 802.15 Projects
q IEEE 802.15.1-2005: Bluetooth 1.2
q IEEE 802.15.4-2011: Low Rate (250kbps) WPAN – ZigBee
q IEEE 802.15.4f-2012: PHY for Active RFID
q IEEE 802.15.6-2012: Body Area Networking. Medical and entertainment. Low power
q IEEE 802.15.7-2011: Visible Light Communications

Bluetooth SIGàIEEE 802.15.1àBluetooth SIG q Started with Ericsson’s Bluetooth Project in 1994 for radio-
communication between cell phones over short distances
q Named after Danish king ̊tand (=Bluetooth) (AD 940-981) who was fond of blueberries
q Intel, IBM, Nokia, Toshiba, and Ericsson formed Bluetooth SIG in May 1998
q Version 1.0A of the specification came out in late 1999.
q IEEE 802.15.1 approved in early 2002 is based on Bluetooth
Later versions handled by Bluetooth SIG directly
q Key Features:
Ø Lower Power: 10 mA in standby, 50 mA while transmitting Ø Cheap: $5 per device
Ø Small: 9 mm2 single chips

Example of a Bluetooth Chipset

Bluetooth Versions
q Bluetooth 1.1: IEEE 802.15.1-2002
q Bluetooth 1.2: IEEE 802.15.1-2005. Adaptive frequency hopping
(avoid frequencies with interference).
q Bluetooth 2.0 + Enhanced Data Rate (EDR) (Nov 2004): 3 Mbps using DPSK. For video applications. Reduced power due to reduced duty cycle
q Bluetooth 4.0 (June 2010): Low energy. Smaller devices requiring longer battery life (several years). New incompatible PHY. Bluetooth Smart or BLE
q Bluetooth 5.0 (December 2016): Make BLE go faster and further.

The Rise of Bluetooth
Source: Bluetooth SIG

The Bluetooth Impact

Bluetooth Classic

Bluetooth Network Topology: Piconet
master slave
scatternet
q Piconet is formed by a master and many slaves (typically 1) Ø Up to 7 active slaves. Slaves can only transmit when requested
Ø Up to 255 parked slaves
q Active slaves are polled by master for transmission
q Any device can become a master (initiator becomes master)
q Each station gets an 8-bit parked address Þ 255 parked slaves/piconet
q A parked station can join in 2ms. Other stations can join in more time.
q Slaves can only transmit/receive to/from master. Slaves cannot talk to another slave in the piconet
q Scatter net: A device can participate in multiple Pico nets Þ Timeshare and must synchronize to the master of the current piconet. Active in one piconet, parked in another.
q Routing protocol not defined (a node can only talk to another node if within Bluetooth range of 10m)
Ref: P. Bhagwat, “Bluetooth Technology for short range wireless Apps,” IEEE Internet Computing, May-June 2001, pp. 96-103, ©2020

Bluetooth Operating Spectrum

Bluetooth Channels
fc =(2402+k)MHz; k=0,1,…,78
k: channel index (79 1-MHz wide channels)

Modulation and Data Rate
q Basic rate (BR):
Ø Binary Gaussian FSK (GFSK): 1 bit/symbol Ø Symbol duration = 1 μs: 1 Msps
Ø Data rate: 1 Mbps
q Enhanced data rate (EDR):
Ø Symbol duration is still 1 μs (1 Msps), but Ø μ/4-DQPSK; 2 bits/symbol; 2 Mbps
Ø 8DPSK: 3 bits/symbol; 3 Mbps
Time Time FSK GFSK

Frequency Hopping (1)
q Unlike WiFi, Bluetooth constantly switches channel within the same connection to avoid collisions with other nearby Bluetooth communications
q No two packets are transmitted on the same channel/frequency, but frequency is never switched in the middle of a packet transmission
q Such frequency switching is known as frequency hopping BT 1

Frequency Hopping (2)
q Bluetooth connections are slotted: packet transmission can start only at the beginning of a time slot
q 625 μs slots using a 312.5 μs (3200Hz) clock (1 slot = 2 clock ticks) q Time-division duplex (TDD)
Þ Downstream (master-to-slave) and upstream (slave-to-master) alternate q Master starts in even numbered slots only.
q Slaves start in odd numbered slots only
q Slaves can transmit right after receiving a packet from master
q Packets = 1 slot, 3 slot, or 5 slots long
q Enables master to start in even and slave in odd slots
q The frequency hop is skipped during a packet; frequency is hopped only at slot boundaries; at the beginning of the next slot after packet transmission/reception is complete; packet lengths may not align with slot boundaries

Frequency Hopping Illustrated
M=master, S = slave

Frequency Hopping Rate
1 frequency hop per packet: a packet can be 1,3, or 5 slot long (no hop in the middle of the packet); maximum FH rate = 1600Hz, minimum FH rate = 320Hz

q Consider a Bluetooth link where the master always transmits 3-slot packets. The transmission from the master is always followed up by a single-slot transmission from a slave. Assuming 625 μs slots, what is the effective frequency hopping rate (# of hopping per second)?
Answer: Given that frequency hopping cannot occur in the middle of a packet transmission, we only have 2 hops per 4 slots, or 1 hop per 2 slots.
The effective hopping rate = 1/(2x625x10-6) = 800 hops/s = 800Hz

Bluetooth Packet Format:
Basic Rate (BR)
q Packets can be up to five slots long. 5 slots =625×5=3125 μs.
Ø Maximum packet size = 72+54+2745 = 2871 μs Ø Some residual slot-time cannot be used (2871 < 3125) q Access codes: Ø Channel access code identifies the piconet Ø Device access code for paging requests and response Ø Inquiry access code to discover units q Header: member address (3b)+type code (4b)+flow control (1b)+ack/nack (1b)+sequence number (1b)+header error check (8b)=18b, which is encoded using 1/3 rate FEC resulting in 54b q How many slots are needed to transmit a Bluetooth Basic Rate packet if the payload is (a) 400 bits, (b) 512 bits, and (c) 2400 bits. Assume that the non- payload portions do not change. Ø Bluetooth transmissions are 1, 3, or 5 slots (2, 4, 6, etc. not allowed) Ø Non-payload bits (max) = 54+72 = 126 bits Ø Each slot can carry 625 bits at most Ø (a) 400b payloadà400+126 = 526b packetà1 slot Ø (b) 512b payloadà512+126 = 638b packetà2 slots would be sufficient, but will have to be padded for a 3-slot transmission (2-slot packets not allowed) Ø (c) 2400b payloadà2400+126 = 2526b packetà5 slots ©2020 Bluetooth Packet Format: Enhanced Data Rate (EDR) q Modulation changes within the packet; facilitated by a guard interval lasting between 4.75 μs and 5.25 μs q GFSK for Access Code and Header q μ/4-DQPSK (2Mbps) or 8DPSK (3Mbps) after guard interval q EDR payload can accommodate more data than BR, but still fits within maximum 5-slot due to higher data rates Bluetooth Address Format q The Bluetooth device address is a unique 48-bit address sent in the access code field of the packet header. q The first (most significant) 24 bits represent the OUI (Organization Unique Identifier) or the Company ID q The main purpose of the Bluetooth address is for identification and authentication, but q The address is also used to seed the frequency hopping pseudorandom generator, to synchronize master and slave clocks, and to pair devices. 000666 = Roving Networks Frequency Hopping with Pseudorandom Number Generator q In Bluetooth Classic, FH is defined by a pseudorandom generating algorithm seeded with the following values Ø UAP and LAP of the master device address, and Ø Bits 1-26 of the 28-bit Bluetooth clock q The pseudorandom pattern would repeat itself after 227 hops Ø Would take 23.3 to repeat! Ø In practice the pseudorandom sequence is never repeated Bluetooth is both Time and Frequency Synchronised Illustration of Pseudorandom FH Collision with : fixed (non adaptive) hopping Collision Avoidance via • Mark interfering channels as bad channels • Avoid bad channels; hop between good channels only • Minimum available (good) channels to hop = 20 (max. 79-20=59 channels can be marked as bad) • AFH available only during Connected state (i.e., when two devices are exchanging data) Adaptive FH (AFH) AFH Illustration: hopping only between good channels Channel assessment: RSSI/SNR, PER (left to chipset vendor; not specifid in standard) q Black: used (by another piconet) q White: available (good to use) q Yellow: Bad Channel Map Master updates the map dynamically and sends it to slaves Bluetooth Operational States Disconnected Connecting Active Low Power Inquiry Transmit Page Connected Sniff Hold q 8 distinct states grouped under 4 high-level states q Standby: Initial state q Inquiry: Master broadcasts an inquiry packet. Slaves scan for inquiries and respond with their address and clock after a random delay (CSMA/CA) Bluetooth Operational States (Cont) q Page: Master in page state invites a slave device to join the piconet. Slave enters page response state and sends page response to the master. q Master informs slave about its clock and address so that slave can participate in piconet. q Connected: A short 3-bit logical address (member address within control header field) is assigned for the slave q Transmit: station is transmitting or receiving a packet Standby Inquiry Transmit Park Page Connected Bluetooth Connection Establishment Procedure Inquiry and Paging Flow Diagram IAC = inquiry access code FHS = frequency hopping synchronization Connection Established Master (initiator) Slave (remote device) Inquiry Response (ADDR, CLK) Page Response Inquiry Broadcast (IAC) FHS (ADDR, CLK) POLL (3-bit ADDR) Bluetooth Connection Establishment Procedure Inquiry and Paging Frequency Hopping q Inquiry/page hopping sequence Ø Hop over 32 subset of 79 channels/frequencies (to speedup) Ø 32 is divided into two 16-channel trains Ø For inquiry, each train is repeated 256 times before switching to the other train; must have 3 train switches (1st à 2nd à 1st à 2nd): each train effectively repeated 256 x 2 times Ø Master sends two inquiry/page packets using 2 different frequencies per slot (hops in the middle of the slot; hops frequency in 312.5μs!), and listens for responses (both frequencies) in the following slots (to speed up)àeventually 2 frequencies covered in 2 slots q Connection establish time Ø 16 x 625 μs = 10 ms for completing a train once Ø Inquiry time (maximum) = 256 x 4 x 10 ms = 10.24 s Ø There is an additional paging time Power Saving Modes in Bluetooth Three inactive (power-saving) states: 1. Hold: Go inactive for a single short period and become active after that 2. Sniff: Low-power mode. Slave listens periodically after fixed sniff intervals. 3. Park: Very Low-power mode. Gives up its 3-bit active member address and gets an 8-bit parked member address. Wake up periodically and listen to beacons. Master broadcasts a train of beacons periodically Bluetooth Protocol Stack Application Middleware q RF: Gaussian Frequency Shift Keying (GFSK) modulation q Baseband: Frequency hop selection, connection, MAC Time Time FSK GFSK Applications (Profiles) Host Controller Interface Link Manager Baseband Layer q Each device has a 48-bit IEEE MAC address q 3 parts: Ø Lower address part (LAP) – 24 bits Ø Upper address part (UAP) – 8 bits Ø Non-significant address part (NAP) - 16 bits q UAP+NAP = Organizationally Unique Identifier (OUI) from IEEE q LAP is used in identifying the piconet and other operations q Clock runs at 3200 cycles/sec or 312.5 μs (twice the hop rate) 8b 16b 24b Upper Address Part Non-sig. Address Part Lower Address Part Bluetooth Protocol Stack (Cont) q Link Manager: Negotiate parameters, Set up connections q Logical Link Control and Adaptation Protocol (L2CAP): Ø Protocol multiplexing Ø Segmentation and reassembly Ø Controls peak bandwidth, latency, and delay variation q Host Controller Interface: Chip independent interface to Bluetooth chip. Allows same software to run on all chips. q RFCOMM Layer: Presents a virtual serial port Ø Sets up a connection to another RFCOMM q Service Discovery Protocol (SDP): Devices can discover the services offered and their parameters Ø E.g., Bluetooth keyboard, Ø Bluetooth mouse Ø Bluetooth headset Applications (Profiles) Host Controller Interface Link Manager Bluetooth Protocol Stack (Cont) q Bluetooth Network Encapsulation Protocol (BNEP): To transport Ethernet/IP packets over Bluetooth q IrDA Interoperability protocols: Allow existing IrDA applications to work w/o changes. IrDA object Exchange (IrOBEX) and Infrared Mobile Communication (IrMC) for synchronization q Audio is carried over 64 kbps over SCO links over baseband q Telephony control specification binary (TCS-BIN): Call control including group management (multiple extensions, call forwarding, and group calls) Ø Telephony has both audio and control Ø Bluetooth telephone very popular in cars q Application Profiles: Set of algorithms, options, and parameters Ø To support specific applications ©2020 Applications (Profiles) Host Controller Interface Link Manager Application Profile Examples q Headset Profile q Global Navigation Satellite System Profile q Hands-Free Profile q Phone Book Access Profile q SIM Access Profile q Synchronization Profile q Video Distribution Profile q Blood Pressure Profile q Cycling Power Profile q Find Me Profile q Heart Rate Profile q Basic Printing Profile q Dial-Up Networking Profile q File Transfer Profile With IoT, the list is expected to grow rapidly over the coming years Ref: Bluetooth SIGn, “Adopted Bluetooth Profiles, Services, Protocols and Transports,” https://www.bluetooth.org/en-us/specification/adopted-specifications Connecting a wireless keyboard with HID Bluetooth profile Bluetooth Low Energy (BLE) Bluetooth 4 Bluetooth LE or BLE q Low Energy: 1% to 50% of Bluetooth classic q For short broadcast: Your body temperature, Heart rate, Wearables, sensors, automotive, industrial. Not for voice/video, file transfers, ... q Small messages: 1Mbps data rate but throughput not critical. q Battery life: In years from coin cells q Simple: Star topology. No scatter nets, mesh, ... q Lower cost than Bluetooth classic q New protocol design based on Nokia’s WiBree technology Shares the same 2.4GHz radio as Bluetooth Þ Dual mode chips q Most smartphones (iPhone, Android, ...) have dual-mode chips ©2020 BLE Channels q 40 2MHz-wide channels: 3 (37,38,39) for advertising and 37 (0-36) for data q Advertising channels specially selected to avoid interference with popular default WiFi channels (1,6,11) BLE Advertising Channels Avoiding Popular BLE Modulation and Data rate q Binary GFSK over 2MHz channel: More significant frequency separations for ‘0’ and ‘1’ allows longer range with low power Ø Note that with Bluetooth Classic, channel bandwidth is only 1MHz, so frequency separations are smaller q 1 million symbols per secondà1 Mbps data rate Benefit of Advertising Channels q BLE simplifies discovery and broadcasting by using only three advertising channels (instead of 32 channels for inquiry/paging in BT Classic) q A BLE device can broadcast advertising beacons on these 3 channels giving information about the device, so other devices can connect, but can also broadcast some sensor data q Data channels are used to exchange data bidirectionally between two devices Connection Events and Connection Intervals q In BLE connections, devices wake up periodically after every connection interval (CI) time; transmit some data (connection event) and then go back to sleep until the next connection event q Send a short blank packet if no data to send during a connection event q More than one packet can be sent during a connection event q Connection interval time can vary from 7.5ms to 4s and is negotiated during connection set up q Hop frequency (switch to different data channel) at each event ... fk+n Sleep Sleep Time Data Transfer BLE Frequency Hopping Algorithm Ø Where h (hop increment) is a fixed value negotiated during connection setup Ø Note: Data channels range from 0-36 q Example hopping sequence for h=10: 0à10à20à30à3à13 q Adaptive FH: If the hopping lands on a bad channel, the channel is remapped to a good channel using a channel remapping algorithm q Fixed hopping instead of pseudorandom qfk+1=(fk +h)mod37 Algorithm #1 Bluetooth Smart Protocol Stack Applications Generic Access Profile Generic Attribute Profile Attribute Protocol Security Manager Logical Link Control and Adaptation Protocol Host Controller Interface Link Layer Direct Test Mode Physical Layer Controller Generic Attribute (GATT) Profile q Defines data formats and interfaces with the Attribute Protocol Ø Define attributes instead of applications (a major difference from Bluetooth Classic); temperature, pressure, heart rates are examples of attributes Ø New applications can be supported by using appropriate attributes q Type-Length-Value (TLV) encoding is used q Each attribute has a 16-bit Universally Unique ID (UUID) standardized by Bluetooth SIG Ø 216=65 thousand unique attributes can be defined! q 128-bit UUID if assigned by a manufacturer Ø Manufacturers can define their own attributes and still interoperate q Allows any 程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

留学生代考 HAX2017]. The preamble, which uses a series of upchirps followed by a few – cscodehelp代写

Chapter 11
LoRa and LoRaWAN
Pervasive IoT deployments demand low-power wide area networking (LPWAN) solutions that can connect hundreds of thousands of sensors and ‘things’ over a large area with minimal infrastructure cost. The low-power solution is needed to ensure that the battery-powered sensors can last for many years with a tiny battery. While Bluetooth is certainly low-powered, it works only for short ranges. Cellular networks are designed for wide area coverage, but they consume too much power which requires large batteries and frequent battery recharging for the end nodes. Consequently, there is a significant momentum in standardizing new networking solutions for LPWAN. New developments are emerging from both cellular and WiFi standard bodies, i.e., from the 3GPP and IEEE/WiFi-alliance, respectively, to fill this gap, but there is a third momentum that is proving very successful. It is called LoRa Alliance (LoRa stands for long range), which is a industry alliance committed to accelerate the development and deployment of LPWAN networks. In this chapter, we shall study the details of the LoRa technology.
LoRa is a proprietary and patented PHY technology originally developed by a small company called Cycleo in France [SEMTECH-BLOG]. Later it was acquired by Semtech corporation, which formed the LoRa Alliance [LORA-ALLIANCE]. Now LoRa Alliance has 500+ members. The first version was LoRa was released to public in July 2015. Since then it enjoyed rapid adoption with many different types of products selling fast. For long range IoT, this is at the moment the major choice in the market currently implemented in over 100 million devices.

Copyright By cscodehelp代写 加微信 cscodehelp

The main advantage of LoRa is the support for extremely long-range connectivity. It supports communications up to five kilometers in urban areas depending on how deep within indoor the sensors are located, and up to 15 kilometers or more in rural areas with line of sight [LORA-SEMTECH]. Such long distances are supported with extremely low power and low cost. These advantages are gained by trading off the data rate. LoRa supports very low rates, on the order of only a few kbps. However, these rates are sufficient for the targeted IoT applications which only need to upload a small message once in a while.
11.2 LoRa frequencies
Like 802.11ah, LoRa also uses sub-GHz ISM license-exempt bands to reach long distances at low power. Different regions have different restrictions on the use of LoRa frequencies. The following bands are specified in LoRa developers guide from SEMTECH [LORA-SEMTECH]:
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 1

• 915 MHz MHz in US. Power limit. No duty cycle limit.
• 868/433 MHz in Europe. 1% and 10% duty cycle limit
• 430 MHz in Asia
Note that there is a power limit in the US, but no duty cycle. It means devices can be awake all the time and transmit as often as they like. However, in Europe, devices have to implement 10% duty cycle, which means they can be up only 10% of the time on average. Limiting the duty cycle enables more devices to be connected to the LoRa network with minimum infrastructure at the expense of slightly higher latency.
LoRa uses channels with significantly smaller bandwidth compared to Bluetooth, WiFi, or cellular networks. Specifically, LoRa channels are either 125kHz or 500kHz wide [LORA-SEMTECH]. For example, in the US, 125kHz channels can be used only for the uplink (end device to gateway) whereas 500kHz can be used for both uplink and downlink.
11.3 LoRa modulation: chirp spread spectrum
Supporting long range communication with low power is challenging because the receiver will be required to demodulate a signal that can be very weak and even below the noise floor, i.e., demodulation with negative signal-to-noise ratio (SNR) would be required. To achieve this objective, LoRa adopts a specific form of chirp spread spectrum that spreads the signal power to all frequencies over the entire channel bandwidth by continuously increasing or decreasing the frequency during the symbol transmission. This which allows the receiver to combine samples from many frequencies to reconstruct the signal despite low signal power. The chirp phenomenon with linear frequency increasing or decreasing rates is illustrated in Figure 11.1.
Figure 11.1 Frequency domain representation of a linearly increasing chirp symbol. The power is spread over the entire channel bandwidth and the received signal power is below the noise floor.
Chirps with increasing frequency are called up-chirps and the ones with decreasing frequency are called down-chirps. In time-frequency graphs, these up-chirps and down-chirps are shown as straight lines with positive and negative slopes, respectively, as shown in Figure 11.2.
Symbol Duration
Frequency Bandwidth
Received Signal
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 2

Frequency fmax fmax
fmin fmin Sweep Duration Time
Down-chirp
Sweep Duration Time
Figure 11.2 Up-chirps and down-chirps.
As we can see in Figure 11.2, the chirps sweep the entire bandwidth, from the minimum frequency to the maximum frequency, within a specified chirp sweep duration. The sweeping speed, k, is thus obtained as:
𝑘 = 𝐵 𝐻𝑧/𝑠𝑒𝑐 (11.1)
Where B is the bandwidth in Hz and TS is the chirp sweeping duration in second.
So, how does LoRa encode information with chirps? Clearly, these chirps need to be modulated in some ways to convey data. In LoRa, data bits are encoded with either up-chirps or down-chirps depending on the direction of communication, i.e., uplink vs. downlink. Each chirp represents one symbol, which means that the symbol duration is equivalent to the chirp duration, TS.
LoRa shifts the starting frequency of the chirp to produce different symbol patterns [LORA-SYMBOL]. The amount of frequency shift is then used to code the symbol, which represents the data bits carried by that symbol. Figure 11.3 illustrates an example of 4-ary modulation that uses 4 possible frequency shifts, including zero shift, to create 4 different symbol patterns. Note that for the non-zero shifts, the chirp is `broken’ into two pieces because it reaches the maximum (for upchirp) or minimum (for downchirp) frequency sooner than the symbol duration. The second piece of the chirp then starts from the minimum (for upchirp) or maximum (for downchirp) frequency and continues the frequency sweep until the end of the symbol duration.
Example 11.1
A LoRa transmitter configured with SF=8 can send how many bits per symbol? Solution:
8 bits. SF=8 means there are 28 different symbol patterns, thus each symbol can be coded with an 8-bit pattern.
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 3

A striking difference between LoRa and the conventional wireless networks is that the symbol duration in LoRa is not fixed but is a function of the modulation order. The larger the modulation order, the longer the symbol duration, and vice versa. Both the modulation order and the symbol duration are controlled by the parameter called, spreading factor (SF). For M-ary modulation, SF=log2(M) and Ts=2SF/B seconds, where B is in Hz. This means that by increasing SF by 1 would not only double the modulation order (increase bits per symbol by 1), but also double the symbol duration. The relationship between SF, modulation order, and the symbol duration is illustrated in Figure 11.4 for upchirps.
Example 11.2
A LoRa transmitter configured with SF=10 would take how long to transmit one symbol over a 125kHz channel?
Ts = 2SF/B = 210/125 ms = 8.192 ms
LoRa increases the symbol duration to increase the communication range, as longer symbols help decode the signal at the receiver despite weak receptions. Hence SF is adaptively adjusted based on the received signal strength. By choosing to exponentially increase both the modulation order and the symbol duration, LoRa seeks to achieve orthogonality between signals of different SF. Thus, two signals from two transmitters would not interfere or collide at the receiver even if they are transmitted on the same channel at the same time if they use different SFs [LORA- SEMTECH].
00 01 10 11
(a) Upchirps
00 01 10 11
(b) Downchirps
Figure 11.3 LoRa symbol patterns for 4-ary modulation.
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 4

A major consequence of exponentially increasing the symbol duration with increase in SF is that the symbol rate, i.e., the number of symbols per second, is reduced exponentially as well. This means that instead of increasing the data rate with increasing modulation order, the data rate is actually reduced with increasing SF. This can be clearly seen in the following universal equation that derives data rate as a function of the modulation rate (bits per symbol), symbol rate, and the coding rate (CR) that reflects the forward error correction (FEC) overhead:
𝐷𝑎𝑡𝑎 𝑟𝑎𝑡𝑒 = 𝑏𝑖𝑡𝑠 𝑝𝑒𝑟 𝑠𝑦𝑚𝑏𝑜𝑙 𝑥 𝑠𝑦𝑚𝑏𝑜𝑙 𝑟𝑎𝑡𝑒 𝑥 𝑐𝑜𝑑𝑖𝑛𝑔 𝑟𝑎𝑡𝑒
= 𝑆𝐹𝑥 𝐵 𝑥𝐶𝑅𝑏𝑝𝑠. (11.2) 2″#
Where B is in Hz and CR is the FEC ratio between actual data bits and the total encoded bits. In LoRa, CR can technically take values from 4/5, 4/6, 4/7, and 4/8, although the default value of 4/5 is often used. As can be seen from Eq. (11.2), data rate would be reduced nearly exponentially by increasing the SF. Thus, SF is the main control knob used by LoRa to trade-off between data rate and range. A total of six spreading factors, SF=7 to SF=12, are supported by LoRa [LORA-SEMTECH].
Example 11.3
A LoRa sensor is allocated a 125kHz uplink channel. What would be its effective data rate if it is forced to use a spreading factor of 10 and 50% redundancy for forward error correction?
SF=10; 2SF=1024; CR=0.5
Symbol rate = B/2SF sym/s = 125,000/1024 sym/s Effective data rate = 10 x 125000/1024 x 0.5 = ~610 bps
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 5

4-ary modulation
902.125 MHz
2SF/B = 32μs
2SF/B = 64μs
8-ary modulation
Figure 11.4 Relationship between SF, modulation order, and symbol duration.
Energy is another important parameter affected by the choice of SF. For a given message, the total energy consumed is proportional to the airtime of the message, i.e., the amount of time the LoRa module needs to be active and consume power. The higher the data rate, the shorter is the airtime, and vice-versa. Thus, shorter SF would reduce the energy consumption, and vice versa. That is why LoRa implements adaptive data rate (ADR), which tries to select the minimum possible SF. For example, devices closer to the gateway would be using shorter SF (due to good quality link) and enjoy longer battery life compared to the ones located further from the gateway.
11.4 LoRa networking with LoRaWAN
LoRa actually refers to only the PHY layer of the LoRa network protocol stack as shown in Figure 11.5. The PHY is available for all frequency bands available in different regions of the world. The MAC layer is called LoRaWAN, which is an open standard. The MAC supports connecting LoRa end devices to the LoRa gateways, which in turn are connected to the network servers in the backbone. The end-to-end LoRa network system is illustrated in Figure 11.6.
Figure 11.5 LoRa network protocol stack
Application
868/433 (EU) 915 (US) 430 (AS)
Class A (basic) Class B (beacon) Class C (continuous)
MAC (LoRaWAN)
PHY (LoRa)
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 6

The gateways are like the base stations in cellular networks. Many gateways are controlled by a central network server. However, unlike cellular networks, LoRa end devices do not associate with a single gateway; instead all gateways within range receive and process the messages transmitted by all end devices. The gateways work only at the PHY layer. They only check data integrity if CRC is present. The message is dropped if CRC is incorrect. They pass the LoRa message to the network server only if the CRC is correct along with some metadata such as received signal strength (RSSI) and timestamp. The network server actually runs the MAC and makes all networking decisions. It assigns each device a frequency, spreading code, eliminates duplicate receptions, and schedules acknowledgements. If requested by the end device, the network server also implements the adaptive data rate (ADR) for that device by dynamically controlling its transmitters parameters such as its SF, bandwidth, and transmit power.
LoRa supports scalable and flexible deployment of networks by provisioning for cost- optimized gateways. For small networks, very simple gateways made from can be used with limited number of channels. For carrier-grade networks run by city municipalities, more heavy-duty gateways with large number of channels (up to 64 channels in the US) can be used, which can be deployed on the rooftop of high-rise buildings, cellular towers, etc.
LoRa supports bidirectional communications. This allows the sensors (LoRa end devices) to upload data to the server and the server to send acknowledgements or update software/firmware on the sensors. Gateways listen to multiple transmissions on multiple channel and all gateway listen to all transmissions, which provides antenna diversity and improved reliability for the simple aloha protocol. For example, if one gateway could not receive it because of collision, another gateway may receive it and forward it to the server. The server selects one gateway for the downlink ACK to the device.
Figure 11.6 End-to-end LoRa network system [LORA-SEMTECH].
LoRa frame format is shown in Figure 11.7 [HAX2017]. The preamble, which uses a series of upchirps followed by a few downchirps, is used to synchronize the
Join Server
Network Server Application Server
End devices (sensors/actuators) Gateways
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 7

transmitter and receiver clocks. An optional header is used before the payload to automate the configuration of several important parameters, namely the payload length, coding rate, and the use of CRC. When the header is not used (to save transmission energy), these parameters must be configured manually before the start of the session. Finally, the payload is optionally followed by a CRC field to detect errors in the payload.
Figure 11.7 Lora packet format.
Application servers are ultimately responsible for processing and interpreting the received LoRa payload data. They also generate the appropriate payload for the downlink messages.
Join servers are used to facilitate over-the-air activation of LoRa end devices. A join server contains the necessary to process an uplink join-request message from an end device and a downlink join-accept message. It also informs the network server about the application server a particular end-device should be connected to. Thus, with join servers in place, users can connect their LoRa sensors and actuators by simply turning them on.
11.5 LoRa device classes
LoRaWAN supports three classes of devices, A, B, and C [LORA-SEMTECH. Class A is the most basic mode of operation, which must be supported by any device. Class B devices must also support Class A option. Finally, Class C devices must have the option to operate in either of the three classes. Let us have a look at the operational features of each of these classes.
Class A: These are the lowest power and lowest traffic LoRa devices mostly sleeping and waking up once in a while to transmit data if a monitoring event is detected. For each uplink (end device to gateway) transmission, the device will be allowed to receive up to two 2 short downlink (gateway to end device) transmissions. One may be for ACK, but another can be used for other kind of information, such as an actuation signal triggered by the application based on the uplink information. Example of these devices include various environmental sensors and monitors with limited actuation capabilities.
The device cannot receive anything else until it transmits again. When it does, again it gets two credits for downlink communication. This cycle repeats. Class A devices are very simple and they use Pure Aloha for channel access, which is basically contention-based. Pure Aloha performs well under light traffic, but will struggle under heavy load. Its performance under sustained heavy load approaches 1/2e or approximately 18.4%.
Payload Length
CRC Present
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 8

Class B: This is basically Class A plus extra receive window at scheduled time following the periodic beacons from Gateway. That is the beacon contains reserved slots for the stations. This class is for stations which need to receive more frequent traffic from the network or server. All gateways transmit beacons every 2n seconds (n=0..7), which provides plenty of opportunity for the network to synchronize with Class B end devices. All gateways are synchronized using GPS so they all can align to the exact beacon timing.
Class C: These are the most powerful stations typically connected to mains power and almost always awake. They can receive anytime, unless transmitting. As such, the server enjoys the lowest latency in reaching a Class C device compared to the other classes. Class C devices include things such as streetlights, electrical meters, etc., which can be constantly monitored and controlled by a server. Figure 11.8 illustrates and compares the operations of the three classes.
Random Fixed Fixed
Tx Rx Rx ClassA
Beacon Beacon Interval Interval
Tx Rx Tx Rx Tx ClassC Transmit at random intervals
Figure 11.8 Operations of Class A vs. Class B vs. Class C.
11.6 Chapter Summary
The main aspects of LoRa can be summarized as follows:
1. LoRa is designed to work with narrow bandwidth channels, long symbols, and low data rates; data rate is sacrificed for longer range.
2. LoRa modulation is a variation of chirp spread spectrum where the modulation order as well as the frequency sweeping speed of the chirp is modulated by an integer variable called spreading factor (SF).
3. For a given bandwidth B Hz and spreading factor SF, modulation order = 2SF and symbol duration = 2SF/B sec. As a result, contrary to typical wireless communications, increasing the modulation order actually decreases the data rate in LoRa.
4. For a given bandwidth, the larger the SF, the longer the symbol duration and longer the range at the expense of reduced data rates.
5. Orthogonality of the SF enables transmission of multiple LoRa chirps at the same frequency channel and at the same time slot.
© 2022 [Wireless and Mobile Networking, CRC Press 2022] 9

6. There are 6 valid SF values in LoRa: 7 to 12.
7. LoRa data contains either all upchirps or all downchirps depending on the
direction of communication (uplink vs. downlink); upchirps and downchirps
are never mixed within the same LoRa packet except for the preamble field.
8. LoRa end devices broadcast to all gateways within range. The gateway with
the best connectivity replies back.
9. LoRa gateways are only PHY-layer devices; all MAC processing is done at
the network server.
10. LoRa supports 3 classes of devices. Class A devices can sleep most of the time
to conserve energy but allow most restricted access from the network. Class B devices can be accessed more frequently by the network at the expense of higher energy consumption. Class C devices are usually powered by the mains; they never sleep and hence can be reached by the network at any time without delay.
References
[LORA-SEMTECH] “LoRa and LoRaWAN: A Technical Overview

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

程序代写 IEEE 802.11a/b/g/n/ac/ax/be – cscodehelp代写

Wireless LAN II
Mainstream IEEE 802.11a/b/g/n/ac/ax/be

1. IEEE 802.11 Amendments

Copyright By cscodehelp代写 加微信 cscodehelp

2. 802.11a/b/g
3. 802.11e: Enhanced DCF, Multiple Queues, Frame Bursting
4. 802.11n [WiFi 4]: Bonding, Aggregation
5. 802.11ac [WiFi 5]: Beamforming, Multi-User MIMO
6. 802.11ax [WiFi 6]: High efficiency
7. 802.11be [WiFi 7]: Extremely high throughput

Mainstream 802.11 Amendments
802.11 Amendment
Key Enhancements
Max. Data Rate
802.11-1997
Legacy WiFi in 2.4GHz (now extinct!)
802.11b-1999
Higher speed modulation in 2.4GHz
802.11a-1999
Higher speed PHY (OFDM) in 5GHz
802.11g-2003
Higher speed PHY (OFDM) in 2.4GHz
802.11n-2009
Higher throughput in 2.4/5GHz
802.11ac-2013
Very high throughput in 5GHz
802.11ax-2020
High efficiency in 2.4/5GHz
802.11be-2024 (expected)
Extremely high throughput in 2.4/5/6GHz

IEEE 802.11b
q Direct Sequence Spread Spectrum:
Signal 01001011011011010010
q Complementary Code Keying (CCK):
Multi-bit symbols with appropriate code to minimize errors
q IEEE 802.11-1997: 1⁄2 rate binary convolution encoder, 2 bit/symbol, 11 chips/symbol, DQPSK = 1⁄2 ×22 × 1/11 × 2 = 2 Mb/s using 22 MHz
q IEEE 802.11b-1999: 1⁄2 rate binary convolution encoder, 8 bit/symbol, 8 chips/symbol, CCK = 1⁄2 ×22 × 1/8 × 8 = 11 Mb/s using 22 MHz
Ref: P. Roshan and J. Leary, “802.11 Wireless LAN Fundamentals,” Cisco Press, 2003, ISBN:1587050773, Safari book
Data Bits Time
Chips = Code bits Time

q A WLAN standard is employing a spread spectrum coding with only 1⁄2 rate, which produces chips at a rate of 1⁄2 chips per Hz. It uses 8 chips to code a symbol and 16 QAM modulation to modulate the symbol stream. What would be the data rate for 22 MHz channels?
Chip rate = 1⁄2 x 22 = 11 Mcps
Symbol rate = 11/8 = 1.375 Msps
Bits per symbol = log2(16) = 4 [16 QAM produces 4 bits per symbol] Data rate = 1.375 x 4 = 5.5 Mbps

IEEE802.11a
q To increase the data rate, 802.11a uses OFDM.
q 20 MHz divided into 64 subcarriers. 6 subcarriers at each side are used as
guards and 4 as pilot, which leaves 48 for data.
q Each OFDM symbol is carried over 48 subcarriers in parallel. q OFDM has a symbol length of 4 μsà0.25 M symbols/s
Ø 3200ns (data pulse) + 800ns (guard interval) = 4000ns = 4μs
q With a binary modulation (e.g., BPSK) , there will be 1 coded bit per subcarrier for each OFDM symbol, or 48 coded bits per OFDM symbol in total (over 48 subcarriers)
q Data rate depends on the combination of modulation and coding
q 802.11a supports 8 different data rates, 6 Mbps up to 54 Mbps, by selecting
a combination of modulation and coding
q 802.11a supports three coding rates, 1⁄2, 2/3, and 3⁄4 (the ratio indicates the ratio
of data bits over all coded bits transmitted).
Ø E.g., 1⁄2 indicates that only half of the total transmitted bits contain data.

IEEE802.11a
1999 Data Rates
Modulation
Coding Rate
Coded bits per subcarrier
Coded bits per symbol
Data bits per symbol
Data Rate (Mbps)

IEEE 802.11g
q OFDM – Same as 802.11a Þ 54 Mbps
q 2.4 GHz band Þ Cheaper than 5 GHz 802.11a q Fall back to 802.11b CCK

IEEE 802.11e
1. Hybrid Coordination Function (HCF) w two components
a. Contention Free Access: Polling
b. Contention-based Access: Enhanced DCF (EDCF)
1. Multiple Priority levels with multiple FIFO queues
2. Frame bursting and Group Acknowledge
3. Direct link
2005 (Enhanced QoS)

Enhanced DCF
q Up to 4 queues. Each Q gets a different set of four Parameters: Ø CWmin/CWmax
Ø Arbitrated Inter-Frame Spacing (AIFS) = DIFS
Ø Transmit Opportunity (TXOP) duration
q DIFS replaced by Arbitrated Inter-frame Spacing (AIFS)
Multiple Queues
Cwmin[2] Cwmax[2] AIFS[2] TXOP[2] BO[2]
Cwmin[3] Cwmax[3] AIFS[3] TXOP[3] BO[3]
Cwmin[4] Cwmax[4] AIFS[4] TXOP[4] BO[4]
Cwmin[1] Cwmax[1] AIFS[1] TXOP[1] BO[1]

q EDCF allows multiple frame transmission Ø Both individual and group ACK allowed
q Max time = Transmission Opportunity (TXOP) Ø Covers total time including multiple data frames
q Voice/gaming has high priority but small burst size q Video/audio has lower priority but large burst size
Frame Bursting

Direct Link in 802.11e
q Direct Link is another feature introduced by 802.11e
q Direct link allows two WiFi devices to communicate directly without going through
the AP, which reduces latency (great for delay-sensitive applications)

IEEE 802.11n
1. First WLAN to use MIMO (Multi-input Multi-Output)
2. MIMO (Multi-input Multi-Output) Multiplexing: n×m:k Þ n transmitters, m receivers, k streams k = degrees of freedom = min(n,m)
Þ k times more throughput
E.g., 2×2:2, 2×3:2, 3×2:2, 4×4:4, 8×4:4
3. MIMO Beamforming: Focus the beam directly on the target
antenna for increased coverage and signal strength
4. MIMO Power Save: Use multiple antennas only when needed

IEEE 802.11n
5. Frame Aggregation: Pack multiple input frames inside a frame Þ Less overhead Þ More throughput
6. Lower FEC Overhead: 5/6 instead of 3⁄4
7. Reduced Guard Interval: 400 ns instead of 800 ns
8. Reduced Inter-Frame Spacing (SIFS=2 μs, instead of 10 μs)
9. : Optionally eliminate support for a/b/g
(shorter and higher rate preamble)
10. Dual Band: 2.4 and 5 GHz
11. Space-Time Block Code
12. Channel Bonding: Use two adjacent 20 MHz channels
13. More subcarriers: 52+4 instead of 48+4 with 20 MHz, 108+6 with 40MHz
2009 (Cont)

Guard Interval
GI GI GI GI GI GI GI GI GI GI GI
q Rule of Thumb: Guard Interval = 4 × Multi-path delay spread q Initial 802.11a design assumed 200ns delay spread
Þ800 ns GI + 3200 ns data Þ20% overhead
q Most indoor environment have smaller 50-75 ns
q So if both sides agree, 400 ns can be used in 802.11n Þ400 ns GI + 3200 ns data Þ11% overhead
Ref: M. Gast, “802.11n: A Survival Guide,” O’Reilly, 2012, ISBN:978-1449312046, Safari Book

q Compared to 802.11a/g, 802.11n has higher coding rate, wider channel bandwidth, lower coding overhead, and reduced guard interval. On top of
this, 802.11n uses MIMO multiplexing to further boost the data rate. Given that 802.11a/g has a data rate of 54 Mbps, can you estimate the data rate for 802.11n that uses 4 MIMO streams (assume 64 QAM for both of them, i.e., there is no improvement in modulation)?
54 Mbps is achieved with 3⁄4 coding for 3200 Data+800 GI for a/g, which basically uses a single stream (no MIMO).
802.11n has the following improvement factors:
Ø Streaming factor = 4
Ø Coding factor = (5/6)/(3/4) = 1.11
Ø OFDM subcarrier (plus wider bandwidth) factor = (108/48) = 2.25 Ø Guard interval factor = (3200+800)/(3200+400) = 1.11
Ø Total improvement factor = 4×1.11×2.25×1.11 = 11.1 Improved data rate for 802.11n =
4×[(5/6)/(3/4)]×(108/48)×[(3200+800)/(3200+400)]×54 Þ 600 Mbps ©2021

802.11n Channel Bonding
q Two adjacent 20 MHz channels used
q OFDM: 52+4 instead of 48+4 with 20 MHz,
108+6 with 40MHz (No guard subcarriers between two bands)
q Primary 20 MHz channel: Used with stations not capable of channel bonding
q Channel bonding is achieved by combining a secondary 20 MHz channel. q Secondary 20 MHz channel: Just below or just above the primary channel
(indicated by the primary channel number and up/down indicator)
Ø E.g., in 5 GHz band, 36+ would indicate that channel bonding is achieved by combining 36 and 40 (both 36 and 40 are 20 MHz channels)

Modulation, Coding, Data Rates of 802.11n: Single Stream

Example: 802.11n
Question: 802.11n can use either 20 MHz channels or 40 MHz channels with channel bonding. For 40 MHz bandwidth, data rate can be improved by what factor if channel bonding is used?
Solution: Data rate is proportional to the number of OFDM subcarriers used for data.
# of subcarriers for 20 MHz channels (no channel bonding) = 52 # of subcarriers for 40 MHz channels with channel bonding = 108
Channel bonding improvement over 40 MHz bandwidth = 108/(52+52) = 1.04 or 4%

Frame Aggregation
q Frame Bursting: Transmit multiple PDUs together q Frame Aggregation: Multiple SDUs in one PDU
All SDUs must have the same transmitter and receiver address

802.11n Frame Aggregation
IP Datagram 1
IP Datagram 2
IP Datagram 3

MAC Header
MSDU Subframe 1
MSDU Subframe 2
MSDU Subframe n
MPDU Delimiter
PHY Header
MPDU Subframe 1
MPDU Subframe 2
MPDU Subframe m
PSDU = A-MPDU PPDU
Ref: D. Skordoulis, et al., “IEEE 802.11n MAC Frame Aggregation Mechanisms for Next-Generation High-Throughput WLANs,”
IEEE Wireless Magazine, February 2008, http://tinyurl.com/k2gvl2g ©2021

802.11n MAC Frame
CSI Feedback Opportunity
Frame Control
Duration/ ID
Seq Control
High Thr CTL
Info <7955B 16b 16b 48b 48b 48b 16b 48b 16b 32b 32b Link Adaptation Control Calibration Pos | Seq 1b 1b 4b 3b 2b 2b 2b 2b 1b 5b 1b 1b q 802.11n introduced a “High Throughput Control” field to exchange channel state information (CSI) q Receivers can derive CSI from the pilots embedded in the transmissions (e.g., OFDM pilot subcarriers), but the transmitters cannot learn it unless receivers explicitly feedback this information. This new field in 802.11n provides this opportunity IEEE 802.11ac q Supports 80 MHz and 80+80 (channel bonding) MHz channels q 5 GHz only. No 2.4 GHz. q 256-QAM 3/4 and 5/6: 8/6 times 64-QAM Þ 1.33X (of 11n) q 8 Spatial streams: 2X (of 11n) q Multi-User MIMO q Less pilots/more data subcarriers: 52+4 (20 MHz), 108+6 (40 MHz), 234+8 (80 MHz), 468+16 (160 MHz) Ref: M. Gast, “802.11ac: A Survival Guide,” O’Reilly, July 2013, ISBN:978-1449343149, Safari Book Bandwidth and Subcarriers of 802.11ac # of Data Subcarriers # of Pilot Subcarriers Modulation, Coding, Data Rates of 802.11ac: Single Stream Beamforming q Direct energy towards the receiver q Requires an antenna array to alter direction per frame Þ A.k.a. Smart Antenna q Implicit: Channel estimation using packet loss q Explicit: Transmitter and receiver collaborate for channel estimation q 802.11ac supports a more “standard” beamforming so multi-vendor products can cooperate easily q MIMO: Multiple uncorrelated spatial beams Multiple antenna’s separated by l/4 or l/2 (absolute minimum) Ø Cannot put too many antennas on a small device; also cost increases with number of antennas q MU-MIMO: Two single-antenna users can act as one multi- antenna device. The users do not really need to know each other. They do not even know that their antennas are used in a MU-MIMO system! Beamforming with Multi q Single User MIMO: Colors represent transmission signals not frequency. has 4 antennas has 1 antenna has 1 antenna q Multi User MIMO: 802.11n vs. 802.11ac https://www.cisco.com/c/en/us/products/collateral/wireless/aironet-3600-series/white_paper_c11-713103.html Goal of 802.11ax: Efficiency vs. Speed q Up until 802.11ac, pushing the data rates had been the main goal Ø 3500X increase from 2Mbps in 1997 to 7Gbps in 2013 Ø 802.11ac increased data rates by ~11X compared to its immediate predecessor, 802.11n q Instead of speed, 802.11ax seeks to solve two efficiency problems: Ø Efficient WiFi in densely deployed scenarios (urban areas) Ø Efficient communications for machines (IoT) q 802.11ax has a modest data rate increase of only 37% against its immediate predecessor, 802.11ac Parameters of 802.11ax q Band: 802.11ax supports both 2.4GHz and 5GHz bands. q Coding rate: There is no change for the coding rate; 5/6 remains the maximum allowed coding rate. q Channel width: There is also no change for the allowed channel width, i.e. 40MHz and 160MHz remain the maximum for 2.4GHz and 5GHz bands, respectively. q MIMO streams: Like its predecessor, 802.11ax maintains the maximum number of MIMO streams to 8 only. q Modulation: 802.11ax supports an increased modulation rate of up to 1024 QAM. q Symbol interval: 802.11ax uses increased symbol intervals to address longer delay spread in challenging outdoor environments. Symbol data interval is increased to 12.8μs (vs. 3.2μs in 11a/g/n/ac) while the guard interval is also increased to 0.8μs, 1.6μs, or 3.2μs (3 options). q OFDM subcarrier: subcarrier spacing is reduced to 78.125 kHz (vs. 312.5kHz in 11a/g/n/ac), which yields a total number of subcarriers as follows: 256 for 20MHz, 512 for 40MHz, 1024 for 80MHz, and 2048 for 160MHz, which includes two new types of subcarriers, DC and null subcarriers, in addition to the conventional data, pilot, and guard subcarriers used in previous WiFi versions. The number of data carriers available are as follows: 234 for 20MHz, 468 for 40MHz, 980 for 80MHz, and 1960 for 160MHz. Modulation, Coding, Data Rates of 802.11ax: Single Stream Multiple Access in 802.11ax: OFDMA q Up until 802.11ac, CSMA had been used for channel access q OFDMA had been used in cellular networks for many years, but for WiFi it was introduced for the first time in 802.11ax Ø OFDMA is available as an option q 802.11ax OFDMA Ø Centrally allocate channel resources using fine-grained time-frequency resource units (Rus) Ø Subcarriers are called tones Ø Each tone = single subcarrier of 78.125 kHz bandwidth Ø The tones are then grouped into 6 different sizes of resource units (RUs): 26, 52, 106, 242, 484, or 996 tones Ø 26 tones = ~2MHz (26x78.125kHz = 2031.25kHz) Ø 996 tones = ~80MHz (996x78.125kHz = 77812.5kHz) Ø A WiFi client can be allocated a maximum of 2 996 tones = ~160 MHz 802.11ax Resource Units 160(80+80)MHz where +n means ‘plus n 26-tone RUs`. For example, to allocate ~20MHz, the access point would allocate 4 52-tone RUs plus 1 26-tone, which results in a total of 4x52+26=234 subcarriers allocated to the station. Example 802.11ax Question: A single antenna 802.11ax client receives a 26-tone RU allocation from the AP when trying to transmit a 147-byte data frame. What could be the minimum possible time required to transmit the frame assuming at least 2 non-data subcarriers? Single antenna means single stream Number of data subcarriers = 26-2 = 24 Symbol length = data-interval+guard = 12.8+0.8 = 13.6μs Maximum data rate for single-stream 26-tone 0.8μs GI ) = symbol-rate x (bits/symbol) x coding-rate = (1/13.6) x (10x24) x (5/6) = 14.7Mbps Data frame length in bits: 147x8 bits Minimum frame transmission time: (147x8)/14.7μs = 80μs 802.11be: Next Generation q 802.11ax is perfectly capable of serving today’s needs, but q Work on next generation WiFi must continue to keep WiFi future q 802.11be is the next generation WiFi Ø work has already begun; expected to release in 2024 q Data rates will be increased by enhancing several parameters Ø Increase bandwidth from 160MHz to 360MHz (6GHz band) Ø Increase number of bits per symbol (4096 QAM) Ø Increase MIMO streams to 16 Ø Multi-band communications (better throughput and reliability) Ø Multi-AP coordination (better spectral efficiency and quality of experience) 802.11be vs. previous generations Table 5.10 Comparison of 802.11be with previous amendments 2.4/5/6GHz Max. Channel Bandwidth Max Modulation 16 streams Max. Data Rate Example 802.11be Question: Calculate the maximum data rate of 802.11be. Solution: Enhancements against 802.11ax: Channel bandwidth factor: 320MHz/160MHz = 2 Modulation factor: 12 bits/symbol (log21024=10)/10 bits/symbol (log24096=12) = 1.2 MIMO factor = 16 streams/8 streams = 2 Therefore 802.11be is expected to achieve a 4.8X (2x1.2x2 = 4.8) improvement against 802.11ax. Given that 802.11ax has a maximum data rate of 9.6Gbps, 802.11be is expected to achieve a maximum data rate of 4.8x9.6 = 46.08Gbps. 802.11be Multi band Communications 2.4GHz 5GHz 2.4GHz 5GHz Top: Improving throughput by allocating data from one traffic stream to multiple bands; Bottom: Improving reliability by sending duplicate data from one traffic stream over multiple bands; 802.11be Multi AP Coordination Example Downlink is handled by AP1, while AP2 handles the uplink. 1. 802.11a/g use OFDM with 64 subcarriers in 20 MHz, which includes 48 Data, 4 Pilot, 12 guard subcarriers. 2. 802.11e introduces 4 queues with different AIFS and TXOP durations and a QoS field in frames to provide enhanced support for QoS. 3. 802.11n adds MIMO, aggregation, dual band, and channel bonding. 4. IEEE 802.11ac supports multi-user MIMO with 80+80 MHz channels with 256-QAM and 8 streams to give 6.9 Gbps 5. IEEE 802.11ax supports 1024QAM, reduces OFDM carrier spacing to 78.125kHz and increases data symbol interval to 12.8μs. It introduced OFDMA. 6. 802.11be expects to increase data rates up to 46Gbps by using 4096 QAM, 320MHz channel bandwidth, and 16 MIMO streams. It uses 6GHz band along with 2.4GHz and 5GHz. 程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

CS代写 IEEE 802.11 Evolution – cscodehelp代写

IEEE 802.11 Evolution

1. Chronology of IEEE 802.11 Amendments
2. Maths of WiFi Data Rates | Modulation and Coding Scheme

Copyright By cscodehelp代写 加微信 cscodehelp

3. 802.11a/b/g
4. 802.11n: Channel Bonding, Aggregation
5. 802.11ac: Multi-User MIMO
6. 802.11ax: OFDMA

q 802.11-1997: 2 Mbps Legacy WiFi in 2.4GHz (now extinct!) q 802.11b-1999: Higher speed modulation in 2.4GHz (11Mbps)
q 802.11a-1999: Higher speed PHY (OFDM) in 5GHz (54Mbps)
q 802.11g-2003: Higher speed PHY (OFDM) in 2.4GHz (54Mbps)
q 802.11n-2009: Enhancements for higher throughput: 2.4/5GHz (600 Mbps)
q 802.11ac-2013: Very high throughput: 5GHz (~7 Gbps)
q 802.11ax-2020 (expected): High efficiency: 2.4/5GHz (~9.6Gbps, but particularly efficient for short packets and dense deployments)
Evolution:
Key 802.11 Amendments

q Each WiFi version supports a range of specific data rates Ø E.g., 802.11bà11 Mbps,
Ø 802.11aà6,9,12,18,24,36,48,54 (Mbps)
q Data rate = symbol rate x data bits per symbol q Symbol rate = number of symbols per second
q Symbol rate calculation depends on PHY Ø Direct sequence spread spectrum (802.11b)
Ø OFDM (802.11a/g/n/ac/ax)
q Data bits per symbol depends on modulation and coding
q WiFi with MIMO can have more than one independent data stream => increases data rate linearly with number of such available streams
Data Rates

IEEE 802.11b
q Direct Sequence Spread Spectrum:
Data Bits Time
Signal 01001011011011010010 Time
Chips = Code bits Multi-bit symbols with appropriate code to minimize errors
q Complementary Code Keying (CCK):
q IEEE 802.11-1997: 1⁄2 rate binary convolution encoder, 2 bit/symbol, 11
chips/symbol, DQPSK = 1⁄2 ×22 × 1/11 × 2 = 2 Mb/s using 22 MHz q IEEE 802.11b-1999: 1⁄2 rate binary convolution encoder, 8 bit/symbol, 8
chips/symbol, CCK = 1⁄2 ×22 × 1/8 × 8 = 11 Mb/s using 22 MHz
Ref: P. Roshan and J. Leary, “802.11 Wireless LAN Fundamentals,” Cisco Press, 2003, ISBN:1587050773, Safari book

q A WLAN standard is employing a spread spectrum coding with only 1⁄2 rate, which produces chips at a rate of 1⁄2 chips per Hz. It uses 8 chips to code a symbol and 16 QAM modulation to modulate the symbol stream. What would be the data rate for 22 MHz channels?
Chip rate = 1⁄2 x 22 = 11 Mcps (cps = chips per second)
Symbol rate = 11/8 = 1.375 Msps (sps = symbols per second)
Bits per symbol = log2(16) = 4 [16 QAM produces 4 bits per symbol] Data rate = symbol rate x bits per symbol = 1.375 x 4 = 5.5 Mbps

Symbol Rate for OFDM
q OFDM adopted from 802.11a onwards
q OFDM symbol rate = 1/(symbol-interval)
q Symbol interval = data interval + guard interval
q Only the data interval contain the actual symbol
q Guard interval contains no data; it is used to protect against inter symbol interference
Ø More multipathàlonger delay spreadàlonger guard intervalà reduced symbol rate

Bits per symbol
q Bits per symbol in OFDM depends on modulation order and subcarrier structure
q Total # of subcarriers in a WiFi channel = channel-bandwidth/subcarrier-spacing Ø Subcarrierspacing312.5kHzin802.11a/g/n/ac
Ø Subcarrierspacing78.125kHzin802.11ax
q Total subcarriers are divided into three categories: data subcarriers + pilot subcarriers + guard subcarriers
Ø Onlydatasubcarrierscarrydata
Ø Pilotsestimatethewirelesschannel
Ø Guards protect against interference from adjacent channels
q Each OFDM symbol is carried over all data subcarriers in parallel q M-ary modulationàlog2M bits per data subcarrier for the symbol
Ø E.g., 16-QAM yields 4 bits per data subcarrier
q Number of raw (coded) bits per symbol = log2M ✘ #-of-data-subcarriers
OFDM subcarrier structure: Black: Data, Blue: Pilot, Yellow: Guard ©2020

Impact of error coding on
data bits per symbol
q Error coding is often applied to original data to detect/correct bit errors during transmission
q Coded bit stream = original data bits + code bits
Ø E.g., with 3⁄4 code, 4 bits are transmitted for 3 data bits
Ø With 2/3 code = 3 bits are transmitted for 2 data bits, and so on Ø 3⁄4, 2/3, etc. are referred to as coding rate
q Data bits per symbol = coding rate ✘ log2M ✘ #-of-data- subcarriers

Question: What is the data rate of an OFDM WiFi applying 64-QAM and a coding rate of 3⁄4 to its 48 data subcarriers? Assume a symbol interval of 4μs.
Log2M = log264 = 6
Coded bits per symbol = log2M ✘ #-of-data-subcarriers = 6×48 = 288
Data bits per symbol = coding rate x 288 = 3⁄4 x 288 = 216
Symbol rate = 1/symbol-interval = 1⁄4 Msps (0.25 million symbols per sec.) Data rate = symbol rate x data bits per symbol = 216 x 1⁄4 Mbps = 54 Mbps

5 Key Parameters
1. Modulation (affects number of bits per symbol) Ø Usually multiple options available
2. Coding (error correction overhead)
Ø Usually multiple options available
Ø MCS (integer number) defines combination of modulation and coding
3. Guard interval (affects symbol rate)
4. Channel width à # of OFDM data subcarriers
Ø Channel width can be increased via bonding from 802.11n onwards
5. MIMO streams (number of independent data streams that can
be sent in parallel)
Ø MIMO available from 802.11n onwards
data rates

IEEE802.11a
q To increase the data rate, 802.11a uses OFDM.
q 20 MHz divided into 64 subcarriers (20000/312.5=64). 6 subcarriers at each
side are used as guards and 4 as pilot, which leaves 48 for data.
q Each OFDM symbol is carried over 48 subcarriers in parallel.
q 802.11a OFDM has a symbol interval of 4μsà0.25 M symbols/s
Ø 3200ns (data pulse) + 800ns (guard interval) = 4000ns = 4μs
q With a binary modulation (e.g., BPSK) , there will be 1 coded bit per subcarrier for each OFDM symbol, or 48 coded bits per OFDM symbol in total (over 48 subcarriers)
q Data rate depends on the combination of modulation and coding
q 802.11a supports 4 different modulations: BPSK, QPSK, 16QAM, 64QAM
q 802.11a supports three coding rates, 1⁄2, 2/3, and 3⁄4
q 802.11a supports 8 different data rates, 6 Mbps up to 54 Mbps, by selecting
a combination of modulation and coding scheme (MCS) ©2020

IEEE802.11a
1999 Data Rates
Modulation
Coding Rate
Coded bits per subcarrier
Coded bits per symbol
Data bits per symbol
Data Rate (Mbps)

IEEE 802.11g
q 802.11a was great at max. data rate of 54Mbps, but
Ø Only operates at 5GHz and not backward compatible with 11b
q 802.11g achieved 54Mbps at 2.4GHz using OFDM
Ø And could fall back to 11b rates with CCK modulation
Ø Was cheaper than 11a (2.4GHz radio had economy of scale)
q OFDM data rates are identical with 11a: Ø 6, 9, 12, 18, 24, 36, 48, 54 Mbps
q CCK data rates:
Ø 1, 2, 5.5, 11 Mbps

IEEE 802.11n

1. First WLAN to use MIMO (Multi-input Multi-Output)
2. MIMO (Multi-input Multi-Output) Multiplexing: n×m:k Þ n transmitters, m receivers, k streams k = degrees of freedom = min(n,m)
Þ k times more throughput
E.g., 2×2:2, 2×3:2, 3×2:2, 4×4:4, 8×4:4
3. The AP is expected to have more antennas than the mobile

Other New Features of IEEE 802.11n
1. Frame Aggregation: Pack multiple input frames inside a frame Þ Less overhead Þ More throughput
2. Reduced Inter-Frame Spacing (SIFS=2 μs, instead of 10 μs)
3. : Optionally eliminate support for a/b/g (shorter and
higher rate preamble)
4. Dual Band: 2.4 and 5 GHz
5. Lower FEC Overhead: 5/6 instead of 3⁄4
6. Channel Bonding: Combine two 20MHz channels to achieve 40MHz
7. Shorter Guard Interval: 400 ns instead of 800 ns
8. More OFDM subcarriers: Shorter GI in time domain enables less guard carriers in frequency domain
Ø 4 instead of 6 guard carriers on either side of data carriers
Ø 52 instead of 48 data carriers with 20 MHz legacy channels
Ø 108 data carriers with 40MHz (no guard between two legacy channels)

Guard Interval
GI GI GI GI GI GI GI GI GI GI GI
Longer GI: 5 symbols Shorter GI: 6 symbols
q Rule of Thumb: Guard Interval = 4 × Multi-path delay spread q Initial 802.11a design assumed 200ns delay spread
Þ 3200ns data + 800ns GI Þ 20% overhead (800/4000=0.2)
q Most indoor environment have smaller delay spread ~50-75ns
q So if both Tx-Rx agree, 400ns GI can be used in 802.11n Þ 3200ns data + 400ns GI Þ 11.11% overhead (400/3600=11.11)
Ref: M. Gast, “802.11n: A Survival Guide,” O’Reilly, 2012, ISBN:978-1449312046, Safari Book

Example: 11n data rate improvement
q Compared to 802.11a/g, 802.11n has higher coding rate, wider channel bandwidth, lower coding overhead, and reduced guard interval. On top of this, 802.11n uses MIMO multiplexing to further boost the data rate. Given that 802.11a/g has a data rate of 54 Mbps, can you estimate the data rate for 802.11n that uses 4 MIMO streams (assume 64 QAM for both of them, i.e., there is no improvement in modulation)?
54 Mbps is achieved with 3⁄4 coding for 3200 Data+800 GI for a/g, which basically uses a single stream (no MIMO).
802.11n has the following improvement factors:
Ø Streaming factor = 4
Ø Coding factor = (5/6)/(3/4) = ~1.11
Ø OFDM subcarrier (plus wider bandwidth) factor = (108/48) = 2.25 Ø Guard interval factor = (3200+800)/(3200+400) = ~1.11
Ø Total improvement factor = 4×1.11×2.25×1.11 = ~11.1 Improved data rate for 802.11n =
4×[(5/6)/(3/4)]×(108/48)×[(3200+800)/(3200+400)]×54 Þ 600 Mbps ©2020

Example: 802.11n maximum data rate
Question: Calculate the maximum achievable data rate for 802.11n
Minimum guard interval: 400ns (data interval=3200ns)à3.6μs symbol interval Maximum modulation: 64 QAM
Maximum coding: 5/6
Maximum # of MIMO streams: 4 (4×4 MIMO)
Maximum # of data carriers: 108 (for 40MHz bonded channels)
Coded bits per symbol = log264 ✘ #-of-data-subcarriers = 6×108 = 648
Data bits per symbol = coding rate x 648 = 5/6 x 648 = 540
Symbol rate = 1/symbol-interval = 1/3.6Msps
Data rate (single MIMO stream) = symbol rate x data bits per symbol = 1/3.6 x 540 Mbps = 150 Mbps
Data rate with 4 streams = 4 x 150 = 600 Mbps

802.11n Data Rates
Single Stream)
Source: https://www.cablefree.net/wirelesstechnology/wireless-lan/data-rates-in-802-11n/

Data rates for (Multiple Streams)
Source: https://www.cablefree.net/wirelesstechnology/wireless-lan/data-rates-in-802-11n/

Frame Aggregation
q Each layer has Service Data Units (SDUs) as input
q Each layer makes Protocol Data Units (PDUs) as output to communicate
with the corresponding layer at the other end
Ø PDUs have a header specific to the layer (header means overhead)
q Frame Aggregation: Multiple SDUs in one PDU
Ø All SDUs must have the same transmitter and receiver address

Frame Aggregation

MAC Header
MSDU Subframe 1
MSDU Subframe 2
MSDU Subframe n
MPDU Delimiter
PHY Header
MPDU Subframe 1
MPDU Subframe 2
PSDU = A-MPDU PPDU
Ref: D. Skordoulis, et al., “IEEE 802.11n MAC Frame Aggregation Mechanisms for Next-Generation High-Throughput WLANs,” IEEE Wireless Magazine, February 2008, http://tinyurl.com/k2gvl2g
IP Datagram 1
IP Datagram 2
IP Datagram 3
MPDU Subframe m

CSI Feedback
Frame Control
Duration/ ID
Seq Control
High Thr CTL
Info <7955B 16b 16b 48b 48b 48b 16b 48b 16b 32b 32b Link Adaptation Control Calibration Pos | Seq 1b 1b 4b 3b 2b 2b 2b 2b 1b 5b 1b 1b q 802.11n introduced a “High Throughput Control” field to exchange channel state information (CSI) q Receivers can derive CSI from the pilots embedded in the transmissions (e.g., OFDM pilot subcarriers), but the transmitters cannot learn it unless receivers explicitly feedback this information. This new field in 802.11n provides this opportunity IEEE 802.11ac IEEE 802.11ac q 5 GHz only (2.4 GHz not supported) q Enhanced channel bonding: 20, 40, 80, 160 MHz channels q More data subcarriers: 52+4 (20 MHz), 108+6 (40 MHz), 234+8 (80 MHz), 468+16 (160 MHz) Ø More data subcarriers achieved due to wider channels Ø Subcarrier spacing remains 312.5 kHz (same as 11a/g/n) q Higher modulation: up to 256-QAM q More MIMO streams: up to 8 streams allowed Ref: M. Gast, “802.11ac: A Survival Guide,” O’Reilly, July 2013, ISBN:978-1449343149, Safari Book Question: Calculate the maximum achievable data rate for an 802.11ac mobile client with a single antenna. Single antennaàonly 1 stream possible (even if the AP has many antennas) Minimum guard interval: 400ns (data interval=3200ns)à3.6μs symbol interval Maximum modulation: 256 QAM Maximum coding: 5/6 Maximum # of data carriers: 468 (for 160MHz bonded channels) Coded bits per symbol = log2256 ✘ #-of-data-subcarriers = 8x468 = 3744 Data bits per symbol = coding rate x 3744 = 5/6 x 3744 = 3120 Symbol rate = 1/symbol-interval = 1/3.6Msps Data rate (single MIMO stream) = symbol rate x data bits per symbol = 1/3.6 x 3120 Mbps = 866.67 Mbps 802.11ac data rate (1) Question: An 802.11ac mobile client fitted with two antennas is connected to a wireless LAN via an 802.11ac access point equipped with four antennas. Calculate the maximum achievable data rate for the mobile client. Max. # of streams = min(2,4) = 2 Max. data rate with single stream(from previous example) = 866.67 Mbps Therefore, max. data rate with 2 streams = 2x866.67 Mbps = 1.733 Gbps 802.11ac data rate (2) 802.11ac Data Rates in Mbps (Single Stream) Source: https://www.cablefree.net/wirelesstechnology/wireless-lan/data-rates-802-11ac/ Question: What is the maximum achievable data rate in 802.11ac? 802.11ac allows a maximum of 8 MIMO streams Maximum achievable with single stream = 866.67 Mbps Maximum achievable data rate of 802.11ac = 8x866.67 = 6.9 Gbps maximum data rate q MIMO: Multiple uncorrelated spatial beams Multiple antenna’s separated by l/4 or l/2 (absolute minimum) Ø Cannot put too many antennas on a small device; also cost increases with number of antennas 802.11ac supports q MU-MIMO: Two single-antenna users can act as one multi- antenna device. The users do not really need to know each other. They do not even know that their antennas are used in a MU-MIMO system! Directing streams with Beamforming in q Single User MIMO: Colors represent transmission signals (streams) not frequency. has 4 antennas has 1 antenna has 1 antenna q Multi User MIMO: 802.11n vs. Data Rate Enhancements in 3 Dimensions https://www.cisco.com/c/en/us/products/collateral/wireless/aironet-3600-series/white_paper_c11-713103.html [Affects # of data subcarriers] IEEE 802.11ax (expected) High Efficiency (HE): Motivation q Up until now, 802.11 evolution was purely driven by pushing the data rates and throughput (we were crazy about speed!) Ø From humble 2Mbps in 1997 (802.11 legacy) to ~7Gbps in 2013 (11ac) an increase of 3500x in just 16 years! q WiFi has become so popular and dense that we cannot really use all that speed due to congestion, collisions, and interference q Need a new WiFi that can work efficiently in dense deployments, in outdoors, for short message communications between IoT machines etc. q 802.11ax is more about efficiency for such new environments than pushing the data rates q 802.11ax has only a modest data rate increase of 37% against its predecessor 802.11ac; whereas 11ac increased data rate by 10x compared to 11n Parameters of 802.11ax q Supports both 2.4 and 5GHz bands q No change for coding rate: 5/6 max. q No change for channel width: 160 MHz max for 5GHz Ø Upto 40MHz for 2.4GHz band q No change with MIMO stream numbers: 8 streams max. q Increased modulation rate: 1024 QAM max. q Increased symbol interval to address longer delay spread in challenging outdoor environments Ø Symbol data interval increased to 12.8μs (vs. 3.2μs in 11a/g/n/ac) Ø Guard interval increased to 0.8μs, 1.6μs, or 3.2μs (3 options allowed) q OFDM subcarrier spacing reduced to 78.125 kHz (vs. 312.5kHz in 11a/g/n/ac) Ø Total subcarriers: 256 (20MHz), 512 (40MHz), 1024 (80MHz), 2048 (160MHz) Ø Total subcarriers = data+pilot+guard+DC+null (5 types of subcarriers) Ø Data subcarriers = 234 (20MHz), 468 (40MHz), 980 (80MHz), 1960 (160MHz) 802.11ax OFDM Parameters NBPSCS: number of coded bits per data subcarrier R: coding rate Nss: number of spatial streams Nsd: number of data subcarriers TDFT: symbol data interval TGI: guard interval Question: Calculate the maximum achievable data rate for 802.11ax OFDM Minimum guard interval: 8μs (data interval=12.8μs)à13.6μs symbol interval Maximum modulation: 1024 QAM Maximum coding: 5/6 Maximum # of MIMO streams: 8 Maximum # of OFDM data subcarriers: 1960 (for 160MHz channels) Coded bits per symbol = log21024 ✘ #data-subcarriers = 10x1960 = 19600 Data bits per symbol = coding rate x 19600 = 5/6 x 19600 = 16333.33 Symbol rate = 1/symbol-interval = 1/13.6Msps Data rate (single MIMO stream) = symbol rate x data bits per symbol = 1/13.6 x 5/6 x 19600 Mbps = 1.2 Gbps Data rate with 8 streams = 8 x 1.2 = 9.6 Gbps 802.11ax OFDM maximum Data Rates in Mbps (Single Stream) Source: https://www.cablefree.net/wirelesstechnology/wireless-lan/802-11ax/ OFDMA: new access control for q OFDMA: Orthogonal Frequency Division Multiple Access q 802.11ax introduces OFDMA as an option to centrally allocate channel resources to each competing station using fine-grained time and frequency resource units (RUs) like cellular networks q Channel bandwidth is first divided into many narrow subcarriers Ø Subcarrier spacing = 78.125kHz (vs. 312.5kHz in previous WiFi) q Subcarriers are grouped into RUs called tones q 26, 52, 106, 242, 484, or 996 tones per station. Each tone consist of a single subcarrier of 78.125 kHz bandwidth. q Smallest resource allocated to an OFDMA communication: 26x78.125kHz = 2031.25kHz (~2MHz) q Largest tone has: 996x78.125kHz = 77812.5kHz (~80MHz) q A station can have a maximum of TWO 996 tones allocated OFDM Freq. OFDMA Freq. OFDMA Illustrated 802.11ax RUs Source: A Tutorial on IEEE 802.11ax High Efficiency WLANs, Khorov et al., IEEE Communications Surveys and Tutorial, 2019. 802.11ax OFDMA Parameters NBPSCS: number of coded bits per data subcarrier R: coding rate Nss: numbe 程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

代写代考 COMP4336/9336 Mobile Data Networking 2022 Term 2 – cscodehelp代写

COMP4336/9336 Mobile Data Networking 2022 Term 2
Individual Term Project: Due 5pm Friday 29 July 2022 (Week 9) Assessment Weighting: 25%
Project Specifications and Marking Criteria (5 pages): Released 16 June 2022
This is the complete specification of the term project. You are encouraged to discuss the project or any questions in the Project Forum in Moodle.

Copyright By cscodehelp代写 加微信 cscodehelp

Location Identification with WiFi Fingerprinting
Distance-dependent path loss of wireless signals, together with dense deployment of WiFi in public spaces enable WiFi to be used as a tool for localising people in indoor environments. In this project the students will develop and implement algorithms that will enable location identification using signals available from in-situ public WiFi infrastructure.
Background on WiFi Fingerprinting
As GPS does not work inside buildings, indoor localisation remains a challenge. Given that WiFi is densely deployed in public spaces, it could be potentially used as a free localisation solution when indoors. There are many different techniques to use WiFi signals for localisation, but the one that is widely pursued is based on a technique called WiFi Fingerprinting.
As we know, wireless signals are affected by distance (attenuation) as well as reflecting objects in the environment (multipath). We have learned that the multipath structure is very sensitive to the location of the receiver, a small move can cause a small-scale fading, which will ultimately affect the received signal strength (RSS) due to constructive or destructive interference with the original signal. We have also learned and observed that Tx-Rx distance directly affects the RSS. Thus, if the receiver (WiFi Client) changes its location, the Tx-Rx distance may also change, causing changes in RSS. Consequently, WiFi RSS can help fingerprinting a location, i.e., we can potentially expect that a given location can be uniquely identified by a unique RSS value.
However, we have also learned that RSS is unstable and fluctuates a lot even for the same distance and location due to many random interferences in the environment. Thus, in practice, its challenging to identify locations uniquely using RSS, especially if using a single WiFi AP as a reference for RSS measurements. The goal of this project is to explore the potential of using multiple WiFi APs for more reliable identification of locations, i.e., WiFi fingerprinting will be based on RSS data from multiple Aps, instead of one. This is possible given the dense deployment of WiFi in urban environment. For example, it is common to receive beacons from tens of WiFi APs in a shopping mall or a university campus.

Hardware Requirements
This project can be completed using a laptop. WiFi RSS data can be collected using Wireshark as learned in the lab experiments.
Programming Requirements
Some basic programming is involved to process WiFi RSS data and implement algorithms that can identify locations from the WiFi RSS data. There are no restrictions on the choice of programming language (Python, MATLAB etc. are all OK).
Tasks Involved
You need to complete the following tasks:
1. WiFi RSS data collection: Each student will choose a suitable indoor environment to conduct this task. It can be a university (e.g., UNSW) campus, a shopping centre, etc., which have plenty of public WiFi APs deployed. You need to use Wireshark to collect WiFi RSS data from the surrounding APs with your own device (e.g., laptop) in different locations in the indoor environment (you may want to use some sort of system API to fetch WiFi RSS directly, which will be useful to build a demo of your localisation program in the following task). Thus, the dataset is expected to be unique for every student. You should collect data from at least 10 different locations, separated by at least 2-3 meters from each other for reliable location identifications. Collect plenty of RSS data for each location so that you can build a reliable WiFi fingerprint for the locations despite the expected fluctuations of RSS.
2. Design and implementation of a location detection algorithm: Design and implement a suitable algorithm to fingerprint a location from the WiFi RSS data you collected in Task 1. Use your algorithm/code to demonstrate that you can identify different locations with good accuracy. You are welcome to use machine learning for this task if you have relevant background, but use of machine learning is not mandatory. Basic WiFi fingerprinting techniques, such as building a fingerprint database and then matching a new fingerprint to the database (as described in [1]) is also acceptable. [Note that this task requires some independent literature search/reading regarding WiFi Fingerprinting- based localisation. An initial reading list is included at the end of this document and a short lecture on WiFi Fingerprinting using a basic database matching approach will be covered in Lecture 3.]
3. Write a short report (approx. 2000-3000 words plus figures/tables) explaining your experiments, algorithm design, and performance results. Do not forget to include a title, abstract, introduction, and conclusion.
4. Produce a short (less than 10-min and 100MB) demo video demonstrating interesting parts of your project.
[1] Detecting Identity-Based Attacks in Wireless Networks Using Signalprints, by Faria and Cheriton, WiSe 2006. [https://dl.acm.org/doi/10.1145/1161289.1161298] [Note: Although the title says it is trying to identify attacks, actually the fingerprinting method described in this paper is quite applicable to location identification as well. ]
You are welcome and encouraged to do your own research to explore suitable algorithms for locations detection using WiFi RSS. Note that there is no restriction on the algorithms to be used.

What to submit?
Submit the following 4 items using the project submission link in Moodle:
1. Dataset: The data set may have many data files, so you should give them appropriate labels. If machine learning is used, provide the training and testing datasets as well. Submit one ZIP file containing all your datasets.
2. Code: Submit the source code you have written for implementing the WiFi fingerprinting and location identification. You should also provide a clear description of how to compile/execute your code (specify the programming language, version, library, etc.). The code should also work with the dataset you submitted, so we can test it against the dataset. Submit one ZIP file for the code and any descriptions.
3. Report: Should be easy to read and comprehend. Maximum 20 MB. Submit in PDF.
4. Demo Video: Be creative. You have the complete freedom and flexibility to choose contents and style. The demo video should show how your program works in a real-world environment. Demonstrate the performance of your program’s predictions across different locations in the indoor area and discuss interesting/important aspects of your work/design. Maximum 10-min, 100MB.
Marking Rubric
Dataset (8 Marks):
1. Data volume (5 Marks)
a. The amount of data collected was adequate for high accuracy detection training and
testing. The relationship between volume of data and detection accuracy was shown
clearly to establish that data collection was adequate. (4~5 marks)
b. The amount of data collected was adequate for moderate accuracy(median
localization error <10m) detection training and testing. But impact of data volume on detection accuracy was not shown explicitly. (2~3 marks) c. The data volume was clearly not adequate. (1~2 marks) d. No data is uploaded, or the data format does not meet the requirements. (0 mark) 2. Data quality (3 Marks) a. The data set is of high quality, has clear labels, very easy to identify, and there is no redundant data. (2~3 marks) b. The quality of the data set is average, with redundant or duplicate data. (1.5~2 mark) c. The quality of the data set is poor, it is difficult to understand their labels and there are redundant or duplicate data. (1~1.5 mark) d. No data is uploaded, or the data format does not meet the requirements. (0 mark) Code (5 marks) 1. Complete working code with clear README instructions submitted, and the code compiles and executes properly. [4-5 marks] 2. Code not fully working and/or README file does not explain clearly how the code should be executed [2-3 marks] 3. No code submitted [0 marks] Report (7 marks) 1. Algorithm design (2 Marks) a. Came up with an innovative idea/algorithm or borrowed/finetuned an existing algorithm from the literature; the idea/algorithm is presented clearly. (1.5~2 Marks) b. An existing idea without any innovation/improvement/adjustment. (1 ~ 1.5 Marks) c. An idea that has obvious logical problems or is incomprehensible. (0 ~ 1 Marks) 2. Experiments (2 Marks) a. The design and execution of the experiments to collect data were clearly explained with sufficient details so a reader can reproduce the experiments/data; the experiments were well designed to produce a valid/useful dataset for the task at hand (1.5-2 marks) b. The descriptions are not detailed enough to be reproduced (0-1.5 marks) 3. Performance (2 Marks) a. Excellent performance (e.g., locations are detected with high accuracies, e.g., median localization error <3m) and there are detailed data, code, and explanations to validate the claims. (1.5~2 Marks) b. Average performance (e.g., locations are detected with low/medium accuracies, median localization error 3~10m) but detailed data, code, and explanations are provided. (1~1.5 Marks) c. Poor performance (locations are barely detected correctly, median localization error >10m), or there is no evaluation, or there is no data to support the results provided. (0~0.5 Marks)
4. Overall organization/presentation (1 Mark)
a. The report is easy to read and understand; it has a succinct but clear abstract that
reflects the contents of the report; proper conclusions were drawn at the end of the
report (1 Mark)
b. The report was challenging to read and understand; abstracts and conclusions do not
capture the contents well (0-0.5).
Demo Video (5 Marks)
a. Video is exciting to watch and clearly demonstrates how the proposed algorithm works possibly with real data and locations; video length and size within limit. (4-5 marks)
b. Video is exciting to watch and clearly demonstrates how the proposed algorithm works possibly with real data and locations; video length and/or size not within limit. (3-4 marks)
c. Video does not convey the message well and does not demonstrate any working system (0-2)

Reading List
Here are some initial reading materials for you to learn more about location identification from WiFi RSS. Note that some of these articles use different techniques than fingerprinting and some of them use other than RSS data, e.g., time of arrival, etc., but they all have the common goal of identifying locations using WiFi signals. You can read as much as you want/need. Use of WiFi for location identification is a hot topic of research and development and as such there are plenty of literature on this topic. You can also do your own literature search and read more widely or selectively.
Kotaru, M., Joshi, K., Bharadia, D. and Katti, S., 2015, August. Spotfi: Decimeter level
localization using wifi. In Proceedings of the 2015 ACM Conference on Special Interest
Group on Data Communication (pp. 269-282).
Vasisht, D., Kumar, S. and Katabi, D., 2016. {Decimeter-Level} Localization with a Single
{WiFi} Access Point. In 13th USENIX Symposium on Networked Systems Design and
Implementation (NSDI 16) (pp. 165-178).
Yang, C. and Shao, H.R., 2015. WiFi-based indoor positioning. IEEE Communications
Magazine, 53(3), pp.150-157.
Garcia-Valverde, T., Garcia-Sola, A., Hagras, H., Dooley, J.A., Callaghan, V. and Botia,
J.A., 2012. A fuzzy logic-based system for indoor localization using WiFi in ambient
intelligent environments. IEEE Transactions on Fuzzy Systems, 21(4), pp.702-718.
Sen, S., Lee, J., Kim, K.H. and Congdon, P., 2013, June. Avoiding multipath to revive
inbuilding WiFi localization. In Proceeding of the 11th annual international conference on
Mobile systems, applications, and services (pp. 249-262).
End of Project Specs and Marking Rubric

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

程序代写 PHY FUNDAMENTALS II – cscodehelp代写

PHY FUNDAMENTALS II
Wireless Signal Propagation

1. Antenna

Copyright By cscodehelp代写 加微信 cscodehelp

2. Reflection, Diffraction, Scattering
3. Fading, Shadowing, Multipath
4. Inter-symbol Interference
5. Path loss model (Frii’s, 2-ray)
6. MIMO (Diversity, Multiplexing, Beamforming)
7. Orthogonal Frequency Division Multiplexing (OFDM)
8. Orthogonal Frequency Division Multiple Access (OFDMA)
9. Effect of Frequency

q Transmitter converts electrical energy to electromagnetic waves q Receiver converts electromagnetic waves to electrical energy
q Same antenna is used for transmission and reception
q Omni-Directional: Power radiated in all directions
q Directional: Most power in the desired direction
q Isotropic antenna: Radiates in all directions equally
q Antenna Gain = Power at particular point/Power with Isotropic Expressed in dBi (“decibel relative to isotropic”)
Omni-Directional Directional Isotropic

Question: How much stronger a 17 dBi antenna effectively receives (transmits) the signal compared to the isotropic antenna?
Power of isotropic antenna = Piso Power of 17 dBi antenna = P We have
17 = 10log10(P/Piso)
Thus P/Piso = 101.7 = 50.12, i.e., the 17 dBi antenna will effectively receive (transmit) the signal 50.12 times stronger than the isotropic antenna albeit using the same actual transmit power.

Relationship between antenna size and frequency
q Antennas are designed to transmit or receive a specific frequency band
Ø Cannot use a TV antenna for wireless router, or vice-versa (why?)
q End-to-end antenna length = 1⁄2 wavelength
Ø So that electrons can travel back and forth the antenna in
q If dipole (two rods), each rod is 1⁄4 wavelength

Reflection, Diffraction, Scattering

Reflection, Diffraction
and Scattering (Cont)
q Reflection: Surface large relative to wavelength (l) of signal
Ø May have phase shift from original
Ø May cancel out original signal or increase/strengthen it at receiver
q Diffraction: Edge of impenetrable body; large relative to l
Ø Receiver may receive signal even if no line-of-sight (LOS) to transmitter
q Scattering
Ø Obstacle size on order of wavelength. Lamp posts etc.
Ø Reflection/diffraction are more directional; scattering in many directions
q If LOS, diffracted and scattered signals not significant (LOS dominates) Ø Reflected signals may be significant
q If no LOS, reflection/diffraction/scattering are primary means of reception

q Received power (PR) at a particular location is only a fraction of the total power used by the transmitter to transmit the signal (PT)
q Pathloss=PT –PR
Ø Depends on distance/separation between Tx-Rx
q Need to estimate path loss to design wireless links q How to estimate path loss?
q There are well-known path loss models
Ø Frii’s model: designed for free-space (no reflections); frequency dependent
Ø 2-Ray model: reflections considered, but frequency-independent (antenna heights are important)

Free Space Path Loss (
PR=PT( c )2 4πdf
Surface area of sphere Asphere = 4πd2 (d=radius); surface area of antenna Aant = λ2/4π Power density at sphere surface = PT/4πd2
PR = power density x surface area of antenna

q A factor of 10 increase in distanceà20dB more path loss (20dB/decade) Ø 2.4 GHz path loss at 1 meter = 40.04dB, 10 meter = 60.04dB
q The higher the frequency, the greater the path loss at fixed distance Ø At 10 meter, 2.4GHz = 60.04dB, 5GHz = 67.25dB
space path loss (

Receiver Sensitivity
q The received power (received signal strength or RSS) has to be greater than a threshold for the receiver to decode information correctly (with low error probability)
Ø Toachieveaminimumsignal-to-noiseratio(SNR)
q Different hardware/standard/equipment specify different values
Ø Dependsonchannelbandwidthandreceivernoisefigure(andtemperature)
Ø Larger bandwidth à larger minimum power (and vice versa)
Ø Larger receiver noiseàlarger minimum power (and vice versa)
q Examples (for room temperature) Ø LTE:-52dBm[roughly]
Ø Bluetooth:-70dBm[roughly]

q To increase the coverage with low transmit power, a manufacturer produced Bluetooth chipsets with a receiver sensitivity of -80 dBm. What is the maximum communication range that could be achieved for this chipset for a transmit power of 1 mW? Assume Free Space Path Loss with unit antenna gains.
Bluetooth frequency f = 2.4 GHz, PT= 1 mW, PR=-80 dBm=10-8 mW Wehave PR=PT( c )2
4πdf d=c PT/PR
= 99.5 meter ©2020

q Multiple copies of the signal received (LoS+reflected NLoS)
q The LoS signal reaches the receiver first followed by the NLoS copy (NLoS has
longer path length compared to the LoS path)
q RSS(LoS) > RSS(NLoS). NLoS signal travels further and hence attenuates more compared to the LoS.

Symbol Interference
q Multipath effect: receiver continues to receive the signal (its reflections) even after the transmitter completes symbol transmission
q As a result, symbols become wider; two consecutively transmitted symbols overlap and interfere with each other
q Longer bit intervals or symbol lengths are required to avoid ISI
q Limits the number of bits/s (data rate inverse of symbol length) ©2020

Delay Spread
q How long to wait to avoid ISI?
q RSS of late arrivals fluctuate, but consistently diminish on average
q Delay Spread = Time between the first (LoS) and the last copy of NLoS
q RSS(last copy of NLoS) < RSSthreshold (so next symbol can still be decoded) ©2020 ray path loss model Path loss exponent q Empty/free space (no reflector)àd-2 law (Frii’s) Ø PL(dB) = 10log10(d2) + C = 10x2xlog10(d) + C (a straight line with slope = 2) q 2-ray modelàd-4 law Ø PL(dB) = 10log10(d4) + C = 10x4xlog10(d) + C (a straight line with slope = 4) q Measurements in real environmentsàd-n (n = 1.5 to 5.5, typically 4) Ø PL(dB) = 10log10(dn) + C = 10nlog10(d) + C (a straight line with slope = n) C is a constant; frequency related (Free-space) or antenna height related (2-ray) q Multipath has phase change (due to reflection and different path to travel) q Fading: the signal amplitude can change significantly by moving a few centimeters (called small scale fading: fluctuates in small time scale): half-wavelength path distance can cause 180 degree phase shift! q Constructive: increased amplitude due to alignment of phase q Destructive: reduced amplitude due to misaligned phase Small Scale Constructive Destructive q Shadowing gives rise to large scale fading Ø Mobile may be in the shadow of a building (fading) for several meters Ø RSS drops when in shadow (large scale fading) Received Power Total Path Loss q Traditionally, single antennas were used q Multiple antennas are increasingly being used to boost quality/reliability and capacity of wireless communications Ø E.g., most recent WiFi routers have multiple antennas q Multiple input (multiple antennas at the transmitter) q Multiple output (multiple antennas at the receiver) q MIMO – multiple input multiple output MIMO Antenna Configurations q SISO – single input (1 Tx antenna) single output (1 Rx antenna) q SIMO – single input (1 Tx antenna) multiple output (>1 Rx antenna) q MISO – multiple input (>1 Tx antenna) single output (1 Rx antenna)
q MIMO – multiple input (>1 Tx antenna) multiple output (>1 Rx antenna)
Ø 2×2 MIMO – 2 input & 2 output (2 Tx antennas & 2 Rx antennas)
Ø 4×2 MIMO – 4 input & 2 output (4 Tx antennas & 2 Rx antennas)
Ø 1000×2 MIMO – 1000 input & 2 output (1000 Tx antennas & 2 Rx antennas)

Why Multiple Antennas Can Improve Performance?
q Multi-path scenario: if antennas are spaced >λ/2 apart, multipath signals for different antennas can be uncorrelated
Ø multiple (spatial) channels using the same frequency!
Ø More channels means opportunity to improve signal quality
and data rate
q Line-of-Sight (LOS) scenario: multiple antennas at the transmitter can be used to realize virtual directional antennas (beamforming)
Ø Increase coverage and signal strength at a particular direction of choice

Spatial Channels

MIMO Techniques
q Spatial Diversity (a.k.a. Diversity)
Ø Improve reliability by exploiting spatial channels
q Spatial Multiplexing (a.k.a. Multiplexing)
Ø Improve data rate by exploiting spatial channels
q Beamforming
Ø Increase coverage and signal strength by exploiting multiple Tx antennas to focus the beam at a narrow angle

q Total # of independent paths = NT x NR
Ø NT = # of transmit antenna, NR = # of receive antenna
q Send same data (copied) over NT x NR redundant paths
q Increases reliability – probability that all paths will suffer bad
fading at the same time is low
Ø SNR at receiver can be improved (diversity gain)

q A base station is equipped with an antenna array consisting of 100 elements. What is the maximum number of spatial channels that could be created from this base station to an ordinary mobile device equipped with a single antenna?
Answer: It is a 100×1 MIMO. 100 spatial channels are possible.

Multiplexing
q Send different bits of the data on different channels
q The combined data rate is increased due to multiplexing
q Overall multiplexing gain is limited by degrees of freedom q Degrees of freedom = min(NT, NR)
10 1 Diversity Multiplexing

q What is the degrees of freedom for an 802.11ac WiFi system with the access point having 8 antennas and communicating to a laptop equipped with 2 antennas?
q Answer: degrees of freedom = min(8,2) = 2

Beamforming
q Phased Antenna Arrays:
Transmit the same signal using multiple antennas
q By phase-shifting various signals Þ Focus on a narrow directional beam (increased SNR and long-distance coverage)
q Receiver does the same, i.e., focus its reception from a particular BS q Used when LOS

q Orthogonal Frequency Division Multiplexing
q Ten 100 kHz channels are better than one 1 MHz Channel
q Frequency band is divided into 256 or more sub-bands. q Orthogonal: Peak of one at null of others
q Each carrier is modulated independtly with a BPSK, QPSK, 16-QAM, 64- QAM etc. depending on the fading in the channel (frequency selective fading means different channel has different fading and requires different modulation and coding)
q Used in newer generation of WiFi and 4G/5G ©2020

Advantages of OFDM
q Robustness against frequency selective burst errors
q Allows adaptive modulation and coding of subcarriers
q Robust against narrowband interference (affecting only some subcarriers) q Allows pilot subcarriers for channel estimation

OFDM: Design considerations
q Subcarrier spacing = Frequency bandwidth/Number of subcarriers
q Large number of carriers Þ Smaller data rate per carrier
Þ Larger symbol duration Þ Less inter-symbol interference
q Reduced subcarrier spacing Þ Increased inter-carrier interference due to Doppler spread in mobile applications
Small # of carriers
Shorter symbol durations Higher data rates per carrier
Large # of carriers
Longer symbol durations Lower data rates per carrier

q Orthogonal Frequency Division Multiple Access
q Each user has a subset of subcarriers for a few time slots q OFDM systems use TDMA (e.g., in WiFi)
q OFDMA allows Time+Freq DMA Þ 2D Scheduling
OFDM Freq.
OFDMA Freq.

q With a subcarrier spacing of 10 kHz, how many subcarriers will be used in an OFDM system with 20 MHz channel bandwidth?
Number of subcarriers = channel bandwidth/subcarrier spacing = 20×106/10×103 = 2000

Effect of Frequency
q Higher Frequencies have higher attenuation, e.g., 18 GHz has 20 dB/m more than 1.8 GHz
q Higher frequencies need smaller antenna Antenna > Wavelength/2, 800 MHz Þ 6”
q Higher frequencies are affected more by weather Higher than 10 GHz affected by rainfall
60 GHz affected by absorption of oxygen molecules
q Higher frequencies have more bandwidth and higher data rate
q Higher frequencies allow more frequency reuse
They attenuate close to cell boundaries. Low frequencies propagate far.

Effect of Frequency (Cont)
q Lower frequencies have longer reach Þ Longer Cell Radius
Þ Good for rural areas
Þ Smaller number of towers
Þ Longer battery life
q Lower frequencies require larger antenna and antenna spacing
Þ MIMO difficult particularly on mobile devices q Lower frequencies Þ Smaller channel width
Þ Need aggressive MCS, e.g., 256-QAM
q Doppler shift = vf/c = Velocity ×Frequency/(speed of light)
Þ Lower Doppler spread at lower frequencies q Mobility Þ Below 10 GHz

1. Path loss increases at a power of 2 to 5.5 with distance.
2. Fading = Changes in power with changes in position
3. Multiple Antennas: Receive diversity, transmit diversity, multiplexing, and beamforming
4. OFDM splits a band into many orthogonal subcarriers. OFDMA = FDMA + TDMA

q BPSK q BS
q DMA q DSP
q DVB-H q FDMA q FFT
q IDFT q IFFT q ISI
q kHz q LoS
Binary Phase-Shift Keying
Base Station
Deci Bels Intrinsic
DeciBels milliwatt
Discrete Fourier Transform
Direct Memory Access
Digital Signal Processing
Digital Video Broadcast handheld Frequency Division Multiple Access Fast Fourier Transform
Inverse Discrete Fourier Transform Inverse Fast Fourier Transform Inter-symbol interference

Line of Sight

q MIMO q MS
q OFDM q OFDMA q QAM
Acronyms (Cont)
Mega Hertz
Multiple Input Multiple Output
Mobile Station
Orthogonal Frequency Division Multiplexing Orthogonal Frequency Division Multiple Access Quadrature Amplitude Modulation
Quadrature Phase-Shift Keying
Radio Frequency
Signal to Noise Ratio
Subscriber Station
Space Time Block Codes
Time Division Multiple Access

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com