Ultrasonic motor rotating speed measuring system based on TMR sensor
The TMR sensor system, which utilizes hardware synchronization and a three-dimensional nonlinear mapping model, solves the problems of electromagnetic interference and temperature drift noise in ultrasonic motor speed measurement, achieving high-precision speed measurement and adapting to the dynamic changes of the motor over a wide frequency range.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-28
AI Technical Summary
The ultrasonic motor speed measurement system suffers from problems such as high-frequency electromagnetic interference, changes in rotor operating state due to contact measurement, and low measurement accuracy due to timing jitter and temperature drift noise caused by software-triggered sampling in non-contact measurement.
An ultrasonic motor speed measurement system based on a TMR sensor is adopted. By triggering analog-to-digital conversion with hardware synchronization signal, a three-dimensional nonlinear mapping model of drive frequency, ambient temperature and rotor speed is constructed. The cutoff frequency of the bandpass filter is dynamically set, and combined with temperature compensation and adaptive hysteresis threshold algorithm, the real-time processing of signal and accurate speed calculation are realized.
It eliminates timing jitter introduced by software triggering, suppresses high-frequency electromagnetic interference and temperature drift noise, improves the signal-to-noise ratio of the measurement signal and the stability of speed calculation, and ensures the speed measurement accuracy across the entire temperature range.
Smart Images

Figure CN121933756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasonic motor testing technology, specifically to an ultrasonic motor speed measurement system based on a TMR sensor. Background Technology
[0002] Ultrasonic motors utilize the inverse piezoelectric effect of piezoelectric ceramics to generate ultrasonic vibrations and drive a rotor through frictional coupling, finding wide application in precision positioning and aerospace. Rotational speed is a core parameter for evaluating the operating status of ultrasonic motors. Traditional contact measurement methods, which involve adding photoelectric encoders or tachogenerators to the shaft, introduce additional rotational inertia and frictional loads, altering the motor's mechanical resonance characteristics and making them unsuitable for measuring miniature ultrasonic motors. Therefore, non-contact measurement techniques based on magnetic field induction have become a research hotspot.
[0003] However, in practical applications, measurement systems based on tunnel magnetoresistive (TMR) sensors face challenges related to signal interference and environmental adaptability. Ultrasonic motors are driven by high-frequency, high-voltage alternating current fields, and the electromagnetic radiation generated by the drive signal couples into the sensor circuit, creating broadband background noise. Existing measurement solutions typically employ filters with fixed parameters, which struggle to adapt to the wide dynamic range of the ultrasonic motor's drive frequency during speed adjustments, leading to a significant decrease in the signal-to-noise ratio of the measurement signal under specific operating conditions.
[0004] Furthermore, ultrasonic motors transmit torque through friction between the stator and rotor, generating significant heat during operation and causing an increase in the ambient temperature. Magnetoresistive sensors inherently possess temperature sensitivity; temperature changes cause a drift in the DC baseline of the signal. Simultaneously, the axial vibration of the motor alters the air gap between the sensor and the magnetic ring, leading to fluctuations in the amplitude of the induced signal. Existing signal processing circuits often employ fixed voltage comparison thresholds for shaping, which can easily result in pulse loss or counting errors when the signal baseline drifts or the amplitude attenuates.
[0005] Regarding data acquisition architecture, existing measurement systems typically rely on software instructions to read the drive frequency and sensor signals separately. Due to the uncertainty of microprocessor instruction execution cycles and task scheduling, there is a random time delay between the occurrence of the drive signal and the sampling time of the sensor. This acquisition method, lacking a unified hardware-level time reference, introduces timing jitter, making it difficult to meet the requirements for synchronous analysis of the transient response characteristics of ultrasonic motors. Summary of the Invention
[0006] To address the problems in existing technologies, such as the susceptibility of ultrasonic motor speed measurement to high-frequency electromagnetic interference, the alteration of rotor operating state by contact measurement, and the low measurement accuracy caused by timing jitter and temperature drift noise in software-triggered sampling during non-contact measurement, this invention provides an ultrasonic motor speed measurement system based on a TMR sensor.
[0007] To achieve the above objectives, the present invention provides the following technical solution: An ultrasonic motor speed measurement system based on a TMR sensor includes a standard motor assembly, a displacement stage, a TMR sensor, a thermocouple, a host computer, and a microcontroller. The standard motor assembly includes a power transformer, a signal generator, a power amplifier module, and a motor body with a magnetic ring on the rotor end face. The displacement stage is fixedly connected to the motor body. The TMR sensor is positioned below the rotor of the motor body. The thermocouple is positioned near the motor body. The host computer is communicatively connected to the microcontroller. The microcontroller is electrically connected to the TMR sensor, the signal generator, the host computer, and the thermocouple. The synchronous signal output port of the signal generator is connected to the timer input capture port of the microcontroller. The microcontroller uses the trigger signal of a general-purpose timer to activate the analog-to-digital converter, which synchronously triggers sampling of the TMR sensor when the edge of the drive signal output by the signal generator arrives.
[0008] Preferably, the microcontroller executes offline calibration logic: controlling the standard motor assembly to perform a full-band stepped frequency sweep, and extracting the speed reference value and speed signal reference amplitude using a spectrum analysis algorithm under steady-state no-load conditions; constructing and storing a multi-dimensional nonlinear mapping model describing the correspondence between the drive frequency, ambient temperature, speed signal reference amplitude, and rotor speed. This model is used to predict the speed range and theoretical signal amplitude based on drive parameters and environmental conditions in subsequent measurements, providing a priori basis for filter parameter setting and system health verification.
[0009] Preferably, the microcontroller executes frequency calculation logic in online measurement mode: it uses the timer input capture port to obtain the numerical difference between two consecutive capture registers, and calculates the real-time drive frequency by combining this with the timer's counting clock frequency; wherein, the real-time drive frequency is calculated using a frequency calculation formula. This method achieves real-time hardware acquisition of the drive frequency, eliminating errors caused by software counting.
[0010] Preferably, the microcontroller executes baseline reconstruction logic: using the sampling result as the original magnetic field voltage signal; calculating the current zero-point offset using preset temperature drift characteristic parameters; and performing DC bias compensation on the original magnetic field voltage signal to generate a baseline correction signal; wherein, the baseline correction signal is calculated using a baseline reconstruction formula. This logic suppresses the zero-point drift of the TMR sensor caused by temperature changes, maintaining the baseline stability of signal processing.
[0011] Preferably, the microcontroller executes the dynamic filter parameter setting logic as follows: calling the multidimensional nonlinear mapping model; substituting the real-time drive frequency and the real-time ambient temperature collected by the thermocouple into the multidimensional nonlinear mapping model to estimate the rotor theoretical predicted rotational speed frequency; determining the lower cutoff frequency and upper cutoff frequency of the dynamic bandpass filter based on the rotor theoretical predicted rotational speed frequency; wherein the lower cutoff frequency and the upper cutoff frequency are calculated using the passband boundary calculation formula.
[0012] Preferably, the microcontroller executes digital filtering logic: configuring an infinite impulse response (IOR) filter using the lower cutoff frequency and the upper cutoff frequency; and using the IOR filter to perform digital bandpass filtering on the baseline correction signal, outputting a clean modulated signal. Through a combination of model prediction and dynamic filtering, power frequency interference and high-frequency drive carriers are adaptively filtered out, improving the signal-to-noise ratio.
[0013] Preferably, the microcontroller executes state verification logic: acquiring the amplitude and waveform distortion of the pure modulation signal; combining the amplitude of the pure modulation signal, the waveform distortion, and the real-time ambient temperature, performing a thermal-magnetic-vibration multi-physical quantity coupling operation state confidence verification, and calculating the system's health index; wherein, the health index is calculated using a state confidence evaluation formula. This logic is used to identify measurement anomalies caused by mechanical alignment deviations or thermal slippage, ensuring the reliability of the output data.
[0014] Preferably, the microcontroller executes threshold generation logic: performs real-time envelope tracking on the pure modulation signal; determines the current dynamic upper threshold and dynamic lower threshold based on the tracking results; wherein, the dynamic upper threshold and dynamic lower threshold are calculated using an adaptive hysteresis threshold calculation formula.
[0015] Preferably, the microcontroller executes pulse shaping logic: it performs a logical comparison of the clean modulation signal using the dynamic upper threshold and the dynamic lower threshold; when the value of the clean modulation signal is greater than the dynamic upper threshold, it outputs a logic high level; when the value of the clean modulation signal is less than the dynamic lower threshold, it outputs a logic low level, generating a digital square wave pulse sequence. Adaptive hysteresis comparison is used to overcome false triggering or waveform loss caused by signal amplitude fluctuations.
[0016] Preferably, the microcontroller executes the speed calculation logic as follows: capturing the rising edge event of the digital square wave pulse sequence; counting the average number of sampling points between two adjacent rising edges of the digital square wave pulse sequence; calculating the real-time speed of the motor rotor based on the average number of sampling points; and sending the calculated real-time speed of the motor rotor to the host computer; wherein the real-time speed of the motor rotor is calculated using a speed calculation formula.
[0017] This invention provides an ultrasonic motor speed measurement system based on a TMR sensor. It has the following advantages: 1. This invention connects the synchronization port of the signal generator to the input capture port of the microcontroller's timer and uses a hardware trigger signal to start the analog-to-digital conversion, thereby achieving hardware-level synchronization between the driving signal edge and the sensor sampling. This method eliminates the random timing jitter caused by traditional software instruction triggering, ensures the uniformity of the time base for multidimensional physical quantity acquisition, and improves the timing accuracy of the measurement data.
[0018] 2. This invention constructs a three-dimensional nonlinear mapping model of driving frequency, ambient temperature and rotor speed, and dynamically sets the cutoff frequency of the bandpass filter accordingly. By predicting the center of the rotational speed frequency through the model, the filter passband can follow the motor's operating state in real time, effectively suppressing high-frequency driving electromagnetic interference and power frequency noise generated when the ultrasonic motor is working, and improving the signal-to-noise ratio of the measurement signal.
[0019] 3. This invention adopts a baseline reconstruction logic that combines temperature compensation with an adaptive hysteresis threshold algorithm based on envelope tracking. By calculating the zero-point offset in real time and dynamically generating the comparison threshold, the system adapts to the DC drift and amplitude fluctuation of the TMR sensor caused by temperature and air gap changes, overcomes the false triggering problem that is easy to cause by fixed thresholds, and ensures the stability of speed calculation in the entire temperature range. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the overall architecture of an ultrasonic motor speed measurement system based on a TMR sensor according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the overall system workflow according to an embodiment of the present invention.
[0021] Among them, 100 is the displacement stage; 200 is the TMR sensor; 300 is the standard motor assembly; 310 is the power transformer; 320 is the signal generator; 330 is the power amplifier module; 340 is the motor body; 400 is the thermocouple; 500 is the microcontroller; and 600 is the host computer. Detailed Implementation
[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] See attached document Figure 1This invention provides an ultrasonic motor speed measurement system based on a TMR sensor. The system mainly includes: a displacement stage 100, a TMR sensor 200, a standard motor assembly 300, a thermocouple 400, a microcontroller 500, and a host computer 600.
[0024] A standard motor assembly 300, used to provide the rotational motion to be measured and the original drive excitation signal, includes a power transformer 310, a signal generator 320, a power amplifier module 330, and a motor body 340. The power transformer 310 converts the input AC mains power into the DC low-voltage power required by the system. The signal generator 320 generates an ultrasonic frequency domain drive signal with adjustable frequency and amplitude; this drive signal is a sine wave or square wave, and its frequency range covers the operating frequency band of the ultrasonic motor. The power amplifier module 330 receives the signal output from the signal generator 320 and amplifies it to drive the motor body 340. A multi-pole magnetic ring is provided on the rotor end face of the motor body 340; this magnetic ring rotates synchronously with the rotor, generating a periodically changing alternating magnetic field.
[0025] The displacement stage 100 serves as the mechanical support and adjustment structure of the system, used to fix the motor body 340. The displacement stage 100 has X-axis, Y-axis, and Z-axis spatial position adjustment functions, used to precisely adjust the spatial position of the motor body 340 relative to the TMR sensor 200. The TMR sensor 200 is fixedly installed below the rotor of the motor body 340 and is located within the effective sensing range of the rotor end face magnetic field. By adjusting the displacement stage 100, the air gap distance between the rotor magnetic end face and the TMR sensor 200 can be changed to obtain a magnetic field sensing signal with a satisfactory signal-to-noise ratio.
[0026] The TMR sensor 200 employs a tunnel magnetoresistive effect element, exhibiting megahertz-level frequency response characteristics. It is used to sense weak magnetic field changes caused by rotor rotation and convert them into analog voltage signals. Thermocouple 400 is installed near the stator-rotor contact interface of the motor body 340, or in the hot spot area of the motor housing, to sense the ambient temperature during motor operation in real time.
[0027] The microcontroller 500 serves as the core of the system's control and data processing, and is selected based on its floating-point arithmetic unit and direct memory access functionality. The microcontroller 500 establishes electrical connections with the TMR sensor 200, the standard motor assembly 300, and the thermocouple 400. The specific connections are as follows: the analog output of the TMR sensor 200 is connected to the first analog-to-digital converter input of the microcontroller 500 via a signal conditioning circuit; the signal output of the thermocouple 400 is connected to the second analog-to-digital converter input of the microcontroller 500 via a cold junction compensation circuit.
[0028] To achieve hardware synchronization between the drive excitation and the measurement signal, the signal generator 320 in the standard motor assembly 300 has a synchronization signal output port, which is directly connected to the timer input capture port of the microcontroller 500 via a wire. This connection allows the microcontroller 500 to obtain the current drive excitation frequency in real time via hardware interrupts or direct register reads, without the need for software estimation or additional frequency measurement circuitry. The microcontroller 500 also connects to the host computer 600 via a universal serial bus or universal asynchronous transceiver interface for data transmission and command interaction.
[0029] See attached document Figure 2 This includes the following steps: S1, the system powers on and executes the initialization program, configures the analog-to-digital converter and timer parameters, then reads the status flag bits in the non-volatile memory space, and generates the system's operating mode instruction according to preset logic or external control signals; S2, when the operating mode command indicates offline calibration mode, the standard motor is controlled to perform full-band stepped frequency sweep, and under steady-state no-load conditions, the speed reference value is extracted using the spectrum analysis algorithm, and a three-dimensional nonlinear mapping model describing the relationship between drive frequency, ambient temperature and rotor speed is constructed and stored. S3, when the operation mode instruction indicates online measurement mode, synchronously reads the magnetic field voltage of TMR sensor 200, the ambient temperature of thermocouple 400 and the drive excitation frequency of standard motor within a single clock cycle, and generates a synchronous acquisition data packet containing multi-dimensional physical quantities. S4, parse the synchronous acquisition data packet, calculate the current zero point offset using the preset temperature drift curve, and perform DC bias compensation on the magnetic field voltage data to generate a baseline correction signal that removes the influence of temperature drift. S5 calls the stored three-dimensional nonlinear mapping model, substitutes the drive excitation frequency and ambient temperature in the synchronous acquisition data packet into the model to estimate the theoretical speed range, sets the passband parameters of the dynamic bandpass filter accordingly, performs digital filtering on the baseline correction signal, and generates a pure modulation signal. S6 performs feature analysis on the pure modulation signal, calculates the harmonic distortion and amplitude attenuation rate of the signal, and combines the ambient temperature to determine the current mechanical coupling state and thermodynamic state, and generates a verification status code indicating the health status of the system. S7. When the verification status code indicates that the status is normal, the dynamic hysteresis comparison algorithm is used to perform envelope tracking and waveform shaping on the pure modulation signal. By calculating the time interval of the shaped pulse sequence, the accurate rotation speed value is obtained. S8 packages the calculated rotational speed, real-time ambient temperature, and verification status code and sends them to the host computer 600 for display and recording via the serial communication interface.
[0030] The technical implementation details of each of the above steps will be explained in detail below, combining specific mathematical models and signal processing algorithms.
[0031] After the system powers on, the 500 microcontroller executes the initialization configuration and operating mode determination logic, which includes the following sub-steps: Step S11 involves configuring the registers and setting the timing synchronization for key hardware peripherals. The microcontroller 500 resets all peripheral clocks and loads parameters for the analog-to-digital converter, general-purpose timer, and input capture port. For the analog-to-digital converter, it is configured in double-buffered direct memory access mode, with a sampling resolution set to 12 bits. Its conversion trigger source is configured to respond to the external synchronization signal to ensure the sampling frequency covers the effective frequency band of the rotor rotation. For the channel connected to the TMR sensor 200, the operational amplifier gain parameters are configured to match the sensor output amplitude.
[0032] For the hardware synchronous acquisition mechanism of this invention, the microcontroller 500 is configured with a general-purpose timer input capture channel. Since the synchronization signal output port of the signal generator 320 in the standard motor assembly 300 is physically connected to the timer input capture port of the microcontroller 500, the microcontroller 500 maps this pin as a capture input source and configures the trigger polarity as rising edge trigger. To achieve strict synchronization between the drive excitation and the measurement signal, the microcontroller 500 configures the update event or output trigger signal of this general-purpose timer as the conversion start trigger source for the analog-to-digital converter. When the edge of the drive signal output by the signal generator 320 arrives, the timer performs phase latching, and the timer's count overflow or a specific comparison event directly triggers the analog-to-digital converter to sample the signal from the TMR sensor 200. This ensures, at the hardware electrical level, that the time base for drive frequency measurement and magnetic field signal acquisition is unified, eliminating random delays caused by software instruction execution.
[0033] Step S12 initializes the non-volatile storage area and communication buffer used to store the nonlinear mapping model. The microcontroller 500 allocates two circular buffers in the random access memory (RAM) to temporarily store the real-time acquired magnetic field data stream from the TMR sensor 200 and intermediate variables during the calculation process, respectively. Simultaneously, the microcontroller 500 defines the address space layout of its internal non-volatile memory, dividing it into a model flag bit area, a calibration parameter storage area, and a verification log area.
[0034] Step S13 executes the automatic judgment logic and state switching of the running mode instruction. The microcontroller 500 reads specific address data from the model flag bit area in the non-volatile memory and compares this data with a preset valid checksum. Simultaneously, the microcontroller 500 checks the receive buffer of the serial communication interface connected to the host computer 600.
[0035] If the serial communication interface receives a forced calibration command, or the data read from the model flag bit area is not equal to the preset valid check code, it indicates that a valid drive speed characteristic model is not currently stored. The microcontroller 500 will switch the system running state to offline self-learning calibration mode and prepare to execute the full-band frequency sweep task.
[0036] If the serial communication interface does not receive a forced calibration command, and the data in the model flag area is equal to the preset valid check code, it indicates that a verified drive speed characteristic model already exists. The microcontroller 500 then switches the system operation status to online real-time measurement mode. At this time, the microcontroller 500 loads the calibration parameters into the random access memory, preparing for real-time speed measurement.
[0037] Once the system enters offline self-learning calibration mode, the microcontroller 500 controls the standard motor assembly 300 to operate under preset conditions, and establishes a mapping relationship between drive parameters and motion state through high-precision spectrum analysis. This includes the following sub-steps: Step S21 executes full-band stepped frequency sweep excitation control under steady-state no-load conditions. The microcontroller 500 sends a frequency control command to the signal generator 320 in the standard motor assembly 300 via a serial communication interface or an analog voltage control interface. This control command causes the frequency of the drive signal generated by the signal generator 320 to change. From the starting frequency Initially, at a fixed frequency step size Increment by increment until the termination frequency is reached. This covers the entire effective operating frequency band of the motor body 340. At each frequency step point, the microcontroller 500 maintains the current control command unchanged and delays for a preset stabilization time. The microcontroller 500 uses this delay process to establish mechanical balance of the rotor speed of the motor body 340 and to achieve thermal equilibrium of the thermodynamic environment between the TMR sensor 200 and the rotor, thereby eliminating the impact of transient oscillations caused by frequency changes on calibration accuracy.
[0038] Step S22 involves extracting the true rotational speed based on long-term high-resolution spectrum analysis. At the end of the stabilization period at each frequency step point, the microcontroller 500 temporarily suspends the real-time measurement task and initiates a long-term data acquisition process. The microcontroller 500 controls the analog-to-digital converter to operate at a high sampling rate. The analog voltage signal output by the TMR sensor 200 is continuously sampled to obtain a length of... time-domain discrete signal sequence The 500 microcontroller employs a full-point Fast Fourier Transform algorithm to process signal sequences. A frequency domain transformation is performed to separate the fundamental component containing rotational speed information from the high-frequency drive carrier component.
[0039] The 500 microcontroller uses the Discrete Fourier Transform formula to calculate signal sequences. Frequency domain representation The formula for the Discrete Fourier Transform is: ; in, Represents the first element in the sampled time-domain discrete signal sequence. One sampling point; This represents the total number of sampling points, and this value determines the frequency resolution of the spectrum analysis; Represents the imaginary unit; Represents the discrete frequency index value in the frequency domain; This indicates the frequency index. The magnitude of the complex spectrum; This indicates that the sequence is summed.
[0040] After obtaining the frequency domain data, the microcontroller 500 executes spectrum peak search logic to determine the true value of the rotor speed. Since the mechanical rotation frequency of the motor body 340 is much lower than its ultrasonic drive frequency, the two have significant isolation in the frequency domain. The microcontroller 500 searches within a preset low-frequency range. Find the index of the spectral peak with the largest amplitude modulus. This range covers the 340 physical possible speed range of the motor body.
[0041] The 500 microcontroller uses a peak search formula to determine the true value of the rotor speed frequency. and speed signal reference amplitude The formula for peak search is: ; ; ; in, and These represent the minimum and maximum frequency index values corresponding to the preset search frequency band, respectively; Represents the magnitude of the spectral components; This represents the value of the independent variable when the function reaches its maximum value; Indicates the sampling frequency of the analog-to-digital converter; This represents the true value of the actual rotor speed frequency at the calculated drive frequency point. This represents the true value of the spectral amplitude of the speed signal under the current calibration conditions; This represents the index of the spectral peak with the largest amplitude modulus found. Through this step, the system obtains the reference true value required for calibration by utilizing the frequency domain separation characteristics without relying on an external encoder.
[0042] Step S23 involves constructing and storing a multi-dimensional mapping model that includes the drive frequency, ambient temperature, rotor speed, and signal amplitude. The microcontroller 500 synchronously reads the ambient temperature measured by thermocouple 400. and the actual drive frequency measured by the input capture port. The microcontroller 500 will extract the true value of the rotor speed and frequency. Speed signal reference amplitude With real-time drive frequency and ambient temperature Form a set of calibration data vectors.
[0043] After completing the full-band scan, the microcontroller 500 constructs a nonlinear mapping model using multiple sets of collected calibration data vectors. The microcontroller 500 generates a multidimensional look-up table from the calibration data vectors as multidimensional discrete nodes, or calculates polynomial regression coefficients using the least squares method, and writes this look-up table or regression coefficients into the calibration parameter storage area of its internal non-volatile memory. In subsequent online real-time measurement mode, the microcontroller 500 directly indexes this model, predicting the theoretical center value of the rotational speed and the theoretical standard amplitude of the signal based on the real-time acquired drive frequency and temperature, providing prior information for setting the window of the dynamic filter and verifying its health.
[0044] When the system is in online real-time measurement mode, the microcontroller 500 executes a hardware-timing-based synchronous acquisition task and performs temperature drift compensation on the raw signal, specifically including the following sub-steps: Step S31 executes hard synchronization acquisition of drive excitation and sensor response based on hardware input capture. The microcontroller 500 initiates the input capture function of the general-purpose timer and the direct memory access function of the analog-to-digital converter. The synchronization pulse signal output by the signal generator 320 in the standard motor assembly 300 is transmitted to the capture pin of the microcontroller 500 via physical lines.
[0045] The microcontroller 500 is configured with a general-purpose timer channel to detect the rising edge of the synchronization pulse and maps the timer's trigger output signal (TRGO) to either an external injection trigger source for the analog-to-digital converter (ADC) or a conventional group conversion trigger source. When the rising edge of the drive signal output by the signal generator 320 arrives, the general-purpose timer hardware latches the current time base counter value into the capture register. Immediately afterwards, the trigger signal generated by this timer directly initiates the ADC to sample and convert the output signal of the TMR sensor 200, and the conversion result is transferred to the random access memory (RAM) via the direct memory access channel. This mechanism ensures that the sampling time of the ADC is delayed by a fixed hardware period relative to the phase of the drive signal, eliminating timing jitter caused by software interrupt responses.
[0046] Step S32 calculates the real-time drive frequency and parses the synchronization data packet. The microcontroller 500 uses the difference between the values of two consecutive capture registers, combined with the timer's counting clock frequency, to calculate the current real-time drive frequency.
[0047] The 500 microcontroller uses a frequency calculation formula to calculate the real-time drive frequency. The formula for calculating frequency is: ; in, This represents the calculated current driving excitation frequency, i.e., the real-time driving frequency. Indicates the counting clock frequency of the general-purpose timer; This represents the count value captured in the current cycle; The denominator represents the count value captured in the previous cycle; This represents the number of counts within one complete cycle of the drive signal. Using this calculation, the microcontroller 500 generates a synchronization data packet containing precise frequency variables and magnetic field voltage data.
[0048] Step S33 executes adaptive DC baseline compensation based on the temperature drift characteristic curve. After acquiring the original magnetic field voltage signal, the microcontroller 500 reads the data from the analog-to-digital conversion channel connected to the thermocouple 400 to obtain the current motor operating environment temperature. Because the magnetoresistive element of the TMR sensor 200 has inherent temperature drift characteristics, the microcontroller 500 needs to remove the DC component superimposed on the signal based on the real-time temperature.
[0049] The 500 microcontroller calls preset temperature drift characteristic parameters and uses the baseline reconstruction formula to calculate the baseline correction signal after removing temperature drift. The baseline reconstruction formula is: ; ; in, Indicates the current ambient temperature The estimated DC zero-point offset voltage of the sensor is as follows; This represents the initial zero-point offset voltage at the reference temperature; This indicates the temperature drift coefficient of the TMR sensor 200; This indicates the real-time ambient temperature measured by thermocouple 400; Indicates the reference temperature during calibration; This represents the original magnetic field voltage signal acquired by the analog-to-digital converter; This represents the baseline correction signal output after compensation calculation.
[0050] Step S34 involves performing a sliding window smoothing process on the baseline correction signal. To eliminate low-frequency noise introduced by power supply ripple or reading jumps, the microcontroller 500 will calculate... As the target value, a first-order hysteresis filtering algorithm is used to update the actual subtracted baseline value. After the above processing, the microcontroller 500 outputs a clean AC signal centered at zero level, providing a reference signal for subsequent dynamic filtering and speed calculation.
[0051] After completing the baseline reconstruction of the signal, the MCU 500 dynamically configures the signal processing link parameters using the previously calibrated and stored nonlinear model, and performs multi-dimensional confidence verification of the system's physical operating state, specifically including the following sub-steps: Step S51 sets the passband parameters of the dynamic filter based on model prediction. The microcontroller 500 then uses the real-time drive frequency acquired in step S3. and ambient temperature As an index key, it is input into the three-dimensional mapping model in the internal non-volatile memory. The microcontroller 500 uses bilinear interpolation to extract the theoretically predicted rotor speed and frequency of the motor body 340 under the current operating conditions. .
[0052] To achieve precise locking of the rotation speed signal and suppress broadband noise, the 500 microcontroller uses a passband boundary calculation formula to determine the lower cutoff frequency of the dynamic bandpass filter. and upper cutoff frequency The formula for calculating the passband boundary is: ; ; in, This represents the center value of the theoretical rotor speed frequency predicted by the model. This represents the preset dynamic bandwidth coefficient, which is used to tolerate small speed fluctuations of the motor body 340 under actual load. This indicates the lower cutoff frequency of the bandpass filter; This indicates the upper cutoff frequency of the bandpass filter.
[0053] Step S52 performs digital bandpass filtering on the baseline correction signal. The microcontroller 500 then calculates the... and The feedforward and feedback coefficients of the Infinite Impulse Response (IIR) filter are calculated in real time. The microcontroller 500 then processes the baseline correction signal output in step S4. corresponding discrete sequence The input is fed into this digital filter. The filter uses recursive operations to remove power frequency interference and high-frequency drive carrier remnants, outputting a clean modulation signal sequence with optimized signal-to-noise ratio. Through this dynamic following strategy, the filter's passband window is always locked within the energy concentration region of the speed signal.
[0054] Step S53 calculates the characteristic parameters and distortion degree of the signal. The microcontroller 500 calculates the clean modulation signal sequence within a preset time window. amplitude Meanwhile, the microcontroller 500 compares the signal energy difference before and after filtering, calculates the degree of waveform distortion, and assesses the current signal quality.
[0055] Step S54 performs a confidence check on the operating state of the thermo-magnetic-vibration multi-physical quantity coupling. The microcontroller 500 combines this with real-time ambient temperature... The system's health indicators are assessed by measuring signal amplitude and waveform distortion, and by checking whether the motor assembly 300 exhibits "thermal slippage" or "mechanical alignment misalignment" faults. The microcontroller 500 uses a state confidence assessment formula to calculate the system's health indicators. The formula for assessing state confidence is: ; ; in, This represents the calculated signal waveform distortion. This represents the baseline correction signal sequence before filtering; This represents the filtered, clean modulated signal sequence; This indicates a summation operation within the calculation window; This indicates the absolute value operation; Indicates the health status of the system; and These are preset weighting coefficients; This is the maximum distortion threshold allowed by the system. This represents the measured amplitude of the pure modulated signal; Indicates the current temperature The standard amplitude of the signal expected by the model.
[0056] Single-chip microcomputer 500 basis and intermediate variable determination state: if If the threshold is exceeded, the microcontroller 500 determines it as "mechanical alignment deviation," indicating that the air gap distance between the TMR sensor 200 and the rotor has changed abnormally or that electromagnetic interference exists; if Within the normal range but Significantly lower than And the current ambient temperature If the value exceeds the preset warning value, the microcontroller 500 determines it as "thermal slippage," indicating that the friction materials of the stator and rotor of the motor body 340 have experienced performance degradation due to high temperature. Only when... When the speed exceeds the preset safety threshold, the microcontroller 500 can confirm the validity of the current data and proceed to the subsequent speed calculation steps; otherwise, it will send the corresponding fault status code to the host computer 600.
[0057] After acquiring the verified pure modulation signal, the microcontroller 500 performs digital shaping of the signal and calculates the final rotational speed. To address the unstable amplitude of the ultrasonic motor's output signal during the heating process, the system employs a dynamic following hysteresis comparison strategy, specifically including the following sub-steps: Step S71 performs dynamic hysteresis threshold generation based on real-time signal envelope tracking. The microcontroller 500 processes the clean modulated signal sequence output from step S5. Perform point-by-point scanning. The microcontroller 500 maintains an envelope tracking variable in memory. For each new sampling point, if the current signal amplitude... Greater than the envelope value of the previous time step The microcontroller 500 updates the envelope tracking variable to the current amplitude; if the current signal amplitude is less than the envelope value at the previous moment, the microcontroller 500 decreases the envelope value according to the preset attenuation factor to achieve smooth tracking of the signal amplitude change trend.
[0058] The 500 microcontroller uses an adaptive hysteresis threshold calculation formula to determine the current dynamic upper limit threshold. and dynamic lower threshold The formula for calculating the adaptive hysteresis threshold is: ; ; ; in, This represents the filtered, clean modulated signal sequence; This indicates the absolute value operation; This represents the updated estimated signal amplitude envelope value at the current moment. This represents the envelope estimate from the previous sampling time. This represents the preset envelope decay factor, used to control the descent rate of envelope tracking; This represents the preset hysteresis coefficient, used to set the ratio of the trigger threshold to the peak value of the signal envelope; This represents the positive trigger threshold calculated at the current moment; This represents the negative reset threshold calculated at the current moment.
[0059] Step S72 performs pulse sequence shaping. The microcontroller 500 uses the calculated dynamic threshold to shape the signal. Perform logical binarization. The 500 microcontroller executes hysteresis comparison logic: when the signal value... Greater than the positive trigger threshold When the signal value is high, the output logic level is high; when the signal value is low, the output logic level is high. Less than the negative reset threshold When the signal value is between two thresholds, the output logic is low; when the signal value is between two thresholds, the microcontroller 500 maintains the output logic state from the previous moment. Through this process, the continuously changing analog sine wave is shaped into a digital square wave pulse sequence with anti-interference capability.
[0060] Step S73 executes the calculation and output of the real-time rotational speed cycle. The microcontroller 500 captures the rising edge events of the shaped digital square wave pulse sequence and counts the number of sampling points between two adjacent rising edges. To reduce quantization error, the microcontroller 500 calculates the continuous... Average number of sampling points per pulse cycle .
[0061] The 500 microcontroller uses a speed calculation formula to calculate the real-time rotor speed of the motor. The formula for calculating the rotational speed is: ; in, This represents the calculated real-time speed of the motor rotor, in revolutions per minute (RPM). Indicates the sampling frequency of the analog-to-digital converter; The number of seconds per minute serves as a conversion factor for time units; This represents the average number of sampling points between adjacent edges of signals in the same direction, corresponding to one electrical signal cycle. This indicates the number of pole pairs in the multi-pole magnetic ring of the rotor of the 340 motor body. The microcontroller 500 will calculate the number of pole pairs. The current temperature and drive frequency data are packaged and uploaded to the host computer 600 via a universal serial bus to complete a complete measurement cycle.
Claims
1. An ultrasonic motor speed measurement system based on a TMR sensor, characterized in that, include: The standard motor assembly (300) includes a power transformer (310), a signal generator (320), a power amplifier module (330), and a motor body (340) with a magnetic ring on the rotor end face. A displacement stage (100) is fixedly connected to the motor body (340). A TMR sensor (200) is disposed below the rotor of the motor body (340); Thermocouple (400) is disposed near the motor body (340); The host computer (600) is connected to the microcontroller (500) for communication. The microcontroller (500) is electrically connected to the TMR sensor (200), the signal generator (320), the thermocouple (400), and the host computer (600). The synchronous signal output port of the signal generator (320) is connected to the timer input capture port of the microcontroller (500); the microcontroller (500) uses the trigger signal of the general-purpose timer to start the analog-to-digital converter, which is used to synchronously trigger the sampling of the TMR sensor (200) when the edge of the drive signal output by the signal generator (320) arrives.
2. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 1, characterized in that, The microcontroller (500) executes the following offline calibration logic: The standard motor assembly (300) is controlled to perform a full-band stepped frequency sweep, and the speed reference value is extracted using a spectrum analysis algorithm under steady-state no-load conditions; Construct and store a three-dimensional nonlinear mapping model describing the relationship between drive frequency, ambient temperature and rotor speed.
3. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 1, characterized in that, The microcontroller (500) executes the following frequency calculation logic in online measurement mode: The difference between two consecutive capture register values is obtained using the timer input capture port, and the real-time drive frequency is calculated in combination with the timer's counting clock frequency. The real-time drive frequency is calculated using a frequency calculation formula.
4. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 1, characterized in that, The microcontroller (500) executes the following baseline reconstruction logic: The sampling result is used as the original magnetic field voltage signal; The current zero-point offset is calculated using preset temperature drift characteristic parameters, and DC bias compensation is performed on the original magnetic field voltage signal to generate a baseline correction signal. The baseline correction signal is calculated using the baseline reconstruction formula.
5. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 2, characterized in that, The microcontroller (500) executes the following dynamic filtering parameter setting logic: Invoke the aforementioned three-dimensional nonlinear mapping model; Substitute the real-time drive frequency and the real-time ambient temperature collected by the thermocouple (400) into the three-dimensional nonlinear mapping model to estimate the rotor's theoretically predicted rotational speed frequency. Based on the rotor theory, predict the rotational speed frequency and determine the lower and upper cutoff frequencies of the dynamic bandpass filter. The lower cutoff frequency and the upper cutoff frequency are calculated using the passband boundary calculation formula.
6. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 5, characterized in that, The microcontroller (500) performs the following digital filtering logic: An infinite impulse response filter is configured using the lower cutoff frequency and the upper cutoff frequency; The baseline correction signal is digitally bandpass filtered using the aforementioned infinite impulse response filter to output a clean modulated signal.
7. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 6, characterized in that, The microcontroller (500) executes the following status verification logic: Obtain the amplitude and waveform distortion of the pure modulated signal; Combining the amplitude of the pure modulation signal, the waveform distortion degree, and the real-time ambient temperature, a confidence check of the operating status of the thermo-magnetic-vibration multi-physical quantity coupling is performed, and the health index of the system is calculated. The health index is calculated using a state confidence assessment formula.
8. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 6, characterized in that, The microcontroller (500) executes the following threshold generation logic: Real-time envelope tracking is performed on the pure modulated signal; Determine the current dynamic upper and lower thresholds based on the tracking results; The dynamic upper limit threshold and the dynamic lower limit threshold are calculated using an adaptive hysteresis threshold calculation formula.
9. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 8, characterized in that, The microcontroller (500) executes the following pulse shaping logic: The clean modulation signal is logically compared using the dynamic upper threshold and the dynamic lower threshold. When the value of the pure modulation signal is greater than the dynamic upper limit threshold, a logic high level is output; when the value of the pure modulation signal is less than the dynamic lower limit threshold, a logic low level is output, generating a digital square wave pulse sequence.
10. The ultrasonic motor speed measurement system based on a TMR sensor according to claim 9, characterized in that, The microcontroller (500) executes the following speed calculation logic: Capture the rising edge event of the digital square wave pulse sequence; The average number of sampling points between two adjacent rising edges of the digital square wave pulse sequence is counted. The real-time speed of the motor rotor is calculated based on the average number of sampling points. The calculated real-time speed of the motor rotor is sent to the host computer (600). The real-time rotor speed of the motor is calculated using a speed calculation formula.