top of page

DC removal

What problem are you trying to solve?

Broadcasting the signal using half of the bandwidth. Essentially, we want to model the signal using SSB (Single Sideband) and reconstruct it by multiplying with a cosine and using an LPF (Low-Pass Filter).

How does the code you wrote solve the problem?

First, we will read the signal and determine the frequency at which it is broadcast. We will create an SSB signal:
- Create a time vector based on the length of the signal divided by its sampling rate.
- Add to the signal a multiplication of `i` with filtering by a Hilbert filter.
- Obtain the SSB signal by multiplying with a complex exponential at the new frequency at which we want to broadcast and take its real part.

Afterward, we will take the new SSB signal and multiply it by a cosine with the new frequency to halve its amplitude. We will use an LPF to filter the frequencies from the original signal.

What do the modules you used do?

Libraries we needed to use:
- NumPy: For mathematical operations and models.
- Soundfile: To read and save the audio file.
- SciPy.signal: To create the LPF and for the Hilbert filter.

What types of inputs does the code accept and what should we expect in the output?

- Input: Audio signal.
- Output: Graphs showing the original signal, the SSB signal, and the recovered signal. Files: A more muted reconstructed audio file.

Explain the parameter names in the code and their functions

- input_filename: The input file.
- output_filename: The output file.
- carrier_frequency: The new frequency to broadcast with.
- ssb_signal: The newly created SSB signal.
- recovered_signal: The signal after LPF.
- data: The signal from the input file.
- samplerate: The sampling rate.
- analytic_signal: The signal with the Hilbert filter component added.
- demodulated_signal: The signal after multiplication with the cosine (halving the amplitude).
- nyquist_rate: The Nyquist rate Wn.
- cutoff: The cutoff frequency of the LPF.
- a, b: Variables for the LPF.
- t: Time vector.
- signal: The name used in the function f
or the signal.

Section Title

Section Subtitle

Every website has a story, and your visitors want to hear yours. This space is a great opportunity to give a full background on who you are, what your team does and what your site has to offer. Double click on the text box to start editing your content and make sure to add all the relevant details you want site visitors to know.

If you’re a business, talk about how you started and share your professional journey. Explain your core values, your commitment to customers and how you stand out from the crowd. Add a photo, gallery or video for even more engagement.

bottom of page