当前位置: 首页 > news >正文

两个频率比较接近的简谐振动叠加后会产生拍形

两个频率比较接近的简谐振动叠加后会产生拍形。
在这里插入图片描述

import numpy as np
import matplotlib.pyplot as plt# Parameters
f1 = 10.0  # Frequency of the first vibration (Hz)
f2 = 10.5  # Frequency of the second vibration (Hz)
t_max = 10  # Time range (seconds)
t = np.linspace(0, t_max, 1000)  # Time array# Generate two simple harmonic vibrations
A = 1.0  # Amplitude
x1 = A * np.sin(2 * np.pi * f1 * t)  # First simple harmonic vibration
x2 = A * np.sin(2 * np.pi * f2 * t)  # Second simple harmonic vibration# Superimpose the two vibrations
x_total = x1 + x2# Plot the results
plt.figure(figsize=(12, 6))# Plot the individual vibrations
plt.subplot(3, 1, 1)
plt.plot(t, x1, label=f'f1 = {f1} Hz')
plt.plot(t, x2, label=f'f2 = {f2} Hz')
plt.title("Individual Simple Harmonic Vibrations")
plt.xlabel("Time (s)")
plt.ylabel("Amplitude")
plt.legend()# Plot the superimposed vibration
plt.subplot(3, 1, 2)
plt.plot(t, x_total, label='Superimposed Vibration')
plt.title("Superimposed Vibration")
plt.xlabel("Time (s)")
plt.ylabel("Amplitude")
plt.legend()# Plot the envelope of the beats
beat_frequency = abs(f2 - f1)  # Beat frequency
envelope = 2 * A * np.abs(np.cos(2 * np.pi * beat_frequency * t / 2))
plt.subplot(3, 1, 3)
plt.plot(t, x_total, label='Superimposed Vibration')
plt.plot(t, envelope, label='Envelope', linestyle='--', color='red')
plt.plot(t, -envelope, label='Envelope', linestyle='--', color='red')
plt.title("Beat Phenomenon Envelope")
plt.xlabel("Time (s)")
plt.ylabel("Amplitude")
plt.legend()plt.tight_layout()
plt.show()
http://www.xdnf.cn/news/715735.html

相关文章:

  • C#学习:基于LLM的简历评估程序
  • 4. 算法与分析 (1)
  • 【Dify系列教程重置精品版】第十一章:Dify与slenium
  • Flutter下的一点实践
  • 手动移植FreeRTOS
  • 用 Python 模拟雪花飘落效果
  • Oracle 临时表空间详解
  • Oracle的NVL函数
  • 前端面试题-HTML篇
  • C++:栈帧、命名空间、引用
  • 第三章:地下三层的技术遗产
  • JaCoCo 是什么
  • 系统架构设计师案例分析----经典架构风格特点
  • 挡片/测试晶圆(Dummy Wafer)通俗解析
  • 非线性声学计算与强化学习融合框架:突破复杂环境人机交互的新技术
  • C++进阶--C++11(04)
  • Golang 配置国内代理
  • Android高级开发第二篇 - JNI 参数传递与 Java → C → Java 双向调用
  • 【第4章 图像与视频】4.5 操作图像的像素
  • FastAPI JWT和hash加密
  • 数据中台系统是什么意思?如何实现数据中台的搭建?
  • MySQL JSON数据存储结构与操作
  • 几款主流V30、V60、V90相机SD卡的评测(索尼、闪迪、三星、雷克沙)
  • ultraiso制作U盘镜像 针对win2012及win2016等需要特殊处理
  • Python训练营打卡 Day39
  • 4 串电池保护芯片创芯微CM1341-DAT使用介绍
  • 板凳-------Mysql cookbook学习 (八--2)
  • [yolov11改进系列]基于yolov11引入倒置残差块块注意力机制iEMA的python源码+训练源码
  • 面向低端设备的移动网页调试策略:WebDebugX 在性能瓶颈分析中的应用
  • 1 µs = 10⁻⁶ s