Skip to content

FFT Size MicroSim

You can include this MicroSim in your course by pasting the following HTML directly into your web page.

1
2
<iframe src="https://dmccreary.github.io/signal-processing/sims/fft-size/main.html" 
  height="500px" scrolling="no" style="overflow: hidden;"></iframe>

Run the FFT Size MicroSim Fullscreen Edit the FFT Size MicroSim

FFT Size - Lesson Plan

Prompt

Please generate a detailed lesson plan with no times for a freshman in college that is getting their first exposure to FFT. Have them vary the controls and see the impact. Have them note the width of the peak in the frequency graph. Have them quickly move the amplitude control and see a packet of waves of a given frequency in the top time domain. Return the results in markup with

Learning Objectives

By the end of this lesson, students will be able to: - Understand the relationship between time domain and frequency domain representations - Explain how FFT size affects frequency resolution - Observe the connection between signal amplitude and spectral peaks - Recognize how transient signals appear in both domains

Part 1: Introduction to the FFT Visualization

Getting Started

  1. Launch the FFT Basic Visualization and observe the interface
  2. Identify the key components:
  3. Top half: Time Domain (shows the waveform over time)
  4. Bottom half: Frequency Domain (shows the FFT spectrum)
  5. Controls: Frequency slider, Amplitude slider, FFT Size radio buttons
  6. Start/Pause and Reset buttons

  7. Initial Observation:

  8. Click "Start" to begin the simulation
  9. Notice the green waveform in the time domain (top)
  10. Notice the purple bars in the frequency domain (bottom)
  11. Question to ponder: What is the relationship between these two displays?

Part 2: Exploring Frequency Relationships

Activity 1: Understanding the Frequency Connection

  1. Set initial conditions:
  2. Frequency: 440 Hz (default)
  3. Amplitude: 0.5 (default)
  4. FFT Size: 1024 (default)
  5. Click "Start"

  6. Observe and record:

  7. What frequency shows the peak in the bottom graph?
  8. How does this relate to the frequency slider setting?
  9. Key insight: The peak in the frequency domain appears at exactly the same frequency as the time domain signal

  10. Experiment with different frequencies:

  11. Move the frequency slider to 200 Hz
  12. Move it to 800 Hz
  13. Move it to 1500 Hz
  14. Record your observations: How does the peak location change in the frequency domain?

Activity 2: The Amplitude Connection

  1. Fix the frequency at 440 Hz
  2. Vary the amplitude from 0.1 to 1.0:
  3. Start with amplitude = 0.1
  4. Gradually increase to 0.5
  5. Increase to 1.0
  6. Observe: What happens to the height of the peak in the frequency domain?

  7. Key discovery: Amplitude in the time domain directly corresponds to the magnitude (height) of the peak in the frequency domain


Part 3: Understanding FFT Resolution

Activity 3: FFT Size and Peak Width Analysis

This is a crucial concept that many students find challenging initially.

  1. Set up for peak width observation:
  2. Frequency: 440 Hz
  3. Amplitude: 0.7
  4. Start with FFT Size: 512

  5. Observe the peak width:

  6. Look carefully at the width of the purple peak at 440 Hz
  7. Notice how "spread out" or "narrow" the peak appears
  8. Record: Estimate the width of the peak in the frequency domain

  9. Change FFT size systematically:

  10. Switch to FFT Size: 1024
  11. Observe: Is the peak narrower or wider than before?
  12. Switch to FFT Size: 2048
  13. Observe: How has the peak width changed?
  14. Switch to FFT Size: 4096
  15. Final observation: What is the trend in peak width as FFT size increases?

  16. Understanding frequency resolution:

  17. Check the display: Look at "Freq Resolution: X.X Hz/bin"
  18. Connect the concepts: Smaller Hz/bin values mean better frequency resolution
  19. Key insight: Larger FFT sizes provide better frequency resolution (narrower peaks)

Activity 4: Trade-offs in FFT Size

  1. Practical considerations:
  2. Try FFT Size: 8192 (maximum)
  3. Try FFT Size: 512 (minimum)
  4. Question: What might be the trade-off between high resolution and computational cost?

Part 4: Observing Transient Signals

Activity 5: Creating Wave Packets

This activity helps students understand how changing signals appear in both domains.

  1. Set up for transient observation:
  2. Frequency: 600 Hz
  3. FFT Size: 2048 (for good resolution)
  4. Amplitude: 0.5

  5. Create a wave packet:

  6. Quickly move the amplitude slider from 0 to 0.8 and back to 0
  7. Do this motion in about 1-2 seconds
  8. Observe the time domain: You should see a "burst" or "packet" of waves

  9. Observe both domains simultaneously:

  10. Time domain: Notice the localized group of oscillations
  11. Frequency domain: What happens to the peak during this transient?
  12. Repeat several times to see the effect clearly

  13. Advanced observation:

  14. Try creating wave packets at different frequencies (300 Hz, 800 Hz, 1200 Hz)
  15. Question: How does the frequency of the wave packet relate to where the peak appears in the frequency domain?

Activity 6: Amplitude Modulation Effects

  1. Create rhythmic amplitude changes:
  2. Set frequency to 440 Hz
  3. Slowly and rhythmically vary the amplitude up and down
  4. Create a "beating" or "pulsing" effect
  5. Observe: How does this appear in both time and frequency domains?

Part 5: Synthesis and Understanding

Reflection Questions

Work through these questions to consolidate your understanding:

  1. Fundamental relationship:
  2. How would you explain the relationship between time domain and frequency domain to a classmate?

  3. Peak characteristics:

  4. Why does a single-frequency sine wave show up as a single peak in the frequency domain?
  5. What determines the location of the peak?
  6. What determines the height of the peak?

  7. Resolution trade-offs:

  8. What happens to frequency resolution as FFT size increases?
  9. Why might you choose a smaller FFT size despite lower resolution?
  10. In what applications might high frequency resolution be critical?

  11. Transient signals:

  12. How do short-duration signals (wave packets) appear differently from continuous signals?
  13. Why might the frequency domain representation change when you create wave packets?

Key Takeaways

Students should be able to articulate:

  • Time-Frequency Duality: Every signal can be represented in both time domain (how it changes over time) and frequency domain (what frequencies it contains)

  • FFT Resolution: The FFT size determines how precisely we can distinguish between different frequencies - larger FFT sizes give narrower, more precise peaks

  • Amplitude-Magnitude Relationship: The amplitude of a signal in the time domain directly relates to the magnitude (height) of its corresponding peak in the frequency domain

  • Transient Analysis: Short-duration signals create temporary peaks in the frequency domain, illustrating how the FFT can reveal the frequency content of time-varying signals


Extension Activities

For Advanced Students:

  1. Predict and verify: Before moving the frequency slider, predict where the peak will appear, then verify your prediction

  2. Multiple frequencies: What would happen if we had two different frequencies at the same time? (This sets up the next lesson on multi-component signals)

  3. Real-world connections: Where might FFT analysis be used in engineering applications? (Audio processing, vibration analysis, communications, etc.)

Troubleshooting Common Misconceptions:

  • "The time domain shows frequency" - Clarify that time domain shows how the signal varies over time, while frequency domain shows what frequencies are present
  • "Bigger FFT is always better" - Discuss computational trade-offs and real-time processing constraints
  • "The peak should be a single line" - Explain that digital processing creates finite-width peaks, and resolution limits cause peak spreading

This lesson provides hands-on experience with the fundamental concepts of FFT analysis while building intuition for more advanced signal processing topics.