A Low-Latency RDP-CORDIC Algorithm for Real-Time Signal Processing of Edge Computing Devices in Smart Grid Cyber-Physical Systems
Abstract
:1. Introduction
- We proposed a rotation direction prediction method of the CORDIC algorithm, which completed the calculation of all the micro-rotation directions by inputting the angle and direction prediction constants, providing the basis for the subsequent merge iteration;
- A constant compensation algorithm for direction prediction was proposed to achieve higher accuracy of direction prediction, being able to solve the problem of large memory consumption under the condition of high accuracy;
- The single-stage iterative structure of the CORDIC algorithm was replaced by a three-stage and multi-stage iterative structure. Based on this structure, the CORDIC algorithm design with high accuracy, low latency, and low power consumption was achieved.
2. Related Work
3. Conventional CORDIC Algorithm
4. RDP-CORDIC Algorithm
4.1. Rotation Direction Prediction
- Compare the input angle with θcp in the direction prediction constant, and select the value of λ corresponding to a value close to and less than or equal to θcp;
- The binary value dθ representing the micro-rotation direction was calculated based on λ. Finally, the prediction of the micro-rotation direction in the non-iterative case was performed.
4.2. ROM Resource Optimization
4.3. Iterative Merging
- For the number of iterations i ≤ [(N − 3)/3], the three-stage merge iteration Formula (15) was used;
- When [(N − 3)/3] < i ≤ [(N − 1)/2], the three-stage merge iteration simplified Formula (16) was used;
- Finally when i > [(N − 1)/2], Formula (16) for multi-stage merge iteration calculation was used.
5. Hardware Design of RDP-CORDIC Algorithm
5.1. RDP-CORDIC Algorithm Structure Design
Algorithm 1 RDP-CORDIC workflow |
1. Directional rough prediction (1) Pre-store the direction prediction constants θcp, λs, and μi in a ROM of size 2[(N − (log2(3/20) − 3)/5] bits; (2) Use the MSB of the input angle θ as the lookup address of the ROM for reading out θcp; (3) Send the sign bit of the value of the input angle θ minus θcp to the selection input port of the multiplexer, and the multiplexer outputs the corresponding value of λs; (4) Add up λs, θ, and 0.5 − 0.5ε to get the rough rotation direction prediction value dap. |
2. Accurate direction prediction |
(1) Shift and sum up the rough rotation direction prediction ds+1~dm with μs according to Equation (14) to calculate the compensation value λc. (2) Calculate the exact direction prediction value dθ by re-summing λ, θ and 0.5 − 0.5ε. 3. Iteration calculation (1) In the iterative calculation part uses multiple three-level merge iteration modules and one multi-level merge iteration module; (2) Set the input values of the iterative calculation module as x1 = K and y1 = 0; (3) The rotation directions d1~d3s−1 are determined by the rough direction value dap, and the rotation directions d3s~dn are determined by the accurate direction value dθ. |
5.2. Calculation of Sine and Cosine Function Based on RDP-CORDIC Algorithm
5.3. More Applications of the RDP-CORDIC Algorithm
6. Performance Testing and Analysis
6.1. ROM Optimization Results of the RDP-CORDIC Algorithm
6.2. Performance Comparison of CORDIC Algorithms
6.3. Test of Calculation Error and Calculation Time of Variousfunctions
7. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Gilbert, G.M.; Naiman, S.; Kimaro, H.; Bagile, B. A Critical Review of Edge and Fog Computing for Smart Grid Applications. In IFIP Advances in Information and Communication Technology; Springer: Berlin/Heidelberg, Germany, 2019; pp. 763–775. [Google Scholar] [CrossRef]
- Wang, Z.; Jiang, D.; Wang, F.; Lv, Z.; Nowak, R. A Polymorphic Heterogeneous Security Architecture for Edge-Enabled Smart Grids. Sustain. Cities Soc. 2021, 67, 102661. [Google Scholar] [CrossRef]
- Qin, M.; Gao, Y.; Hou, B.; Wang, H.; Zhou, W.; Yao, Y. Research on Efficient Channel Decoding Algorithm for Memory Channel and Short Packet Transmission in Smart Grid. Front. Energy Res. 2022, 10, 1014. [Google Scholar] [CrossRef]
- Song, C.; Xu, W.; Han, G.; Zeng, P.; Wang, Z.; Yu, S. A Cloud Edge Collaborative Intelligence Method of Insulator String Defect Detection for Power IIoT. IEEE Internet Things J. 2021, 8, 7510–7520. [Google Scholar] [CrossRef]
- Song, C.; Liu, S.; Han, G.; Zeng, P.; Yu, H.; Zheng, Q. Edge Intelligence Based Condition Monitoring of Beam Pumping Units under Heavy Noise in the Industrial Internet of Things for Industry 4.0. IEEE Internet Things J. 2022, 1. [Google Scholar] [CrossRef]
- Zhang, Y.; Liang, K.; Zhang, S.; He, Y. Applications of edge computing in PIoT. In Proceedings of the 2017 IEEE Conference on Energy Internet and Energy System Integration (EI2), Beijing, China, 26–28 November 2017; pp. 1–4. [Google Scholar]
- Hussain, M.; Alam, M.S.; Beg, M.M. Fog assisted cloud models for smart grid architectures-comparison study and optimal deployment. arXiv 2018, arXiv:1805.09254. [Google Scholar]
- Pan, X.; Jiang, A.; Wang, H. Edge-Cloud Computing Application, Architecture, and Challenges in Ubiquitous Power Internet of Things Demand Response. J. Renew. Sustain. Energy 2020, 12, 062702. [Google Scholar] [CrossRef]
- Albayati, A.; Abdullah, N.F.; Abu-Samah, A.; Mutlag, A.H.; Nordin, R. A Serverless Advanced Metering Infrastructure Based on Fog-Edge Computing for a Smart Grid: A Comparison Study for Energy Sector in Iraq. Energies 2020, 13, 5460. [Google Scholar] [CrossRef]
- Kumar, S.; Agarwal, S.; Krishnamoorthy, A.; Vijayarajan, V.; & Kannadasan, R. Improving the response time in smart grid using fog computing. In Proceedings of the 2nd International Conference on Data Engineering and Communication Technology, Pune, India, 15–16 December 2017; Springer: Singapore, 2019; pp. 563–571. [Google Scholar]
- Lei, W.; Jiang, Y.; Wen, H.; Xu, A.; Ming, Z.; Hou, W.; Yin, Y. New Features of Automatic Meter Reading System: Based on Edge Computing. In Proceedings of 2019 International Conference on Energy, Power, Environment and Computer Application(ICEPECA 2019)., Wuhan, China, 20–21 January 2019; pp. 364–368. [Google Scholar]
- Yu, D.; Ma, Z.; Wang, R. Efficient Smart Grid Load Balancing via Fog and Cloud Computing. Math. Probl. Eng. 2022, 2022, 3151249. [Google Scholar] [CrossRef]
- Yang, K.; Jiang, L.; Low, S.; Liu, S. Privacy-Preserving Energy Scheduling for Smart Grid with Renewables. IEEE Access 2020, 8, 132320–132329. [Google Scholar] [CrossRef]
- Diamantoulakis, P.D.; Bouzinis, P.S.; Sarigannidis, P.G.; Ding, Z.; Karagiannidis, G.K. Optimal Design and Orchestration of Mobile Edge Computing with Energy Awareness. IEEE Trans. Sustain. Comput. 2022, 7, 456–470. [Google Scholar] [CrossRef]
- Song, C.; Han, G.; Zeng, P. Cloud Computing Based Demand Response Management Using Deep Reinforcement Learning. IEEE Trans. Cloud Comput. 2021, 10, 72–81. [Google Scholar] [CrossRef]
- Zhu, Z.; Zhang, J.; Zhao, J.; Cao, J.; Zhao, D.; Jia, G.; Meng, Q. A Hardware and Software Task-Scheduling Framework Based on CPU+FPGA Heterogeneous Architecture in Edge Computing. IEEE Access 2019, 7, 148975–148988. [Google Scholar] [CrossRef]
- Amarasinghe, G.; de Assunção, M.D.; Harwood, A.; Karunasekera, S. A Data Stream Processing Optimisation Framework for Edge Computing Applications. In Proceedings of the 2018 IEEE 21st International Symposium on Real-Time Distributed Computing (ISORC), Singapore, 29–31 May 2018; pp. 91–98. [Google Scholar] [CrossRef] [Green Version]
- Yunzhou, Z.; Mo, Z.; Haoqi, L.; Gang, Z. Innovative Architecture of Single Chip Edge Device Based on Virtualization Technology. Pervasive Mob. Comput. 2019, 52, 100–112. [Google Scholar] [CrossRef]
- Kumar, P.A. FPGA Implementation of the Trigonometric Functions Using the CORDIC Algorithm. In Proceedings of the 2019 5th International Conference on Advanced Computing & Communication Systems (ICACCS), Coimbatore, India, 15–16 March 2019; pp. 894–900. [Google Scholar] [CrossRef]
- Fu, W.; Xia, J.; Lin, X.; Liu, M.; Wang, M. Low-Latency Hardware Implementation of High-Precision Hyperbolic Functions Sinhx and Coshx Based on Improved CORDIC Algorithm. Electronics 2021, 10, 2533. [Google Scholar] [CrossRef]
- Mahdavi, H.; Timarchi, S. Area–Time–Power Efficient FFT Architectures Based on Binary-Signed-Digit CORDIC. IEEE Trans. Circuits Syst. I Regul. Pap. 2019, 66, 3874–3881. [Google Scholar] [CrossRef]
- Younes, H.; Ibrahim, A.; Rizk, M.; Valle, M. Efficient FPGA Implementation of Approximate Singular Value Decomposition based on Shallow Neural Networks. In Proceedings of the 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington DC, USA, 6–9 June 2021; pp. 1–4. [Google Scholar] [CrossRef]
- Nguyen, H.-T.; Nguyen, X.-T.; Pham, C.-K. A Low-Latency Parallel Pipeline CORDIC. IEICE Trans. Electron. 2017, E100.C, 391–398. [Google Scholar] [CrossRef]
- Villalba, J.; Zapata, E.L.; Antelo, E.; Bruguera, J.D. Radix-4 vectoring cordic algorithm and architectures. J. VLSI Signal Process. Syst. Signal Image Video Technol. 1998, 19, 127–147. [Google Scholar] [CrossRef]
- Antelo, E.; Bruguera, J.D.; Zapata, E.L. Unified Mixed Radix 2-4 Redundant CORDIC Processor. IEEE Trans. Comput. 1996, 45, 1068–1073. [Google Scholar] [CrossRef] [Green Version]
- Bruguera, J.D.; Antelo, E.; Zapata, E.L. Design of a Pipelined Radix 4 CORDIC Processor. Parallel Comput. 1993, 19, 729–744. [Google Scholar] [CrossRef]
- Antelo, E.; Villalba, J.; Bruguera, J.D.; Zapata, E.L. High Performance Rotation Architectures Based on the Radix-4 CORDIC Algorithm. IEEE Trans. Comput. 1997, 46, 855–870. [Google Scholar] [CrossRef] [Green Version]
- Parmar, Y.; Sridharan, K. Precomputation-Based Radix-4 CORDIC for Approximate Rotations and Hough Transform. IET Circuits Devices Syst. 2018, 12, 413–423. [Google Scholar] [CrossRef]
- Tang, W.; Xu, F. A Noniterative Radix-8 CORDIC Algorithm with Low Latency and High Efficiency. Electronics 2020, 9, 1521. [Google Scholar] [CrossRef]
- Changela, A.; Zaveri, M.; Verma, D. Mixed-Radix, Virtually Scaling-Free CORDIC Algorithm Based Rotator for DSP Applications. Integration 2021, 78, 70–83. [Google Scholar] [CrossRef]
- Jaime, F.J.; Sanchez, M.A.; Hormigo, J.; Villalba, J.; Zapata, E.L. Enhanced Scaling-Free CORDIC. IEEE Trans. Circuits Syst. I Regul. Pap. 2010, 57, 1654–1662. [Google Scholar] [CrossRef]
- Moroz, L.; Taras, M.; Herasym, M. Improved scaling-free CORDIC algorithm. In Proceedings of the 2013 11th East-West Design and Test Symposium (EWDTS), Rostov-on-Don, Russia, 27 September 2013; IEEE Computer Society: Washington, DC, USA, 2013. [Google Scholar]
- Shukla, R.; Ray, K.C. Low Latency Hybrid CORDIC Algorithm. IEEE Trans. Comput. 2014, 63, 3066–3078. [Google Scholar] [CrossRef]
- Yao, Y.; Feng, Z. BBR-Based Iteration-Free CORDIC Algorithm. J. Circuits Syst. Comput. 2018, 27, 1850076. [Google Scholar] [CrossRef]
- Zhang, Y.Y.; Liu, J.R.; Wang, Z.Y.; Mo, J.J.; Yu, F.X. Implementation of direct digital frequency synthesizer based on three-step rotation coordinate rotation digital computer algorithm. J. Zhejiang Univ. Eng. Sci. 2019, 53, 2034–2040. [Google Scholar]
- Khurshid, B.; Khan, J.J. An Efficient Fixed-Point Multiplier Based on CORDIC Algorithm. J. Circuits Syst. Comput. 2020, 30, 2150080. [Google Scholar] [CrossRef]
- Kumar, A.; Kumar, A.; Singh Tomar, G. Hardware Chip Performance of CORDIC Based OFDM Transceiver for Wireless Communication. Comput. Syst. Sci. Eng. 2022, 40, 645–659. [Google Scholar] [CrossRef]
- Garrido, M.; Kallstrom, P.; Kumm, M.; Gustafsson, O. CORDIC II: A New Improved CORDIC Algorithm. IEEE Trans. Circuits Syst. II Express Briefs 2016, 63, 186–190. [Google Scholar] [CrossRef]
Application Category | Functions Implemented |
---|---|
basic arithmetic | multiplication |
division | |
trigonometric function | sin x |
cos x | |
tan x | |
inverse trigonometric function | arcsin x |
arcsin−1 x | |
arctan−1 x | |
hyperbolic function | cosh x |
sinh x | |
tanh x | |
tanh−1 x | |
other common functions | |
In(x) | |
ex | |
other applications | Fast Fourier transform |
Matrix eigenvalue estimation | |
Singular value decomposition | |
Digital frequency synthesis |
CORDIC Algorithm | Radix | Rotation Direction Prediction | Fixed Scaling Factor |
---|---|---|---|
R-2 CORDIC [26] | R-2 | × | √ |
R-4 CORDIC [24] | R-4 | × | × |
R-8 CORDIC [28] | R-8 | × | × |
scaling-free CORDIC [31] | MIX-R | × | √ |
Mixed-R-scaling-free CORDIC [29] | MIX-R | × | √ |
BBR-CORDIC [34] | R-2 | √ | × |
CORDIC II [38] | R-2 | × | × |
RDP-CORDIC [proposed] | R-2 | √ | √ |
{d1,d2,d3,d4,d5} | λ | θcp5 |
---|---|---|
01111 | 0.03635239 | −0.0305780 |
10000 | 0.03636256 | 0.03190169 |
10001 | 0.03643358 | 0.09425964 |
10010 | 0.03644375 | 0.15673931 |
10011 | 0.03699740 | 0.21813201 |
10100 | 0.03700756 | 0.28061168 |
10101 | 0.03707859 | 0.34296963 |
10110 | 0.03708875 | 0.40544930 |
10111 | 0.04137373 | 0.45937935 |
11000 | 0.04138389 | 0.52185901 |
11001 | 0.04145492 | 0.58421697 |
11010 | 0.04146508 | 0.64669663 |
11011 | 0.04201873 | 0.70808934 |
11100 | 0.04202890 | 0.77056900 |
i | μi |
---|---|
1 | 0.0363523910 |
2 | 0.0050213369 |
3 | 0.0006450055 |
4 | 8.1190004043 × 10−5 |
5 | 1.0166569732 × 10−5 |
6 | 1.2713795232 × 10−6 |
7 | 1.5893989889 × 10−7 |
8 | 1.9868033028 × 10−8 |
9 | 2.4835211812 × 10−9 |
10 | 3.1044068054 × 10−10 |
Input Angle Range θe | Angle after Conversion θ | cos θe | sin θe |
---|---|---|---|
[0/4) | θe | cos θ | sin θ |
[/4/2) | /2 − θe | sin θ | cos θ |
[/2/4) | θe − /2 | −sin θ | cos θ |
[) | − θe | −cos θ | sin θ |
[) | θe − | −cos θ | −sin θ |
[) | /2 − θe | −sin θ | −cos θ |
[) | θe − /2 | sin θ | −cos θ |
[] | 2 − θe | cos θ | −sin θ |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Qin, M.; Liu, T.; Hou, B.; Gao, Y.; Yao, Y.; Sun, H. A Low-Latency RDP-CORDIC Algorithm for Real-Time Signal Processing of Edge Computing Devices in Smart Grid Cyber-Physical Systems. Sensors 2022, 22, 7489. https://doi.org/10.3390/s22197489
Qin M, Liu T, Hou B, Gao Y, Yao Y, Sun H. A Low-Latency RDP-CORDIC Algorithm for Real-Time Signal Processing of Edge Computing Devices in Smart Grid Cyber-Physical Systems. Sensors. 2022; 22(19):7489. https://doi.org/10.3390/s22197489
Chicago/Turabian StyleQin, Mingwei, Tong Liu, Baolin Hou, Yongxiang Gao, Yuancheng Yao, and Haifeng Sun. 2022. "A Low-Latency RDP-CORDIC Algorithm for Real-Time Signal Processing of Edge Computing Devices in Smart Grid Cyber-Physical Systems" Sensors 22, no. 19: 7489. https://doi.org/10.3390/s22197489
APA StyleQin, M., Liu, T., Hou, B., Gao, Y., Yao, Y., & Sun, H. (2022). A Low-Latency RDP-CORDIC Algorithm for Real-Time Signal Processing of Edge Computing Devices in Smart Grid Cyber-Physical Systems. Sensors, 22(19), 7489. https://doi.org/10.3390/s22197489