### RectifierFilter

Rectifier with half and full-wave modes and added first-order lowpass filer.

##### Parameters

gain

corner_frequency

##### Options
rectifier_mode $$\in \{$$ POSITIVE_HALF_WAVE $$,$$ NEGATIVE_HALF_WAVE $$,$$ FULL_WAVE $$\}$$

output_polarity $$\in \{$$ NONINVERTED $$,$$ INVERTED $$\}$$

output_phase $$\in \{$$ PHASE1 $$,$$ PHASE2 $$\}$$

opamp_mode $$\in \{$$ DEFAULT $$,$$ CHOPPER_STABILIZED $$\}$$

##### Inputs

input Continuous

##### Outputs

output Continuous

##### Transfer Function

$$\text{Full Wave} \\ V_{rec} = \pm G \cdot \lvert V_{in} \rvert \\~\\ \text{Positive Half Wave} \\ V_{rec} = \begin{cases} \pm G \cdot V_{in} & \text{if \> V_{in} > 0} \\ 0 & \text{if \> V_{in} < 0} \end{cases} \\~\\ \text{Negative Half Wave} \\ V_{rec} = \begin{cases} 0 & \text{if \> V_{in} > 0} \\ \pm G \cdot V_{in} & \text{if \> V_{in} < 0} \end{cases} \\~\\ \frac{V_{out}(s)}{V_{rec}(s)} = \pm \frac{2\pi f_cG}{s + 2\pi f_c}$$

##### Analog Resource Usage

$$\begin{array}{|c|c|} \hline \text{Opamps} & \text{1 of 8} \\ \hline \text{Comparators} & \text{1 of 4} \\ \hline \text{Capacitors} & \text{3 of 32} \\ \hline \end{array}$$