1 Introduction
During the operation of UPS, it is very important to accurately grasp the values of input and output voltage, output current and output power (active power and apparent power) to ensure the normal operation of UPS and provide timely protection. The values of input voltage and output voltage are one of the important parameters for UPS mains and inverter conversion and STS conversion; the value of output current is one of the important parameters for UPS to judge overload amplitude and short circuit, which is crucial for protecting power devices; the value of output power (active power and apparent power) is an important parameter for UPS to determine load type, output power factor and load degree. The following introduces how MC68HC11K4 calculates the values of voltage, current and power in UPS, as well as the flowchart and annotations of related programs.
2 Basic calculation methods
MC68HC11K4 calculates the input voltage, output voltage, output current and output power (active power and apparent power) through the interrupt subroutine CALRMS_PRC. It uses Time Output Compare2 to select the next interrupt according to the inverter count, and calls CALRMS_PRC to calculate the relevant values. The basic method is as follows:
(1) The input voltage, output voltage, and current are read from the A/D buffer, squared, and then divided by the number of A/Ds and stored in the corresponding TEMP0.
(2) The active power W is also read from the A/D buffer. The current and voltage are multiplied to determine the positive and negative signs, added up, and then divided by the number of A/Ds and stored in WATTV_TEMP0.
(3) In each cycle, calculate the RMS value of the inverter, take the square root of INVV_TEMP0 and filter it to get INVVOLT. Similarly, calculate LINEVOLT every two cycles and CURVOLT every 32 cycles.
(4) Every 32 cycles, multiply CURVOLT and LINEVOLT or INVVOLT to obtain VOLT_AMP.
(5) Every 32 cycles, multiply WATTV_TEMP0 by 2, take the high byte, filter it, and store it in WATTVOLT.
[page]3 Flowchart and annotations of CALRMS_PRC
The flowchart and annotations of CALRMS_PRC are shown in Figures 1, 2 and 3.
Figure 1 Flowchart and annotations 1
Figure 2 Flowchart and annotation 2
Figure 3 Flowchart and annotation 3
Previous article:Enhanced-mode 4th generation CAL diode for high efficiency applications
Next article:Application of Fiber Optic Sensors in Measurement Technology
Recommended ReadingLatest update time:2024-11-16 15:39
- Popular Resources
- Popular amplifiers
- Operational Amplifier Practical Reference Handbook (Edited by Liu Changsheng, Zhao Mingying, Liu Xu, etc.)
- A Complete Illustrated Guide to Operational Amplifier Applications (Written by Wang Zhenhong)
- Power Electronics Technology (Editor-in-Chief: Wang Luyang; Deputy Editor-in-Chief: Wang Hexing)
- Power Technology (Wang Chuan)
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [nRF52840 DK Review] +52840 NFC (Part 2)
- The compilation of the program sent by serial communication always fails
- How to select external clock for TI DSP?
- EEWORLD University Hall ---- Industrial innovation applications based on DLP
- About the power consumption optimization design in embedded DSP design
- About the peripheral circuit of single chip microcomputer to measure the frequency of alternating current
- Why does TPS92691 recommend adding resistors and capacitors to the Vin design?
- 5G is a revolutionary advancement in mobile communications
- How to achieve ZigBee fast networking?
- Using LTC2380 as a data acquisition card, the data jumps greatly