How to implement an RF Mixer for chirp signal in python? According to this link, all I need to do to mix two signals is to multiply them.
I have two chirp signals with same properties, one leading the other. If I multiply them to get the IF output, I don't get a constant frequency which is what I expect, I get double the frequency:


from scipy.signal import chirp, spectrogram
import matplotlib.pyplot as plt
import numpy as np
import math

def plot_spectrogram(title, w, fs):
  ff, tt, Sxx = spectrogram(w, fs=fs)
  plt.pcolormesh(tt, ff, Sxx, cmap='gray_r')
  plt.title(title)
  plt.xlabel('Second(s)')
  plt.ylabel('Hz')
  plt.grid()

fig, ax = plt.subplots()

T = 0.4
fs = 7200
t = np.arange(0, int(T*fs)) / fs
f0, f1 = 5, 120
sc = chirp(t, f0=f0, f1=f1, t1=T)
rc = chirp(t, f0=f0, f1=f1, t1=T, phi=90.)

plt.figure(1)
ax.plot(t, sc, 'blue', lw=1.25, label='sent')
ax.plot(t, rc, 'green', lw=1.25, label='recv')

plt.figure(2)
plot_spectrogram(f'Chirp mul, f(0)={f0}, f({T})={f1}', sc * rc, fs)

plt.show()
Wouldn't mixing them give you a sum and difference frequency and you have to lowpass filter to get the difference frequency only?  Also your chirps are the same frequency, just out of phase?  So the difference would be zero and the sum would be double.
So:

Actually create a chirp that is a different frequency from the original, not just out of phase.
After mixing, lowpass filter to keep only the difference frequency