The goal of this project is to animate Bad Apple!! frame by frame using RF Signal plots. This will be done by using Python, and a bit of creativity.
https://www.youtube.com/watch?v=FtutLA63Cp8
Generate a sine wave.
import numpy as np
import matplotlib.pylab as plt
fs = 48000 # samples per second
f = 1000 # cycles per second
t = np.linspace(0, 1, int(fs), endpoint=False) # time vector
y = np.sin(2 * np.pi * f * t) # sampled sine wave
plt.plot(t[:200], y[:200])
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.title('1 kHz Sine Wave sampled at 48kHz')
plt.show()
Term | Symbol | Meaning | Analogy / Notes |
---|---|---|---|
Signal | ( y(t) ) | A varying quantity (e.g., voltage) over time | The thing we’re measuring or transmitting |
Amplitude | ( A ) | Instantaneous strength or height of the signal | “Volume” or “intensity” |
Frequency | ( f ) | Cycles per second (Hz) | How fast the wave repeats |
Period | ( T = 1/f ) | Duration of one full cycle | For 1 kHz, (T = 1 ms) |
Sampling Rate | ( f_s ) | Samples taken per second (Hz) | “Camera frame rate” for signals |
Samples per Cycle | ( N = f_s / f ) | Number of discrete points describing one wave | Determines smoothness of the digital curve |
Time Step | ( \Delta t = 1/f_s ) | Time between samples | For 48 kHz → ≈ 20.83 µs |
Nyquist Rate | ( f_s > 2f ) | Minimum rate to avoid aliasing | You must sample at > 2× the signal frequency |
Phase | ( \phi = 2\pif t ) | Angle position within the wave cycle | Think of it as “where you are” on the sine curve |
In stage two, I will…
Concept | Description |
---|---|
Modulating Signal | A second, slower waveform (or data array) that controls the amplitude. |
Carrier Signal | The fast sine wave you already built (1 kHz). |
Amplitude Modulation (AM) | Multiplying them: ( s(t) = A(t)\sin(2\pi f_c t) ). The amplitude of the carrier follows (A(t)). |
What is Amplitude Modulation? Amplitude modulation is the act of using one signal to control the amplitude (height) of another signal. We start with…
Then we combine them together into one equation.
$$ s(t)=[1+m(t)]⋅A_csin(2πf_ct) $$
Where: