def am_rx(x192):
x_edet192 = env_det(x192)<EOL>m_rx8 = deci24(x_edet192)<EOL>m_rx8 -= np.mean(m_rx8)<EOL>t8 = np.arange(len(m_rx8))/<NUM_LIT><EOL>"""<STR_LIT>"""<EOL>b192,a192 = signal.butter(<NUM_LIT:5>,<NUM_LIT:2>*<NUM_LIT>/<NUM_LIT>)<EOL>m_rx192 = signal.lfilter(b192,a192,x_edet192)<EOL>m_rx192 = signal.lfilter(b192,a192,m_rx192)<EOL>m_rx192 -= np.mean(m_rx192)<EOL>return m_rx8,t8,m_rx192,x_edet192<EOL>
AM envelope detector receiver for the Chapter 17 Case Study

The receiver bandpass filter is not included in this function.

Parameters
----------
x192 : ndarray of the AM signal at sampling rate 192 ksps

Returns
-------
m_rx8 : ndarray of the demodulated message at 8 ksps
t8 : ndarray of the time axis at 8 ksps
m_rx192 : ndarray of the demodulated output at 192 ksps
x_edet192 : ndarray of the envelope detector output at 192 ksps

Notes
-----
The bandpass filter needed at the receiver front-end can be designed
using b_bpf,a_bpf = :func:`am_rx_BPF`.

Examples
--------
>>> import numpy as np
>>> n = np.arange(0,1000)
>>> # 1 kHz message signal
>>> m = np.cos(2*np.pi*1000/8000.*n)
>>> m_rx8,t8,m_rx192,x_edet192 = am_rx(x192)