﻿ 基于形态学滤波的反电动势过零检测算法
 哈尔滨工业大学学报  2021, Vol. 53 Issue (1): 139-146  DOI: 10.11918/201910104 0

### 引用本文

LIU Wenjie, FENG Ming. Zero-crossing detection algorithm of Back-EMF based on morphological filtering[J]. Journal of Harbin Institute of Technology, 2021, 53(1): 139-146. DOI: 10.11918/201910104.

### 文章历史

Zero-crossing detection algorithm of Back-EMF based on morphological filtering
LIU Wenjie, FENG Ming
School of Mechanical Engineering, University of Science and Technology Beijing, Beijing 100083, China
Abstract: In order to overcome the shortcomings of the traditional Back Electromotive Force(BEMF) Detection Algorithm, such as filtering delay and error of phase compensation, the morphological filtering is applied to two-dimensional signal to design a digital filter with fixed delay, which makes the filtering delay not to change with the speed and no additional sampling circuit is needed. At the same time, the digital phase-locked loop algorithm is used to improve the delay algorithm of back EMF zero crossing. According to the above methods, a simulation model is built and a controller of brushless DC motor is designed. The simulation and experimental results show that this new BEMF detection algorithm can improve the rotor position detection accuracy of brushless DC motors effectively, and make the control accuracy of speed fluctuations reach the level of one ten thousandth.
Keywords: brushless DC motor    rotor position detection    back electromotive force    mathematical morphology    phase lock loop

1 反电动势检测法

 图 1 无刷直流电机控制系统 Fig. 1 Control system of brushless DC motor

 图 2 反电动势检测电路 Fig. 2 Detection circuit of back electromotive force

 图 3 三相端电压及虚拟中性点电压波形 Fig. 3 Three-phase terminal voltage and virtual neutral voltage waveforms
 图 4 三相过零点信号 Fig. 4 Zero-crossing of three-phase BEMF

 $\theta = \left\{ {\begin{array}{*{20}{c}} {30^\circ , }&{ - \varphi \left( \omega \right)\varphi \left( \omega \right) < {\rm{ \mathsf{ π} }}/6;}\\ {90^\circ , }&{ - \varphi \left( \omega \right)\varphi \left( \omega \right) > {\rm{ \mathsf{ π} }}/6.} \end{array}} \right.$ (1)

2 固定延时的形态学滤波算法

 ${A \ominus B = \left\{ {x, y|{{\left( B \right)}_{xy}} \subseteq A} \right\}, }$ (2)
 ${A \oplus B = \left\{ {x, y|{{\left( B \right)}_{xy}} \cap A \ne \phi } \right\}.}$ (3)

 $\begin{array}{l} {f_1}\left( s \right) = s\& s\_{\rm{delay}}, \\ {f_2}\left( s \right) = s||s\_{\rm{delay}}. \end{array}$ (4)

 $F = {f_1}\left( {{f_2}\left( s \right)} \right).$ (5)

 图 5 形态学滤波后处理算法框图 Fig. 5 Morphological filtering post-processing algorithm

 图 7 滤波算法仿真结果 Fig. 7 Simulation results of filtering algorithm
3 锁相环算法

 图 8 鉴频鉴相器PFD原理图 Fig. 8 Schematic diagram of PFD

 图 10 锁相环模型仿真结果 Fig. 10 Simulation results of phase-locked loop model
4 反电动势过零点30°延时算法

 图 11 30°延时锁相环模型 Fig. 11 Phase-locked loop model of 30° delay

 图 13 延时模型仿真结果 Fig. 13 Simulation results of delay model
5 实验

 图 14 实验装置 Fig. 14 Experimental devices

1) 固定延时滤波算法实验：为了验证本文设计的滤波算法的有效性，使电机分别运行在5 000 r/min和10 000 r/min进行实验.为了延时时间的测量方便，在满占空比条件下进行测量.实验结果如图 15所示，通道1为端电压信号，通道2为端电压与中性点比较所得的过零点方波信号.通道3为对通道2的方波信号进行数字滤波所得.可以看到端电压中存在由换相导致的续流尖峰并且直接造成了与中性点比较获得的过零信号中含有错误的过零信息.而滤波后的信号则完全消除了假过零点，说明该算法可以非常良好地去除虚假过零点，并且延时时间不随转速变化.在5 000 r/min和10 000 r/min的滤波延时都是0.4 ms.

 图 15 端电压及反电动势过零信号波形 Fig. 15 Terminal voltage and zero-crossing signal waveforms

2) 反电势换相实验：为了获得换相位置，需要对过零信号进行延时. 图 16(a)为改进的检测算法的波形图.可以看到换相信号被准确地延时到理论换相位置，采集到的端电压波形也十分接近梯形，说明换相准确. 图 16(b)则为传统的反电动势检测算法波形，端电压出现畸变，梯形反电动势出现不对称.对比实验结果可以看到，改进算法可以有效地提高位置检测的精度.

 图 16 反电动势换相波形 Fig. 16 Commutation waveform of BEMF

3) 调速实验：由于锁相环的相位跟踪特性，可以将其运用在电机调速中.在本文的设计中，将电机反电动势与中性点比较得到的方波信号作为VCO输出，这样就构造出了锁相环回路.当给定参考信号，反电动势方波信号将被锁相到参考信号.这样即可实现锁相环调速.实验结果如图 17所示.

 图 17 动态转速 Fig. 17 Dynamic speed

 $\delta = \frac{{{n_{{\rm{max}}}} - {n_{{\rm{min}}}}}}{{2*{n_{{\rm{ave}}}}}} = \frac{{7201.65 - 7198.86}}{{2 \times 7200.28}} = 1.94 \times {10^{ - 4}}.$ (6)

6 结论