i'm trying to implement SSB Modulation on Octave. i based my code on this:
https://www.mathworks.com/help/signal/ug/single-sideband-modulation-via-the-hilbert-transform.html
it works ok, until i change Fo to a higher frequency, in MHz (of course, changing the Fs>2*fo on ssbdemod also). when i do it, the demod sounds metallic, and when analyzing spectrum, it doesnt seem to supress the other sideband well.
here is what i have been doing:
pkg load signal
pkg load communications
[input_wave, Fs] = audioread('./input.wav');
t = (0:length(input_wave)-1) / Fs;
N = 60;
h = firpm(N, [0.05 0.95], [1 1], 'hilbert');
input_wave_tilde = filter(h, 1, input_wave);
G = floor(N/2);
fo = 1000;
input_wave_delayed = [zeros(1,G), input_wave(1:end-G)];
input_wave_tilde_delayed = [zeros(1,G), input_wave_tilde(1:end-G)];
t = (0:length(input_wave_delayed)-1) / Fs;
f = input_wave_delayed .* cos(2*pi*fo*t) - input_wave_tilde_delayed .* sin(2*pi*fo*t);
demodulated_signal = ssbdemod(f, fo, Fs);
demodulated_signal = demodulated_signal / max(abs(demodulated_signal));
output_path = './demodulated_signal.wav';
audiowrite(output_path, demodulated_signal, Fs);
Thanks in advance!