### Rectifier

Rectifier with half and full-wave modes.

##### Parameters

gain

##### 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 Half-Cycle

##### Transfer Function

$$\text{Full Wave} \\ V_{out} = \pm G \cdot \lvert V_{in} \rvert \\~\\ \text{Positive Half Wave} \\ V_{out} = \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_{out} = \begin{cases} 0 & \text{if \> V_{in} > 0} \\ \pm G \cdot V_{in} & \text{if \> V_{in} < 0} \end{cases}$$

##### 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{2 of 32} \\ \hline \end{array}$$