# What's the relationship between excitation and LPC residual

While studying LPC, I have found something that boggles my mind. I'm studying from some university texts but pretty much everything I need for explanation is summed up here. I'd like someone explain to me what relationship is there between residual error and excitation (if there is one).

Here's how I understand it. $A(z)$ is inverse filter to $1/A(z)$. $1/A(z)$ represents the part of vocal pathway (mouth, nose,..) which filters sound coming from vocal chords (noise or harmonic signal). So using $A(z)$ on the recorded (frame of) speech should give me the excitation signal. This is also illustrated in the image on the linked page.

However, now there's the prediction part. The error signal is $e(n) = s(n) - s'(n)$ where $s'(n)$ is the predicted signal. In my study materials we can get this $s'(n)$ by filtering $s(n)$ with $1-A(z)$, because if $A(z) = 1 + a_1z^{-1} + ... + a_Pz^{-P}$, then $1-A(z) = -\sum_{i=1}^{P}a_iz^i$. Using this filter with $s(n)$ gives $s'(n)=-\sum_{i=1}^{P}a_is(n-i)$. That's the same as on the linked page, only with minus sign (I'm not sure why the difference but I attribute it to the different signs of $a_i$ in filter).

Now according to my materials we should be able to write $A(z)$ as $A(z) = 1 - [1 - A(z)]$. Again, if I understand this correctly, filtering signal $s(n)$ with this filter should give us $s(n) - [s'(n)]$, which is the same as $e(n)$. But in the second paragraph we assumed that filtering $s(n)$ with $A(z)$ gives us excitation! This is confusing me for past 3 hours and I'd be glad if someone pointed out an error or explained how this can be.