maple doing division REVD
DOCX · 81.7 KB
Open DOCX file
Short working note by Phil dated 6.19.13, supporting his scrambler document (after equations 1.2.7 and 1.2.9). He does long division of z^2+1 by z+1 into negative powers, observes that the terms alternate, and sums the series to check it. He then derives the recurrence o(n+1) = -(h0/h1) o(n) + (1/h1) i(n) and solves it in Maple with rsolve. The Maple code and output are missing from the extracted text.
AI-written summary; may contain errors. This description is approximate.
Extracted text (machine-read; may contain errors)
A little math and maple problem PhL 6.19.13
This relates do stuff after (1.2.7) and then later after (1.2.9).
I want Maple to perform the infinite polynomial division in line with my examples here from scrambler doc
z+1 | z2 + 1
z2 + z
-z+1
-z -1
2
=> = (z - 1) + // the usual stopping point
z - 1 + 2z-1
z+1 | z2 + 1
z2 + z
-z+1
-z -1
2
2 + 2z-1
-2z-1
=> = (z - 1 + 2z-1) -
z - 1 + 2z-1 - 2z-2
z+1 | z2 + 1
z2 + z
-z+1
-z -1
2
2 + 2z-1
-2z-1
-2z-1 - 2z-2
2z-2
=> = (z - 1 + 2z-1 - 2z-2) +
I conjecture (with Maple proof later) that the powers just alternate forever. Then we have
= (z - 1 + 2z-1 - 2z-2 + .....) = (z-1) + 2 (z-1 - z-2 + z-3 - z-4 + .....)
= (z-1) + 2z-1 [1 + (-z)-1 + (-z)-2 + (-z)-3 + .....] = (z-1) + 2z-1 [ 1/(1+z-1) ]
=(z-1) + 2 [ 1/(z+1) ] = [ z2 -1 + 2 ] /(z+1) = so it works!
*********************************************
Consider this arbitrary polynomial division with positive and negative powers:
O(z) = I(z) / H(z) . (1.2.5)
In the time domain we can write this as
in = . (1.9.5)
The Maple problem is to find the coefficients oj. Let's start with the simple example above
I(z) = z2+ 1 highest power is z2 with coefficient i-2
H(z) = z + 1 highest power is z with coefficient h1
Recall this from scrambler, where in our current example k = 1, max power of h(z):
[okz-k + ok+1z-k-1 + ok+2z-k-2 + .....]
= [i0 + i1z-1 + i2z-2 + ..... + irz-r] / [hk zk + hk-1 zk-1 + ... + h1 z + h0] .
If we back up 2 clocks so the first ij is i-2, then the first oj will not be o1, it will be o-1. So
in = = h0on + h1on+1 (1.9.5)
I(z) = i-2 z2 + i-1z + i0 + i1z-1 + i2z-2 + ..... + irz-r . i-2 = 1 and i0 = 1
O(z) = o-1z + o0 + o1z-1 + o2z-2 + o3z-3 + .....
This of course matches the long divisions shown above.
This seems to be an iteration of this form
h1on+1 = - h0 on + in (*)
Where do we want to start this thing? Maybe here with n = -2 :
h1o-1 = - h0 o-2 + i-2 = i-2 = 1 which is correct since it says o-1 = 1/h1 = 1 in my example.
If we go to large negative n, we have both oj and ij = 0 in that regime. Then 0 = 0 + 0 at each clock in the past.
h1o-4 = - h0 o-5 + i-5 0 = 0+0
h1o-3 = - h0 o-4 + i-4 0 = 0+0
h1o-2 = - h0 o-3 + i-3 0 = 0+0
h1o-1 = - h0 o-2 + i-2 says h1o-1 = i-2
**************************************************
This seems to be an iteration of this form
h1on+1 = - h0 on + in
on+1 = - (h0/h1) on + (1/h1) in
I know that o0 = 1 so we can take it from there:
o1 = - (h0/h1) o0 + (1/h1) i0
o2 = - (h0/h1) o1 + (1/h1) i1 = - (h0/h1) [- (h0/h1) o0 + (1/h1) i0] + (1/h1) i1
o3 = - (h0/h1) o2 + (1/h1) i2 = - (h0/h1) [- (h0/h1) [- (h0/h1) o0 + (1/h1) i0] + (1/h1) i1]+ (1/h1) i2
OK, lets make some abbreviations for our starting equation
on+1 = - (h0/h1) on + (1/h1) in
on+1 = - a on + b in
Now have Maple just solve this baby. Here it is, and I have now added this as a second rsolve example in the Maple user guide. First, here is the general method of solution and functionalization of the result
We know in this example that c = 1. Here then is code to show the first 10 of the on coefficients:
Our only requirement is that (1/h1) must exist. If h1 = 1 in an example, this is no problem. Then the implied and + operations in the above expressions can be either real operators or Mod(10) operators.
Now finally back to our example in which has h0= h1 = 1. I then unprotect O and get
Now finally I can set in a specific input sequence:
I(z) = z2+ 1
So now only i2 = i0 = 1. We then get