```python
import numpy as np
import sympy as sy
```


```python
s,z = sy.symbols('s,z', real=False)
Td,N,h = sy.symbols('Td, N,  h')
```


```python
Fpd = 1 + Td*s/(1+Td*s/N)
Fpdd = Fpd.subs(s, (z-1)/(z*h)).subs(N,20).subs(h,0.2)
(Fnum, Fden) = sy.fraction(sy.together(Fpdd))
Bf = sy.poly(sy.expand(Fnum), z)
print Bf
Bd = sy.poly(z-0.8, z)
print Bd
coeffs = Bf.all_coeffs()
print coeffs
```

    Poly((5.25*Td + 1.0)*z - 5.25*Td, z, domain='RR[Td]')
    Poly(1.0*z - 0.8, z, domain='RR')
    [5.25*Td + 1.0, -5.25*Td]



```python
eq = coeffs[1]/coeffs[0] + 0.8
print eq
sol = sy.solve(eq, Td)
print sol
```

    -5.25*Td/(5.25*Td + 1.0) + 0.8
    [0.761904761904762]



```python
Tdn = sy.N(sol[0])
5.25*Tdn/(5.25*Tdn+1)
```




    0.800000000000000




```python

```

37f04aa87b20b9e2d217bd7e3b5c157980847925
ipynb
Jupyter Notebook
misc-notebooks/.ipynb_checkpoints/final-exam-2015-checkpoint.ipynb
kjartan-at-tec/mr2007-computerized-control
16e35f5007f53870eaf344eea1165507505ab4aa
MIT
2020-11-07T05:20:37.000Z
2020-12-22T09:46:13.000Z
misc-notebooks/MR2007-final-exam-fall-2015.ipynb
alfkjartan/control-computarizado
5b9a3ae67602d131adf0b306f3ffce7a4914bf8e
MIT
2020-06-12T20:44:41.000Z
2020-06-12T20:49:00.000Z
misc-notebooks/MR2007-final-exam-fall-2015.ipynb
kjartan-at-tec/mr2007-computerized-control
16e35f5007f53870eaf344eea1165507505ab4aa
MIT
2021-03-14T03:55:27.000Z
2021-03-14T03:55:27.000Z
Qwen/Qwen-72B
1. YES
2. YES