How to convert RMS to peak-to-peak for sinusoids in Python using UliEngineering

You can easily convert an RMS value to peak-to-peak for a sinusoidal signal using the UliEngineering Python library:

example.py
from UliEngineering.SignalProcessing.Utils import *

# Convert 1V RMS to peak-to-peak
pp_value = rms_to_peak_to_peak("1V")
print(f"1V RMS = {pp_value} peak-to-peak")

# Convert 3.3V RMS to peak-to-peak
pp_value = rms_to_peak_to_peak("3.3V")
print(f"3.3V RMS = {pp_value} peak-to-peak")

Example output

rms_to_peak_to_peak_output.txt
1V RMS = 2.828V peak-to-peak
3.3V RMS = 9.333V peak-to-peak

The conversion uses the relationship for sinusoidal signals: $V_{pp} = 2\sqrt{2} \times V_{RMS}$


Check out similar posts by category: Signal Processing, Python