Files
graduation-project/main.adoc

216 lines
10 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

= 基于 CNN 和 MEMS 的边缘计算振动检测设备
曹王仁博 <cao.wangrenbo@yandex.com>
2024.03.11
:toc: auto
:stem: latexmath
== 摘要
随着物联网 (IoT) 和工业 4.0 的快速发展,对实时监测和分析振动数据的需求不断增长。传统的振动监测系统通常依赖于中心服务器进行数据处理,这会带来延迟和数据传输成本高昂的问题。为了解决这些问题,本文提出了一种基于卷积神经网络 (CNN) 和微机电系统 (MEMS) 的边缘计算振动检测设备。该设备能够在本地进行实时振动分析,并通过无线网络将结果传输到远程服务器。
=== 研究现状
传统的振动监测系统通常由传感器、数据采集器和中心服务器组成。传感器负责采集振动数据,数据采集器负责将数据传输到中心服务器,中心服务器负责进行数据分析和处理。这种模式存在以下问题:
- 调试过程复杂:传统方案主要依靠专家针对测得的信号进行时域和频域特征的分析,通过尝试合适的算法提取振动特征,对于不同的设备需要专门化处理,对于复杂场景的快速部署是不利的。
- 数据延迟:由于数据需要传输到中心服务器进行处理,因此会存在一定的延迟,这对于需要实时监测的应用来说是不可接受的。
数据传输成本高昂:对于大型监测系统,需要传输大量数据,这会带来高昂的数据传输成本。
- 安全性和可靠性问题:中心服务器容易受到攻击和故障的影响,这会影响系统的安全性和可靠性。
=== 边缘计算
边缘计算是一种将计算资源从中心服务器迁移到边缘设备的新兴技术。边缘设备可以是任何靠近数据源的设备,例如智能手机、智能传感器和网关。边缘计算可以有效解决传统模式存在的延迟、成本和安全问题。
=== CNN 和 MEMS
CNN 是一种深度学习算法在图像识别和自然语言处理等领域取得了巨大成功。CNN 也可用于振动信号分析。MEMS 是一种微型机电系统可以用于制造微型传感器。MEMS 传感器可以用于采集振动数据。
=== 本文提出的设备
本文提出的设备由以下部分组成:
- MEMS 传感器:用于采集振动数据。
- CNN 处理器:用于进行实时振动分析。
- 无线通信模块:用于将分析结果传输到远程服务器。
本文提出了一种基于 CNN 和 MEMS 的边缘计算振动检测设备。该设备能够在本地进行实时振动分析,并通过无线网络将结果传输到远程服务器。该设备可以有效解决传统振动监测系统存在的延迟、成本和安全问题。
关键词振动监测、边缘计算、CNN、MEMS
== Abstract
With the rapid development of the Internet of Things (IoT) and Industry 4.0, there is a growing need for real-time monitoring and analysis of vibration data. Traditional vibration monitoring systems typically rely on a central server for data processing, which introduces problems with latency and high data transmission costs. To address these issues, this paper proposes an edge computing vibration detection device based on convolutional neural networks (CNN) and micro-electromechanical systems (MEMS). The device is capable of performing real-time vibration analysis locally and transmitting the results to a remote server via wireless network.
=== Current status of research
Traditional vibration monitoring systems usually consist of sensors, data collectors and central servers. The sensor is responsible for collecting vibration data, the data collector is responsible for transmitting the data to the central server, and the central server is responsible for data analysis and processing. This model has the following problems:
- The debugging process is complex: Traditional solutions mainly rely on experts to analyze the time domain and frequency domain characteristics of the measured signals, and extract vibration characteristics by trying appropriate algorithms. Specialized processing is required for different equipment, and rapid deployment in complex scenarios is Adverse.
- Data delay: Since the data needs to be transmitted to the central server for processing, there will be a certain delay, which is unacceptable for applications that require real-time monitoring.
Data transmission costs are high: For large monitoring systems, a large amount of data needs to be transmitted, which will bring high data transmission costs.
- Security and reliability issues: Central servers are vulnerable to attacks and failures, which can affect the security and reliability of the system.
=== Edge Computing
Edge computing is an emerging technology that migrates computing resources from central servers to edge devices. An edge device can be any device that is close to the data source, such as smartphones, smart sensors, and gateways. Edge computing can effectively solve the latency, cost and security issues of traditional models.
=== CNN and MEMS
CNN is a deep learning algorithm that has achieved great success in areas such as image recognition and natural language processing. CNN can also be used for vibration signal analysis. MEMS are microelectromechanical systems that can be used to create tiny sensors. MEMS sensors can be used to collect vibration data.
=== Equipment proposed in this article
The device proposed in this article consists of the following parts:
- MEMS sensors: used to collect vibration data.
- CNN processor: for real-time vibration analysis.
- Wireless communication module: used to transmit analysis results to a remote server.
This paper proposes an edge computing vibration detection device based on CNN and MEMS. The device is capable of performing real-time vibration analysis locally and transmitting the results to a remote server via wireless network. This device can effectively solve the delay, cost and safety problems of traditional vibration monitoring systems.
Keywords: vibration monitoring, edge computing, CNN, MEMS
== 绪论
// 和摘要有点冲突,后面再改
=== 引言
=== 振动检测设备的研究现状
== 基于 CNN 和 MEMS 的边缘计算振动检测设备硬件设计
=== 设备主控模块设计
设计要求能够运行裁剪后的卷积神经网络 (CNN),对于处理器的存储和运算处理能力有一定要求。此外,还要求有一定的耐候性要求,以应对家用或者环境较为恶劣的工业场景。同时考虑作为消费级设备的成本问题,本文设计的振动检测设备的主控核心选用意法半导体的 STM32F405RGT6。另外考虑国产化要求同时选用可 Pin to Pin 替代的 GD32F405RGT6 进行替换测试,该芯片对于本设计所需性能参数要优于 STM32F405RGT6。对于 STM32F405RGT6其架构如图所示。
image:doc_attachments/2024-03-11T03-02-23-728Z.png[STM32F405RG 系统框图]
STM32F405RGT6 基于高性能 Arm® Cortex®-M4 32 位 RISC 内核,运行频率可达 168 MHz。Cortex-M4 内核具有浮点单元FPU单精度支持所有 Arm 单精度数据处理指令和数据类型。它还实现了完整的 DSP 指令和内存保护单元 (MPU),可增强应用程序安全性。
STM32F405RGT6 采用高速嵌入式存储器1 Mbyte 闪存和 192 KB SRAM、4 KB 备份 SRAM以及广泛的增强型 I/O 和外设,连接到两个 APB 总线、3 条 AHB 总线和 1 个 32 位多 AHB 总线矩阵。提供三个 12 位 ADC、两个 DAC、一个低功耗 RTC、多个定时器以及标准和高级功能通讯接口。
工作温度范围为 40 至 +105 °C
image:doc_attachments/2024-03-11T03-29-49-397Z.png[主控电路原理图]
主控部分的电路由电源、复位电路、启动选择电路、外部高速时钟、外部低速时钟组成。
其中电源部分结合本设计中不考虑器件低功耗运行的情况,使用一个 3.3V 为多个供电域直接供电,并外接退耦和滤波电容,降低开关噪声和电压跌落对主控造成的影响。
复位部分由于芯片内部有一个 40K 的上拉电阻,所以仅需外接一个 0.1uF 的陶瓷电容和一个按键,该电路在上电和按键按下时,可以将 NRST 引脚电平拉低到
[stem]
++++
V_{IL(NRST)}=0.3V_{DD}\approx0.99V
++++
以下,并持续超过
[stem]
++++
T_{NRST} = 20us
++++
的时间
=== 设备电源模块设计
image:doc_attachments/2024-03-11T13-29-59-494Z.png[电源电路原理图]
本文设计的设备采用工业上常见的 12-24V 直流电源供电需要给主控、温度和加速度传感器、485 通信模块等供电。
由于主控和传感器供电电压较小,而输入电压较大,所以设计为两级降压方式。先使用开关电源芯片将电压降至 5V再使用 LDO 芯片将电压降至 3.3V。这样的设计提高了电源效率,同时降低了输入主控和传感器的开关噪声。
image:doc_attachments/2024-03-12T04-30-03-730Z.png[供电结构]
==== SGM6132 设计计算
SGM6132 为一款标称 3A28.5V1.4MHz 的异步开关电源转换芯片,典型应用电路如图所示。
image:doc_attachments/2024-03-12T08-54-01-296Z.png[SGM6132 典型应用电路]
根据本文应用需求,主要设计的计算有电感 L、反馈分压电阻 R1 R2、续流二极管 D1。
===== 反馈电阻 R1 R2 设计
对于反馈电阻 R1 R2
[stem]
++++
V_{FB} = V_{OUT}\frac{R2}{R1+R2}
++++
其中,根据数据手册得
[stem]
++++
V_{FB} = 0.8V
++++
又有要求
[stem]
++++
R2 < 100k\Omega
++++
故选择
[stem]
++++
R2 = 10k\Omega
R1 = 52.3k\Omega
++++
计算得
[stem]
++++
V_{OUT} = 0.8\times\frac{R1+R2}{R2} = 0.8\times\frac{10+52.3}{10} = 4.984V
++++
该输出电压满足后级 LDO 的最小压降。
===== 电感 L 设计
[stem]
++++
L = \frac{V_{OUT}}{f_{OSC}\times{\Delta}I_L}\times(1-\frac{V_{OUT}}{V_{IN}})
++++
其中
[stem]
++++
时钟频率 f_{OSC} = 1.4MHz
输入电压 V_{IN} = 24V
峰峰电流值 {\Delta}I_L = 30\% \times I_L
最大峰值电流 I_L = I_{LOAD} + \frac{V_{OUT}}{2 \times f_{OSC} \times L} \times (1 - \frac{V_{OUT}}{V_{IN}})
++++
设计负载电流 1.7A
所以有
[stem]
++++
I_L = 2.000A
++++
代入得
[stem]
++++
L = 4.712 \times 10^{-6} H = 4.712 uH
++++
就近取标准功率电感值
[stem]
++++
L = 4.7uH
++++
===== 续流二极管 D1 设计
为了减小二极管正向导通损失和恢复时间,续流二极管类型选择肖特基二极管。要求其最大反向电压大于最大输入电压,最大过流能力大于最大负载电流。
按照该需求选择 D1 型号为 SS34。