June Test Flashcards
Key applications of communications in robotics (3 of them)
Telerobotics: semi-autonomous robots controlled remotely via comunication network
Swarm robotics: an approach for coordinating several robots capable of performing simple tasks
Cloud robotics: any robot that relies on data/code from a network to support its operation
Haptic/tactile technology
Haptic: creates an experience of touch through vibrations forces or motions
Tactile: sensors designed to provide feedback to human operators about robots environment
Definition of latency
Acceptable latency for VR (only roughly)
Time it takes for a packet of data to get from one designated point to another
Around 25ms
Calulating latency for a given length of fiber
Ask henry
CPS: what it stands for, what is it and three key components
Cyber physical systems
Integrates the physical and digital processes
Used for communication, control and computation
Definition of IOT
Difference between CPS and IOT
Internet of things-computing devices connected via the internet
All IOT devices are CPS’s but CPS’s are not necessarily connected to the internet
Definition of PAN,LAN
PAN: personal area network, within around 10 metres, computer connected to mouse/printer, bluetooth
LAN: local area network, small geographic area, computers in offices to share resources
Definiton of MAN,WAN, internet
MAN: metropolitan area network, covers between several buildings to a city
WAN: wide area network, covers a country/continent
Internet: WAN that interconnects billions of devices
Name for the link from source-to-destination and vice versa
Three categories of equipment in networks
Uplink/upstream
Downlink/downstream
1. End systems (hosts): client/server devices
2. Intermediate devices: devices capable of directing packets or performing other functions on the packets
3. Network media: medium providing a channel for communication (fiber cable etc)
Definition of:
Transmission latency
Link throughput
Hop count
TL: delay between transmission and reception on a communication link
LT: number of bits per second
HC: number of communication links traversed in a path
Things to consider about network media
Distance of each link dictated by media
Impairments associated with media
Maximum sustained throughput
Cost
Key challenges to do with networking (5 of them)
Sender and reciever locating each other over a network
Accomodating multiple senders and receivers simultaneously
Avoiding errors i.e. missage mix ups
Maintaining communication path between reciever and sender
Stopping eavesdropping
OSI model: what it stands for, all the layers, good mnemonic to remember
Open systems interconnection
Application, presentation, session, transport, network, data link, physical
All people seem to need data processing
Description of 1-3 OSI layers (what they do)
Application: implement human machine interface
Presentation: encode and compress data in appropriate form
Encrypt/decrypt data
Session: manages sessions for different host applications
Description of 4-5 OSI layers
Transport: enables error correction and flow control
Network: structure and manage network using logical addressing
Manage message priority and scheduling
Description of 6-7 OSI layers
Data link: manages reliable transmission and sharing of physical media
Physical: encodes data in to voltages/waveforms
Protocol multiplexing and de-multiplexing (specifically how to de-multiplex)
Multiple overlying (higher) protocols can use same underlying (lower) protocols. E.g. Multiple transport protocols can use the same networking one Protocol headers: each layer attaches a label/tag. Lower layers remove tags before forwarding payload upwards
Differences between OSI and TCP/IP
OSI is reference architecture, TCP/IP is based on the specific standardized internet protocols
In TCP/IP the first three layers are merged into one application layer
The three properties of layers
Service: functionality of the layer
Service interface: how to access the service
Protocol interface: how peers communicate to implement service
Rules and formats about communication between two internet hosts
Hub: layers involved, how they work and collision/broadcast domains
Only has physical layer
Sends incoming signal to all outgoing ports
1 collision domain, 1 broadcast domain
Switch: layers involved, how they work and collision/broadcast domains
Switch: physical and data link layers.
Knows specific address of messages and can send directly to the right computer
0 collision domain so can receive from multiple PC’s.
1 broadcast domain
Router: layers involved, how they work and collision/broadcast domains
Physical, data and network layers
Usually connects two networks
0 collsion and broadcast domain so can send and receive from multiple PC’s
What is collision and broadcast domain?
CD: the part of the network where collisions can occur
Collision: when two devices send a packet at the same time on the same network segment
BD: the domain in which a broadcast is forwarded
All ports on a hub/switch are in the same broadcast domain
All ports on a router are in different broadcast domains
Packet switching equations: time required to complete transmission
T = L/R T= time L = packet length R = bits per second
What is store-and-forward transmission?
What’s the equation for transmitting time for switches/routers?
SFT: switches and routers must receive complete packet before the first bit can be retransmitted
τ = 4L/R
L = packet length
R = bits per second
What’s the general equation for sending one packet over a path with multiple N links
τ = N*L/R N = number of links between source and destination Means theres N-1 routers L = packet length R = bits per second rate of the links
Circuit switching: description, pros and cons
Reserves the resources required for the duration of communication session
Pros: guaranteed good service and no delays
Cons: wasted bandwidth, static single path to follow
Packet switching: description, pros and cons
No prior reservation of resources. Instead they are allocated on demand so messages may have to wait in queues
Pros: enables data transmission on multiple paths simultaneously
Cons: wasted bandwidth when source bit rate is lower than link bit rate
Congestion occurs under heavy traffic
Multiplexing: frequency division vs time division
What’s a frame?
Equation for transmission rate of a circuit
Frequency division: multiple packets being transmited at the same time at different frequencies
Time division: packets sent one at time at all frequencies
Frame: a unit of data
TRC = Frame rate (No. of frames per second) * Number of bits in each slot
What is source coding?
What is the equation to calculate the number of bits required for a source code?
Converting any type of data into binary form
2^L = M
M = number of distinct characters (aka not repeated)
L = number of bits
How to synchronise a message?
What is a fix length code?
Send code that identifies the start and end of a message
The number of bits used for all symbols/data in a source code is the same i.e. if theres 8 symbols use 3 bits
What is a variable length code? What is the benefit?
Symbols that appear more often have fewer number of bits than symbols that appear more often.
Saves data but requires carefully designed source code
How to use the huffman algorithm?
- List all letters and how often they appear. REMEMBER SPACES
- Combine them into nodes with a combined value. Do this in order from lowest frequency to highest
- List them in a tree. One side gets a 0, other side gets a 1
- To list off values follow the tree
What is required for variable length code?
Needs to be uniquely decodable. Achieved by prefix free code
What does uniquely decodable mean/prefix free mean?
When variable length code is put in series, you are able to deode and identify each letter individually
How to figure out percentage of compression for Huffman code?
% = (1- VLC/FLC)*100
VLC = variable length code
Adding up the number of bits needed from the Huffman code table
FLC = fixed length code
Adding up the number of bits if FLC was used i.e. 4 characters, 2 bits, 8 characters, 3 bits
What can an MQTT client do?
How are messages grouped?
Can publish to or receive messages from an MQTT server
Messages are grouped using a label called ‘Topic Name’. Clients can decide to only get certain messages using ‘Topic Filter’
What can an MQTT server do?
Acts as an mediator between MQTT clients.
Also called MQTT broker
Receives messages from clients under various topics and forwards those messages to clients who have subscribed to those topics
What does MQTT stand for? What layer does it run on?
What protocol does it run over?
Message Queuing Telemetry Transport
Application layer
TCP/IP
What is the naming structure of MQTT?
What are the naming conventions of MQTT?
Organised like a file system with topics seperated by '/' Tree higherarchy of files >Case sensitive >At least 1 character long >Space can be used >Cannot include NULL character >Can't exceed 2^16 bytes
What’s the special reserved topic name in MQTT?
What’s it used for?
$SYS
Used by the server
Used for meta topics like server specific information
Read only for clients
What are MQTT wildcards?
topic/# will allow a client to subscribe to all topic threads on the level of the # AND below
topic/+ will allow the client to subcribe to all topics threads on the level of +
What is the format of an MQTT packet?
3 different parts
Fixed Header:
Minimum = 2 bytes
Header info = 1 byte
Packet length >= 1 byte
Variable header:
Variable size, not compulsory
Payload:
Variable size, not compulsory
MQTT QoS:
What is QoS?
How many levels?
Quality of service of MQTT
3 levels
What is QoS 0?
“Fire and forget”
Messages are sent to clients and the server assumes that that it received it
What is QoS 1?
Server sends messages to client until client replies with acknowledgement
What is QoS 2?
- Server sends message to client
- Client responds with acknowledgment
>If no acknowledgment is received message is sent again with duplicate flag - Server responds with acknowledgment
- Client responds with acknowledgment
What are the two transport layer choice?
UDP and TCP
UDP:
What it stands for
Pros,Cons
User Datagram Protocol Pros: minimum sending rate Reduced transmission delay Cons: Unreliable data transfer Dosn't guarantee data arrives
TCP:
What is stands for
Pros
Cons
Transmission control protocol Pros: Reliable data transfer Prevents nodes from swamping links Cons: needs more computer resources Slower
What are the two parts of a TCP/UDP port?
IP: identifies the computer that the packet needs to travel to
Port: identifies the application on the computer
What’s special about ports 0-1023?
What port is MQTT?
Well-known port numbers which are usually restricted to other apps (e.g. HTTP)
Port 1883
What are the features of UDP?
>Multiplexing >Demultiplexing >Basic error detection >No handshaking >No congestion control
How does UDP establish a connection?
What happens with the connection state?
No connection establishment
>Less packet exchanges
Connection state isn’t maintained so servers can handle more users
What are allowed message and what are they called?
What are disallowed messages and what are they called?
AM: every string of bits sent over a network
Codewords
DM: a AM where there is an error
Space
What is two-repetition code?
> Transmitter repeats every bit once (e.g. 0011001111)
Receiver decodes the message (01011)
If there is a single bit error (01 or 10) it can be detected and the message resent
Whats a two bit error in two-repetition code?
Can it be detected?
When both of the bits sent are both flipped
Can’t be detected
What is hamming distance?
What is the hamming distance for two-repetition code?
The minimum number of bit flips to change one code word into another
2
00 > 01 > 11
Whats the symbol for minimum Hamming distance?
How many errors at most can we detect given this?
dmin
Max errors detected: dmin - 1
How does a receiver decode error correcting codes?
How can a receiver correct errors in error correcting code?
- Match the received bits to code words
- Map codeword to source bits
Chooses the closest codeword to the received bits
Explain how a receiver decides how to correct a three-repetition code
If error detected: receiver will correct it with the codeword that shares the most bits as the error
001 = 000
101 = 111
How many bit flips can be corrected with three-repetition code?
What is the general formula for how many bits can be corrected given Hamming distance dmin?
1 bit flip
(dmin - 1)/2
What is code rate?
What is the equation for it?
A fraction between 0 and 1 Defines how much excess data an error detecting code produces R = k/n R = code rate k = message length (k < n) n = codeword length
What is the trade off with regards to code rate?
High-rate codes (R → 1)
Correct fewer errors but add less overhead
Lower-rate codes (R→0)
Correct more errors but add more overhead
Parity bit: What it is? Even parity Odd parity Why is it useful?
Bit added to the end of a message
EP: Bit makes total number of 1’s even
OP: Bit makes total number of 1’s odd
Receiver counts number of 1’s in message to check for an error
Minimum hamming distance for parity
dmin = 2
Change one data bit → change parity bit
How does two dimensional parity work?
Think like an array
> Break the data into multiple rows
Add a parity bit to each row at the end
Add a parity bit to each column
Add a parity bit for the row parity bits and add this to the end of the bottom row parities
What is dmin for two dimensional parity arrays?
How many errors can be therefore be detected?
dmin = 4
Can detect <= 3 errors
How to calculate a UDP checksum?
How to use the checksum to check for errors?
Split the message into bit words (often 16 bits) and sum them
Invert the total and this is the checksum
Sum all of the bitwords inclucding the checksum and the total should be all 1’s
Acknowledgements that can be given by a receiver
ACKS: acknowledge, receiver tells sender that packet recevied okay
NACKS: negative acknowledge, receiver tells sender that packet had errors
What is the reliable data transfer protocol?
Think about ACK’s
Sender: sends packet
Receiver: sends ACK
Sender: waits ‘reasonable’ amount of time to get ACK.
When ACK received it sends the next packet
What happens in the reliable data transfer protocol when:
>a packet is lost
>an ACK is lost
>ACK takes too long to arrive
> after a ‘reasonable’ amount of time the packet is resent
packet is resent
Receiver gets two packets and detects duplicates so ignores second
packet is resent
Receiver detects duplicate
Equation for the utilization of a link from a single sender sneding a single packet and receiving ACK? How to turn this into a percentage?
U = (L/R) / (RTT + (L/R) ) % = 100 * U L = packet size R = rate of transmission RTT = 2*propagation delay
What is pipelining?
How to calculate utilization for n packets sent?
Sending multiple packets in a row and waiting for multiple ACKs
n * U
What is Go-Back N?
Similar to pipelining
Sender can send up to N unACKed packets
Receiver ONLY sends cumulative ACK
Sender has timer for oldest unACKed packet
When timer expires, retransmit all unACKed packets
TCP:
>what does it stand for
>how does it work
>what does it use
Transmission control protocol
Point-to-point transmission standard (one sender, one receiver)
Uses reliable, in-order byte stream
Uses pipeling
Equation for the time out interval in TCP pipelining
How to calculate safety margin?
ToI: EstimatedRTT + ‘Safety Margin’
Safety margin = 4*DevRTT
DevRTT = deviation of RTT
What is a nodes routing table?
For every destination in the network graph/mesh:
>Number of hops to reach the destination
>Next node on the path to that destination
How does each node on a network know which node to sent data to?
Each node broadcasts its routing table which allows neighbouring nodes to update theirs accordingly
In a network what happens if:
>a new node is added
>a link is removed
> Neighbouring nodes update their tables with the new node
The new tables are then broadcast to others
Weight of link is set to infinity
What is dynamic source routing (DSR):
>when is it used
>how does it work
> When a node wants to send a packet to another node but doesn’t know the route
floods network with route requests (RREQ)
Eventually the shortest route is found
What is the process for route discovery for DSR?
- Transmitting node floods network with RREQ packets
- RREQ packets are duplicated and sent on until one reachs the destination node
- Once a RREQ packet reachs its destination, a RREP packet is sent back the same way to the transmitting node
- Transmitting node sends data the way that the RREP node came
What does RREQ stand for?
What does RREP stand for?
Route request
Route reply
What is the data link
4 main points
> Enables communication between end hosts
Controls errors
Determines the start and end of bits and frames
Delivers information reliably
TDMA:
>What does it stand for
>What does it involve
>What are cons
> Time division multiple access
Each user gets a fixed time slot to transmit packets
Unused slots are wasted
FDMA: >What does it stand for >What does it involve >What are pros >What are cons
> Frequency division multiple access
Each user gets a frequency band to send data over
Guaranteed to be able to send bits
Unused frequencies are wasted
What is CDMA?
CDMA = Code DIvision Multiple Access
All users transmit over the same frequencies and at the same time with no interference
Nyquist-Shannon Theorem
Sampling frequency should be at least twice the highest frequency contained in the signal
fs > 2*f
Equation for calculating noise power?
Power = Δ^2/12
Where 1/Δ is the gradient of the slope
Slope = (y2 - y1) / (x2 - x1)