Build the Single stage RC circuit shown in Fig. 3, with $R = 10k\Omega ,\space C = 0.47\mu F$.

Fig. 3: (left) schematic of the single stage RC circuit, (right) implementation on breadboard

**Analysis**

The claimed transfer function of this circuit is

$\begin{split}\begin{matrix} T(f) = \ \frac{V_{out}(f)}{V_{in}(f)} = \frac{j2\pi fRC}{1 + j2\pi fRC}\ \#(2) \\ \end{matrix}\end{split}$Where $j=\sqrt -1$ is the imaginary unit.

- What is the magnitude of the transfer function?
- What is the phase response of the circuit?
- What class (low-pass, high-pass, band-pass, band-stop) of filter is this?
- What is the -3dB frequency?

**Measurement**

Using the Red Pitaya’s Bode Analyzer tool, measure the frequency response (|T(f)|) as described in section 3.1.2.

- Show the plot of the measurement below:

**Comparison**

Respond to the following questions:

- Does the shape of the frequency response match your expectation from the analysis? Is there any point that stands out as odd?
- Find the -3dB point in the circuit, and compare this value to the one you previously calculated.

**Single stage RC circuit – Unknown parameter estimation**

Build the Single stage RC circuit shown in Fig. 4, with the potentiometer and $C=4.7nF$. Use another resistor to provide electrical contact. Ensure that the potentiometer pins used are the two furthest pins, as this will be the total resistance of the device.

Fig. 4: (left) schematic of the single stage RC circuit, (right) implementation on breadboard

**Analysis**

The claimed transfer function of this circuit is the same as in 3.1 (reprinted here for courtesy)

$\begin{split}\begin{matrix} T(f) = \ \frac{V_{out}(f)}{V_{in}(f)} = \frac{1}{1 + j2\pi fRC}\ \\ \end{matrix}\end{split}$Where $j=\sqrt -1$ is the imaginary unit. However now the value of R is unknown. Since we already know the expected behavior of the system, we can estimate the value of R by measuring the transfer function again.

- Derive the expression for the -3dB frequency as a function of R.

**Measurement**

Using the Red Pitaya’s Bode Analyzer tool, measure the frequency response (|T(f)|) as described in section 3.1.2. Pay special attention to include the cutoff frequency in the sweep.

- Show the plot of the measurement below:

**Comparison**

Respond to the following questions:

- Use the expression you derived to calculate the value of R from the measured value of $f_c$.

*To calculate the value of * $R$* from the measured value of* $f_c$*, we can rearrange the transfer function equation as follows:* $T(f) = \frac{1}{1 + j2pi fRC}$*. Solving for* $R$*, we get * $R = \frac{1}{2pi f_cC}$* . Substitute the measured value of * $f_c$* and the known value of* $C$* to obtain the calculated value of* $R$*.*

- The previous analysis all presumed we knew the value of $f, C$ perfectly. In reality, the values of there are only approximately known.
- If the capacitance value $C$ can vary ±20%, what is the bounds on the error of the calculated value of $R$?
- (Optional) In the same line of thought, assume that the values of
*$C$**and**$f$*are described statistically by gaussian distributions with mean and variances provided below:

*If the capacitance value varies by * $\pm 20$%*, the bounds on the error of the calculated value of* $R$* can be determined by considering the sensitivity of* $R$* with respect to* $C$*. Using the formula for sensitivity, the upper bound of the error in* $R$* can be calculated as* $\Delta R = \left| \frac{dR}{dC} \right| \cdot 0.2C$*, where *$\frac{dR}{dC}$* is the derivative of *$R$* with respect to *$C$*. Similarly, the lower bound can be obtained by considering the negative change (-20%) in capacitance.*

b. If the frequency f value can vary ±0.1%, what is the bounds on the error of the calculated value of R?

*If the frequency value varies by **$\pm$** 0.1%, the bounds on the error of the calculated value of **$R$** can be determined by considering the sensitivity of **$R$** with respect to **$f$**. Using the formula for sensitivity, the upper bound of the error in **$R$** can be calculated as **$\Delta R = \left| \frac{dR}{df} \right| \cdot 0.001f$**, where **$\frac{dR}{df}$** is the derivative of **$R$** with respect to **$f$**. Similarly, the lower bound can be obtained by considering the negative change (-0.1%) in frequency.*

c. If the both* *$C,f$ as above simultaneously, what is the total bounding on the error of the calculated value of * *$R$? (Hint: This should be a rectangular area)

*If both **$C$** and **$f$** vary simultaneously, the total bounding on the error of the calculated value of **$R$** can be obtained by combining the individual bounds calculated in parts (a) and (b). The total bounding will form a rectangular area defined by the maximum and minimum values of the error in **$R$** due to the variations in **$C$** and **$f$**.*

If* **$C$** *and* **$f$** *are described by Gaussian distributions with means and variances, the resulting probability distribution of* **$R$** *can be calculated by applying the rules of propagation of uncertainty. By considering the distributions of * **$C$** *and* **$f$** *as well as their respective derivatives with respect to* **$R$*, the probability distribution of* **$R$** *can be obtained. This distribution will provide information about the likelihood of different values of* **$R$** *based on the statistical characteristics of* **$C$** *and* **$f$*.