Exam - 2020 Flashcards

1
Q

For a signal with the frequency f=10Hz, suggest a reasonable sampling frequency y by selecting one of the possible answers.

A. We need to use as many samples as possible, so we choose 1000 f, so Fs=10000 Hz.

B. According to Shannon theorem, we need at least a frequency equal to 2f. So a reasonable sampling frequency would be 2f, Fs= 20Hz.

C. According to Shannon theorem, we need to use 2f. But Nyquist’s theorems state that a good sampling frequency is 10f. Fs= 100 Hz

D. According to Shannon theorem, we need at least 2f. In order to have a good reconstruction, we recommend 10f. Fs= 100 Hz

A

D. According to Shannon theorem, we need at least 2f. In order to have a good reconstruction, we recommend 10f. Fs= 100 Hz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A signal of 50 Hz is recorded during 5 seconds with a sampling frequency of 1000 Hz. What is the total number of samples obtained? [5p]

A

5 x 1000 = 5000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the consequences of not obeying the Shannon sampling criterion? [5p]

A

A too high samping frequency results in a good quality of reconstruction but excesive storage, a too low one creates aliasing and distorsions in
the reconstructed signal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Imagine you have to build an automatic insulin pump, a wearable device that keeps the blood glucose concentration BGC of a diabetes patient
low.

Every time when the BGC is higher than 5.5 mmol/L, insulin is injected.

Label correctly the components in the feedback control process. [5p]

A

Goal (desired BCG value) -> Comparator -> Controller -> Actuator (pump motor) -> Output (current BCG) OR Sensor (error) -> Comparator (repeat)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Write in pseudocode a controller that keeps a small car driving between two parallel black lines on a white surface (like in the figure).

The vehicle
is equipped with two light sensors on both flanks. The track can have curves. [5p]

A

start motors
while (true)
if sensor left and sensor right see white then drive forward
if sensor left sees black and sensor right sees white then turn right
if sensor right sees black and sensor left sees white then turn left
endloop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Regarding mean and median filters for images, which of the following statement is correct? [5p]

A. They both do the same thing.

B. Mean filter calculates the average of the colours of the neighbours including the pixel itself. Median filter is ordering all the pixels by colour and
takes the middle value.

C. Mean filter is ordering all the pixels by colour and takes the middle value. Median filter calculates the average of the colours of the neighbours
including the pixel itself.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe shortly how will a Naïve Bayes classifier work to recognize emotions from face images? [5p]

A
A Naive Bayes classifier is using as input features some face markers such as eyebrows, mouth corner position, eyes 
width, etc and the output is a class that specifies the emotion (angry, happy, sad, etc).

It calculates for each class Ci
the conditional probability P(C|Xi) , where Xi is the feature vector, using Bayes theorem.
P(Ci|Xi)=(Xi|Ci)x(P(Ci)/P(Xi). The right side can be calculated from training. It is called Naive because it considers
all features independent from each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Imagine we want to build a system that recognized handwritten letters A B C and D. Describe the process of using a neural network (NN) for
this task. Describe the topology, inputs and outputs and describe how are you going to train it. What are the advantages and disadvantages of
using a NN? [10 p]

A

The input layer receives a cropped image of a letter converted in a vector of pixel colours (0 or 1) or a vector of
shape features or statistical moments such as 7 invariant moments of Hu.

So it contains for example 48 neurons if
the image is 6x8 or 7 neurons. The output layer has 4 neurons. Codified as follows. If it is an A then O1=1;
O2=0;O3=0;O4=0, and so on. We can use one hidden layer. We train the networks by feeding the NN a large
number of examples of A,B,C,D images and the corresponding output.

The advantage if we use the moments of
Hu is that it will work for unknown A,B,C,D letters written in a different way, rotation or size.

The more we train
the better it becomes. The disadvantage is that the algorithm is not simple and training cost time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Imagine you have to build a car lane departure assistant that uses video and laser sensors to keep the vehicle between two white lines on the
freeway. Any time when a car unexpectedly crosses a white line, a lane departure alarm is generated to warn the driver. Moreover, if the driver
does not perform a corrective action, the system takes over steering, to ensure that the vehicle stays in lane. The system is designed to
minimize accidents by addressing the main causes of collisions: driver error, distractions and drowsiness.

Identify five stakeholders, formulate one functional requirement and one non-functional requirement. [5p]

A

A stakeholder is everyone that is directly or indirectly interested and affected by the system. In this case this can be:
-The driver of the car, passengers, driving instructors, safety regulators, car manufacturers
A functional requirement may be:
“The system shall raise an alarm if the car crosses a white line “
A non-functional requirement may be:
“The system shall raise an alarm with 90% accuracy”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Imagine you have to build a car lane departure assistant that uses video and laser sensors to keep the vehicle between two white lines on the
freeway. Any time when a car unexpectedly crosses a white line, a lane departure alarm is generated to warn the driver. Moreover, if the driver
does not perform a corrective action, the system takes over steering, to ensure that the vehicle stays in lane. The system is designed to
minimize accidents by addressing the main causes of collisions: driver error, distractions and drowsiness.

Identify one accident and one hazard that could cause the accident.

For this hazard, imagine a possible causal scenario and a mitigation
measure to prevent it. [5 p

A

An accident: a person dies in a collision

Hazard: alarm was not generated
Causal scenario: sensor was obstructed

Mitigation measure: use a second sensor and software to detect differences in readings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Imagine we want to build a bionic eye that adds X-ray vision to a human and makes it possible to see through the walls.
Identify two ethical questions related to this system. [5p]

A

Many good answers are possible here.
Is it correct to look into peoples houses and break their privacy?
Will a bionic eye possessor get a better job than a “normal” human being?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

magine you have to build an automatic insulin pump, a wearable device that keeps the blood glucose concentration BGC of a diabetes patient
in a healthy range of 4-5.5 mmol/L.

Insulin is injected any time the BCG is higher than this range.

A BCG lower than this range can be fatal for
the patient.

The system stores in a log file all the insulin quantities that have been injected.

Generate a set of test cases using Boundary Value Analysis to test the functionality of the system. [5p]

A
Test ID input BGC (mmol/L) Expected action 
TC1 3.9 low BGC alarm, don't inject
TC2 4.0 BGC ok, don't inject
TC3 4.1 BGC ok, don't inject
TC4 5 BGC ok, don't inject 
TC5 5.4 BGC ok, don't inject 
TC6 5.5 BGC at max, start insuline pump 
TC7 5.6 inject insulin 
TC8 6 inject insulin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly