The science behind ultrasonic motion sensing for Echo

Reducing false positives for rare events, adapting Echo hardware to ultrasound sensing, and enabling concurrent ultrasound sensing and music playback are just a few challenges Amazon researchers addressed.

Routine setup.gif
An example of how to use the Alexa app to configure Routines with ultrasound-based motion-detection triggers.

Last fall, Amazon introduced ultrasound-based motion detection, to enable Alexa customers to initiate Routines, or prespecified sequences of actions, when certain types of motion are detected (or not detected). For instance, Routines could be configured to automatically turn the lights on, play music, or announce weather or traffic when motion is detected near a customer’s Echo device, indicating that someone has entered the room.

There are many different motion detection technologies, but we selected ultrasound because it works in low-light conditions or even in the dark and, unlike radio waves, ultrasound waves do not travel through drywall, so there's less risk of detecting motion in other rooms.

Getting the technology to work on existing Echo hardware required innovation on a number of fronts — among other things, reducing false alarms by adequately sampling long-tail data; devising a self-calibration feature to adjust to variations in commodity hardware; and filtering out distortion during concurrent ultrasound detection and music playback. We describe the details below.

Ultrasound-based presence detection

With ultrasound-based presence detection (USPD), an ultrasonic signal (>=32 kHz) is transmitted via onboard loudspeakers, and changes in the signal received at the microphones are monitored to detect motion.

Ultrasound sensors can be broadly categorized as using Doppler sensing or time-of-flight sensing. In Doppler sensing, once the signal is transmitted, the system detects motion by looking for frequency shifts in the recorded spectrum of the signal, which are caused by its reflection from moving objects. This frequency shift is similar to the shift in sound frequencies you hear in a police car siren it is approaching you or moving away from you.

Doppler-Illustration.gif
Doppler sensing detects motion by looking for frequency shifts in the recorded spectrum of a transmitted signal, which are caused by reflection from moving objects.

In time-of-flight sensing, variations in the arrival time of the reflected signal are monitored to detect changes in the environment. We use Doppler sensing due to the robustness of its motion detection signal and because it generalizes well across the cases when Alexa is or is not playing audio simultaneously.

The magnitude of the Doppler-shifted signal depends on factors such as distance from target to source, the size and absorption coefficient of the target, the absorption coefficient of the room, and even the humidity and temperature in the room. In addition, when a person moves through a closed space, not only do we observe multiple Doppler components due to various parts of the body moving in different directions with different speeds, but we also observe repetitions of those components due to reflections.

Because of all these complexities, the signal received at the source is not at all as clean as a single tone with a frequency shift. In practice, what we observe looks more like this:

Motion spectrogram.png
Spectrogram of the signal received at device microphones when there is motion near the device.
Fan only.gif
Spectrogram of the signal received at device microphones when there is no motion in the room other than a rotating floor fan.
Fan and motion.gif
Spectrogram of the signal with both the rotating floor fan and human motion.

Further, moving objects such as fans and curtains introduce their own Doppler shifts, which have to be rejected since they do not necessarily indicate people’s presence. Below are two spectrograms, one of a room with no motion other than a rotating floor fan and another with both a fan and human motion near a device. As can be seen, they are difficult to tell apart.

These complications mean that conventional signal processing is insufficient to recognize human motion from Doppler-shifted signals. So we instead use deep learning, which should be able to recognize more heterogeneous patterns in the signal.

Below is a high-level block diagram of our USPD algorithm. On the signal transmitter side, a device- and environment-dependent optimal ultrasound signal is transmitted through the onboard loudspeaker. This signal gets reflected from a moving object and is then captured by the onboard microphone array. The signal is preprocessed and then passed to a neural-network-based classifier to detect motion.

uspd-simplified-diagram(2).png
High-level block diagram of USPD algorithm.

False alarms

The biggest algorithmic challenge we faced was achieving high detection accuracy while keeping the false-alarm rate low. Reducing false-alarm rates is especially challenging because of the well-known long-tail problem in AI: there are a multitude of rare events that could fool a detector, but their rarity means that they’re usually underrepresented in training data.

To address this problem, we started by training a seed model on a relatively small amount of data. First, we used the seed model to sort through large amounts of data and extract infrequent events. Second, we used a model trained on that rare-event data to automatically capture infrequent events during our internal data collection process. Data captured by these methods eventually helped us address the long-tail problem and achieve extremely low false-alarm rates.

Deployment challenges

Deploying the trained model brought its own challenges. We wanted to enable USPD with the lowest possible emission level, while still retaining a sufficient detection range, and do all of this with no additional hardware costs (i.e., using the available microphones and loudspeakers on Echo devices instead of dedicated ultrasound transmitters). Further, we decided to support always-on motion detection. This meant being able to detect motion even when a user is playing music from the device speakers. Finally, we added algorithms to improve the user experience in the presence of only minor motion and spent a considerable amount of effort to support Amazon’s goal of reducing our devices’ power consumption. We describe these in more detail below.

Hardware variations and environmental conditions

Using onboard loudspeakers and microphones for ultrasound transmission and sensing meant that we had to manage variable acoustic characteristics. Mass-produced devices are known to have a certain variation in amplitude and phase response, and it is very difficult to control the response of loudspeakers in the ultrasonic frequency range without affecting yield rates. To manage these hardware variations and environmental variations, we designed automatic device calibration modules to tailor emission frequencies and levels to both the devices’ hardware idiosyncrasies and the acoustic properties of the rooms in which they are used. This helped us provide a consistent user experience across devices without increasing device costs.

Music playback.gif
Signal spectrum observed in an empty room with concurrent music playback.
Motion and music playback.gif
Signal spectrum observed with both concurrent music playback and motion near device.
Cleaned-up music.gif
The signal observed in an empty room with concurrent music playback after passing through our multimicrophone algorithm.
Cleaned-up motion and music.gif
The signal with both concurrent playback and motion near the device after passing through our multimicrophone algorithm.

Sensing with concurrent music playback

Music playback is a key use case for Echo devices, which poses challenges, since we use device loudspeakers to simultaneously play music and emit ultrasound. Specifically, when low-frequency music content (such as bass sounds) is played together with an ultrasonic signal, the distortion shows up as noise in the ultrasound region. This noise is inaudible to listeners, but it interferes with the frequencies we use for sensing.

In order to enhance the ultrasound signal and get reasonable range performance in the presence of concurrent music, we developed an adaptive algorithm that uses the different magnitude and phase of distortion and motion features at different microphones to identify and remove distortion.

Major and minor motion

Human movements can be broadly categorized as either major or minor. Major movements include walking into or through an area, while minor movements include reaching for a telephone while seated, turning the pages in a book, opening a file folder, and picking up a coffee cup. Detecting minor movements is difficult, as their ultrasound spectra have very low signal-to-noise ratios (SNRs) compared to major movements, and detecting low-SNR events often means high false-positive rates. At the same time, detecting minor movements is extremely important for recognizing a user’s continued presence after walking into the room.

We developed an algorithm that changes the sensitivity of the detector based on context, such as time elapsed since the last major movement. After a customer walks into the room, the device operates at high sensitivity to detect minor movements for continued presence sensing, so we can provide the best of both worlds — high sensitivity to movements and low false-alarm rates.

Low-power mode

Reducing power consumption is an important goal at Amazon, so we implemented our solution on a low-power digital signal processor (DSP). This required a lot of code and optimizations of the neural-network architecture.

Specifically, as real-time systems, DSPs have strict computation schedules and budgets. This prevented us from deploying deeper neural network models, but we managed to trade off detection latency (on the order of 50 milliseconds) for higher accuracy by combining our neural models with custom DSP implementations. In addition, we disable ultrasonic emission when it is not essential; for example, we disable emissions for set periods of time after detecting presence.

The launch of far-field ultrasonic motion sensing on Echo devices is an exciting development, which will enable our customers to easily automate their day-to-day needs. We are looking forward to inventing more on behalf of our customers.

Acknowledgments: Special thanks to Tarun Pruthi for his contributions to this post.

Research areas

Related content

IL, Haifa
We’re looking for a Principal Applied Scientist in the Personalization team with experience in generative AI and large models. You will be responsible for developing and disseminating customer-facing personalized recommendation models. This is a hands-on role with global impact working with a team of world-class engineers and scientists across the wider organization. You will lead the design of machine learning models that scale to very large quantities of data, and serve high-scale low-latency recommendations to all customers worldwide. You will embody scientific rigor, designing and executing experiments to demonstrate the technical efficacy and business value of your methods. You will work alongside a science team to delight customers by aiding in recommendations relevancy, and raise the profile of Amazon as a global leader in machine learning and personalization. Successful candidates will have strong technical ability, focus on customers by applying a customer-first approach, excellent teamwork and communication skills, and a motivation to achieve results in a fast-paced environment. Our position offers exceptional opportunities for every candidate to grow their technical and non-technical skills. If you are selected, you have the opportunity to make a difference to our business by designing and building state of the art machine learning systems on big data, leveraging Amazon’s vast computing resources (AWS), working on exciting and challenging projects, and delivering meaningful results to customers world-wide. Key job responsibilities Develop machine learning algorithms for high-scale recommendations problem Rapidly design, prototype and test many possible hypotheses in a high-ambiguity environment, making use of both quantitative analysis and business judgement. Collaborate with software engineers to integrate successful experimental results into large-scale, highly complex Amazon production systems capable of handling 100,000s of transactions per second at low latency. Report results in a manner which is both statistically rigorous and compellingly relevant, exemplifying good scientific practice in a business environment.
DE, Aachen
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Applied Scientist with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As an Applied Scientist with the AGI team, you will work with talented peers to lead the development of novel algorithms and modeling techniques, to advance the state of the art with LLMs. Your work will directly impact our customers in the form of products and services that make use of speech and language technology. You will leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in spoken language understanding. About the team The AGI team has a mission to push the envelope in GenAI with LLMs and multimodal systems, in order to provide the best-possible experience for our customers.
US, WA, Seattle
Are you a brilliant mind seeking to push the boundaries of what's possible with intelligent robotics? Join our elite team of researchers and engineers - led by Pieter Abeel, Rocky Duan, and Peter Chen - at the forefront of applied science, where we're harnessing the latest advancements in large language models (LLMs) and generative AI to reshape the world of robotics and unlock new realms of innovation. As an Applied Science Intern, you'll have the unique opportunity to work alongside world-renowned experts, gaining invaluable hands-on experience with cutting-edge robotics technologies. You'll dive deep into exciting research projects at the intersection of AI and robotics. This internship is not just about executing tasks – it's about being a driving force behind groundbreaking discoveries. You'll collaborate with cross-functional teams, leveraging your expertise in areas such as deep learning, reinforcement learning, computer vision, and motion planning to tackle real-world problems and deliver impactful solutions. Throughout your journey, you'll have access to unparalleled resources, including state-of-the-art computing infrastructure, cutting-edge research papers, and mentorship from industry luminaries. This immersive experience will not only sharpen your technical skills but also cultivate your ability to think critically, communicate effectively, and thrive in a fast-paced, innovative environment where bold ideas are celebrated. Join us at the forefront of applied robotics and AI, where your contributions will shape the future of intelligent systems and propel humanity forward. Seize this extraordinary opportunity to learn, grow, and leave an indelible mark on the world of technology. Amazon has positions available in San Francisco, CA and Seattle, WA. The ideal candidate should possess: - Strong background in machine learning, deep learning, and/or robotics - Publication record at science conferences such as NeurIPS, CVPR, ICRA, RSS, CoRL, and ICLR. - Experience in areas such as multimodal LLMs, world models, image/video tokenization, real2Sim/Sim2real transfer, bimanual manipulation, open-vocabulary panoptic scene understanding, scaling up multi-modal LLMs, and end-to-end vision-language-action models. - Proficiency in Python, Experience with PyTorch or JAX - Excellent problem-solving skills, attention to detail, and the ability to work collaboratively in a team Join us at the forefront of applied robotics and AI, and be a part of the team that's reshaping the future of intelligent systems. Apply now and embark on an extraordinary journey of discovery and innovation! Key job responsibilities - Develop novel, scalable algorithms and modeling techniques that advance the state-of-the-art in areas at the intersection of LLMs and generative AI for robotics - Tackle challenging, groundbreaking research problems on production-scale data, with a focus on robotic perception, manipulation, and control - Collaborate with cross-functional teams to solve complex business problems, leveraging your expertise in areas such as deep learning, reinforcement learning, computer vision, and motion planning - Demonstrate the ability to work independently, thrive in a fast-paced, ever-changing environment, and communicate effectively with diverse stakeholders
US, WA, Seattle
Join the next revolution in robotics at Amazon's Frontier AI & Robotics team, where you'll work alongside world-renowned AI pioneers like Pieter Abbeel, Rocky Duan, and Peter Chen to lead key initiatives in robotic intelligence. As a Senior Applied Scientist, you'll spearhead the development of breakthrough foundation models that enable robots to perceive, understand, and interact with the world in unprecedented ways. You'll drive technical excellence in areas such as perception, manipulation, scence understanding, sim2real transfer, multi-modal foundation models, and multi-task learning, designing novel algorithms that bridge the gap between cutting-edge research and real-world deployment at Amazon scale. In this role, you'll combine hands-on technical work with scientific leadership, ensuring your team delivers robust solutions for dynamic real-world environments. You'll leverage Amazon's vast computational resources to tackle ambitious problems in areas like very large multi-modal robotic foundation models and efficient, promptable model architectures that can scale across diverse robotic applications. Key job responsibilities - Lead technical initiatives in robotics foundation models, driving breakthrough approaches through hands-on research and development in areas like open-vocabulary panoptic scene understanding, scaling up multi-modal LLMs, sim2real/real2sim techniques, end-to-end vision-language-action models, efficient model inference, video tokenization - Design and implement novel deep learning architectures that push the boundaries of what robots can understand and accomplish - Guide technical direction for specific research initiatives, ensuring robust performance in production environments - Mentor fellow scientists while maintaining strong individual technical contributions - Collaborate with engineering teams to optimize and scale models for real-world applications - Influence technical decisions and implementation strategies within your area of focus A day in the life - Develop and implement novel foundation model architectures, working hands-on with our extensive compute infrastructure - Guide fellow scientists in solving complex technical challenges, from sim2real transfer to efficient multi-task learning - Lead focused technical initiatives from conception through deployment, ensuring successful integration with production systems - Drive technical discussions within your team and with key stakeholders - Conduct experiments and prototype new ideas using our massive compute cluster - Mentor team members while maintaining significant hands-on contribution to technical solutions Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply! About the team At Frontier AI & Robotics, we're not just advancing robotics – we're reimagining it from the ground up. Our team, led by pioneering AI researchers Pieter Abbeel, Rocky Duan, and Peter Chen, is building the future of intelligent robotics through groundbreaking foundation models and end-to-end learned systems. We tackle some of the most challenging problems in AI and robotics, from developing sophisticated perception systems to creating adaptive manipulation strategies that work in complex, real-world scenarios. What sets us apart is our unique combination of ambitious research vision and practical impact. We leverage Amazon's massive computational infrastructure and rich real-world datasets to train and deploy state-of-the-art foundation models. Our work spans the full spectrum of robotics intelligence – from multimodal perception using images, videos, and sensor data, to sophisticated manipulation strategies that can handle diverse real-world scenarios. We're building systems that don't just work in the lab, but scale to meet the demands of Amazon's global operations. Join us if you're excited about pushing the boundaries of what's possible in robotics, working with world-class researchers, and seeing your innovations deployed at unprecedented scale.
US, WA, Seattle
The Private Brands Discovery team designs innovative machine learning solutions to drive customer awareness for Amazon’s own brands and help customers discover products they love. Private Brands Discovery is an interdisciplinary team of Scientists and Engineers, who incubate and build disruptive solutions using cutting-edge technology to solve some of the toughest science problems at Amazon. To this end, the team employs methods from Natural Language Processing, Deep learning, multi-armed bandits and reinforcement learning, Bayesian Optimization, causal and statistical inference, and econometrics to drive discovery across the customer journey. Our solutions are crucial for the success of Amazon’s own brands and serve as a beacon for discovery solutions across Amazon. This is a high visibility opportunity for someone who wants to have business impact, dive deep into large-scale problems, enable measurable actions on the consumer economy, and work closely with scientists and engineers. As a scientist, you bring business and industry context to science and technology decisions. You set the standard for scientific excellence and make decisions that affect the way we build and integrate algorithms. Your solutions are exemplary in terms of algorithm design, clarity, model structure, efficiency, and extensibility. You tackle intrinsically hard problems, acquiring expertise as needed. You decompose complex problems into straightforward solutions.. With a focus on bias for action, this individual will be able to work equally well with Science, Engineering, Economics and business teams. Key job responsibilities - 5+ yrs of relevant, broad research experience after PhD degree or equivalent. - Advanced expertise and knowledge of applying observational causal interference methods - Strong background in statistics methodology, applications to business problems, and/or big data. - Ability to work in a fast-paced business environment. - Strong research track record. - Effective verbal and written communications skills with both economists and non-economist audiences.
US, WA, Seattle
The AWS Marketplace & Partner Services Science team is hiring an Applied Scientist to develop science products that support AWS initiatives to grow AWS Partners. The team is seeking candidates with strong background in machine learning and engineering, creativity, curiosity, and great business judgment. As an applied scientist on the team, you will work on targeting and lead prioritization related AI/ML products, recommendation systems, and deliver them into the production ecosystem. You are comfortable with ambiguity and have a deep understanding of ML algorithms and an analytical mindset. You are capable of summarizing complex data and models through clear visual and written explanations. You thrive in a collaborative environment and are passionate about learning. Key job responsibilities - Work with scientists, product managers and engineers to deliver high-quality science products - Experiment with large amounts of data to deliver the best possible science solutions - Design, build, and deploy innovative ML solutions to impact AWS Co-Sell initiatives About the team The AWS Marketplace & Partner Services team is the center of Analytics, Insights, and Science supporting the AWS Specialist Partner Organization on its mission to provide customers with an outstanding experience while working with AWS partners. The Science team supports science models and recommendation systems that are deployed directly to AWS Customers, AWS partners, and internal AWS Sellers.
US, WA, Seattle
The People eXperience and Technology (PXT) Central Science Team uses economics, behavioral science, statistics, and machine learning to proactively identify mechanisms, process improvements and products, which simultaneously improve Amazon and the lives, wellbeing, and the value of work of Amazonians. We are an interdisciplinary team which combines the talents of science and engineering to develop and deliver solutions that measurably achieve this goal. We invest in innovation and rapid prototyping of scientific models, AI/ML technologies and software solutions to accelerate informed, accurate, and reliable decision backed by science and data. As a research scientist you will you will design and carry out surveys to address business questions; analyze survey and other forms of data with regression models; perform weighting and multiple imputation to reduce bias due to nonresponse. You will conduct methodological and statistical research to understand the quality of survey data. You will work with economists, engineers, and computer scientists to select samples, draft and test survey questions, calculate nonresponse adjusted weights, and estimate regression models on large scale data. You will evaluate, diagnose, understand, and surface drivers and moderators for key research streams, including (but are not limited to) attrition, engagement, productivity, inclusion, and Amazon culture. Key job responsibilities Help to design and execute a scalable global content development and validation strategy to drive more effective decisions and improve the employee experience across all of Amazon Conduct psychometric and econometric analyses to evaluate integrity and practical application of survey questions and data Identify and execute research streams to evaluate how to mitigate or remove sources of measurement error Partner closely and drive effective collaborations across multi-disciplinary research and product teams Manage full life cycle of large-scale research programs (Develop strategy, gather requirements, manage and execute)
US, WA, Seattle
The Artificial General Intelligence (AGI) team is looking for a passionate, talented, and inventive Applied Scientist with a strong deep learning background, to build industry-leading Generative Artificial Intelligence (GenAI) technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities - Leverage Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in generative artificial intelligence (GenAI). - Work with talented peers to lead the development of novel algorithms and modeling techniques to advance the state of the art with LLMs. - Collaborate with other science and engineering teams as well as business stakeholders to maximize the velocity and impact of your contributions. About the team It's an exciting time to be a leader in AI research. In Amazon's AGI Information team, you can make your mark by improving information-driven experiences of Amazon customers worldwide. Your work will directly impact our customers in the form of products and services that make use of language and multimodal technology!
US, WA, Seattle
Are you excited about developing foundation models to revolutionize automation, robotics and computer vision? Are you looking for opportunities to build and deploy them on real problems at truly vast scale? At Amazon Fulfillment Technologies and Robotics we are on a mission to build high-performance autonomous systems that perceive and act to further improve our world-class customer experience - at Amazon scale. We are looking for collaborative scientists, engineers and program managers for a variety of roles. The Amazon Robotics software team is seeking an experienced and senior Applied Scientist to focus on computer vision machine learning models. This includes building multi-viewpoint and time-series computer vision systems. It includes building large-scale models using data from many different tasks and scenes. This work spans from basic research such as cross domain training, to experimenting on prototype in the lab, to running wide-scale A/B tests on robots in our facilities. Key job responsibilities * Research vision - Where should we be focusing our efforts * Research delivery – Proving/dis-proving strategies in offline data or in the lab * Production studies - Insights from production data or ad-hoc experimentation. A day in the life Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply!
US, CA, East Palo Alto
The Customer Engagement Technology team leads AI/LLM-driven customer experience transformation using task-oriented dialogue systems. We develop multi-modal, multi-turn, goal-oriented dialog systems that can handle customer issues at Amazon scale across multiple languages. These systems are designed to adapt to changing company policies and invoke correct APIs to automate solutions to customer problems. Additionally, we enhance associate productivity through response/action recommendation, summarization to capture conversation context succinctly, retrieving precise information from documents to provide useful information to the agent, and machine translation to facilitate smoother conversations when the customer and agent speak different languages. Key job responsibilities Research and development of LLM-based chatbots and conversational AI systems for customer service applications. Design and implement state-of-the-art NLP and ML models for tasks such as language understanding, dialogue management, and response generation. Collaborate with cross-functional teams, including data scientists, software engineers, and product managers, to integrate LLM-based solutions into Amazon's customer service platforms. 4. Develop and implement strategies for data collection, annotation, and model training to ensure high-quality and robust performance of the chatbots. Conduct experiments and evaluations to measure the performance of the developed models and systems, and identify areas for improvement. Stay up-to-date with the latest advancements in NLP, LLMs, and conversational AI, and explore opportunities to incorporate new techniques and technologies into Amazon's customer service solutions. Collaborate with internal and external research communities, participate in conferences and publications, and contribute to the advancement of the field. A day in the life Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply!