Application of ARM's equal-precision frequency measurement in unit speed measurement and control

Publisher:玉立风华Latest update time:2011-06-07 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

There are two traditional measurement methods. One is the frequency measurement method (M method), which counts the pulses of the measured signal within the gate time (T-Nfo, the time of N reference signal pulses) (the count value is M). The frequency of the measured signal is , and the error is

The other is the cycle measurement method (T method), which is to count the reference pulses within one cycle of the measured signal (the count value is N). The frequency of the measured signal is and the error is .

Among them, is the accuracy of the reference signal frequency, which can usually reach ; for the frequency measurement method, within the same gate time, for any f, it cannot be guaranteed that there are exactly M T within the T time, so a maximum quantization error of ±1 T will be generated, and as the measured frequency f decreases, M decreases, and the error increases. Therefore, the frequency measurement method only has good measurement accuracy for high-frequency signals; for the period measurement method, as the measured frequency f increases, N becomes smaller, and the error increases. Therefore, the period measurement method only has good measurement accuracy for low-frequency signals. When the measurement range is relatively wide, the combination of the above two methods is undoubtedly effective in improving the measurement accuracy, but there are the following problems: first, the measurement accuracy of the entire frequency band is inconsistent; second, the measurement method is frequently switched near the mid-frequency, the error is large, and the real-time performance is poor.

2 Principle and error analysis of equal precision measurement method

The equal-precision frequency measurement method is a frequency measurement method developed on the basis of the traditional frequency measurement method, and has been increasingly used in frequency measurement in various fields.

The principle of the equal-precision frequency measurement method is shown in Figure 1.

Set up two counters, counter 1 counts the measured signal, and counter 2 counts the reference signal. A gate time T is set in advance. After the measurement starts, when the next leading edge of the measured signal arrives, counter 1 and counter 2 are opened synchronously to start counting. After the gate time arrives, counter 1 and counter 2 do not stop counting until the leading edge of the measured signal arrives, and then counter 1 and counter 2 are closed synchronously. The frequency of the measured signal can be expressed as: The error is: , where M is the count value of counter 1, N is the count value of counter 2, and f is the reference frequency. It can be seen that it is the same as the expression of the traditional frequency measurement method. The difference is that the work of counter 1 is synchronously opened and closed by the measured pulse, so there is no counting error, that is, 99. It can be seen that the measurement accuracy of this method does not change with the frequency of the measured signal. The effective number of digits displayed by the measured value is the same within the full range, that is, equal precision measurement. In general, 1010, so the measurement error of this method is mainly caused by the ±1 error in the counting of the reference signal. Therefore, it can be seen that the higher the frequency of the reference signal, the higher the measurement accuracy under the same gate time. In addition, the longer the gate time T is, the more counts N are, and the higher the measurement accuracy is. However, T and N are restricted by many factors and cannot be increased arbitrarily. First of all, it is the requirements of the project. To reflect and understand the degree of change in speed, a shorter time must be used. The speed of the turbine unit changes from 0 to 50 Hz during the start-up and shutdown process, and does not exceed 100 Hz. In practical applications, the gate time and reference signal frequency can be appropriately selected to enable the measurement to achieve high-precision and fast measurement in the full frequency band. [page]

3 Implementation in ARM Measurement System

Using the equal precision measurement method, the unit speed measurement and control system uses ARM7's LPC2214 as the CPU. LPC2214 has two 32-bit timers/counters, each of which has the following characteristics:

1) 32-bit timer/counter with programmable 32-bit prescaler.

2) Each timer has four 32-bit capture channels that can capture the instantaneous value of the timer when the input signal jumps. The capture event can optionally generate an interrupt.

3) Four 32-bit match registers: ① Continuous operation, with the option to generate an interrupt on match; ② Stop timer on match, with the option to generate an interrupt; ③ Reset timer on match, with the option to generate an interrupt.

4) Each timer has 4 external outputs corresponding to the match registers, with the following characteristics: ① Set to low level when matching; ② Set to high level when matching; ③ Flip when matching; ④ Remain unchanged when matching.

In this system, the matching function of timer/counter 0 is used to control the gate time, and the capture function of timer/counter 1 is used to monitor the measured signal. The measured signal is transformed into a square wave signal with the same frequency through the hardware shaping circuit, connected to the capture pin of timer/counter 1, and its capture interrupt function is opened. The software responds to the interrupt and performs corresponding processing. The counting frequency is 2.211 840 MHz, the gate time is 0.5 s, and the error is 1111, of which 1212, so it can be concluded that, in theory, the measurement accuracy of equal-precision frequency measurement in this system is better than that of the other, which can fully meet the needs of the project.

In the turbine speed measurement and control system, in order to improve the reliability of measurement, a measurement method is adopted in which two types of signals, electrical (machine end residual pressure) signal and gear disk mechanical pulse signal, are input simultaneously. The calculated frequency value is used for display, output control, etc. The circuit structure block diagram of the measurement system is shown in Figure 2.

The system program mainly includes subroutines such as initializing timer/counter, capturing interrupt processing, frequency calculation, display, and output control. The system flow is shown in Figure 3.

Use the RIGOL function/arbitrary waveform generator to generate a frequency-varying sine waveform: ① The frequency of the simulated waveform decreases from 100 Hz to 0.2 Hz within 500 s, with a decreasing gradient of 0.1996 Hz/s; ② The frequency of the simulated waveform decreases from 100 Hz to 1 Hz and then increases from 1 Hz to 100 Hz, with each 10 Hz lasting for 18 s; ③ The measured data is recorded every 0.5 s, and waveforms 1 and 2 are obtained as shown in Figure 4.

Experiments have shown that using the equal-precision frequency measurement method can achieve relatively high measurement accuracy in the entire measurement range. The maximum relative error of this test system is less than 10~. The gate time is 0.5 s, which can quickly respond to changes in the unit speed.

4 Conclusion

Compared with the traditional frequency measurement method and period measurement method, the equal-precision measurement method can achieve equal precision in the entire frequency band, greatly improving the measurement accuracy. The test results show that the maximum relative error of the measurement is better than that of the conventional frequency measurement method and the period measurement method in the turbine speed measurement and control system, and the gate time is variable, which can quickly respond to the change of the unit speed. The developed SJ-22D microcomputer speed measurement and control device has been put into use in many hydropower stations (plants), and its operation is accurate and reliable.

Keywords:ARM Reference address:Application of ARM's equal-precision frequency measurement in unit speed measurement and control

Previous article:Design of Embedded WEB Server Based on ARM Processor
Next article:Design of ARM Components in SCA Architecture

Recommended ReadingLatest update time:2024-11-17 00:20

Difference between MOV MVN LDR in ARM assembly language
Personal summary, if there are any mistakes, please correct them, thank you!!! The MOV instruction can load a destination register from another register, a shifted register, or an immediate value. For example: MOV  R1,     R0 MOV  R1,  R0,  LSL   #3 MOV  R1 ,    #3 However, when assigning an immediate value to a reg
[Microcontroller]
Interface Design between ARM CPU CS89712 and C5510 DSP
introduction At present, embedded systems have been widely used in the field of electronic products and high-end equipment such as wireless communication and network communication. 32-bit ARM embedded processors have the characteristics of high performance and low power consumption. DSP chips are more and mor
[Microcontroller]
Interface Design between ARM CPU CS89712 and C5510 DSP
Design of laser power supply control system based on ARM
  0 Introduction   With the rapid development of the laser industry, lasers have been widely used in industrial processing fields, such as laser cutting, laser marking, laser resistance adjustment, laser heat treatment, etc. In addition, they are also used in the medical field as diagnostic equipment.   Laser weld
[Microcontroller]
Design of laser power supply control system based on ARM
Research on Distributed Loading and Special Applications of ARM Processor
Introduction In today's embedded system design, ARM processors are widely used for their low price, low power consumption, high integration, rich peripheral resources and ease of use. In terms of speed and performance, they have reached or exceeded the performance of some PC104 embedded computers, but the cost is muc
[Microcontroller]
Research on Distributed Loading and Special Applications of ARM Processor
Nvidia's acquisition of ARM suffered a setback: the EU launched a comprehensive antitrust investigation
Nvidia, the US graphics chip giant, plans to spend $54 billion to acquire British semiconductor design company ARM, but the deal has suffered a major setback. On Wednesday local time, the European Union's antitrust agency launched a large-scale antitrust investigation into the acquisition, because of concerns that the
[Semiconductor design/manufacturing]
ARM link address and programming address
    In ARM design, there is usually a link address involved. This link address and the burning address are easily confused. People may think that the link address is the burning address, which is wrong. The following are some personal understandings. There may be some errors and what is said may not be professional, bu
[Microcontroller]
Zhu's ARM bare metal learning notes (IV): Detailed explanation of the S5PV210 boot process
Common device characteristics Memory:  The characteristics of SRAM static memory are small capacity and high price. The advantage is that it  can be used directly after power-on without software initialization. The characteristics of DRAM dynamic memory are large capacity and low price. The disadvantage is that it can
[Microcontroller]
Zhu's ARM bare metal learning notes (IV): Detailed explanation of the S5PV210 boot process
Design of Graphical User Interface Development Platform Based on ARM&Linux
1 Introduction Embedded products such as PDA, set-top boxes, WAP mobile phones, etc. are rapidly becoming popular, bringing great convenience to a large number of non-professional users. At the same time, these products need to be supported by high-performance, stable and reliable GUI (Graphical User Interface)
[Microcontroller]
Design of Graphical User Interface Development Platform Based on ARM&Linux
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号