Authors – Patrick Jungwirth & Kaveh Heidary (AAMU)


We present a model based engineering approach to solve the microwave popcorn dilemma. Do you trust the automatic popcorn button on a microwave oven? The instructions for microwave popcorn state to cook until there is a 2 to 3 second time gap between kernels popping. In this paper, we follow a model based engineering approach and develop a fully automatic microwave popcorn system. The material for this paper originated from a digital signal processing class project at Alabama A&M University. To encourage interest in patents, the students were required to write a project report as a patent application. We hope other universities will find this pedagogical paper of interest for digital signal processing and simulation courses.



The first author faced the usual conflicting requirements for a digital signal processing class project: relatively simple, interesting, and real-world. The eureka moment occurred one Saturday afternoon while making a bag of microwave popcorn. We could record popcorn kernels popping and create a simulation demonstrating a fully automatic microwave popcorn solution. We will follow a model based engineering approach and take a step-by-step approach towards a solution. At the paper’s conclusion, we present the Microwave Popcorn System and simulate a solution to the microwave automatic popcorn button dilemma.

Model based engineering is not new. The Wright brothers followed a model based engineering approach towards powered flight (Jungwirth 2018). The earliest model based engineering approach may be the ancient Egyptian pyramids (Wikipedia 2018). Model based engineering and Agile software development approaches have similar development philosophies (Jungwirth and Badawy 2017).

Alabama A&M University used this material for digital signal processing courses offered from 2012- 2104. A chapter section published in 2016 presented two simulation examples (Jungwirth 2016). The textbook used a countdown timer to find the 3 second time gap. In this paper, we use a missing pulse detector. We hope this paper will encourage other universities to use this class project in future digital signal processing courses. We feel all engineers would like to patent an invention during their careers. We believe writing a project report as a patent application will be very beneficial for future engineers. At a minimum the students will really enjoy eating popcorn for a class project. 


Microwave Popcorn Introduction

We begin by looking at an audio recording of microwave popcorn cooking. Model based engineering is data driven. We apply linear and non-linear signal processing steps to find the 2-3 second time gap between popcorn kernels popping. Figure 1 illustrates using a cell phone to record microwave popcorn audio. To keep the lawyers happy, we include the standard disclaimer. Caution: misuse could lead to injury, serious injury, or worse, damage, environmental damage, etc. Use at your own risk. Do not earn a Darwin award.

For the audio recording, we used a 16 kHz sampling frequency with a 16 bit analog to digital converter. We can clearly see significant levels of noise in Figure 1. We see the popcorn kernel audio pulses above the noise level. The noise is most likely low frequency noise. In the audio recording, we can easily hear kernels popping. We know that filtering and pulse shaping will be required to temporally locate a 3 second void (missing popcorn kernel pulse). With model based design, we want to break the problem down into a series of simple steps and work towards a solution.  

Figure 2 shows our first attempt at a model based design to solve the microwave popcorn dilemma. We begin by looking at filtering the raw audio found in Figure 1. The filtering and pulse shaping step converts the popcorn audio (kernels popping) into digital pulses. The missing pulse detector looks for a 3 second time gap between digital pulses (3 seconds between popcorn kernels popping). In the next section, we begin by removing the noise from the raw (unprocessed) popcorn audio.


Filtering and Pulse Shaping

In Figure 3, we zoom in on the noise near time = 10.0 seconds mark. The magnified view shows 35 cycles in 0.19 seconds. This corresponds to a frequency of 180 Hz, or 3 times 60 Hz power line frequency. The power spectral density plot shows line spectra at 60, 120, and 180 Hz. As illustrated in Figure 3, we clearly need to filter out low frequency noise.

In Figure 4, we examine a single popcorn kernel popping in the time domain. We see high frequency pulses present. A rough estimate of the high frequency component is to compute the number of cycle peaks in a time span. We see 69 cycle peaks in 0.015 seconds. This corresponds to a frequency of 4.6 kHz. We need a high pass filter with a cutoff frequency around 4 kHz to remove the low frequency power line noise and keep the popcorn audio pulses.

In Figure 5, we filter the unprocessed audio input with a 4.0 kHz cutoff frequency, 4th Order Butterworth High Pass Filter. The magnified view shows a substantial reduction in low frequency power line noise. We have found the first filter block for the model based design in Figure 2.

The popcorn pulse in Figure 5 has positive and negative values. To recover the low frequency envelope (estimated in bottom of Figure 6), we borrow an amplitude modulation detection method. We rectify (apply absolute value function) to the waveform in Figure 5. In Figure 6, we estimate the pulse envelope (orange waveform) to estimate the frequency bandwidth for a popcorn pulse. From the rise time, the bandwidth from (1) is approximately 63 Hz. Figure 7 shows a 60 Hz, 2 nd order low pass Butterworth filter applied to Figure 6. Figure 8 includes the low pass filter in the signal processing chain.

