real time systems tasks, Übungen von Zeitreihenanalyse / Time series

Toggle sidebar
bg1
Task-1
Task-2
The discretization of a signal is necessary in order to process it within a computer. Explain why that is
the case and which property must hold so that we can recreate the correct signal in any case!
There are several reasons why discretization is necessary:
Storage: Digital signals can be easily stored in memory or on a hard drive, whereas continuous
signals require an infinite amount of storage.
Transmission: Digital signals can be transmitted over long distances with minimal loss of quality,
whereas continuous signals can suffer from attenuation and interference.
Processing: Digital signals can be easily processed by computers using mathematical algorithms,
whereas continuous signals require complex analog circuits.
Analysis: Digital signals can be easily analyzed using signal processing techniques, whereas
continuous signals require more complex analysis methods.
One property that must hold so that we can recreate the correct signal in any case is the Nyquist-
Shannon sampling theorem. This theorem states that a continuous signal can be properly sampled, only
if it does not contain frequency components above half of the sampling rate.
Task-3
Below you see a table with minimum and maximum signal frequencies and their corresponding sample
frequency. With the knowledge from Task 2 you should be able to fill in the missing values. How can you
check whether a given controller can manage a given signal?
Solution:
According to the Nyquist-Shannon sampling theorem, the sampling frequency must be at least twice
the highest frequency component in the signal (fsampling >= fmax and fsampling >= fmin ) to avoid aliasing. Based
on this theorem, we can fill in the missing values as follows:
Fs > 2 (fmax - fmin)
fmin in Hz fmax in Hz fsample in Hz
5 10 >10
>6,<7 7 2
2 <5, >2 6
pf3
pf4

Unvollständige Textvorschau

Nur auf Docsity: Lade real time systems tasks und mehr Übungen als PDF für Zeitreihenanalyse / Time series herunter!

Task-

Task-

The discretization of a signal is necessary in order to process it within a computer. Explain why that is the case and which property must hold so that we can recreate the correct signal in any case! There are several reasons why discretization is necessary:  Storage : Digital signals can be easily stored in memory or on a hard drive, whereas continuous signals require an infinite amount of storage.  Transmission : Digital signals can be transmitted over long distances with minimal loss of quality, whereas continuous signals can suffer from attenuation and interference.  Processing : Digital signals can be easily processed by computers using mathematical algorithms, whereas continuous signals require complex analog circuits.  Analysis : Digital signals can be easily analyzed using signal processing techniques, whereas continuous signals require more complex analysis methods. One property that must hold so that we can recreate the correct signal in any case is the Nyquist- Shannon sampling theorem. This theorem states that a continuous signal can be properly sampled, only if it does not contain frequency components above half of the sampling rate.

Task-

Below you see a table with minimum and maximum signal frequencies and their corresponding sample frequency. With the knowledge from Task 2 you should be able to fill in the missing values. How can you check whether a given controller can manage a given signal? Solution: According to the Nyquist-Shannon sampling theorem , the sampling frequency must be at least twice the highest frequency component in the signal (fsampling >= fmax and fsampling >= fmin ) to avoid aliasing. Based on this theorem, we can fill in the missing values as follows: Fs > 2 (fmax - fmin) fmin in Hz fmax in Hz fsample in Hz 5 10 >

6,<7 7 2 2 <5, >2 6

To check whether a given controller can manage a given signal, we should compare the specifications of the signal and the controller. If the controller's bandwidth and sampling rate are sufficient to handle the signal, and if the controller has the required processing capabilities, then it should be able to manage the signal. Task- Consider the following taskset T = {T1, T2, T3} with the timing requirement R, and the given values for the tasks completion times Tc,i and the tasksets minimal required value Vt.

  • For each time value function Vi, draw a graph which shows the value over the course of 10-time units.
  • Evaluate the time value functions for the task’s completion times Tc,i provided in a) to c).
  • Check for each subset a) to c) if the requested minimal task set value Vt is achieved or not. T1: v1(t) = {6 if t ∈ [0, 5) and −∞ otherwise} T2: v2(t) = {4 if t ∈ [0, 5), 9-t if t ∈ [5, 9) and 0 otherwise} T3: v3(t) = {3 if t ∈ [2, 3) and 0 otherwise} R: sum of Vi(Tc,i) > Vt for i = 1, i = 2, and i = 3 a) tc,1 = 4, tc,2 = 6, tc,3 = 4, vT = 8 b) tc,1 = 11, tc,2 = 3, tc,3 = 2, vT = 7 c) tc,1 = 4, tc,2 = 3, tc,3 = 1, vT = 11

Task-

Consider the following situation: a driver on a nightly road is suddenly confronted with an obstacle at 100 m ahead. At a speed of 70 km/h and with brakes able to achieve a braking deceleration of −11 m/s2, at which distance does the driver have to step on the brake? How much reaction time is allowed before the driver must step on the break to avoid collision?

Task-6:

The two implementations of a controller lead to different timely behavior. What is the problem with the while-loop implementation and why does the interrupt implementation solve that problem? Answer: The problem with the while-loop implementation is that it doesn’t account for the time it takes to execute the code within the loop. The sleep(t) function only ensures that the loop waits for a time t before starting the next iteration, but it doesn’t account for the time it takes to read y and w, calculate x, and write x to the output. The interrupt implementation solves this problem by using a timer to trigger an interrupt at regular intervals. The interrupt handler reads y and w, calculates x, and writes x to the output. Since the interrupt is triggered at regular intervals t, the time between two iterations of the interrupt handler is always equal to t, regardless of how long it takes to execute the code within the interrupt handler.