- What is DSP and where it can be applied?
- Linear systems
- Fourier analysis
- Filter design in R
Mykola Pavlov
Founder at Biomech
Anything that carries information is a signal
The mathematics, the algorithms, and the techniques used to manipulate signals after they have been converted into a digital form.
Examples: Wave propagation, resistors, capacitors, inductors, amplifiers, filters, mechanical interaction of masses, springs, echoes, resonances, image blurring...
Amplitude change in the input results in an identical amplitude change in the output.
Signals added at the input produce signals that are added at the output.
Shift in the input signal causes an identical shift in the output signal.
Synthesis: 5 + 10 = 15
Decomposition: 15 = 3 + 12 or 1 + 5 + 9 or ...
Divide-and-conquer: 1027 * 4 = 1000 * 4 + 20 * 4 + 7 * 4
Same as filter kernel, convolution kernel, kernel, point spread function (image processing).
Intuition: If we know impulse response, then we can calculate the output for any possible input signal!
signal <- rnorm(100)
fourier_transform <- fft(signal)
Re(fourier_transform)[1:5]
## [1] -4.874 -3.616 -9.085 5.431 -2.516
Im(fourier_transform)[1:5]
## [1] 0.0000 -0.9916 10.2477 -1.5758 -0.3789
Mod(fourier_transform)[1:5]
## [1] 4.874 3.749 13.695 5.655 2.545
library(signal)
t <- as.vector(as.matrix(read.csv("data/data.csv", row.names = NULL, header = F))) # 20 Hz
plot.ts(t, ylab = "g", main = "User Acceleration")
filt <- fir1(15, 0.15, type = "low") # 3 Hz low-pass filter
z <- filter(filt, t) # apply filter
plot(z, col = "red", lwd = 3, type = "l", ylab = "g", main = "User Acceleration")