Tag Archives: 面试代面

最近学生PROGRAMHELP抄袭我们网址 请大家擦亮眼睛,谨防诈骗

尊敬的各位用户,我们最近发现一个名为PROGRAMHELP的诈骗网站,无视法律与道德的约束,抄袭cscodehelp的网站内容。这种行为严重侵犯了的版权,同时也对大家的权益构成了直接威胁,(目前已经收集到他们诈骗 用户的15项证据)

博士坚持抵制这样劣币驱逐良币的行为!!!大家加机构以后,一定要试试他们的英文水平!!!

可以看到这个所谓的学长代面,叫javawork的微信。根本不是一个以面试为基础的网址。大家可以看看过去做过的题集,就能看到并没有什么过往的post。

博士坚决反对并谴责任何形式的抄袭行为。原创是我们网站的基石和骄傲,我们将尽全力保护我们的面试代面基础,确保每一位用户的正当权益。同时,我们也提醒各位用户,对于类似的抄袭行为,一定要保持警惕,避免因此受到欺诈的风险。

博士已经向Google法务合作,对这种抄袭行为进行彻底调查,并采取法律手段予以制止。请大家对我们有信心,我们将尽全力维护网站的合法权益,保障大家的利益不受损害。同时,我们也希望大家在发现任何可疑的抄袭行为时,能够及时向我们报告。

同时,博士呼吁所有用户,和博士一起,维护一个公平、公正、充满创新和尊重原创的网络环境。谢谢大家的理解和支持!

CODEHELP博士 面试代面 OA代做 远程面试 直接代面 代面试

硅谷国外科技公司FLAG,HRT,Bloomberg 代码笔试OA代写, 面试代面, 支持各种语言,python,java,c++算法, SQL数据分析等. 通过语音转达,音频转接等技术, 助力您拿梦想OFFER 代码笔试代考, 面试代面直接代面, 帮你收货国内外大厂名企offer 帮你走进Google, Apple, Facebook, Twitter等一线大厂.

笔试OA包通过, HackerRank OA代考,Leetcode代码辅导.

VO包高质量,通过语音直接转发,完全不是廉价的辅助方式。

今年43个学生通通拿offer。

CODEHELP博士 面试代面 OA代做 远程面试 直接代面 代面试插图
CODEHELP博士 面试代面 OA代做 远程面试 直接代面 代面试插图1

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