In Figure 7, we see several different low pass filtered popcorn pulse envelopes. We need to convert the family of pulse envelopes into digital pulses. Figure 7 shows different pulse widths and amplitudes. Since we are only interested in a 3 second time gap between pulses, multiple pulses that combine together will not cause any difficulties.

Missing Pulse Detector

To create a clean digital pulse from the popcorn pulse waveform in Figure 8, we apply hysteresis. Hysteresis requires the input to cross threshold values before changing state. After experimenting with high and low hysteresis limits, we set hysteresis limits to high limit = 1,000 and low limit = 500. Figure 9 shows hysteresis applied to the low pass filtered envelope pulses from Figure 7. Figure 9 also shows a magnified view of the envelopes converted into clean digital pulses. Figure 10 shows the completed filtering and pulse shaping block diagram. We need a missing pulse detector to find the 3 second time gap from 98.8 seconds to 101.8 seconds.

To help understand the missing pulse detector, we first look at popcorn pulse count as a function of time. Since this is a pulse count, the graph is monotonic (never decreases with time). Figure 11 shows 5 different regions occur over the cooking time. (1) No pulse count: popcorn has not started to pop. (2) Startup: popcorn begins to pop. (3) Constant slope region: where the popcorn pops per second is approximately constant. (4) Approaching done: popcorn pops per second decreases with time. (5) Done: 3 second time gap occurs from 98.8 seconds to 101.8 seconds (Figures 10, and 12). Do not overcook!

As illustrated in Figure 12, the missing pulse detector compares the popcorn pulse count to the pulse count from 3 seconds ago. We downsample to 10 Hz to reduce the memory stack required to implement the 3 second delay. Does the reader see an oversight in Figure 12? The current missing pulse detector will find a 3 second time gap at time = 3 seconds. During the no pulse count phase, there is a 20 second time gap. The startup phase also has 3 second time gaps. We need to create an enable signal to prevent the missing pulse detector from false triggering.

Figure 13 shows an enable signal occurring when the pulse count > 50. This places the enable signal just after the startup phase. The block diagram in Figure 13 shows the count > 50 enable signal added to the missing pulse detector. We have now completed the popcorn audio missing pulse detector.


Popcorn System Final Design

In Figure 14 presents the block diagram for the microwave popcorn system. The downsample operation from Figure 13 was converted into an enabled execution block. The top part of Figure 14 shows the filtering and pulse shaping operations from Figure 2. The bottom part shows the missing pulse detector. The pulse count > 50 block ensures, the popcorn missing pulse detector is enable only after the popcorn kernel count enters the constant slope region illustrated in Figures 11 and 13. Figure 14 shows the 3 second time gap from 98.8 to 101.8 seconds. We present a simulation of the microwave popcorn system in Figure 15 using the communications simulation tool VisSim/Comm version 8.0 (now Altair Embed/Comm).

The raw (unprocessed) popcorn audio file is shown in Figure 1. Figures 3, 4, 5, 6, 7, 9, 11, and 13 show simulation results for individual signal processing stages in the microwave popcorn system (see block diagram in Figure 14). Figure 15 summarizes the simulation results for the raw popcorn audio from Figure 1. The top part of the figure shows the actual simulation block diagram for VisSim/Comm 8.0 simulation tool.




We have applied a model based design methodology to develop an algorithm for an automatic microwave popcorn system. We have simulated the algorithm using Altair Embed/Comm (formerly called VisSim Comm).



P. Jungwirth: Sampling Theory and Analog to Digital Conversion,

P. Jungwirth: “Model Based Design Introduction,” In Proceedings of the SPIE Defense+Security Conference, Orlando, Society of Photooptical Instrumentation Engineers, 2018. “Egyptian Pyramids”. Accessed Aug. 18, 2018.

P. Jungwirth and A. Badawy: “Model Based Design Introduction: Game Controllers to Microprocessor Simulation,” Proceedings of the SPIE Defense + Security Conference, Los Angeles, CA , Society of Photooptical Instrumentation Engineers, 2017.



PATRICK JUNGWIRTH was previously an adjunct professor at Alabama A&M University. He holds a PhD in Electrical Engineering from the University of Alabama in Huntsville. His interests include digital signal processing, analog to digital conversion, and model based engineering.

KAVEH HEIDARY is professor at AAMU’s Department of Electrical Engineering and Computer Science. He holds a PhD in Electrical Engineering from Syracuse University. His interests include applied electromagnetics, wireless communications, radar signal processing and engineering, development of advanced algorithms for automatic target recognition and tracking, hyperspectral image processing applications to ATR, and pattern recognition

About Rahul Ponginan

Technical Manager - Academic Program
Click Here for Software,Training and Support for your Team!
Click Here for Software,Training and Support for your Team!

Have a question or comment?

Post your comment/question on our user forum.