Module 3 - Series expansion
Speech Processing>Module 3>Digital Speech Signals>Videos>Series expansion
Series expansion
speech.zone
음성은 시간이 지남에 따라 변화하기 때문에 단기간에 분석해야 한다는 사실을 이미 깨달았습니다.
음성을 프레임으로 나누고 프레임별로 분석을 수행해야 합니다.
가장 중요한 분석 중 하나는 주파수 영역으로 들어가는 것입니다.이를 위해 푸리에 분석을 사용할 예정이지만 두 단계로 나누어 소개하겠습니다.
첫 번째 주제는 사실 조금 추상적으로 보일 수 있습니다.
급수 확장(series expansion)을 추상적인 개념으로 소개하는 데에는 그만한 이유가 있는데, 바로 여러 가지 응용 분야가 있기 때문입니다.그 중 가장 중요한 것은 푸리에 분석이지만 다른 것들도 있습니다.
여기 우리가 분석하고자 하는 음성 같은 신호가 있습니다.
그렇다면 '분석'의 의미를 제대로 설명해야 할 것 같습니다.
그럼 구체적인 예를 들어볼까요?
이 복잡한 파형이 무엇으로 '만들어졌는지' 알고 싶습니다.
이를 표현하는 한 가지 방법은 매우 단순한 파동의 합이라고 말하는 것입니다.
따라서 가능한 가장 단순한 파동의 합으로 확장해 보겠습니다.
이것이 바로 계열 확장(series expansion)의 의미입니다.
여기서는 그림의 목적을 위해 이 파형의 단일 피치 주기만 사용하겠습니다.
그러면 그림이 좀 더 단순해 보일 것입니다.
하지만 사실 지금부터 설명할 내용은 모든 파형에 적용됩니다.
단일 피치 주기에만 국한되지 않습니다.
이 파형을 간단한 함수의 합으로 표현하겠습니다.
이를 기저함수(basis function)라고 하며, 가장 간단한 주기적 신호인 사인파를 기저함수로 사용하겠습니다.
이제 사인파를 더해서 이 복잡한 파형을 만들어 보겠습니다.
이것은 사인파처럼 보이지 않으므로 불가능하다고 생각할 수도 있습니다.
전혀 불가능하지 않습니다!
사인파를 더하면 어떤 복잡한 파동도 만들 수 있습니다.
여기에 몇 가지 방정식을 작성했습니다.
complex wave는 제가 정의할 어떤 것과 거의 같다고 적었습니다.
하나의 사인파를 사용하여 이를 근사화해 보겠습니다.
여기 사인파를 사용해 보니 결과가 원본에 가깝지 않습니다.
이제 더 높은 주파수에서 두 번째 기저 함수를 추가해 보겠습니다.
이제 이 두 가지를 더하면 조금 더 가까워졌습니다.
더 높은 주파수에 세 번째 기저 함수를 추가하면 조금 더 가까워지고, 네 번째 기저 함수를 추가하면 원본에 매우 가까워집니다.
정확히 같지는 않지만 매우 가깝습니다.
여기에는 네 개의 사인파만 사용했습니다.
첫 번째 사인파는 기본 주기가 가장 길어서 분석 창에서 한 주기를 만듭니다.
두 번째는 두 주기를 만듭니다.
세 번째는 세 주기를 만들고 네 번째는 네 주기를 만듭니다.
따라서 이들은 시리즈를 형성합니다.
이제 합계에 계속 조건을 추가하여 원래 신호에 원하는 만큼 가까워질 수 있습니다.
계속 진행하겠습니다.
용어가 너무 많아서 모든 용어를 보여드리지는 않겠습니다.
하지만 계속 항(terms)을 추가하면 결국 충분히 높은 주파수까지 충분한 항을 추가하여 원래 신호를 정확하게 재구성할 수 있습니다.
이제 우리는 신호를 근사화하는 것이 아니라 실제로 동일하게 만들 수 있습니다.
이론적으로 이 모든 과정이 아날로그 신호에서 일어난다면 원래 신호를 정확히 얻기 위해 무한한 수의 항을 더해야 할 수도 있습니다.
하지만 이것은 디지털 신호입니다.
즉, 이 분석 프레임에는 한정된 수의 샘플이 포함되어 있습니다.
이 파형은 16kHz로 샘플링되며 0.01초 동안 지속됩니다.
즉, 분석 프레임에 160개의 샘플이 있다는 뜻입니다.
정보의 양이 한정되어 있기 때문에 이를 정확히 재구성하기 위해서는 한정된 수의 기저 함수만 필요합니다.
다른 말로 하면 기저 함수 역시 디지털 신호이며, 가장 높은 주파수를 가진 기저 함수는 나이퀴스트 주파수에 있는 함수입니다.
따라서 가능한 가장 높은 주파수까지 기저 함수를 합산하면 원래 신호를 정확하게 재구성할 수 있습니다.
이렇게 하면 정확히 무엇을 얻을 수 있을까요?
왼쪽의 복소파를 기저함수의 합으로 표현했는데, 각 기저함수는 주파수가 증가함에 따라 사인파라는 매우 간단한 함수입니다.
이러한 재구성을 위해서는 각각의 기저 함수를 매우 구체적으로 합산해야 합니다.
신호를 정확히 재구성하려면 이것의 0.1, 이것의 0.15, 이것의 0.25, 이것의 0.2, 그리고 그 사이의 항이 무엇이든 간에 이것의 0.1이 필요하고 이것의 0.2가 약간 필요합니다.
이 계수 집합은 고정된 기저 함수 집합에 대해 원래 신호를 정확하게 특성화합니다.
급수에 포함할 항의 개수를 선택할 수 있기 때문에 급수 아래로 원하는 만큼 내려가다가 원하는 곳에서 멈출 수 있으므로 실제로 원본 신호를 얼마나 가깝게 표현할지 선택할 수 있습니다.
파형의 이 모든 세부 정보는 유용한 정보가 아니므로 흥미롭지 않을 수도 있습니다.
그냥 노이즈일 수도 있고, 이 노이즈를 제거한 신호로 표현하고 싶을 수도 있습니다.
직렬 확장은 이를 위한 원칙적인 방법을 제공합니다.
용어를 추가하는 것을 멈추면 됩니다.
이 신호는 잡음이 있는 신호일 수 있으며 이 신호는 해당 신호의 노이즈 제거 버전입니다.
이는 관련 없는 정보를 제거합니다(우리가 생각하는 정보라면).
급수 확장을 이해하는 주요 포인트는 시간 영역 신호를 주파수 영역 신호로 변환하는 푸리에 분석의 기초입니다.
그러나 방금 살펴본 것과 같이 신호에서 불필요한 세부 정보를 제거하기 위해 잘라내기를 사용하는 등 급수 확장의 다른 용도를 찾을 수 있습니다.여기서 배운 것은 파형 분석에만 국한되지 않습니다.우리가 한 작업에서 가로축에 시간으로 레이블을 지정하는 데 의존하는 것은 없으며, 다른 어떤 것으로도 레이블을 지정할 수 있습니다.푸리에 분석은 시간 영역에서 주파수 영역으로 이동하여 훨씬 더 강력한 음성 신호 분석 및 모델링을 수행할 수 있도록 해줍니다.
Because speech changes over time, we've already realised that we need to analyse it in the short-term.
We need to break it into frames and perform analysis frame by frame.
One of the most important analyses is to get into the frequency domain.
We're going to use Fourier analysis to do that, but we're going to introduce that in two stages.
So the first topic is actually going to seem a little abstract.
There's a reason for introducing series expansion as an abstract concept, and that's because it has several different applications.
The most important of those is Fourier analysis, but there will be others.
Here's a speech-like signal that we'd like to analyse.
So maybe we should really say what 'analyse' means.
Well, how about a concrete example?
I'd like to know what this complicated waveform is 'made from'.
One way to express that is to say that it's a sum of very simple waves.
So we're going to expand it into a summation of the simplest possible waves.
That's what series expansion means.
For the purpose of the illustrations here, I'm just going to take a single pitch period of this waveform.
That's just going to make the pictures look a little simpler.
But actually everything we're going to say applies to any waveform.
It's not restricted to a single pitch period.
I'm going to express this waveform as a sum of simple functions.
Those are called basis functions and as the basis function I'm going to use the simplest possible periodic signal there is: the sine wave.
So let's try making this complex wave by adding together sine waves.
This doesn't look much like a sine wave, so maybe you think that's impossible.
Not at all!
We could make any complex wave by adding together sine waves.
I've written some equations here.
I've written that the complex wave is approximately equal to something that I'm going to define.
Let's try using just one sine wave to approximate this.
Try the sine wave here, and the result is not that close to the original.
So let's try adding a second basis function at a higher frequency.
Here it is: now if we add those two things together, we got a little closer
I'll add a third basis function at a higher frequency still, and we get a little closer still, and the fourth one, and we get really quite close to the original.
It's not precisely the same, but it's very close.
I've only used four sine waves there.
The first sine wave has the longest possible fundamental period: it makes one cycle in the analysis window.
The second one makes two cycles.
The third one makes three cycles, then four cycles and so on.
So they form a series.
Now, I can keep adding terms to my summation to get as close as I want to the original signal.
So let's keep going.
I'm not going to show every term because there's a lot of them.
But we keep adding terms and eventually, by adding enough terms going up to a high enough frequency, we will reconstruct exactly our original signal.
Now we're not just approximating the signal, it is actually now equal.
Theoretically, if this was all happening with analogue signals, I might need to add together an infinite number of terms to get exactly the original signal.
But these are digital signals.
That means that this analysis frame has a finite number of samples in it.
This waveform is sampled at 16 kHz and it lasts 0.01 s.
That means there are 160 samples in the analysis frame.
Because there's a finite amount of information, I only need a finite number of basis functions to exactly reconstruct it.
Another way of saying that is that these basis functions are also digital signals, and the highest possible frequency one is the one at the Nyquist frequency
So if I sum up basis functions all the way up to that highest possible frequency one, I will exactly reconstruct my original signal.
So what exactly have we achieved by doing this?
We've expressed the complex wave on the left as a sum of basis functions, each of which is a very simple function: it's a sine wave, at increasing frequency.
We've had to add together a very specific amount of each of those basis functions to make that reconstruction.
We need 0.1 of this one and 0.15 of this one and 0.25 of this one and 0.2 of this one and just a little bit of this one, and whatever the terms in between might be, to exactly reconstruct our signal.
This set of coefficients exactly characterises the original signal, for a fixed set of basis functions.
Because we can choose how many terms we have in the series - we can go as far as we like down the series but then stop any where we like - we actually get to choose how closely we represent the original signal.
Perhaps all of this fine detail on the waveform is not interesting: it's not useful information.
Maybe it's just noise, and we'd like to have a representation of this signal that removes that noise.
Well, series expansion gives us a principled way to do that.
We can just stop adding terms.
This signal might be a noisy signal and this signal is a denoised version of that signal.
It removes the irrelevant information (if that's what we think it is).
The main point of understanding series expansion is as the basis of Fourier analysis, which transforms a time domain signal into its frequency domain counterpart.
But we will find other uses for series expansion, such as the one we just saw, of truncation to remove unnecessary detail from a signal.
What we learned here is not restricted to only analysing waveforms.
There's nothing in what we did that relies on the horizontal axis being labelled with time: it could be labelled with anything else.
Fourier analysis will then do what we've been trying to do for some time: to get us from the time domain into the frequency domain where we can do some much more powerful analysis and modelling of speech signals.