Tracking Differentiator Algorithms: Theories, Implementations and Applications [1st ed.] 9789811593833, 9789811593840

This book highlights designs, implementations and applications of tracking differentiator (TD) algorithms. The real-time

414 58 4MB

English Pages XIII, 105 [113] Year 2021

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Tracking Differentiator Algorithms: Theories, Implementations and Applications [1st ed.]
 9789811593833, 9789811593840

Table of contents :
Front Matter ....Pages i-xiii
Introduction (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 1-7
Literature Review (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 9-15
Discrete Time Optimal Control Algorithm (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 17-33
Simple and Efficient Tracking Differentiator (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 35-46
On Convergence Performance of DTOC Based Tracking Differentiator (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 47-59
Time-Optimal Control Based Tracking Differentiator with Phase Delay Alleviation (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 61-75
Tracking Differentiators in Real-Life Engineering (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 77-90
Summary (Hehong Zhang, Gaoxi Xiao, Yunde Xie, Wenzhong Guo, Chao Zhai)....Pages 91-93
Back Matter ....Pages 95-105

Citation preview

Lecture Notes in Electrical Engineering 717

Hehong Zhang · Gaoxi Xiao · Yunde Xie · Wenzhong Guo · Chao Zhai

Tracking Differentiator Algorithms Theories, Implementations and Applications

Lecture Notes in Electrical Engineering Volume 717

Series Editors Leopoldo Angrisani, Department of Electrical and Information Technologies Engineering, University of Napoli Federico II, Naples, Italy Marco Arteaga, Departament de Control y Robótica, Universidad Nacional Autónoma de México, Coyoacán, Mexico Bijaya Ketan Panigrahi, Electrical Engineering, Indian Institute of Technology Delhi, New Delhi, Delhi, India Samarjit Chakraborty, Fakultät für Elektrotechnik und Informationstechnik, TU München, Munich, Germany Jiming Chen, Zhejiang University, Hangzhou, Zhejiang, China Shanben Chen, Materials Science and Engineering, Shanghai Jiao Tong University, Shanghai, China Tan Kay Chen, Department of Electrical and Computer Engineering, National University of Singapore, Singapore, Singapore Rüdiger Dillmann, Humanoids and Intelligent Systems Laboratory, Karlsruhe Institute for Technology, Karlsruhe, Germany Haibin Duan, Beijing University of Aeronautics and Astronautics, Beijing, China Gianluigi Ferrari, Università di Parma, Parma, Italy Manuel Ferre, Centre for Automation and Robotics CAR (UPM-CSIC), Universidad Politécnica de Madrid, Madrid, Spain Sandra Hirche, Department of Electrical Engineering and Information Science, Technische Universität München, Munich, Germany Faryar Jabbari, Department of Mechanical and Aerospace Engineering, University of California, Irvine, CA, USA Limin Jia, State Key Laboratory of Rail Traffic Control and Safety, Beijing Jiaotong University, Beijing, China Janusz Kacprzyk, Systems Research Institute, Polish Academy of Sciences, Warsaw, Poland Alaa Khamis, German University in Egypt El Tagamoa El Khames, New Cairo City, Egypt Torsten Kroeger, Stanford University, Stanford, CA, USA Qilian Liang, Department of Electrical Engineering, University of Texas at Arlington, Arlington, TX, USA Ferran Martín, Departament d’Enginyeria Electrònica, Universitat Autònoma de Barcelona, Bellaterra, Barcelona, Spain Tan Cher Ming, College of Engineering, Nanyang Technological University, Singapore, Singapore Wolfgang Minker, Institute of Information Technology, University of Ulm, Ulm, Germany Pradeep Misra, Department of Electrical Engineering, Wright State University, Dayton, OH, USA Sebastian Möller, Quality and Usability Laboratory, TU Berlin, Berlin, Germany Subhas Mukhopadhyay, School of Engineering & Advanced Technology, Massey University, Palmerston North, Manawatu-Wanganui, New Zealand Cun-Zheng Ning, Electrical Engineering, Arizona State University, Tempe, AZ, USA Toyoaki Nishida, Graduate School of Informatics, Kyoto University, Kyoto, Japan Federica Pascucci, Dipartimento di Ingegneria, Università degli Studi “Roma Tre”, Rome, Italy Yong Qin, State Key Laboratory of Rail Traffic Control and Safety, Beijing Jiaotong University, Beijing, China Gan Woon Seng, School of Electrical & Electronic Engineering, Nanyang Technological University, Singapore, Singapore Joachim Speidel, Institute of Telecommunications, Universität Stuttgart, Stuttgart, Germany Germano Veiga, Campus da FEUP, INESC Porto, Porto, Portugal Haitao Wu, Academy of Opto-electronics, Chinese Academy of Sciences, Beijing, China Junjie James Zhang, Charlotte, NC, USA

The book series Lecture Notes in Electrical Engineering (LNEE) publishes the latest developments in Electrical Engineering - quickly, informally and in high quality. While original research reported in proceedings and monographs has traditionally formed the core of LNEE, we also encourage authors to submit books devoted to supporting student education and professional training in the various fields and applications areas of electrical engineering. The series cover classical and emerging topics concerning: • • • • • • • • • • • •

Communication Engineering, Information Theory and Networks Electronics Engineering and Microelectronics Signal, Image and Speech Processing Wireless and Mobile Communication Circuits and Systems Energy Systems, Power Electronics and Electrical Machines Electro-optical Engineering Instrumentation Engineering Avionics Engineering Control Systems Internet-of-Things and Cybersecurity Biomedical Devices, MEMS and NEMS

For general information about this book series, comments or suggestions, please contact [email protected]. To submit a proposal or request further information, please contact the Publishing Editor in your country: China Jasmine Dou, Associate Editor ([email protected]) India, Japan, Rest of Asia Swati Meherishi, Executive Editor ([email protected]) Southeast Asia, Australia, New Zealand Ramesh Nath Premnath, Editor ([email protected]) USA, Canada: Michael Luby, Senior Editor ([email protected]) All other Countries: Leontina Di Cecco, Senior Editor ([email protected]) ** Indexing: The books of this series are submitted to ISI Proceedings, EI-Compendex, SCOPUS, MetaPress, Web of Science and Springerlink **

More information about this series at http://www.springer.com/series/7818

Hehong Zhang Gaoxi Xiao Yunde Xie Wenzhong Guo Chao Zhai •







Tracking Differentiator Algorithms Theories, Implementations and Applications

123

Hehong Zhang Fuzhou University Fuzhou, China Yunde Xie Beijing Rail Transit Technology Institute Beijing, China Chao Zhai China University of Geosciences Wuhan, China

Gaoxi Xiao Nanyang Technological University School of Electrical and Electronic Engineering Singapore, Singapore Wenzhong Guo Fuzhou University Fuzhou, China

ISSN 1876-1100 ISSN 1876-1119 (electronic) Lecture Notes in Electrical Engineering ISBN 978-981-15-9383-3 ISBN 978-981-15-9384-0 (eBook) https://doi.org/10.1007/978-981-15-9384-0 © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd. The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore

Preface

Both real-time filtering and differentiation estimation of a given signal are of high importance in signal processing, feedback control, fault detection and isolation, and many other fields. In some cases, with access to the dynamic model of a system, an observer or disturbance estimator is applied to calculate the derivative of the given signals. While in other cases where the system model is unattainable or complicated to build, a differentiator is necessary to be constructed for obtaining filtering and differentiation signals. A good differentiator shall have two characteristics: (1) robustness against inevitable measurement errors and input noises and (2) exactness with a small phase delay in filtering and differentiation. Motivated by the need and requirements of a differentiator, this book has two focuses: i Designing and implementing practical, accurate and efficient tracking differentiators (TDs) via discrete-time optimal control (DTOC) algorithms and presenting full convergence analysis on the proposed DTOC-TDs. ii Applying the DTOC-TDs in static state estimation in power systems and signal processing in maglev trains. The first part of the book focuses on the construction and theoretical analysis of DTOC-TD algorithms. Initially proposed by Jingqing Han, DTOC-TD outperforms other differentiators in quickness, smoothness and noise tolerance, with no overshoots. With the use of the Isochronic Regions (IRs) method, an in-depth analysis of the algorithm construction process of Han’s DTOC algorithm (fhan) is given. To reduce the complexity of the fhan algorithm, a linearized criterion is adopted in constructing the control strategy to form a new DTOC algorithm (denoted as Fast). This makes the proposed Fast algorithm to be with a simpler structure and more efficient with much less nonlinear calculations, including square-root calculations existing in the fhan algorithm. Simulations conducted in both the frequency and the time domains demonstrate that Fast-TD outperforms fhan-TD in quickness, small tracking errors and the computational resources needed. Different DTOC algorithms are determined by comparing the position of the initial state with the IRs that are constructed through different boundary transformations. To unify different DTOC

v

vi

Preface

algorithms in designing corresponding DTOC-TDs, the general form of the DTOC algorithm based on the general boundary transformation is presented. This allows one to flexibly design an appropriate DTOC-TD by easily modifying the relevant boundary transformation. To make the DTOC-TD application technically sound, we investigate the convergence of DTOC-TD algorithms by demonstrating the convergence path of the state point sequence driven by the corresponding control signal sequence. While the proposed TDs have advantageous quickness, smoothness and noise tolerance, the phase delay exists. To reduce the phase delay in both filtering and differentiation estimations, we design two approaches to boost the phase quality for better practical applications. Simulation and experiment results show that these two approaches perform well in reducing the phase delay. The second part of the book focuses on real-life engineering applications by applying the proposed DTOC-TDs. First, we conduct static state estimations in power systems where the field PMUs data are filtered by using the proposed DTOC-TD. Not requiring complex power system modelling and historical data, the proposed TD is suitable for real-time synchrophasor estimation applications especially when the states are corrupted by noises. Compared with the Kalman filter algorithm, the proposed DTOC-TD can obtain more effective state estimation filtering outputs with smaller tracking errors and less time consumption in real-time executions. Then, the proposed DTOC-TD is utilized to acquire the gap filtering signals and its corresponding velocity signals to design the feedback controller in the suspension control system of the maglev train. The comparison results with the typical differentiator reveal that the proposed DTOC-TD can ensure better suspension control performance by obtaining more effective filtering and differentiation outputs. Further, the experiments carried out on the speed and position detection system for a maglev train demonstrate that the proposed TD group, with the moving-average algorithm, can filter noises, amend distortion signals effectively and compensate for phase delays when the train is passing over track joints. The aforementioned DTOC-TDs can effectively reduce the computational resources needed and meet the requirements of signal filtering and differentiation estimation. With two phase delay compensation algorithms, the proposed DTOC-TD algorithms are ready to use in real-life engineering. Together with full convergence analysis on DTOC-TDs, the development of new DTOC algorithms and their corresponding DTOC-TDs in this book have greatly enriched the time optimal control based differentiator theory. The proposed approaches may provide a new methodology to realize the more efficient design of observers and controllers both in control theory and control engineering practice. Fuzhou, China Singapore, Singapore Beijing, China Fuzhou, China Wuhan, China

Hehong Zhang Gaoxi Xiao Yunde Xie Wenzhong Guo Chao Zhai

Acknowledgments

It was the result of the joint effort from all co-authors and the people concerned to make this monograph happen. This monograph would have been possible without their ongoing help and support. At the outset, I express my sincere thanks and gratitude to my supervisor, Dr. Gaoxi Xiao, Professor in the School of Electrical and Electronic Engineering, Nanyang Technological University (NTU) who provided me the directions and extended all possible help to undertake this noble venture. His patience, motivation, enthusiasm and immense knowledge have inspired me a great interest in conducting relevant research work. As a supervisor, Dr. Gaoxi Xiao has constantly observed my work, raised issues pertaining to my research and monitored regularly the research progress with timely, specific and valuable comments and feedback. My association with him enlightened and led me in many ways to penetrate into the insight of my research and became an invaluable experience for my future career. Without his unfailing guidance and continuous encouragement, this monograph would hardly have been completed. I would also like to take the privilege to express my sincere thanks and gratitude to Dr. Yunde Xie, Senior Engineer in the Beijing Maglev Transportation Development Co., Ltd. who is instrumental in defining the path of my research. His insightful thoughts and expertise in control theory and control engineering practice have inspired me greatly in the development of innovative technologies. I enjoyed and cherished those moments when we designed, implemented and enhanced differentiator algorithms together. During the process of continuous exploration and development, I had a much more profound understanding of the differentiator theory and its applications, and the ideas on designing new differentiator algorithms have proliferated in my mind. Besides, I express my sincere thanks and deepest gratitude to my co-supervisor Dr. Tso-Chien Pan, Executive Director of the Institute of Catastrophe Risk Management (ICRM), NTU, Professor in the School of Civil and Environmental Engineering (CEE), NTU; my mentor Dr. Edmond Lo Yat Man, Deputy Director of ICRM, NTU, Professor in the School of CEE, NTU, the former Director of Future Resilient Systems (FRS) programme in the Singapore-ETH Centre; Dr. Hans vii

viii

Acknowledgments

Rudolf Heinimann; the current Director Dr. Jörin Jonas, the Dean of the College of Mathematics and Computer Science, Fuzhou University; Dr. Wenzhong Guo; and Dr. Chao Zhai, the former Research Fellow in the ICRM, NTU. The interactions with them were of great help to know certain things on my research problems in a wider perspective, and all of them were kind enough to provide the stimulus to my research. With their insightful suggestions and generous support in my research work, this monograph became possible. My sincere thanks also go to Dr. Xinghuo Yu, Distinguished Professor at Royal Melbourne Institute of Technology (RMIT), who offered me a position in his group as a visiting scholar with a grant support to work on the project of the tracking differentiator-based control theory. This gave me a great chance to meet and interact with the scholars who are from the respective educational institutions and with multifarious experiences and skills in control-related fields, and it enabled me to study their minds and invaluable thoughts over the issues. Moreover, I would like to thank many friends and colleagues in the Singapore-ETH Centre, ICRM, NTU, Interdisciplinary Graduate Programme, NTU, and College of Mathematics and Computer Science, Fuzhou University. I express my sincere thanks and gratitude to Mr. Aaron Ang, Ms. Hwei Li Lim, Dr. Youfeng Su, Ms. Jean Tang, Ms. Li Hoon Goh and Ms. Chye Peng Lim; they have offered and are still offering warm-hearted assistants. This monograph is an outcome of the Future Resilient System (FRS) project at the Singapore-ETH Centre (SEC) and the National Natural Science Foundation of China (Grant No. 62003088, No. U1705262 & No. 61672159). Part of this work is also supported by the Ministry of Education (MOE), Singapore (Contract No. MOE-2016-T2-1-119), the National Key R & D Program of China under Grant (2016YFB1200600), and the outsourced project at AECC Sichuan Gas Turbine Establishment of China. In addition, I would like to show my great thanks and gratitude to the book examiners and coordinators for their comments and suggestions on how to improve the quality of this monograph. Finally, I owe thanks to my parents, Mr. Yanke Zhang and Ms. Bilin Lin. My family has always provided me with support and stood by me through ups and downs. Thanks very much for their selfless love and unconditional support.

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 The Feedback Controller Design . . . 1.1.2 State Estimation in Power Systems . 1.2 Research Contents . . . . . . . . . . . . . . . . . . 1.3 Layout of the Chapters . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

1 1 2 3 4 5 6

2 Literature Review . . . . . . . 2.1 State Obersver . . . . . . 2.2 Tracking Differentiator References . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

9 9 12 14

3 Discrete Time Optimal Control Algorithm . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 The fhan Algorithm . . . . . . . . . . . . . . . . . . . 3.3 A Simple and Efficient DTOC Algorithm . . . . 3.3.1 Determination of the Boundary Curves and Control Characteristic Curve . . . . 3.3.2 Construction of the DTOC Law . . . . . 3.4 Discussion on General Form of DTOC Law . . 3.5 Simulations and Implementations . . . . . . . . . . 3.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

17 17 19 24

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

25 27 29 30 32 33

4 Simple and Efficient Tracking Differentiator . . . . . . . . . . 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Construction of Tracking Differentiator . . . . . . . . . . . 4.3 Structure Analysis and Filtering Characteristic of Fast 4.4 Frequency-Domain Characteristics Analysis . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

35 35 36 37 38

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

ix

x

Contents

4.5 Numerical Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42 45 46

5 On Convergence Performance of DTOC Based Tracking Differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Convergence Proof of fhan-TD . . . . . . . . . . . . . . . . . . 5.3 Convergence Proof of Fast-TD . . . . . . . . . . . . . . . . . . 5.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

47 47 48 52 58 59

6 Time-Optimal Control Based Tracking Differentiator with Phase Delay Alleviation . . . . . . . . . . . . . . . . . . . . 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 TD Group Scheme for Fast-TD . . . . . . . . . . . . . . . 6.3 fsp-TD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 fsp Algorithm . . . . . . . . . . . . . . . . . . . . . . 6.3.2 Tracking Differentiator via fsp Algorithm . . 6.4 Numerical Simulations . . . . . . . . . . . . . . . . . . . . . 6.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

61 61 62 65 66 72 72 75 75

7 Tracking Differentiators in Real-Life Engineering . . . . 7.1 Case Study 1: State Estimation in Power Systems . . 7.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.2 Experiment Results . . . . . . . . . . . . . . . . . . . 7.2 Case Study 2: Suspension Control System . . . . . . . . 7.2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2 Experiment Results . . . . . . . . . . . . . . . . . . . 7.3 Case Study 3: Speed and Position Detection System . 7.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

77 78 78 79 80 80 82 86 88 89

8 Summary . . . . . . . . . . . . . . . . . . . . . . 8.1 Summary of Contributions . . . . . . 8.2 Future Work . . . . . . . . . . . . . . . . . 8.2.1 Extended DTOC Algorithm 8.2.2 Tracking Differentiator . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

91 91 93 93 93

Appendix A: Matlab Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

List of Figures

Fig. 1.1 Fig. 1.2 Fig. 1.3 Fig. 1.4 Fig. 3.1 Fig. 3.2 Fig. 3.3 Fig. 3.4

Fig. 3.5 Fig. 3.6 Fig. 4.1 Fig. 4.2 Fig. 4.3 Fig. 4.4 Fig. 4.5 Fig. 4.6 Fig. 4.7 Fig. 4.8 Fig. 4.9

The schematic diagram of a differentiator system . . . . . . . . . . A block diagram of a PID controller in a feedback loop . . . . Resilience consists of hardening, fault identification, corrective actions, and restoration in power systems . . . . . . . . Main work and book framework . . . . . . . . . . . . . . . . . . . . . . . Gð1Þ and Gð2Þ on the phase plane . . . . . . . . . . . . . . . . . . . . . Illustration of CA , CB , and CC , where CA ¼ CAþ [ C A, . . . . . . . . . . . . . . . . . . . . . . . . . . ....... and CB ¼ CBþ [ C B þ ~ 0 ~ ~ Illustration of C , C , and C . . . . . . . . . . . . . . . . . . . . . . . . Illustration of two boundary curves (CA and CB ), control characteristic curve CC , region X (surrounded by two boundary curves), and three intersection points A, B, and C . . Illustration of two-step reachable region Xr , i.e., diamond region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Illustration of state trajectory under two different algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output variance sequence R versus filtering factor c0 . . . . . . . Frequency-domain characteristics of tracking output x1 . . . . . Frequency-domain characteristics of differentiation estimation x2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs of signal-tracking filtering for step input . . . . . . . . . . Outputs of differentiation acquisition for step input . . . . . . . . Outputs of signal-tracking filtering for sinusoidal signal input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partial enlargement of signal-tracking filtering for sinusoidal signal input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outputs of differentiation acquisition for sinusoidal signal input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partial enlargement of differentiation acquisition for sinusoidal signal input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.. ..

2 3

.. .. ..

3 6 21

.. ..

23 24

..

27

..

28

.. .. ..

31 38 40

.. .. ..

41 43 43

..

43

..

44

..

44

..

44

xi

xii

List of Figures

Fig. 5.1 Fig. 5.2 Fig. 5.3 Fig. 5.4 Fig. 5.5 Fig. 6.1 Fig. 6.2 Fig. 6.3 Fig. 6.4 Fig. 6.5 Fig. Fig. Fig. Fig. Fig. Fig.

6.6 6.7 6.8 6.9 6.10 7.1

Fig. 7.2 Fig. 7.3 Fig. Fig. Fig. Fig. Fig.

7.4 7.5 7.6 7.7 7.8

Fig. 7.9 Fig. 7.10 Fig. 7.11 Fig. 7.12

Illustration of state trajectory when initial state is located above CBþ or below CAþ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Illustration of state trajectory when initial state is located inside IR between CBþ and CAþ and beyond Gð2Þ . . . . . . . . . Illustration of the region X2 , Xh[0:5 and Xh0:5 . . . . . . . . . . . Convergence path for any initial state M located in the region Xh[0:5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convergence path for any initial state M located in the region Xh0:5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Characteristic curves of magnitude frequency and phase frequency for Fast based TD . . . . . . . . . . . . . . . . . . . . . . . . . Block diagram of TD group with phase compensation when m¼4........................................... Filtering outputs and their partial enlargement with phase compensation for real data . . . . . . . . . . . . . . . . . . . . . . . . . . . Isochronic Regions Gð1Þ and Gð2Þ on the phase plane . . . . . . Illustration of CA , CB and CC , where CA ¼ CAþ [ C A, . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ CB ¼ CBþ [ C B ~þ, C ~  and C ~0 . . . . . . . . . . . . . . . . . . . . . . . . Illustration of C Signal-tracking filtering with an SNR value of 45 dB . . . . . . Differentiation acquisition with an SNR value of 45 dB . . . . . Signal-tracking filtering with an SNR value of 35 dB . . . . . . Differentiation acquisition with an SNR value of 35 dB . . . . . Output of current magnitude SE filtering using the real-time PMU data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The suspension system and its control framework in the maglev transportation . . . . . . . . . . . . . . . . . . . . . . . . . . Experimental platform of a maglev bogie with suspension control systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gap tracking filtering when the train is in rising phase . . . . . . Speed estimation when the train is in rising phase . . . . . . . . . Gap tracking filtering when the train is in stable suspension . Speed estimation when the train is in stable suspension . . . . . The comparison of suspension control performance among three different control scheme . . . . . . . . . . . . . . . . . . . . . . . . . Synchronous traction system . . . . . . . . . . . . . . . . . . . . . . . . . . Track joint in traction system . . . . . . . . . . . . . . . . . . . . . . . . . The expected output of the position sensor when the maglev train passes over track joint . . . . . . . . . . . . . . . . . . . . . . . . . . Results of magnetic pole phase filtering and phase compensation with the algorithm Fast and Fhan . . . . . . . . . .

..

49

.. ..

51 56

..

56

..

57

..

64

..

65

.. ..

66 68

.. . . . . .

70 71 73 73 74 74

..

79

..

81

. . . . .

. . . . .

83 83 84 84 85

.. .. ..

85 87 87

..

87

..

88

. . . . .

List of Tables

Table 3.1 Table 3.2 Table 4.1 Table 6.1 Table 7.1

Comparisons of the computational resources needed in FPGA of Fhan and Fast . . . . . . . . . . . . . . . . . . . . . Comparisons of the average execution time of Fhan and Fast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison of results among Fhan, Ftd, and Fast . . . The value of coefficient ami . . . . . . . . . . . . . . . . . . . . . Comparisons of the execution time of Fast and KF with same data window width . . . . . . . . . . . . . . . . . . .

.......

32

....... ....... .......

32 45 65

.......

79

xiii

Chapter 1

Introduction

In this chapter, we first present the background information regarding a differentiator system. Then we take two cases to show the importance of designing a differentiator for acquiring signal-tracking filtering and differential signals in real-life engineering. Exploring and implementing practical, effective and efficient differentiator algorithms is the main focus of our research work. Finally, the main work and book framework are presented.

1.1 Background The real-time signal-tracking filtering and differentiation estimation of a given signal is a common and important problem in control theory and control engineering practice [1–3]. For example, in missile intercept systems, acquiring real-time and accurate velocity and acceleration information of an objective is critically important for designing a feedback controller to intercept the objective [4]. In thermal industrial applications, obtaining effective rate of the thermal change plays a key role in controlling a thermal process [5]. For magnetic levitation systems, knowing effective gap (between the electromagnet and the objective) and its corresponding velocity signals is vital to construct the suspension feedback controller [6] to guarantee the vehicle to stably suspend on the guideway. The same happens in other control and signal processing related cases [7–10]. For a given signal with the explicit mathematical expression, like basic functions, we can calculate its differentiation outputs by performing the derivative operation. For most cases in real-life engineering, however, a signal sequence that is usually collected from a sensor has no definite mathematical expression, and the difference method is usually applied to determine its differentiation outputs. Inevitable noises existing in signals from sensors make the derivative outputs inaccurate. The state observer or disturbance estimator is utilized to estimate the differential signals when the dynamic model of a system is known. However, the system model is not © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_1

1

2

1 Introduction

Fig. 1.1 The schematic diagram of a differentiator system

always accessible. This leads to the extensive studies on designing the model-free differentiators. Based on a given known second-order system, one can construct a corresponding differentiator by designing the control algorithm for that system to acquire filtering signals and the corresponding differential signals simultaneously (see Fig. 1.1). As shown in Fig. 1.1, a differentiator system only needs measurable and bounded signals collected from sensors as its inputs. Not requiring the model of the objective plant, a differentiator system is usually regarded as a model-free approach to obtain filtering and differential signals. In the following, we will take two real-life engineering cases in detail to show the importance of designing a differentiator.

1.1.1 The Feedback Controller Design A feedback control system is one in which the output signal is sampled and then fed back to the input to form an error signal that drives the system [1]. A PID controller is a control loop mechanism employing feedback that is widely used in industrial control systems and a variety of other applications requiring continuously modulated control [2]. A PID controller continuously calculates an error value e(t) as the difference between a desired setpoint (SP) and a measured process variable (PV) and applies a correction based on proportional, integral, and derivative terms (denoted P, I, and D respectively), hence the name. The block diagram (see Fig. 1.2) shows the principles of how these terms are generated and applied. Therein, term D is a best estimate of the future trend of the error, based on its current rate of change. Noise is a random disturbance on a signal [11]. When one is dealing with sensors, both mechanical and electronic sensors, noises are unavoidable. These noises produce tiny shifts and voltage over a wide range of frequencies, which in turn produces shifts in the measurement itself. Usually, the noises with the small amplitude and high frequency are not capable of impacting a system. But that is not true for an ideal PID controller because this has a pure derivative. Derivative can amplify high frequency signals and take those tiny barely noticeable wiggles and amplify them to values that can impact the system. Term D is sometimes called “anticipatory control”, as it is effectively seeking to reduce the effect of the error by exerting a control influence generated by the rate of error change. Therefore, it is

1.1 Background

3

Fig. 1.2 A block diagram of a PID controller in a feedback loop

Fig. 1.3 Resilience consists of hardening, fault identification, corrective actions, and restoration in power systems

necessary to design a differentiator to acquire effective signal filtering and differential signals to participate in the feedback controller design.

1.1.2 State Estimation in Power Systems Secure and reliable power plays an essential part in social well-being [12]. To enhance power system resilience, the following measures based on accurate state estimation results can be taken into consideration (see Fig. 1.3): • Hardening and resilience investment: using advanced technologies, such as advanced power components, that help systems limit damage

4

1 Introduction

• Fault identification and appropriate control actions: the use of appropriate control actions from operators during pre-cascading phase based on state estimation results • Corrective actions and emergency response: the use of fast automatic actions based on state estimation results to prevent systems from evolving into an uncontrollable high-speed cascading phase • Restoration and damage assessment: the use of techniques and tools to restore electricity service so as to help consumers access normal power sources for their normal work The above four measures are potential ways to improve the power system’s resilience [13]. Therein, as shown in Fig. 1.3, state estimation accounts for the fundamental function in power systems, in particular for the second and third measures above. It serves to estimate the real-time operating states and help operators carry out the appropriate emergency control actions [14]. Driven by the importance of the state estimation, an increasing number of phasor measurement units (PMUs) are being deployed in power systems. These devices provide accurate and synchronized voltage/current phasors and/or frequency data and thus are capable of measuring the power-system state [15]. The data collected from PMU sensors, however, is prone to corruption by noises, which makes the PMU data not able to be directly applied in advanced applications. In practice, the noises in PMUs refer to the summation of different noises created from different sources that stem from things like environment that a PMU is operating in, which include both naturally occurring noises and man-made noises. Also, the noises include the specific implementation of PMU’s electronics and manufacturing defects. Due to the high complexity of the power system model, it is difficult to utilize the model-based observers to design the state estimation algorithms. Therefore, it is necessary to adopt the aforementioned modelfree differentiator to carry out the signal filtering and differentiation estimation, like the estimation of rate of frequency change in power systems.

1.2 Research Contents The objective of this book is to greatly enrich both theory and practice of the differentiator algorithms. The main contributions are twofold: (1) putting forward some practical, effective and efficient tracking differentiator algorithms; (2) providing some references for engineers by managing the applications of the proposed tracking differentiator algorithms in real-life engineering. Specifically, the tracking differentiator algorithms are proposed based on discrete-time optimal control (DTOC) algorithms, and the full convergence analysis is given. Further, we will demonstrate how to apply them in the power systems’ state estimation and the signal processing for the maglev train. The main research contents cover the followings. A. Tracking Differentiator algorithms • A closed-form mathematical derivation for the DTOC algorithm ( f han) was first proposed by Jingqing Han. The f han algorithm is determined by comparing the

1.2 Research Contents

5

position of the initial state with the isochronic regions (IRs) obtained through the non-linear boundary transformation. This makes the structure of the f han algorithm to be complex with non-linear calculations, including square-root calculations. To reduce the complexity of the f han algorithm, we will design a new DTOC algorithm (Fast) by adopting a linearized criterion in constructing its control signal sequence. To unify different DTOC algorithms in designing corresponding DTOC-TDs, a general form of DTOC algorithm based on the general boundary transformation is presented. • The DTOC algorithms have been widely used to design controllers, observers and noise-tolerant differentiators. The convergence of DTOC-TD algorithms, however, is still an open question, which makes their applications technically unsound. We will test the convergence of the DTOC algorithms via some easily checkable procedures. • A good differentiator shall have exactness with a small phase delay in both signal filtering and differentiation estimation. To fulfil this requirement, two approaches are designed and proposed to improve the phase quality of DTOC-TDs. B. Tracking Differentiators in Real-life engineering • To perform state estimation in power systems, the field PMUs data are processed by using the proposed Fast-TD. Not requiring complex power system modeling and historical data, the proposed TD is suitable for real-time synchrophasor estimation application especially when the states are corrupted by noises. • The proposed f sp-TD is applied to obtain the gap filtering signals and its corresponding velocity signals to participate in the feedback controller design for the suspension control system in the maglev train. • The proposed TD with phase delay compensation method is utilized to filter the noises and amend distortion signals in the speed and position detection system when the maglev train is passing over the track joints.

1.3 Layout of the Chapters Figure 1.4 demonstrates the main research work and book framework. Specifically, there exist two main parts including the theories and applications of tracking differentiator algorithms. The first part introduces DTOC-TDs and the algorithms’ convergence analysis in detail. The second part of the book presents the applications of the proposed algorithms in some real-life engineering. Chapters’ layout is shown as follows: • Chapter 2 provides a comprehensive literature review on differentiators including their types, working principles, characteristics and applications, etc. The limitations of previous literature and the advantages of DTOC-TDs over others are analyzed.

6

1 Introduction

Fig. 1.4 Main work and book framework

• Chapter 3 investigates the discrete-time optimal control (DTOC) algorithms that will be used to design tracking differentiators. • Chapter 4 presents the new tracking differentiators based on the proposed DTOC algorithms, and then shows their good performances in both signal-tracking and differentiation acquisition. • Chapter 5 gives the full convergence proof for the DTOC-TDs by using the tool of Lyapunov function and the method of state sequence convergence to make DTOC-TDs application technically sound. • Chapter 6 comes up with two approaches in the DTOC-TDs to reduce the phase delay for a large class of inputs in respect to different levels of noises. • Chapter 7 demonstrates the applications of the proposed DTOC-TDs together with phase delay compensation algorithms in (i) the static state estimation in power systems integrating PMUs measurements; and (ii) the signal processing and the feedback controller design in the maglev train. • Chapter 8 gives a summary of book work and some future work on tracking differentiators.

References 1. Franklin GF, Powell JD, Emami-Naeini A, Powell JD (2002) Feedback control of dynamic systems, vol 4. Prentice Hall, Upper Saddle River 2. Åström KJ, Hägglund T, Astrom KJ (2006) Advanced PID control, vol 461. ISA-The Instrumentation, Systems, and Automation Society, Research Triangle Park, NC

References

7

3. Levant A (2019) Homogeneous filtering and differentiation based on sliding modes. In: 2019 IEEE 58th conference on decision and control (CDC). IEEE, pp 6013–6018 4. Zhao Z, Li C, Yang J, Li S (2019) Output feedback continuous terminal sliding mode guidance law for missile-target interception with autopilot dynamics. Aerosp Sci Technol 86:256–267 5. Mansour SE, Kember GC, Dubay R, Robertson B (2005) Online optimization of fuzzy-PID control of a thermal process. ISA Trans 44(2):305–314 6. Zhang H, Xie Y, Xiao G, Zhai C, Long Z (2018) A simple discrete-time tracking differentiator and its application to speed and position detection system for a maglev train. IEEE Trans Control Syst Technol 27(4):1728–1734 7. Yang Z, Ji J, Sun X, Zhu H, Zhao Q (2019) Active disturbance rejection control for bearingless induction motor based on hyperbolic tangent tracking differentiator. IEEE J Emerg Select Top Power Electron 8. An H, Fidan B, Wu Q, Wang C, Cao X (2019) Sliding mode differentiator based tracking control of uncertain nonlinear systems with application to hypersonic flight. Asian J Control 21(1):143–155 9. Nayak C, Saha SK, Kar R, Mandal D (2019) An efficient and robust digital fractional order differentiator based ECG Pre-processor design for QRS detection. IEEE Trans Biomed Circuits Syst 13(4):682–696 10. Guo X, Yan W, Cui R (2019) Reinforcement learning-based nearly optimal control for constrained-input partially unknown systems using differentiator. IEEE Trans Neural Netw Learn Syst 11. Åström KJ, Hägglund T (2001) The future of PID control. Control Eng Pract 9(11):1163–1175 12. Diao R, Vittal V, Logic N (2010) Design of a real-time security assessment tool for situational awareness enhancement in modern power systems. IEEE Trans Power Syst 25(2):957–965 13. Hosseini S, Barker K, Ramirez-Marquez JE (2016) A review of definitions and measures of system resilience. Reliab Eng Syst Saf 145:47–61 14. Primadianto A, Lu CN (2017) A review on distribution system state estimation. IEEE Trans Power Syst 32(5):3875–3883 15. Zhao J, Zhang G, Das K, Korres GN, Manousakis NM, Sinha AK, He Z (2016) Power system real-time monitoring by using PMU-based robust state estimation method. IEEE Trans Smart Grid 7(1):300–309

Chapter 2

Literature Review

Differentiator, also known as an observer, is a system constructed to estimate the signal-tracking filtering, differential signals and/or higher-order differential signals from measurements of the output of a real system. In this chapter, we provide a literature review of approaches that can be utilized to obtain the filtering and differential signals. First, both common model-based observer and differentiator approaches for signal-tracking filtering and differential estimation are reviewed. The limitations of previous literature and the advantages of time optimal control based tracking differentiators over theirs are then analyzed.

2.1 State Obersver Acquiring the system state is necessary to solve many control engineering problems [1–3]; for example, stabilizing a system using state feedback. A state observer is a system that provides an estimation of the internal state of a given real system, from measurements of the input and output of the real system. Consider a continuous-time linear and time-invariant physical system 

x˙ = Ax + Bu y = C x + Du,

(2.1)

where x ∈ R, u ∈ Rm , y ∈ Rr and the matrices A, B and C are parameters of the state-space model. The most commonly-used Luenburger Observer is constructed as [4]  x˙ˆ = A xˆ + Bu + L(y − yˆ ) (2.2) yˆ = C xˆ + Du.

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_2

9

10

2 Literature Review

The observer error e = x − xˆ satisfies the equation e˙ = (A − LC)e.

(2.3)

The Luenberger observer for system (2.1) can be asymptotically stable when the observer gains L are chosen to make the continuous-time error dynamics converge to zero asymptotically (i.e., when A − LC is a Hurwitz matrix). In most practical cases, the physical state of the system cannot be determined by direct observation. The Luenberger observer in (2.2) provides a practical and effective way to estimate the internal variables of a system including signal filtering and differential signals that are otherwise unknown. This allows the observer to be widely applied in filtering, estimation, control, and many other real-life engineering. When the observer gain L is high, the linear Luenberger observer converges to the system states very quickly. However, high observer gain leads to a peaking phenomenon in which initial estimator error can be prohibitively large (i.e., impractical or unsafe to use). Also, inevitable issues in real-life engineering, such as measurement noises, model uncertainty, non-linearity of a system, external and internal disturbance, etc., cannot be ignored, which stimulates the birth of some advanced techniques to construct the observers. To briefly introduce a few other commonly-used observers, a generalized secondorder nonlinear system is considered and described as follows: ⎧ ⎨ x˙1 = x2 x˙2 = f (x1 , x2 , w) + bu ⎩ y = x1

(2.4)

where f (x1 , x2 , w) is the dynamics of the system, w is the unknown disturbances, x1 and x2 are the systems states, u is its inputs, and y is its outputs. The system parameter b is assumed to be known. Based on the system (2.4), the following three common state observer are reviewed below. (1) Sliding-mode observer For the system (2.4), one can design a corresponding sliding-mode observer as follows [5]  x˙ˆ1 = α1 e1 + xˆ2 + k1 sign(e1 ) (2.5) x˙ˆ2 = α2 e1 + f 0 + bu + k2 sign(e1 ) where e1 = x1 − xˆ1 , f 0 is an estimate of f (x1 , x2 , w) and the parameters α1 and α2 are selected to ensure asymptotic error decay of a corresponding linearised system representation, where k1 = 0 and k2 = 0. The sliding-mode control based observer has many advantages [6, 7]. For example, it can bring an estimated state’s error to zero in finite time even in the presence of measurement error; the errors existing in other states have similar error characteristic that exists in a Luenberger observer. Sliding mode observers also have attractive noise tolerance properties that are similar to those of a Kalman filter. A disadvantage of the method in the domain of control applications has been the necessity to imple-

2.1 State Obersver

11

ment a fundamentally discontinuous control signal which, in theoretical terms, must switch with an infinite frequency to provide total rejection of uncertainty. Control implementation via approximate, smooth strategies is widely reported [9, 10], but in such cases total invariance is routinely lost. (2) High-gain observer According to the system (2.4), the construction of a high-gain observer can be defined as follows [11]:  x˙ˆ1 = xˆ2 + h 1 e1 (2.6) x˙ˆ2 = f 0 + bu + h 2 e1 where e1 = x1 − xˆ1 and f 0 is an estimate of f (x1 , x2 , w). The estimation error equations are  e˙1 = −h 1 e1 + e2 e˙2 = −h 2 e1 + δ(x1 , x2 , e1 , e2 , w) where e2 = x2 − xˆ2 and δ(x1 , x2 , e1 , e2 , w) is the disturbance term. Without the disturbance term, one can achieve the asymptotic error convergence when the observer gain is Hurwitz. Then the parameters h 1 and h 2 can be determined. In the presence of the disturbance term, we determine the parameters with the additional goal of rejecting the effects of δ on e1 and e2 . High-gain observer has evolved over the past two decades as an important tool for the design of output feedback control of nonlinear systems due to its simplicity [12, 13]. The transient response of the high-gain observer, however, suffers from the peaking phenomenon. This limits its applications in real-life engineering. (3) Extended state observer The aforementioned observers heavily depend on the knowledge of the system dynamics ( f (x1 , x2 , w)). To reduce its dependence on the system, an alternative approach is proposed by Han [14], that is, extended state observer (ESO). In this approach, the system dynamics with internal and external disturbances are to be extended as an another state variable [15–17]. Thus, the system in (2.4) can be changed to ⎧ x˙1 = x2 ⎪ ⎪ ⎨ x˙2 = x3 + b0 u (2.7) x˙3 = d ⎪ ⎪ ⎩ y = x1 where h = f (x1 , ˙x2 , w) and b0 is an estimate of b. By extending f (x1 , x2 , w) as a state variable, Han proposed the following observer: ⎧ z˙ 1 = z 2 + β01 g1 (e) ⎪ ⎪ ⎨ z˙ 2 = 2 + β02 g2 (e) + b0 u ⎪ z˙ 3 = β03 g3 (e) ⎪ ⎩ y = x1

(2.8)

12

2 Literature Review

where e = x1 − z 1 . The term z 3 is an estimate of the f (x1 , x2 , w). gi (·) is the function to be used in designing ESO. When a linear function is applied, it is equivalently a linear ESO for system (2.4) and it is similar to the high-gain observer in (2.6) [18]. However, to improve the observation efficiency, a modified exponential gain function is usually adopted in ESO. More detailed design and parameters’ tuning can be found in the corresponding references [15, 17]. Originally proposed by Luenberger, the state observers become useful in not only system states’ monitoring and estimation but also in fault detection and fault-tolerant control. With aforementioned observers, one can estimate the filtering and differential signals of systems. However, almost all the observers are heavily dependent on the accuracy of the mathematical model of the system to obtain filtering and differential signals. Even in ESO, we may need to know the inputs of the systems. Also, according to extensive simulation investigations, the presence of disturbances, dynamic uncertainties, and nonlinearities pose great challenges in practical applications [15, 18]. Toward this end, the model-free tracking differentiator design has been a topic of considerable interest recently for acquiring the filtering and differential signals of a system. In the following, we will briefly review the works on the tracking differentiator.

2.2 Tracking Differentiator The real-time filtering and differentiation estimation of a given unknown signal is an essential and common problem in many fields [10, 20, 21]. It is a challenging problem to estimate the exact derivative signals from the noise-polluted inputs. A state observer or disturbance estimator is therefore usually utilized to estimate the differential signals when the system model is given. However, the model of the system is not always accessible. For this reason, the design of a differentiator becomes necessary in some cases and has attracted much attention in recent years. For example, a finite-time-convergent differentiator was presented by adopting the singular perturbation technique in [22]. The properties of two different linear time-derivative trackers were studied in [23]. In [24], a continuous hybrid differentiator was proposed based on a strong Lyapunov function, of which the dynamical performance was improved by combining linear and nonlinear parts in its algorithm. Readers can refer to the references [25–27] for more research work on differentiators. Among extensive studies on differentiators, to the best of our knowledge, the tracking differentiator (TD) is one of most commonly-used algorithms in real-life engineering. Due to the space limitation, we will only review the tracking differentiator. A differentiation of a signal v(t) is usually obtained approximately as y(t) ≈

1 (v(t) − v(t − τ )) ≈ v(t), ˙ τ

2.2 Tracking Differentiator

13

where τ is a small positive constant. Let delay signal v(t − τ ) be denoted by y1 (t). Then we have ˆ yˆ1 (s) = e−τ s v(s). Approximating esτ by its first order in Taylor expansion, which is 1 + sτ as τ is small, we have 1 v(s). ˆ yˆ2 (s) = 1 + τs The state-space realization of the above equation is 1 y˙2 (t) = − (y2 (t) − v(t)). τ Further, we have y2 (t) =

1 τ



t

e− τ (t−ρ) v(ρ)dρ. 1

0

This obtained delayed signal can filter the high-frequency noises. Therefore, when the input v(t) is polluted by high-frequency noises, e.g.., n(t) with zero expectation, the input is v(t) + n(t) instead of v(t), y2 (t) can also approximate v(t − τ ) satisfactorily. However, y(t) ≈

1 1 (v(t) + n(t) − y2 (t) − n(t − τ )) ≈ v(t) ˙ + n(t) τ τ

is quite sensitive to the noise in v(t) because it is amplified by a factor of 1/τ . To address this issue, Han proposed a noise tolerant tracking differentiator [14]: v(t) ˙ ≈

v(t − τ1 ) − v(t − τ2 ) τ2 − τ1

(2.9)

where parameters τ1 and τ2 are two time constants and they satisfy 0 < τ1 < τ2 . Its state-space realization is 

x˙1 = x2 x˙2 = − τ11τ2 (x1 − v(t)) −

τ2 −τ1 x . τ1 τ2 2

(2.10)

System (2.9) is a special form of the nonlinear TD proposed by Han as follows:  x˙1 = x2 (2.11) x˙2 = r 2 f (x1 − v(t), xr2 ), where r is the tuning parameter, f (·) is an appropriate nonlinear function. The differentiator with the format in (2.10) can be called as a tracking differentiator where we obtain the differential signals by tracking the inputs. It is the desire to find

14

2 Literature Review

a differentiator yielding the fastest tracking that leads us to the time-optimal control based tracking differentiator as presented in the following. The double-integral system is defined as x˙1 = x2 , x˙2 = u, where |u| ≤ r , r is a constant constraint of the control input. The resulting feedback control law that drives the state from any initial point to the origin in the shortest time is u = −r sign(x1 − v + x22r|x2 | ), where v is the desired value for x1 . Using this principle, one can obtain the desired trajectory and its derivative by solving the following differential equations: 

v˙1 = v2 , v˙2 = −r sign(v1 − v +

v2 |v2 | ) 2r

(2.12)

where v1 is the desired trajectory and v2 is its derivative. The advantage of this TOC-based TD is that it sets a weak condition on the stability of the systems to be constructed for TD and requires a weak condition on the input [28–30]. Because most control algorithms are now implemented in discrete time domain, a closed-form discrete-time optimal control (DTOC) law is needed for constructing TD with such favourable characteristics. Direct digitization of a continuous TOC solution proves to be problematic in practice because of the highfrequency chattering of the control signals. The work of Han provides an alternative mathematical solution to the DTOC problem, known as f han [14]. It was constructed based on an idea that goes back to 1950s: the concept of isochronous region for a discrete-time, double-integral plant. By introducing a boundary layer around the switching curve of bang-bang control, f han resolves the long-standing issue of chattering in the control signal of a continuous TOC solution. This characteristic confers an advantage of smoothness to the DTOC-based TD (denoted as DTOC-TD) when compared with a sliding-mode-based differentiator. However, there are still many challenges regarding the DTOC-TDs remained to be resolved. For example, does there exist the uniqueness of the boundary layer and boundary curves in constructing DTOC algorithms? Does there exist a general DTOC algorithm that can be used to construct a general DTOC-TD? Could any approaches be applied to improve the phase delay in both filtering and differentiation estimation? Can we give the full convergence proof for DTOC-TDs to make their applications sound? How to apply DTOC-TDs in real-life engineering? In the following chapters, we will show readers how our work for resolving the above challenges.

References 1. Besanon G (2007) Nonlinear observers and applications, vol 363. Springer. Berlin 2. Jo NH, Seo JH (2000) Input output linearization approach to state observer design for nonlinear system. IEEE Trans Autom Control 45(12):2388–2393 3. Chen X, Kano H (2004) State observer for a class of nonlinear systems and its application to machine vision. IEEE Trans Autom Control 49(11):2085–2091 4. Luenberger D (1966) Observers for multivariable systems. IEEE Trans Autom Control 11(2):190–197

References

15

5. Spurgeon SK (2008) Sliding mode observers: a survey. Int J Syst Sci 39(8):751–764 6. Shtessel Y, Edwards C, Fridman L, Levant A (2014) Sliding mode control and observation. Springer, New York, pp 1–42 7. Davila J, Fridman L, Levant A (2005) Second-order sliding-mode observer for mechanical systems. IEEE Trans Autom Control 50(11):1785–1789 8. Chalanga A, Kamal S, Fridman LM, Bandyopadhyay B, Moreno JA (2016) Implementation of super-twisting control: Super-twisting and higher order sliding-mode observer-based approaches. IEEE Trans Ind Electron 63(6):3677–3685 9. Liang D, Li J, Qu R (2017) Sensorless control of permanent magnet synchronous machine based on second-order sliding-mode observer with online resistance estimation. IEEE Trans Ind Appl 53(4):3672–3682 10. Khalil HK (2008) High-gain observers in nonlinear feedback control. In: 2008 International conference on control, automation and systems. IEEE, pp xlvii–lvii 11. Prasov AA, Khalil HK (2012) A nonlinear high-gain observer for systems with measurement noise in a feedback control framework. IEEE Trans Autom Control 58(3):569–580 12. Khalil HK, Praly L (2014) Hig-gain observers in nonlinear feedback control. Int J Robust Nonlinear Control 24(6):993–1015 13. Andrieu V, Praly L, Astolfi A (2009) High gain observers with updated gain and homogeneous correction terms. Automatica 45(2):422–428 14. Han J (2009) From PID to active disturbance rejection control. IEEE Trans Ind Electron 56(3):900–906 15. Li S, Yang J, Chen WH, Chen X (2011) Generalized extended state observer based control for systems with mismatched uncertainties. IEEE Trans Ind Electron 59(12):4792–4802 16. Guo BZ, Zhao ZL (2011) On the convergence of an extended state observer for nonlinear systems with uncertainty. Syst Control Lett 60(6):420–430 17. Wang L, Gao Z, Zhou X, Han Z (2020) Exponential stabilization of a star-shaped thermoelastic network system based on the extended state observer with time-varying gains. IEEE Trans Autom Control 18. Gao Z (2006) Scaling and bandwidth-parameterization based controller tuning. In: Proceedings of the American control conference, vol 6, pp 4989–4996 19. Ang KH, Chong G, Li Y (2005) PID control system analysis, design, and technology. IEEE Trans Control Syst Technol 13(4):559–576 20. Shao X, Liu J, Li J, Cao H, Shen C, Zhang X (2017) Augmented nonlinear differentiator design and application to nonlinear uncertain systems. ISA Trans 67:30–46 21. Bu X, Wu X, Zhang R, Ma Z, Huang J (2015) Tracking differentiator design for the robust backstepping control of a flexible air-breathing hypersonic vehicle. J Frankl Inst 352(4):1739– 1765 22. Wang X, Chen Z, Yang G (2007) Finite-time-convergent differentiator based on singular perturbation technique. IEEE Trans Autom Control 52(9):1731–1737 23. Ibrir S (2004) Linear time-derivative trackers. Automatica 40(3):397–405 24. Wang X, Lin H (2011) Design and analysis of a continuous hybrid differentiator. IET Control Theory Appl 5(11):1321–1334 25. Levant A (1998) Robust exact differentiation via sliding mode technique. Automatica 34(3):379–384 26. Shao X, Liu J, Yang W, Tang J, Li J (2017) Augmented nonlinear differentiator design. Mech Syst Signal Process 90:268–284 27. Ibrir S (2003) Online exact differentiation and notion of asymptotic algebraic observers. IEEE Trans Autom Control 48(11):2055–2060 28. Guo BZ, Zhao ZL (2011) On convergence of tracking differentiator. Int J Control 84(4):693– 701 29. Xue W, Huang Y, Yang X (2010) What kinds of system can be used as tracking-differentiator. In: Proceedings of the 29th Chinese control conference. IEEE, pp 6113–6120 30. Guo BZ, Zhao ZL (2015) Active disturbance rejection control: theoretical perspectives. Commun Inf Syst 15(3):361–421

Chapter 3

Discrete Time Optimal Control Algorithm

3.1 Introduction Time optimal control (TOC) originated from servo control design problems in the 1950s [1, 2], and has drawn significant interests in the field of applied mathematics [3]. The relevant research work gave birth to optimal control theory [4]. In particular, Pontryagin’s minimum principle greatly simplified the mathematical derivation of time optimal control law [5]. Based on this principle, the existence and uniqueness of the solution were proved for the TOC of a double-integral plant [6, 7]. That is,  x˙1 = x2 (3.1) x˙2 = u, where x(t) = [x1 (t), x2 (t)]T ∈ R 2 , the resulting feedback control law (i.e., bangbang control) that drives the state from any initial point to the origin in the shortest time is x2 |x2 | ) (3.2) u(x1 , x2 , r ) = −r sign(x1 + 2r and therein the switching curve function is (x1 , x2 ) = x1 +

x2 |x2 | . 2r

There are many advantages of this time optimal control law over linear controllers: (1) any initial state can be driven back to the steady state in the shortest and finite time; (2) it is immunized against disturbance and has maximum accuracy in command following and minimal disturbance recovery time. However, from an engineering perspective, the applications of time optimal control prove to be challenging [8]. A nagging issue is the chattering problem in the control signals, that is, the instant switching between extreme values in the control © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_3

17

18

3 Discrete Time Optimal Control Algorithm

signals required by TOC. It is often neither feasible, because of the physical limits on how fast a control signal can change, nor desirable, because of the stress it puts on the control actuators. A number of modifications of the control law in (3.2) have been proposed to ease the implementation, including adding a linear zone to reduce the chattering of control signals around the origin, replacing the sign function in (3.2) with the saturation function and so forth [9, 10]. These modifications, however, can only make the solution to be suboptimal because the chattering problem still exists. Further, with the great developments of computer control technology, most control algorithms are implemented in discrete time domain today. Direct digitization of continuous TOC solution proves to be problematic in practice because of the high frequency chattering of the control signals. It was demonstrated that TOC for discrete systems is not a bang-bang control in [11, 12], but digitized bang-bang control has been used as an approximation for the discrete time optimal control (DTOC) problems. In [13], minimum-time feedback control laws for different applications are proposed and algorithms are given to obtain facial descriptions of admissible set. In [14, 15], the non-closed-form of the shortest time feedback control algorithms for linear systems are proposed. In [16–18], the time-optimal model predictive control (MPC) schemes are presented. A discrete-time closed-form solution ( f han algorithm) for TOC problem [11] was proposed by Jinqing Han. This algorithm is constructed by the method of the isochronic regions (IRs) for the double-integral system [11, 12], and it has advantageous smoothness. Meanwhile, Han built a tracking differentiator (TD) via this discrete-time optimal control (DTOC) algorithm [19]. The TD baed on the proposed DTOC algorithm allows one to avoid a setpoint jump in the emerging active disturbance-rejection controller (ADRC) [11, 20]. However, the boundary curves of that IRs where the control signals take on non-extreme values are determined by a nonlinear boundary transformation. This means taking on a non-extreme value of control signal needs carrying out a non-linear boundary transformation operation inside that IRs. This gives f han a complex structure with non-linear calculations, including square-root calculations. Based on the above analysis on the time optimal control, first, this chapter presents the construction of the f han algorithm in detail. To clearly demonstrate the determination of the control signals for different initial states in the f han algorithm, we have adopted three boundary curves ( A ,  B and C ) in algorithm construction to better distinguish different regions on the phase plane that initial state set belongs to [21]. Second, the mathematical derivation of a new and simple closed-form discrete optimal control law for the discrete form of system (3.1) is presented [22]. This control law avoids the overshoot and the high frequency chattering of the control signals that exist in digitized bang-bang control. Compared with the f han algorithm, the proposed discrete optimal control law is determined by the linearized criterion according to the position of the initial state point on the phase plane by adopting the boundary characteristic points, which equips the control law with a simpler structure, making it much easier to be applied in the practical engineering. We also discuss the general form of DTOC law by analysing the relationship between boundary transformations and boundary characteristic points [23].

3.1 Introduction

19

The layout of this chapter is given as follows: the construction of the f han algorithm is presented by adopting boundary curves in Sect. 3.2. A new and simple DTOC algorithm by adopting the linearized criterion is proposed in Sect. 3.3. In Sect. 3.4, we obtain a general form of DTOC law with which one can flexibly design a new algorithm by modifying the boundary characteristic points. Section 3.5 carries out the comparison simulation results to show the performance of two different DTOC algorithms. Also the comparisons of the computational complexities between the proposed DTOC law and normal one are demonstrated. Section 3.6 concludes the work in this chapter.

3.2 The fhan Algorithm In this section, for integrity of the work, the construction of the DTOC algorithm, that is, f han algorithm, is presented by adopting three boundary curves ( A ,  B and C ). We consider the following discrete-time double-integral system x(k + 1) = Ax(k) + Bu(k)

(3.3)

  1h where |u| ≤ r gives the limitation of system acceleration, A = , and B = 01  T 0 h . We aim to drag any system state to the steady state within the shortest time in discrete-time domain. The following definition of this problem is given. DTOC Problem: Given system (3.3) and its initial state x(0), determine the control signal sequence, u(0), u(1),..., u(k), such that the state x(k) is driven back to the origin in a minimum and finite number of steps, subject to the constraint that |u(k)| ≤ r . That is, finding u(k ∗ ), |u(k)| ≤ r , such that k ∗ = min {k|x(k) = 0}. For a discrete-time system, the state is measured only at the sampling instants, t = kh, where h is the sampling period for the system. If we treat the measurement, x(kh), as if it were an initial condition, x(0), then all we need to find is u(0) at each sampling instant. We may repeat such an operation until the system state reaches the origin. This logic is used to derive the DTOC algorithm. The method of the isochronic region (G(k)) is applied in the deduction of this algorithm. G(k) denotes the set of states that, for any x(0) ∈ G(k), there is as least one admissible control sequence, u(0), u(1), ..., u(k), which makes the solution of (3.3) satisfy x(k) = 0. The basic idea in deriving the DTOC algorithm is to find u(0) / G(k − 1), such that the next state x(1) satisfies for any x(0) ∈ G(k) and x(0) ∈ x(1) ∈ G(k − 1). This process is divided into two parts: I: Determine G(k), i.e., the presentation of the initial condition, x(0), in terms of h and r , from which the state can be driven back to the origin in k steps; II: For any given initial condition x(0), find the corresponding control signal sequence.

20

3 Discrete Time Optimal Control Algorithm

First, let’s examine G(k). For any initial state sequence, at least one admissible control sequence exists, e.g., u(0), u(1), ..., u(k), that makes the solution to (3.3) satisfy x(k) = 0. Under the initial condition x(0), the solution is x(k) = A x(0) + k

k 

Ak−i Bu(i − 1)

(3.4)

i=1

Let x(k) = 0, there exist x(0) =

 k   i h2 i=1

Second,

−h

 k 

G(k) =

i=1



Consider G(1) =  G(2) =

u(i − 1)

  i h2 u(i − 1) −h

(3.5)

(3.6)

  h2 u(0) −h

  2  2h h2 u(0) + u(1) −h −h

When the value of r or −r is applied to the control input u(i), the G(k), k = 1, 2 can be shown in Fig. 3.1. G(1) is a line connected by the following two points  {a−1 =

 2   −h 2 r h r , a1 = }. hr −hr

Determined by the following four points, G(2) is a parallelogram.    3h 2 r −3h 2 r , a−2 = } {a2 = −2hr 2hr 



and {b2 =

 2   −h 2 r h r , b−2 = } 0 0

We assume y = x1 + hx2

(3.7)

3.2 The fhan Algorithm

21

Fig. 3.1 G(1) and G(2) on the phase plane

G(2) is surrounded by two pairs of parallel lines described as y = x1 + hx2 = ±h 2 r and y + hx2 = ±h 2 r . The states of G(2) are 0 = {(x1 , x2 ) : |y| ≤ h 2 r ∩ |y + hx2 | ≤ h 2 r } Let ak =

 k  i=1

a−k =

 k  i=1

bk =

 k  i=1

b− k =

  i h2 u(i − 1), u(i) = −r −h

  i h2 u(i − 1), u(0) = r, u(i) = −r f or i > 0 −h

 k  i=1

  i h2 u(i − 1), u(i) = r −h

  i h2 u(i − 1), u(0) = −r, u(i) = r f or i > 0 −h

22

3 Discrete Time Optimal Control Algorithm

According to (3.5) and the control sequence taken above, we obtain a curve that depicts the minimum time state trajectory, denoted as  A , as follows:  A : x1 +

x2 |x2 | 1 + hx2 = 0 2r 2

(3.8)

− where  A =  + A ∪  A (see Fig. 3.2). This state trajectory curve overlaps the above broken line at point {ak , a−k }. Connecting {b−2 , ..., b−(k−1) , b−k , ...} and {..., bk , bk−1 , ..., b2 } forms a broken line. We can determine the expression of its corresponding curve, denoted by  B , as follows: 5 x2 (3.9)  B : x1 − s 2 + hx2 − sh 2 r = 0 2r 2 − where s = sign(x1 + hx2 ) and  B =  + B ∪  B (see Fig. 3.2). This curve overlaps the corresponding broken line at point {bk , b−k , k ≥ 2}. Note that segments [b−k ak ] ([bk a−k ]) are all parallel to each other and their midpoints, ck (c−k ). The broken line is denoted as  0 . We can also obtain the expression of its corresponding curve, denoted by C (see Fig. 3.2), as follows:

C : x1 +

x2 |x2 | 3 + hx2 = 0 2r 2

(3.10)

Connecting the points {..., ak , ak−1 , ..., a2 , b2 , ..., bk−1 , bk } forms a boundary,  + , and points {..., b−k , b−(k−1) , ..., b−2 , a−2 , ..., a−(k−1) , a−k , ...} as  − . Combining the functions of  A and  B with the boundary transformation in (3.7) produces the following: 1 T (x1 , x2 , r, h) = x2 + ( h 2 r 2 + 8r |y| − hr )sign(y), |y| ≥ h 2 r 2

(3.11)

From this, T (x1 , x2 , r, h) = −hr corresponds to the parabolas connecting ak and bk , respectively, and this curve, denoted as ˜ + , overlaps  + at points ak , bk , k ≥ 2. Similarly, T (x1 , x2 , r, h) = hr corresponds to the parabolas connecting a−k and b−k , respectively. This curve, ˜ − , overlaps  − at points a−k , b−k , k ≥ 2. In addition, T (x1 , x2 , r, h) = 0 represents ˜ 0 , which overlaps  0 at points c−k , ck , k ≥ 2. Moreover, ˜ + and ˜ − partition the phase plane in the manner of ⎧ T (x1 , x2 , r, h) ≤ −hr, x = [x1 , x2 ]T is below ˜ + ⎪ ⎪ ⎪ ⎪ ⎨ (3.12) T (x1 , x2 , r, h) ≥ hr, x = [x1 , x2 ]T is above ˜ − ⎪ ⎪ ⎪ ⎪ ⎩ T (x1 , x2 , r, h) ≤ hr, x = [x1 , x2 ]T is between ˜ + and ˜ −

3.2 The fhan Algorithm

23

− + − Fig. 3.2 Illustration of  A ,  B , and C , where  A =  + A ∪  A , and  B =  B ∪  B

Up to now, the state points can be divided into four parts: G(1), G(2), the initial condition (|y| ≥ h 2 r ) inside the area bounded by ˜ + and ˜ − and the remaining portion (see Fig. 3.3). As described by Gao [12], the complete DTOC algorithm is u = −r sat(T (x1 , x2 , r, h), hr )

(3.13)

where  T (x1 , x2 , r, h) =

√ ( h 2 r 2 +8r |y|−hr ) x2 + sign(y), |y| > h 2 r 2 2 x2 + y/ h, |y| ≤ h r

(3.14)

The above law can be shown in (3.15). ⎧ u = f han(x1 , x2 , r, h) ⎪ ⎪ ⎪ ⎪ d = r h; d0 = hd ⎪ ⎪ ⎪ ⎪ y = x1 + hx2 ⎪ ⎪ ⎨ a0 =  d 2 + 8r |y| ⎪ x2 + (a02−d) sign(y), |y| > h 2 r ⎪ T = ⎪ ⎪ ⎪ x2 +y/ h, |y| ≤ h 2 r ⎪ ⎪ ⎪ ⎪ r sign(T ), |T | > d ⎪ ⎩ f han = − r Td , |T | ≤ d

(3.15)

24

3 Discrete Time Optimal Control Algorithm

Fig. 3.3 Illustration of ˜ + , ˜ − , and ˜ 0

The essence of the discrete-time optimal control algorithm ( f han) in (3.15) is a sliding-mode control with the boundary level. By adopting a boundary level near C , the algorithm in (3.13) shows that time optimal control in discrete time is not necessarily bang-bang control, that is, the control signal does not always take on extreme values. This resolves the chattering problem encountered by sliding mode control based differentiators. However, the structure of the f han algorithm is complex with non-linear calculations including square roots calculation, which makes the algorithm difficult to be applied into engineering applications. In the next section, a new and simple discrete time optimal control algorithm will be proposed for better construction of simple tracking differentiator.

3.3 A Simple and Efficient DTOC Algorithm In this subsection, to reduce the f han algorithm’s complexities, a simple and efficient DTOC algorithm is proposed for the system (3.3). The main issue is the same with the definition we have given in the above DTOC Problem. For readability, we will rewrite some important equations here, and the method of the state back-stepping approach is adopted to derive the algorithm. In bang-bang control, the control signal switches between its two extreme values (u = +r or u = −r ) around the switching curve, and it switches the sign instantaneously after reaching the switching curve. For a discrete time system, however,

3.3 A Simple and Efficient DTOC Algorithm

25

the process of sign-switching occurs within a sampling period h. During that process, the corresponding state sequences remain in a certain region (denoted as ) near the switching curve. The control signals for the state sequences in region  are determined by a linearized criterion. The control signal varies from a certain positive (negative) value to a negative (positive) value when control signal u passes from one side of the region  to the other. All initial state sequences outside region  when the control signal takes an extreme value, i.e., u = +r or u = −r , are located at certain curves, referred to as boundary curves  A and  B . Region  is surrounded by these boundary curves. In addition, when the value of the control signal varies in [−r, r ], there exists a state that corresponds to u = 0. All states that correspond to u = 0 constitute another curve, which is referred to as the control characteristic curve C . In deriving the DTOC law, one must find the control signal sequence for any initial state point x(0) ∈  or x(0) ∈ / . The whole task is divided into two parts: I: Determine the boundary curves of region  and the control characteristic curve based on the state back-stepping approach, i.e., the representation of the initial condition x(0) = [x1 (0), x2 (0)]T in terms of h and r , from which the state can be driven back to the origin in (k + 1) steps. II: For any given initial condition x(0) ∈  or x(0) ∈ / , find the corresponding control signal sequence.

3.3.1 Determination of the Boundary Curves and Control Characteristic Curve For any initial state sequence, at least one admissible control sequence exists, e.g., u(0), u(1), ..., u(k), that makes the solution to (3.3) satisfy x(k + 1) = 0. Under the initial condition x(0), the solution is x(k + 1) = Ak+1 x(0) +

k 

Ak−i Bu(i)

(3.16)

i=0

where x(0) = [x1 (0), x2 (0)]T and i = 0, 1, 2, ..., k. It manifests that x(k + 1) = 0. Therefore, the initial condition satisfies x(0) =

 k   (i + 1)h 2 u(i) −h

(3.17)

i=0

Adopting the state back-stepping approach, we can determine the two boundary curves  A and  B as well as the control characteristic curve C as follows: To obtain the boundary curve  A , we suppose that {a+k } and {a−k } are the sets of any x(0) that can be driven back to the origin with the control signal sequence u(i) = +r or u(i) = −r , i = 0, 1, 2, ..., k. For this we specify that all initial states − in set {a+k } consist of  + A and all initial states in set {a−k } consist of  A .

26

3 Discrete Time Optimal Control Algorithm

For set {a+k }, the following result holds when the control signal sequence takes on u(i) = +r according to (3.17).  k   (i + 1)h 2 x(0) = r −h

(3.18)

i=0

2

And we have: x1 (0) = r h 2 ( k2 + 3k2 + 1) and x2 (0) = −r h(k + 1) < 0. Simplifying x(0) into x and eliminating the variable k results in the boundary curve  + A , which is x2 x1 = 2r2 − 21 hx2 , where x2 < 0. Similarly, we can get the boundary curve  − A : x1 = x2

− 2r2 − 21 hx2 , where x2 > 0. Therefore, the entire boundary curve  A (see Fig. 3.4) is x2 |x2 | 1 + hx2 = 0 (3.19)  A : x1 + 2r 2 We then determine the boundary curve  B . If we suppose that {b+k } and {b−k }(k > 2) are the sets of any initial state x(0) that can be driven back to the origin when the control signal takes on u(0) = −r or u(0) = +r in the first step, from then on the control sequence becomes u(i) = +r or u(i) = −r, i = 1, 2, ..., k, respectively. − Similarly, the boundary curve  B consists of  + B and  B . For set {b+k }, the rule presented above for choosing the control signal sequence 2 allows us to obtain x1 = r h 2 ( k2 + 3k2 − 1) and x2 = −r h(k − 1) < 0. Eliminating x2

5 2 2 the variable k, the boundary curve  + B is x 1 = 2r − 2 hx 2 + h r and there exists 1 2 x1 + hx2 = 2 r h k(k + 1) > 0. Similarly, we can obtain the boundary curve  − B: x2

x1 = − 2r2 − 25 hx2 − h 2 r, x1 + hx2 < 0. Therefore, the entire boundary curve  B (see Fig. 3.4) is 5 x2  B : x1 − s 2 + hx2 − sh 2 r = 0 (3.20) 2r 2 where s = sign(x1 + hx2 ). We finally determine the control characteristic curve C . If we suppose that {c+k } and {c−k } (k > 2) are the sets of any initial state x(0) that can be driven back to the origin when the control signal takes on u(0) = 0 beginning in the first step, then the control sequence takes on u(i) = +r or u(i) = −r, i = 1, 2, ..., k. Similarly, the boundary curve C consists of C+ and C− . For set {c+k }, there exists x1 = 21 r h 2 (k 2 + 3k + 2) and x2 = −r hk < 0 according to the rule for choosing the control signal sequence, as shown above. By eliminating x2 the variable k, we have that the control characteristic curve C+ is x1 = 2r2 − 23 hx2 . x2

Similarly we can obtain the control characteristic curve C− : x1 = − 2r2 − 23 hx2 − h 2 r . Therefore, the entire control characteristic curve C (see Fig. 3.4) is C : x1 +

x2 |x2 | 3 + hx2 = 0 2r 2

(3.21)

3.3 A Simple and Efficient DTOC Algorithm

27

Fig. 3.4 Illustration of two boundary curves ( A and  B ), control characteristic curve C , region  (surrounded by two boundary curves), and three intersection points A, B, and C

3.3.2 Construction of the DTOC Law The new DTOC law is constructed based on the boundary curves and the control characteristic curve presented above. As shown in Fig. 3.4, we denote that, for any initial state M(x1 , x2 ) in the fourth quadrant (x1 > 0, x2 < 0), an auxiliary line x2 = x2 (M) intersects with the boundary curves and the control characteristic curve at points A, C and B (in the direction of x1 ). The coordinates of x A , x B , and xC along the x-axis are ⎧ x22 1 ⎪ ⎨ x A = 2r2 + 2 h|x2 | x2 (3.22) x B = 2r + 25 h|x2 | + h 2 r ⎪ ⎩ x22 3 xC = 2r + 2 h|x2 |. For any initial state M(x1 , x2 ) satisfying x1 < x A or x1 > x B , the control signal is taken as u = +r or u = −r . For any initial state M(x1 , x2 ) satisfying x1 ∈ [x A , xC ], the control signal can be determined as follows: u = −r αsign(x2 )

(3.23)

−x1 . For any initial state M(x1 , x2 ) satisfying x1 ∈ [xC , x B ], the control where α = xxCC −x A signal is calculated as: (3.24) u = r βsign(x2 )

where β =

x1 −xC x B −xC

.

28

3 Discrete Time Optimal Control Algorithm

When the initial state M(x1 , x2 ) is in the second quadrant, the control signal sequence can be constructed similarly. However, when the initial state M(x1 , x2 ) is in the first or third quadrant (located outside region ), two different cases have to be considered when selecting the control signal. When M(x1 , x2 ) cannot be driven back to the origin within two steps, that is, the initial state does not satisfy the condition x12 + x22 = 0, then u = −r sign(x1 + hx2 ). When M(x1 , x2 ) can be driven back to the origin within two steps, the initial state x(0) and the corresponding control signal sequence satisfy (3.17), i.e., ⎧ x1 (1) = x1 (0) + hx2 (0) ⎪ ⎪ ⎨ x2 (1) = x2 (0) + hu(0) x1 (2) = x1 (1) + hx2 (1) ⎪ ⎪ ⎩ x2 (2) = x2 (1) + hu(1).

(3.25)

Furthermore, when M(x1 , x2 ) can be driven back to the origin within two steps, the corresponding control signals can be derived as follows: 

2 (0) u(0) = − x1 (0)+2hx h2 x1 (0)+hx2 (0) u(1) = . h2

(3.26)

The condition u(1) ≤ r is a sufficient condition for driving the initial state back to the origin within two steps. When it is satisfied, the control signal can take on u(0) and u(1) in (3.26) to drive the initial state back to the origin. The region in which any x(0) can be driven back to the origin within two steps, denoted as r , is surrounded by two pairs of parallel lines: x1 + hx2 = ±h 2 r and x1 + 2hx2 = ±h 2 r . As shown in Fig. 3.5, r is a parallelogram defined by the four points of (−h 2 r, 0), (−3h 2 r, 2hr ), (h 2 r, 0) and (3h 2 r, −2hr ).

Fig. 3.5 Illustration of two-step reachable region r , i.e., diamond region

3.3 A Simple and Efficient DTOC Algorithm

29

Now, any initial state M(x1 , x2 ) on the x1 − x2 plane can be driven back to the origin in a minimum and finite number of steps according to the control signal sequence above. The complete DTOC law is described as follows: Step 1: Set z 1 = x1 + λhx2 , z 2 = z 1 + hx2 , where λ ∈ (0, 1] is a tuning parameter to determine the different coordinates of x A , x B , and xC . Here, we choose λ = 1. If |z 1 | > h 2 r or |z 2 | > h 2 r , then M(x1 , x2 ) cannot be driven back to the origin within / r , go to the next step; otherwise, go to Step 5; two steps, i.e., M(x1 , x2 ) ∈ / 2 ∪ , Step 2: If the initial state M(x1 , x2 ) satisfies x1 x2 ≥ 0 and M(x1 , x2 ) ∈ then the control signal takes on u = −r sign(x1 + hx2 ); Step 3: Determine the boundary of the region , i.e., x A , xC and x B according to (3.22). Step 4: If |x1 | ≥ x B , then the control signal takes on u = −r sign(x1 ); if |x1 | ≤ x A , then the control signal takes on u = r sign(x2 ); Step 5: If |x1 | ≤ xC , then the control signal takes on u = −r αsign(x2 ); otherwise 1| C and β = |xx B1 |−x ; u = r βsign(x2 ), where α = xxCC−|x −x A −xC Step 6: If the initial state M(x1 , x2 ) ∈ r , then the control signal takes on u = − hz22 ; Step 7: The algorithm ends. From the deduction above, the mathematical derivation of a closed-form DTOC as a function of x1 , x2 , r , and h, denoted by u(k) = Fast (x1 (k), x2 (k), r, h, x A , x B , xC ), is obtained. The DTOC law proposed by [11, 12] is essentially a non-linear boundary transformation that includes complex non-linear calculations. The control signal of our new law is determined by using piecewise linear function according to the relative positions of the initial state and the corresponding x-axis values for intersection points x A , xC . This allows the new law to have a simple structure. For Step 1 of the algorithm in Subsection B, choosing a different λ can result in different points x A , x B and xC . However, the whole algorithm does not need to change.

3.4 Discussion on General Form of DTOC Law As shown in Sect. 3.2, the f han algorithm is determined by comparing the position of the initial state with the IRs through non-linear boundary transformation functions. In contrast, our proposed DTOC law (Fast) is created by the boundary curves, a control characteristic curve, and three corresponding boundary characteristic points (x A , x B , and xC ). This produces a one-to-one correspondence between boundary transformation functions and boundary characteristic points. Therefore, obtaining the general form of DTOC laws can be accomplished flexibly by modifying characteristic points. According to (3.11), the boundary functions of the f han are

30

3 Discrete Time Optimal Control Algorithm

⎧ ⎨ x2 + 21 ( φ2 h 2 r 2 + 8r |y| − φhr )sign(y) = φhr x + 1 ( φ2 h 2 r 2 + 8r |y| − φhr )sign(y) = −φhr ⎩ 2 2 y = x1 + λhx2 , φ = 1.0, λ = 1.0

(3.27)

Using the boundary transformation method, we derive the corresponding boundary characteristic points as follows: ⎧ ⎪ ⎨ xA = xB = ⎪ ⎩ xC =

x22 2r2 x2 2r2 x2 2r

+ 21 h|x2 | + 25 h|x2 | + h 2 r + 23 h|x2 |.

(3.28)

For the proposed Fast law, the boundary characteristic points are ⎧ ⎪ ⎨ xA = xB = ⎪ ⎩ xC =

x22 2r2 x2 2r2 x2 2r

+ 2h|x2 | + h 2 r + h|x2 |

(3.29)

The boundary functions of that law are presented as follows: ⎧ ⎨ x2 + 21 ( φ2 h 2 r 2 + 8r |y| − φhr )sign(y) = φhr x + 1 ( φ2 h 2 r 2 + 8r |y| − φhr )sign(y) = −φhr ⎩ 2 2 y = x1 + λhx2 , φ = 0.5, λ = 0.5

(3.30)

From the above analysis, we may conclude that the boundary transformation of DTOC law is not unique. The switching curve of the proposed DTOC law is the same as the switching curve identified in the continuous-time case, which implies that the f han law is not an optimal algorithm as claimed. In fact, different types of tracking differentiators are possible based on various boundary transformations. For example, one can easily obtain other DTOC laws by modifying the boundary characteristic points, which then result in different precision in signal tracking and differentiation acquisition. Because of this, the range of laws may be considered as variants of each other.

3.5 Simulations and Implementations We ran numerical simulations to compare the state trajectory starting from the same initial states between the Fhan and the Fast algorithm. The comparisons of the computational complexities of the proposed Fast algorithm and normal Fhan algorithm were demonstrated by showing computational resources needed and the time consumptions in real-time executions using field-programmable gate array (FPGA) and MCU (STM32F405), respectively.

3.5 Simulations and Implementations

31

Fig. 3.6 Illustration of state trajectory under two different algorithms

The switching curve function of the algorithm Fhan is  A : x1 + x22r|x2 | + 21 hx2 = 0, while the switching curve function of TOC is 0 : x1 + x22r|x2 | = 0. Figure 3.6 illustrates the state trajectory under two different algorithms, Fhan and Fast. We can see that the state trajectory for Fast is in accordance with the optimal trajectory while the state trajectory for Fast lags the optimal trajectory. To compare the computational complexities of the Fast and the Fhan, we may count what and how many operations have been taken during each sampling interval to measure the computational resources needed. Also, we can carry out a certain number of tests (like 1000 times) to observe the average time consumptions for real-time executions. Specially, we make comparisons between the performances of the two algorithms in (i) computational resources needed while using field-programmable gate array (FPGA); and (ii) the average time consumptions in real-time executions using MCU (STM32F405), respectively. For the comparisons on computational resources needed, we introduce the FPGA with item No. Stratix II EP2S30484C5 under QuartusII 5.1 programming context. A great amount of multipliers and logic-element resources are consumed in FPGA implementations, especially for square root calculations. We adopted the method of successive approximations to calculate square root using the VHSIC Hardware Description Language (VHDL) language in FPGA implementations. The comparisons of the FPGA resources consumed by a single run of the two different algorithms are presented in Table 3.1. For simplification, we regard multiplication and division as the same type of operations.

32

3 Discrete Time Optimal Control Algorithm

Table 3.1 Comparisons of the computational resources needed in FPGA of Fhan and Fast Algorithm Multiplications Square-root Logic-Element Clock cycles Fhan (32 bit) Fast (32 bit)

14 6

Table 3.2 Comparisons of the average execution time of Fhan and Fast

1 0

290 6

74 5

Algorithm

Average execution time

Fhan Fast

5.25us 2.52us

From Table 3.1, we see that the proposed Fast algorithm can significantly reduce the computational resources needed. In our extensive testing, for different initial states on the phase plane, the number of multiplication operations carried out by the Fast algorithm has never been larger than 8. Starting from some initial states, the Fast algorithm requests only 4 multiplication operations. To compare the average time consumptions of the two different algorithms in processing the same input signals in real-time execution, we adopt the STM32F405 with an upgraded CPU clock speed of 200 MHz. We calculate the average execution time for a single run of the algorithms (with 1000 times) and the results are presented in Table 3.2. From the above comparisons, we see that the Fast algorithm reduces both the computational resources needed and the time consumptions for real-time executions. This indicates the Fast algorithm is more efficient and practical in engineering applications.

3.6 Conclusions In this chapter, based on the f han algorithm, we first proposed a simple and efficient discrete time optimal control algorithm. The boundary curves and the control characteristic curve were obtained using the state back-stepping method. Using the linearized criterion in control law allows us to obtain a new DTOC law with a simple structure. Then, a general form of DTOC law by analysing the relationship between boundary transformations and boundary characteristic points is proposed. Based on boundary transformation analysis, we determined that this proposed DTOC law is a general one, which suggests that one can easily construct other DTOC laws with different features by properly modifying the boundary characteristic points. Numerical simulation results indicated that, when compared with the f han algorithm, the proposed Fast algorithm achieves better performance in state trajectory. Comparison experiments based FPGA and MCU revealed the computational complexity of the proposed Fast algorithm is less than the normal f han algorithm.

References

33

References 1. Hopkin AM (1951) A phase-plane approach to the compensation of saturating servomechanisms. Trans Am Inst Electr Eng 70(1):631–639 2. LaSalle JP (1959) Time optimal control systems. Proc Natl Acad Sci USA 45(4):573 3. LaSalle JP (1960) The time optimal control problem. In: Contributions to the theory of nonlinear oscillations, vol 5, pp 1–24 4. Athans M, Falb PL (2013) Optimal control: an introduction to the theory and its applications. Courier Corporation 5. Pontryagin LS (2018) Mathematical theory of optimal processes. Routledge 6. Bellman R, Glicksberg I, Gross O (1956) On the bang-bang control problem. Q Appl Math 14(1):11–18 7. Casas E, Wachsmuth D, Wachsmuth G (2017) Sufficient second-order conditions for bang-bang control problems. SIAM J Control Opti 55(5):3066–3090 8. Bartolini G, Ferrara A, Usai E (1998) Chattering avoidance by second-order sliding mode control. IEEE Trans Autom Control 43(2):241–246 9. Bertrand R, Epenoy R (2002) New smoothing techniques for solving bang-bang optimal control problems numerical results and statistical interpretation. Opti Control Appl Methods 23(4):171–197 10. Jian S, King-Ching H (1963) Analysis and synthesis of time-optimal control systems. IFAC Proc Vol 1(2):347–351 11. Han J (2009) From PID to active disturbance rejection control. IEEE Trans Ind Electron 56(3):900–906 12. Gao Z (2004) On discrete time optimal control: a closed-form solution. In: Proceedings of the 2004 American control conference, Vol 1. IEEE, pp 52–58 13. Gutman PO, Cwikel M (1986) Admissible sets and feedback control for discrete-time linear dynamical systems with bounded controls and states. IEEE Trans Autom Control 31(4):373– 376 14. Keerthi S, Gilbert E (1987) Computation of minimum-time feedback control laws for discretetime systems with state-control constraints. IEEE Trans Autom Control 32(5):432–435 15. Zhang X, Fang Y, Sun N (2014) Minimum-time trajectory planning for underactuated overhead crane systems with state and control constraints. IEEE Trans Ind Electron 61(12):6915–6925 16. Mayne DQ, Rawlings JB, Rao CV, Scokaert PO (2000) Constrained model predictive control: stability and optimality. Automatica 36(6):789–814 17. Rösmann C, Hoffmann F, Bertram T (2015) Timed-elastic-bands for time-optimal point-topoint nonlinear model predictive control. In: 2015 European control conference (ECC). IEEE, pp 3352–3357 18. Van den Broeck L, Diehl M, Swevers J (2011) A model predictive control approach for time optimal point-to-point motion control. Mechatronics 21(7):1203–1212 19. Han J (1999) The discrete form of the tracking differentiator. Syst Sci Math Sci 19:268–273 20. Guo BZ, Zhao ZL (2016) Active disturbance rejection control for nonlinear systems: an introduction. Wiley 21. Zhang H, Xiao G, Yu X, Xie Y (2020) On convergence performance of discrete-time optimal control based tracking differentiator. IEEE Trans Ind Electron 22. Zhang H, Xie Y, Xiao G, Zhai C, Long Z (2018) A simple discrete-time tracking differentiator and its application to speed and position detection system for a maglev train. IEEE Trans Control Syst Technol 99:1–7 23. Zhang H, Xie Y, She L, Zhai C, Xiao G (2019) High-precision tracking differentiator via generalized discrete-time optimal control. ISA Trans 95:144–151

Chapter 4

Simple and Efficient Tracking Differentiator

4.1 Introduction Real-time differentiation estimation of signals is commonly used in the feedback controller design, the fault detection and isolation and many other control related fields [1–3]. As mentioned in Chap. 2, time optimal control (TOC) based tracking differentiator (TD), first proposed by Jinqing Han, serves not only a transient profile that the system output can reasonably follow to avoid setpoint jump in active disturbance rejection control (ADRC), but also the differentiation acquisition from noise-polluted and/or discontinuous signals. The applications of TOC solution, the bang-bang control, however, are quite limited because there exists frequent switching of the control signals between two extreme values around the switching curve, particularly around the origin [4, 5]. This may lead to excessive wear and tear of the actuators. On the other hand, with the developments in computer control technology, most control algorithms are now implemented in the discrete-time domain. These lead to the discrete-time optimal control (DTOC), denoted as Fhan, based TD for practical implementations. This TD sets a weaker condition on the stability of the systems to be constructed. Also, this noise-tolerant TD has advantageous smoothness compared with the chattering and over-shoot problems encountered by sliding-mode-based differentiators. Also, in Chap. 3, unlike the control algorithm Fhan, a simple and efficient DTOC algorithm (Fast) based on a linearized criterion that depends upon the position of the initial state point on the phase plane was proposed. In doing so, the new control algorithm has a simpler structure that is much easier to be applied in practical engineering scenarios. In this chapter, by adopting the Fast algorithm designed in Chap. 3, we show how to apply the DTOC algorithm in constructing the corresponding tracking differentiator. Further, we demonstrate its performance in signal-tracking filtering and differentiation acquisition both in time and frequency domains. This chapter is organized as follows: the construction of tracking differentiator based on the Fast algorithm is proposed in Sect. 4.2. The structure of the TD and its © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_4

35

36

4 Simple and Efficient Tracking Differentiator

filtering characteristic are discussed in Sect. 4.3. Section 4.4 illustrates the frequencydomain characteristics of this DTOC-TD in signal-tracking filtering and differentiation acquisition, giving a rule of thumb for regulating the parameters. Time-domain numerical simulation results are presented to compare the performance of signal tracking, differentiation acquisition between the control law Fhan and the proposed one in Sect. 4.5. Finally Sect. 4.6 concludes the chapter.

4.2 Construction of Tracking Differentiator In this section, we first present a brief outline for the construction of the continuous tracking differentiator based on time-optimal control. Then we can use the same construction principle to design the Fast algorithm based tracking differentiator directly. As shown in Chap. 3, the double-integral system is defined as ⎧ ⎨ x˙1 = x2 , ⎩

(4.1) x˙2 = u, |u| ≤ r

where r is a constant. Note that, depending on the physical limitations of each application, the parameter r can be selected accordingly to speed up or slow down the transient profile. The resulting feedback control law that drives the state from any initial point to the origin in the shortest time is u = −r sign(x1 − v +

x2 |x2 | ) 2r

(4.2)

where v is the desired value for x1 . The switching curve function is (x1 , x2 ) = x1 + x22r|x2 | . Using this principle, we can obtain the desired trajectory and its derivative by solving the following differential equations: ⎧ ⎨ v˙1 = v2 , ⎩

v˙2 = −r sign(v1 − v +

v2 |v2 | ) 2r

(4.3)

where v1 is the desired trajectory and v2 is its derivative. According to Chap. 3, any initial state M(x1 , x2 ) on the x1 − x2 plane can be dragged back to the origin in the shortest time based onu(k) = Fast (x1 (k), x2 (k), r, h, x A , x B , xC ). Using the above construction method, one can easily construct the following time optimal system-based tracking differentiator

4.2 Construction of Tracking Differentiator

⎧ ⎪ ⎪ u(k) = Fast (x1 (k) − v(k), x2 (k), r, c0 h) ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k) ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), k = 0, 1, 2, ...

37

(4.4)

where r is the quickness factor, c0 is the filtering factor, and h is the sampling time.

4.3 Structure Analysis and Filtering Characteristic of Fast In this section, we will analyse the proposed Fast based TD in frequency domain so as to reveal its filtering mechanism [7]. The approximate linear format of the proposed TD in (4.4) can be shown as follows if one properly selects parameter r : 

    1 − 0.5 (1 − 0.75 )h x1 (k) x1 (k + 1) c0 c02 = x2 (k + 1) x2 (k) 1 − 1.5 − c21h c0 0   1 1 + 2 v(k). c0 h 0.5h

(4.5)

For convenience, the above equation can be expressed as x(k + 1) = Gx(k) + v(k), k = 0, 1, 2...

(4.6)

where are the corresponding matrices in (4.5). Consider an input signal v(t) =

N G,  j (wi t+φi0 ) + ξ(t), where Ai , wi ∈ R+ , φi0 ∈ R, we have i=1 Ai e x(k) = G k p0 +

N (e jwi h I2 − G)−1  Ai e j (wi kh+ phii0 ) + η(k)

(4.7)

i=1

where η(k + 1) = Gη(k) + ξ(k), and p0 is determined by initial condition x(0) and η(0). By adopting (z) = C(z I2 − G)−1 , x1 (k) is rewritten as x1 (k) = C G k p0 +

N

(e jwi h )Ai e j (wi kh+φi0 ) + Cη(k).

(4.8)

i=1

For comparisons between the filtering characteristics of Fast and Fhan algorithms, we only consider the width-steady random process. If ξ(t) is a white noise sequence, there exists Rξ = Qδ(τ ), where δ(τ ) is the Kronecker delta function and Q is the constant matrix [8]. The Rη (k) converges to the constant matrix, i.e., Rη = G Rη G T +  Q T .

(4.9)

38

4 Simple and Efficient Tracking Differentiator

Fig. 4.1 Output variance sequence R versus filtering factor c0

For Fhan algorithm, the matrix G and  are  G1 =

1 1 c0 h

h 1−



 2 c0

, 1 =

0



1 c02 h

respectively. Assume that the white-noise power spectrum density is Q = 1. Figure 4.1 shows the relationship between the output variance sequence R and the parameter c0 . As shown in Fig. 4.1, choosing the proper filtering factor c0 allows that the proposed TD based on the control law Fast to effectively filter random noises. Compared with the control law Fhan, the Fast algorithm performs better in signal-filtering.

4.4 Frequency-Domain Characteristics Analysis The objective of this section is to show how the parameter r affects the outputs of differentiator viewed from the frequency domain [9]. In turn, the frequency-domain characteristic analysis for the DTOC-TD gives us a rule of thumb to regulate the tunable parameter r for achieving fast convergence. The frequency-domain analysis makes the features of tracking differentiator concrete, in particular, for the characteristic of filtering. Further we can easily observe the characteristics of differentiator in signal-tracking filtering and differentiation acquisition. This helps us to evaluate if the tracking differentiator is suitable for a given system.

4.4 Frequency-Domain Characteristics Analysis

39

According to the Fast algorithm, with a given reference signal sequence v(k), k = 0, 1, 2, ... corrupted with a random noise, the following TD can be constructed ⎧ u(k) = Fast (x1 (k) − v(k), x2 (k), r, c0 h) ⎪ ⎪ ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k) ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), |u(k)| ≤ r, k = 0, 1, 2, ...

(4.10)

where v is the input signal to be differentiated, x1 is the desired trajectory, x2 is its derivative and c0 is the filtering factor. It is utilized to provide the fastest tracking of v(k) and its differentiation estimation subject to the acceleration limit of r . The tuning parameter r in (4.10) plays an essential role in deciding the speed and precision of signal tracking and differentiation estimation. Specifically, the Fast algorithm based TD can track the input and estimate the corresponding differentiation with arbitrary precision when r tends to infinity. Under practical limitations, r can only regulate within a certain bound. This may lead to high-frequency attenuation with a selected r once the frequency of the input signals exceeds a certain range. Meanwhile, the TD is insensitive to the noises, which enables its good filtering ability. Here, we shall analyse the characteristics of the output signals of the TD in frequency-domain by means of the frequency-sweep. Specifically, for an open-loop system, when input signals are v(t) = sin(wt), the system output can be described as (4.11) y(t) = sin(wt + ϕ) = [sin(wt), cos(wt)][Asinϕ, Acosϕ]T where A and ϕ are amplitude and phase of the output signals, respectively. Adopting t = 0, h, 2h, ..., nh in the time-domain and assuming the followings Y T = [y(0), y(h), ..., y(nh)]  T =

sin(wh0) sin(wh) ... sin(wnh) cos(wh0) cos(wh) ... cos(wnh)



c1 = Acos(ϕ), c2 = Asin(ϕ), we have Y = [c1 , c2 ]T .

(4.12)

Applying the least squares method, we can determine the least squares solution of c1 and c2 as follows: (4.13) [c˜1 , c˜2 ]T = (T )−1 T Y.

40

4 Simple and Efficient Tracking Differentiator

Fig. 4.2 Frequency-domain characteristics of tracking output x1

Then the amplitude and phase of output signals for the differentiator when the angular frequency w is given can be determined as c˜1 2 + c˜2 2

(4.14)

ϕ˜ = tan−1 2 (c˜1 , c˜2 )

(4.15)

A˜ =

Using the above method, we can obtain the amplitude-frequency and phasefrequency response curves by selecting the sequence of the angular frequency {wi } (i = 1, 2, ..., n). We assume that the frequency of input signals have a range of [0.1, 10 Hz]. The initial condition is P(x1 , x2 ) = P(1, −1) and the filtering factor c0 = 3. The amplitude-frequency and phase-frequency response curves under different values of the r are shown in Figs. 4.2 and 4.3, respectively. From Fig. 4.2, the frequency-domain characteristics of output x1 approximates a low-pass filter. When the frequency of input signals is lower than the turnover frequency, the amplitude-frequency characteristics is similar to a straight line parallel to the x-axis. Meanwhile, the phase-frequency response change gradually with a

4.4 Frequency-Domain Characteristics Analysis

41

Fig. 4.3 Frequency-domain characteristics of differentiation estimation x2

small phase delay. However, when the frequency of input signals is greater than the turnover frequency, compared with input signals, the amplitude attenuation and phase delay are apparent. From Fig. 4.3, we see that the frequency-domain characteristics of output x2 (differentiation estimation) approximates the bandpass filter. When the frequency of input signals is lower than the turnover frequency, the amplitude of output x2 increases as the frequency goes up, and the phase lead remains over 90◦ . Similarly, the amplitude attenuation and phase delay are apparent when the frequency of input signals is greater than the turnover frequency. Further, from Figs. 4.2 and 4.3, we see that the turnover frequency of the proposed TD rises as the tuning parameter r increases. This represents that a relatively bigger r enables the proposed TD track a higher frequency of input signals and enhances the estimation of the corresponding differentiation. However, the ability of restraining the noise meanwhile is reduced. In practice, a proper value of the parameter r can be selected accordingly to speed up or slow down the transient profile.

42

4 Simple and Efficient Tracking Differentiator

4.5 Numerical Simulations In this section, we ran numerical simulations to compare the performance of the proposed TD with that of the existing DTOC algorithm based TD for signal-tracking filtering and differentiation acquisition. The following three DTOC-TD algorithms are compared. DI. Tracking differentiator based on Fhan [1]. ⎧ u(k) = Fhan(x1 (k) − v(k), x2 (k), r, c0 h), ⎪ ⎪ ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k), ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), |u(k)| ≤ r DII. Tracking differentiator based on Ftd [10]. ⎧ u(k) = Ftd(x1 (k) − v(k), x2 (k), r, c0 h) ⎪ ⎪ ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k) ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), |u(k)| ≤ r DIII. Tracking differentiator based on Fast [7]. ⎧ u(k) = Fast (x1 (k) − v(k), x2 (k), r, c0 h) ⎪ ⎪ ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k) + 21 h 2 u(k) ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), |u(k)| ≤ r For these simulations, we selected the step function and sinusoidal signal as our input signal sequences, setting the same initial value (x1 (0) = 0, x2 (0) = 2) for all of the simulations. For parameter setting, with the trial and error method, we first set the parameters for the traditional TD to get the best possible performance. Then we take on the same parameters for the proposed differentiator, that is, sampling period, h = 0.005s; quickness factor, r = 500; and filtering factor c0 = 5. We plotted the results for comparisons among them in signal-tracking filtering and differentiation acquisition. Figures 4.4, 4.6 and 4.7 revealed that all the three different TDs could quickly track the input signals without overshooting and chattering. Our proposed Fast-based TD proved to be the most rapid one in signal-tracking. As shown in Figs. 4.5, 4.8 and 4.9, although the Fhan-based TD was, to some extent, capable of producing good dif-

4.5 Numerical Simulations Fig. 4.4 Outputs of signal-tracking filtering for step input

Fig. 4.5 Outputs of differentiation acquisition for step input

Fig. 4.6 Outputs of signal-tracking filtering for sinusoidal signal input

43

44 Fig. 4.7 Partial enlargement of signal-tracking filtering for sinusoidal signal input

Fig. 4.8 Outputs of differentiation acquisition for sinusoidal signal input

Fig. 4.9 Partial enlargement of differentiation acquisition for sinusoidal signal input

4 Simple and Efficient Tracking Differentiator

4.6 Conclusion

45

Table 4.1 Comparison of results among Fhan, Ftd, and Fast Algorithm Input Settling time (s) Steady-state error (rev) Fhan

Step function

0.02(T),0.03(D)

1.87 × 10−2 (T),2.45 × 10−2 (D) 1.83 × 10−2 (T),2.41 × 10−2 (D) 3.45 × 10−3 (T),3.67 × 10−3 (D) 0.025(T),0.088(D)

0.323(T),0.378(D)

0.018(T),0.028(D) 0.01(T),0.02(D)

0.023(T),0.086(D) 0.018(T),0.065(D)

0.322(T),0.376(D) 0.265(T),0.286(D)

0.015(T),0.018(D)

Ftd

0.015(T),0.018(D)

Fast

0.012(T),0.016(D)

Fhan

Sinusoidal signal

Ftd Fast

RMS error (rad) 0.236(T),0.265(D)

0.233(T),0.261(D)

0.114(T),0.118(D)

ferential signals, some intermittent jumps occurred in differentiation acquisition. In contrast, the proposed Fast-based TD avoided such jumps and obtained the highest precision of differential signals within the shortest time. To quantify the differences among these differentiators, settling time (3%), steadystate error and the RMS error are used as criteria for comparison, as shown in Table 4.1. In the table, the letter “T” stands for signal tracking while the letter “D” represents differentiation acquisition. The data displayed in Table 4.1 indicated that, based on discrete-time optimal control, the tracking differentiator DIII achieved better performance and higher precision in signal-tracking filtering and differentiation acquisition when compared with the other two differentiators.

4.6 Conclusion In this chapter, the tracing differentiator is constructed based on the proposed Fast algorithm. Using the linearized criterion in the control algorithm allows us to obtain a new TD with a simple structure. The filtering mechanism was identified through structure analysis. The frequency-domain analysis of this TD under different values of r reveals a rule of thumb to regulate this parameter in practice. Numerical simulations showed that the TD based on the algorithm Fast is more effective and has better performances filtering and obtaining differentiation than the other existing ones. These indicate the proposed TD based on the Fast algorithm is ready for practical engineering application.

46

4 Simple and Efficient Tracking Differentiator

References 1. Han J (2009) From PID to active disturbance rejection control. IEEE Trans Ind Electron 56(3):900–906 2. Ríos H, Punta E, Fridman L (2017) Fault detection and isolation for nonlinear non-affine uncertain systems via sliding-mode techniques. Int J Control 90(2):218–230 3. Vázquez C, Aranovskiy S, Freidovich LB, Fridman LM (2016) Time-varying gain differentiator: a mobile hydraulic system case study. IEEE Trans Control Syst Technol 24(5):1740–1750 4. Bonifacius L, Pieper K, Vexler B (2019) Error estimates for space-time discretization of parabolic time-optimal control problems with bang-bang controls. SIAM J Control Opti 57(3):1730–1756 5. Newman WS (1990) Robust near time-optimal control. IEEE Trans Autom Control 35(7):841– 844 6. Guo BZ, Zhao ZL (2016) Active disturbance rejection control for nonlinear systems: an introduction. Wiley 7. Zhang H, Xie Y, Xiao G, Zhai C, Long Z (2018) A simple discrete-time tracking differentiator and its application to speed and position detection system for a maglev train. IEEE Trans Control Syst Technol 27(4):1728–1734 8. Zoubir AM, Boashash B (1998) The bootstrap and its application in signal processing. IEEE Signal Process Mag 15(1):56–76 9. Zhang H, Xiao G, Yu X, Xie Y (2020) On convergence performance of discrete-time optimal control based tracking differentiator. IEEE Trans Ind Electron 10. Zhang H, Xie Y, Xiao G, Zhai C (2017) Closed-form solution of discrete-time optimal control and its convergence. IET Control Theory Appl 12(3):413–418

Chapter 5

On Convergence Performance of DTOC Based Tracking Differentiator

5.1 Introduction The closed-form f han and Fast algorithms proposed in Chap. 3 were both derived for a discrete-time, double-integral system using the method of isochronic regions; they demonstrate that the solution for DTOC problem is not necessarily a bang-bang control. Also, instead of chattering, the DTOC can produce a smooth control signal that results in the performance similar to that of the bang-bang control. As verified in various simulation results, the f han and Fast algorithms are convergent and fast [1–3]. However, the rigorous full convergence proof of the DTOC-TD has not been done. To check on the convergence performance of these DTOC-TDs, we will provide two different approaches. The main contributions of this chapter are briefly summarized as follows: I: The convergence of this f han-TD is analysed by some easily checkable procedures based on Lyapunov functions [4]. The convergence analysis guarantees that starting from any given initial state, the system can converge to the steady state within a finite number of steps, which provides an important theoretical foundation of the emerging active disturbance rejection control (ADRC). II: The convergence of the Fast-TD is proved by showing the convergence path of the state point sequence driven by the derived control law [5]. In particular, the state convergence trajectories driven by the corresponding DTOC in different isochronic regions are presented. The layout of this chapter is as follows: the convergence of f han-TD algorithm is proved in Sect. 5.2. In Sect. 5.3, the convergence of Fast-TD algorithm is checked, followed by concluding remarks in Sect. 5.4.

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_5

47

48

5 On Convergence Performance of DTOC Based Tracking Differentiator

5.2 Convergence Proof of fhan-TD The main purpose of this section is to rigorously analyse the convergence of the DTOC algorithm in (3.15) for system (3.3) by demonstrating the state convergence trajectories based on the corresponding Lyapunov functions. The main result is stated as follows. Theorem 5.1 Consider system (3.3) with the designed control algorithm in (3.15). For any initial state M(x10 , x20 ), there exists a positive integer K such that x(k) = 0 for any k ≥ K . Before presenting the convergence analysis on this DTOC algorithm, we need to figure out whether isochronic region for any initial condition is unique or not. In other words, we have to show the monotonic characteristic of IR boundaries to clarify that any initial condition belongs to only one IR. In order to show this, equation in (3.11) is introduced, which partitions the whole phase plane (see Fig. 3.3). Let 1 √ (5.1) T (x1 , x2 , r, h) = x2 + ( w − hr )sign(y) 2  √ where w = h 2 r 2 + 8r |y|. We have ⎧ ∂T 2r ⎪ ⎨ ∂ x 1 = √w > 0 (5.2) ⎪ 2hr ⎩ ∂T = √ > 0, ∂ x2 w which implies that the boundaries of IR have the monotonic characteristic. According to (3.12), different values of h and r lead to different boundaries, that is, ⎧ ⎨ T (x1 , x2 , r, h) = c1 (5.3) ⎩ T (x1 , x2 , r, h) = c2 where c1 = c2 . Therefore, there must exist a curve family T (x1 , x2 , r, h) = c that divides the whole phase plane into different IRs (see Fig. 3.3), which clarifies that any initial condition can only belong to one IR. Then the convergence analysis of the f han algorithm can be carried out in the following several steps. ˜+ Step 1: Any initial state point M(x10 (k), x20 (k)) located below  + B ( ) or above + ˜− + +  A ( ) can converge to the region between  B and  A . Under this condition, the control algorithm takes on extreme value according the f han algorithm, that is, u(k) = −r sign(s(k)) (5.4) where s(k) = x1 + x22r|x2 | + 21 hx2 is the curve  A . Without loss of generality, we consider the initial state point M(x1 (0), x2 (0)) (denoted as M(x1 , x2 ) for simplicity)

5.2 Convergence Proof of fhan-TD

49

+ Fig. 5.1 Illustration of state trajectory when initial state is located above  + B or below  A

located above  + A on the right side of phase plane, where there exists s(k) > 0. The following Lyapunov function is constructed s(k) = s(k + 1) − s(k) 1 1 =hx2 (k) − h 2 r − h(x2 (k) − hr )sign(x2 (k)) 2 2 1 =h(x2 (k) − |x2 (k)|) − h 2 r (1 − sign(x2 (k))) ≤ 0 2

(5.5)

There are two possible cases for the value of s(k). (1) If x2 (k) > 0, then s(k) = 0. According to (3.13), the initial state x2 (k) will keep decreasing until it arrives at  A . There exists x2 (k + 1) = x2 (k) − hr , that is, x2 (k) = x2 (0) − khr . Hence there exists a positive constant k0 = x2hr(0) that can make x2 (k) < 0 when k > k0 . Therefore, any initial state located above  A on upper phase plane can be driven to lower phase plane where x2 (k) < 0. (2) If x2 (k) < 0, then s(k) = −2h|x2 (k)| − h 2 r < −h 2 r < 0. When s(k) > 0, there exists s(k + 1) − s(k) < −h 2 r , that is, s(k) < s(0) − kh 2 r . that guarantees s(k) < 0 when k > k1 . Clearly there is a positive constant k1 = s(0) h2r Similar conclusion can be obtained when the initial state M(x1 (k), x2 (k)) is located below  + B . The above statement manifests that any initial state M(x 1 , x 2 ) + + + located below  + B or above  A can converge to the region between  B and  A (see Fig. 5.1). Step 2: Any initial state point M(x1 , x2 ) located inside the IR between  + B and +  A and beyond G(2) cannot step out of this region inside which the state converges to G(2).

50

5 On Convergence Performance of DTOC Based Tracking Differentiator

Under this condition, there exists T (x1 , x2 , r, h) ≤ hr , and the control algorithm takes on u = − T (x1 ,xh2 ,r,h) . According to (3.11), we have √ ⎧ ( h 2 r 2 +8r |y(k)|−hr )sign(y(k)) ⎪ ⎨ T (k) = x2 (k) + 2 ⎪ ⎩

T (k + 1) = x2 (k + 1) +



(

(5.6) h 2 r 2 +8r |y(k+1)|−hr )sign(y(k+1)) 2

where y(k) = x1 (k) + hx2 (k) = x1 (k + 1) and y(k + 1) = x1 (k + 1) + hx2 (k + 1). Further, we have T (k) = T (k + 1) − T (k)  ( h 2 r 2 + 8r |y(k + 1)| − hr ) = x2 (k + 1) + sign(y(k + 1)) 2  ( h 2 r 2 + 8r |y(k)| − hr ) sign(y(k)) − x2 (k) − 2 4r [y(k + 1) − y(k)] = [x2 (k + 1) − x2 (k)] + √ √ w(k) + w(k + 1) 4hr [x2 (k) + hu(k)] =hu(k) + √ √ w(k) + w(k + 1)

(5.7)

√ earlier. where w(k) is the√same as mentioned √ Setting Q(k) = w(k) + w(k + 1), we have T (k + 1) = T (k) + hu(k) +

4hr [x2 (k) + hu(k)] Q(k)

4hr [x2 (k) − T (k)] Q(k)  2 2hr  sign(y(k)) = −hr − w(k+1) Q(k) 1+ w(k) √  w(k) − hr = −hr √ sign(y(k)) √ =

(5.8)

w(k)+ w(k+1) 2

Without loss of generality, the condition of y(k) > 0 is taken into consideration. If there exists √ w(k) − hr < 1, (5.9) 0< √ √ w(k)+ w(k+1) 2

then we have |T (k + 1)| < hr (Note that the condition |T (k)| < hr holds at the beginning), which means any initial state point M(x1 , x2 ) located inside the IR + between  + B and  A and beyond G(2) cannot step out of this region. Meanwhile,

5.2 Convergence Proof of fhan-TD

51

+ Fig. 5.2 Illustration of state trajectory when initial state is located inside IR between  + B and  A and beyond G(2)

because there exist x2 (k) = hu(k) and u = − T (x1 ,xh2 ,r,h) , |x2 (k)| will decrease converge to G(2). monotonously, meaning that the initial state point M(x1 , x2 ) will √ w(k)−hr Now we need to analyse inequality (5.9). Apparently, 0 < √w(k)+ holds since √ w(k+1) 2 √  √ w(k)−hr w = h 2 r 2 + 8r |y| > hr . To show that √w(k)+ < 1, we have √ w(k+1) 2 √ w(k) − hr 0 2 2 1  ⇐⇒x2 (k + 1) + ( w(k + 1) − hr )sign(y(k + 1)) > −hr 2 ⇐⇒T (k + 1) > −hr

(5.10)

Based on the above analysis, the condition in (5.9) holds. Thus, any initial state + point M(x1 , x2 ) located inside the IR between  + B and  A and beyond G(2) cannot step out of this region and the state converges to G(2) (see Fig. 5.2). Step 3: Any initial state point M(x1 , x2 ) located inside G(2) can converge to the origin with at most two steps. When the initial state point M(x1 , x2 ) is inside G(2), there exists

52

5 On Convergence Performance of DTOC Based Tracking Differentiator

u(0) = −

x1 (0) + 2hx2 (0) x2 (0) + y(0)/ h = 2 h h

(5.11)

Further, we have



x1 (0) + hx2 (0) y(0) x(1) = = ∈ G(1) x2 (0) + hu(0) −y(0)/ h

(5.12)

Therefore, any initial condition M(x1 , x2 ) ∈ G(2) will be driven into G(1) and then is back to the origin. The above analysis in a few steps shows the convergence performance of f hanTD algorithm. As shown in Chap. 3, the adoption of boundary level around the switching curve in the f han algorithm makes the f han-TD be of advantageous chattering alleviation compared with the typical second-order differentiators. Not like a unified control strategy for constructing the typical second-order differentiators, the f han algorithm needs to find different corresponding signal sequences for different IRs with different initial conditions. For certain linear cases, it is feasible to solve the system outputs directly and analyze their convergence properties. The non-linearity of the systems and the wide varieties of control strategies in different IRs, however, make it difficult to prove the convergence of f han-TD. Our work shows that f han-TD’s states are guaranteed to converge to the derivatives of the reference.

5.3 Convergence Proof of Fast-TD The main result in this section is stated as the following Theorem. Theorem 5.2 Given the system (3.3) and any initial state x(0), the state x(k) can converge to the origin in the minimum and finite number of steps with the discrete time optimal control signal sequence u(0), u(1), ..., u(k) determined by u(k) = Fast (x1 (k), x2 (k), r, h) in (4.10), subject to the constraint of |u(k)| ≤ r . That is, x1 (k) → 0 and x2 (k) → 0 with u(k ∗ ), where |u(k)| ≤ r and k ∗ = min[k|x(k + 1) = 0]. Proof Here we will split the proof into two steps according to the position of the initial state on the phase plane. Step A: Any initial state x(0) located outside the region  can converge to the region  when the control signal sequence takes on the extreme value. Consider the following control system when the initial state is located outside the region :

5.3 Convergence Proof of Fast-TD

⎧ ⎪ ⎪ x1 (k + 1) = x1 (k) + hx2 (k) ⎪ ⎪ ⎨ x2 (k + 1) = x2 (k) + hu(k) ⎪ ⎪ ⎪ ⎪ ⎩ u(k) = −r sign(s(k))

53

(5.13)

where s(k) is the boundary curve  A : x1 + x22r|x2 | + 21 hx2 = 0. When the initial state M(x1 , x2 ) is located above the  A , there exists s(k) > 0. The following Lyapunov function is constructed s(k) = s(k + 1) − s(k) 1 1 = hx2 (k) − h 2 r − h(x2 (k) − hr )sign(x2 (k)) 2 2 1 = h(x2 (k) − |x2 (k)|) − h 2 r (1 − sign(x2 (k))) ≤ 0 2

(5.14)

There are two possible cases for the value of s(k). (1) If x2 (k) > 0, then s(k) = 0. According to (5.13), the initial state x2 (k) will keep decreasing until it arrives at  A . There exists x2 (k + 1) = x2 (k) − hr , that is, x2 (k) = x2 (0) − khr . Hence there exists a positive constant k0 = x2hr(0) that can make x2 (k) < 0 when k > k0 . Therefore, any initial state located above  A on upper phase plane can be driven to lower phase plane, i.e., x2 (k) < 0. (2) If x2 (k) < 0, then s(k) = −2h|x2 (k)| − h 2 r < −h 2 r < 0. When s(k) > 0, there exists s(k + 1) − s(k) < −h 2 r , that is, s(k) < s(0) − kh 2 r that can guarantee s(k) < 0 when and clearly there is a positive constant k1 = s(0) h2r k > k1 . The above statement manifests that the initial state x(0) located outside the region  can approach the boundary curve  A and converge to the region  when the control signal sequence takes on the extreme value described in (5.13). Similar conclusion can be obtained when the initial state M(x1 , x2 ) is located below  A . Step B: The state sequence located inside the region  can be driven into the region 2 with the control signal in (3.23) in a limited number of steps. In this step, we only need to prove the convergence of the state sequence on the fourth quadrant because the region  is symmetric in the second and fourth quadrant. For simplicity, we may still adopt parametric expressions by introducing the parameters α and β (α > 0, β > 0), where any state point on the phase plane can be expressed as x1 = αh 2 r, x2 = −βhr . Further, for convenience, we may as well adopt dimensionless expression by introducing another parameter θ to ignore the value of h and r . Based on the above, the boundary curves  A and  B on the fourth quadrant in parametric form are

54

5 On Convergence Performance of DTOC Based Tracking Differentiator

⎧ + β ⎨  A : α = 2 (β + 1) ⎩

β + B : α = 2 (β + 1) + (2β + 1).

(5.15)

Any initial state point M(x1 , x2 ) located inside the region  in dimensionless form can be ⎧ ⎨ α = β2 (β + 1) + (2β + 1)θ (5.16) ⎩ β=β where 0 ≤ θ ≤ 1. Its corresponding control signal sequence according to Step 4 and Step 5 in Sect. 3.3.2 is x B + x A − 2|x1 | sign(x2 ) xB − xA = r (1 − 2θ )

u = −r

(5.17)

where x A = β(β+1) h 2 r and x B = [ β(β+5) + 1]h 2 r . 2 2 The state variables at steps k and (k + 1) in dimensionless form can be ⎧ x1 (k) = α(k)h 2 r ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ x2 (k) = −β(k)hr ⎪ ⎪ x1 (k + 1) = α(k + 1)h 2 r ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = −β(k + 1)hr Because of (3.3), there exist ⎧ ⎨ α(k + 1) = α(k) − β(k) ⎩

β(k + 1) = β(k) − 1 + 2θ (k)

According to (5.16), we can derive α(k + 1) = β(k+1)[β(k+1)+1] + [2β(k + 1) + 2 1]θ (k + 1). Therefore, the expressions of α(k + 1), β(k + 1) and θ (k + 1) can be derived as follows: ⎧ β(k+1)[β(k+1)+1] + [2β(k + 1) + 1]θ (k + 1) ⎪ 2 ⎪ α(k + 1) = ⎪ ⎪ ⎨ β(k + 1) = β(k) + 2θ (k) − 1 (5.18) ⎪ ⎪ ⎪ ⎪ ⎩ 2θ(k)[1−θ(k)] . θ (k + 1) = 2β(k)−1+4θ(k)

5.3 Convergence Proof of Fast-TD

55

According to (5.17), there exists a curve (denoted as C ) between the boundary curves  A and  B . It can be determined by choosing θ = 0.5 as follows. Suppose that {c+k } and {c−k } (k > 2) are the sets of any initial state x(0) that can be driven back to the origin when the control signal takes on u(0) = 0 in the first step. Then the control sequence takes on u(i) = +r or u(i) = −r, i = 1, 2, ..., k. Similarly, the boundary curve C consists of C+ and C− . For set {c+k }, there exists x1 = 21 r h 2 (k 2 + 3k + 2) and x2 = −r hk < 0 according to the rule for choosing the control signal sequence, as shown above. By eliminating x2 the variable k, we can obtain the control characteristic curve C+ : x1 = 2r2 − 23 hx2 + 1 2 h r . Similarly, we can 2 3 hx2 + 21 h 2 r . Therefore, 2 3 hx2 − 21 h 2 r = 0. 2

x2

obtain the control characteristic curve C− : x1 = − 2r2 − the entire control characteristic curve C is x1 + x22r|x2 | +

We assume that the curve C and the region 2 intersect at point C, which can be determined by their simultaneous equations: ⎧ ⎨ x1 − ⎩

x22 2r

+ 23 hx2 − 21 h 2 r = 0

(5.19)

x1 + hx2 = h r 2





Solving the above equations, we can get the intersection point ( 5+1 h 2 r, − 5−1 hr ). 2 2 The region  is divided into two regions (denoted as θ>0.5 and θ≤0.5 ) by the curve C . The definitions of these two regions are given as follows and shown in Fig. 5.3. Definition 5.1 θ>0.5 = {M(α, β)|M ∈ , M ∈ / 2 , θ > 0.5}. Definition 5.2 θ≤0.5 = {M(α, β)|M ∈ , M ∈ / 2 , θ ≤ 0.5}. From the definitions above, the region  − 2 is divided into two different regions. What we should prove is that any initial state M(α, β) ∈  − 2 can be driven into the region 2 with the control signal sequence described in (5.17). The whole proof can be split into two steps. Step 1: When the initial state satisfies M(x1 , x2 ) ∈ θ>0.5 as shown in Fig. 5.4, there exists β(0) ≥ 0, θ > 0.5. Suppose that θ (0) = 0.5 + δ where 0 < δ < 0.5. According to (5.18), we can derive 2θ (0)[1 − θ (0)] 0 ≤ θ (1) = 2β(0) + 4θ (0) − 1 (5.20) 1 1 1 1 2 ≤ · ≤ . = 2β(0) + 4δ + 1 2 2β(0) + 1 2 However, this contradicts with the condition that the initial state satisfies θ > 0.5. Therefore we can derive the conclusion that any initial state can be driven into the region 2 or the region θ≤0.5 with the control signal in one step, and the control signal is u(1) = r (1 − 2θ (1)) ≥ 0.5r according to (5.16).

56

5 On Convergence Performance of DTOC Based Tracking Differentiator

Fig. 5.3 Illustration of the region 2 , θ >0.5 and θ ≤0.5

Fig. 5.4 Convergence path for any initial state M located in the region θ >0.5

Step 2: When the initial state satisfies M(x1 , x2 ) ∈ √θ≤0.5 as shown in Fig. 5.5, √ hr , i.e., β(0) > 5−1 . there exists x2 (k) = −β(k)hr < − 5−1 2 2 If the initial state cannot be driven out of the region θ≤0.5 with the corresponding control signal in one step, according to (5.18), there exists

5.3 Convergence Proof of Fast-TD

57

Fig. 5.5 Convergence path for any initial state M located in the region θ ≤0.5

2θ (0)[1 − θ (0)] 2β(0) + 4θ (0) − 1 1 1 1 2θ (0)[1 − θ (0)] < · < √ . = 2β(1) + 1 2 2β(1) + 1 2 5

θ (0) =

(5.21)

From (5.16) and (5.20), u(1) = r (1 − 2θ (1)) > (1 − √15 )r can be obtained. According to Step 1 and Step 2 above, where the initial state is in the region θ>0.5 or θ≤0.5 , the control signal satisfies u > 21 r . From (3.16), we can obtain that x2 (k + 1) = x2 (0) + h

k

u(i)

i=0

(5.22)

1 1 > x2 (0) + (1 − √ )(k − 2)hr − hr 2 5 Further, we have 1 1 β(k + 1) < β(0) − (1 − √ )(k − 2) − . 2 5

(5.23)

From (5.23), we know β(k + 1) is a monotonic function. However, for any initial state located in the region θ≤0.5 , the condition β > 0 holds. Therefore, the state must be driven out of the region θ≤0.5 with the corresponding control signal in a limited number of steps. Suppose that the state M(α(k), β(k)) located in the region θ≤0.5 becomes M(α(k + 1), β(k + 1)) located outside the region θ≤0.5 by adding the control sig-

58

5 On Convergence Performance of DTOC Based Tracking Differentiator

nal in one step, we need to prove that the state M(α(k + 1), β(k + 1)) is in the region . From (5.18), we can obtain ⎧ ⎨ α(k + 1) = ⎩

β 2 (k) 2



β(k) 2

+ 2θ (k)β(k) + θ (k) (5.24)

β(k + 1) = β(k) + 2θ (k) − 1.

Further, since β(k) >



5−1 2

and 0 ≤ θ ≤ 1, the following equations can be obtained ⎧ ⎨ −2θ 2 (k) − β(k) + ⎩

1 2

0 −h

 k i=1

i h2 u(i − 1), u(i) = r −h

i h2 u(i − 1), u(0) = −r, u(i) = r f or i > 0 −h

Clearly, ak (a−k ) are initial conditions from which the state is driven back to the origin by using u(i) = r (u(i) = −r ), i = 0, ..., k − 1. Furthermore, the broken line connecting {ak , ak−1 , ..., a1 , 0} ({a−k , a−(k−1) , ..., a−1 , 0}) is the minimum time

6.3 fsp-TD

69

state trajectory corresponding to u(i) = r (u(i) = −r ), i = 0, ..., k − 1. According to (6.12) and the control sequence taken above, we can get the minimum time state trajectory, denoted as A , as follows: A : x1 +

x2 |x2 | 1 + hx2 = 0 2r 2

(6.15)

− where A = + A ∪ A (see Fig. 6.5). This state trajectory curve overlaps the above broken line at the point {ak , a−k }. The b−k (bk ), k ≥ 2 are initial conditions from which the state is first driven back to ak−1 (a−(k−1) ) by using u(0) = −r (u(0) = r ), and then be forced to the origin by using u(i) = r (u(i) = −r ), i = 1, ..., k − 1. Connecting {b−2 , ..., b−(k−1) , b−k , ...} and {..., bk , bk−1 , ..., b2 } forms a broken line. We can get its corresponding curve’s expression, denoted as B , as follows:

B : x1 − s

5 x22 + hx2 − sh 2 r = 0 2r 2

(6.16)

− where s = sign(x1 + hx2 ) and B = + B ∪ B (see Fig. 6.5). This curve overlaps the corresponding broken line at the point {bk , b−k , k ≥ 2}. Note that, the segments [b−k ak ] ([bk a−k ]) are all parallel to each other and their midpoints, ck (c−k ), are initial conditions from which the state is first driven back to ak−1 (a−(k1 ) ) by using u(0) = 0, and then be forced to the origin by using u(i) = r (u(i) = −r ), i = 1, ..., k − 1. This broken line is denoted as 0 . Also, we can get its corresponding curve’s expression, denoted as C (see Fig. 6.5), as follow:

C : x1 +

x2 |x2 | 3 + hx2 = 0 2r 2

(6.17)

Connecting the points {..., ak , ak−1 , ..., a2 , b2 , ..., bk−1 , bk } forms a boundary denoted as + , and the points {..., b−k , b−(k−1) , ..., b−2 , a−2 , ..., a−(k−1) , a−k , ...} as − . Combining functions of A and B and the boundary transformation in (6.16), we have 1 T (x1 , x2 , r, h) = x2 + ( h 2 r 2 + 8r |y| − hr )sign(y), |y| ≥ h 2 r 2

(6.18)

Then T (x1 , x2 , r, h) = −hr corresponds to the parabolas connecting ak and bk , respectively, and this curve, denoted as ˜ + , overlaps + at the points ak , bk , k ≥ 2. Similarly, T (x1 , x2 , r, h) = hr corresponds to the parabolas connecting a−k and b−k , respectively, and this curve, denoted as ˜ − , overlaps − at the points a−k , b−k , k ≥ 2. It can also be shown that T (x1 , x2 , r, h) = 0 represents ˜ 0 , which overlaps 0 at the points c−k , ck , k ≥ 2. Moreover, ˜ + and ˜ − partition the phase plane in a manner of

70

6 Time-Optimal Control Based Tracking Differentiator with Phase Delay Alleviation

− + − Fig. 6.5 Illustration of A , B and C , where A = + A ∪ A , B = B ∪ B

⎧ ⎨ T (x1 , x2 , r, h) ≤ −hr, x = [x1 , x2 ]T is below ˜ + T (x1 , x2 , r, h) ≥ hr, x = [x1 , x2 ]T is above ˜ − ⎩ T (x1 , x2 , r, h) ≤ hr, x = [x1 , x2 ]T is between ˜ + and ˜ −

(6.19)

Up to now, any initial condition on the x1 − x2 plane can be divided as belonging to one of the following four parts, G(1), G(2), the initial condition (|y| ≥ h 2 r ) inside the area bounded by ˜ + and ˜ − and the rest part (see Fig. 6.6). The complete f sp algorithm for any initial condition on the x1 − x2 plane is u = −r sat(T (x1 , x2 , r, h), hr )

(6.20)

where  T (x1 , x2 , r, h) =



(

h 2 r 2 +8r |y|−hr )

sign(y), |y| > h 2 r x2 + 2 2 x2 + y/ h, |y| ≤ h r

and sat(T (x1 , x2 , r, h), hr ) =

(6.21)

sign(T ), T > hr T , |T | ≤ hr hr

The complete f sp algorithm now can be coded in a digital computer as in (6.22).

6.3 fsp-TD

71

Fig. 6.6 Illustration of ˜ + , ˜ − and ˜ 0

⎧ u = f sp(x1 , x2 , r, h) ⎪ ⎪ ⎪ d = r h; d = hd ⎪ 0 ⎪ ⎪ ⎪ ⎪ + μhx y = x 1 2 ⎪

⎪ ⎪ 2 + 8r |y| ⎪ a = d ⎪ 0 ⎪ ⎨ ⎪ x2 + (a02−d) sign(y), |y| > h 2 r ⎪ T = ⎪ ⎪ ⎪ x2 + y/ h, |y| ≤ h 2 r ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ r sign(T ), |T | > d ⎪ ⎩ f sp = − r Td , |T | ≤ d

(6.22)

Remark 1 The essence of the discrete-time optimal control algorithm ( f sp) in (6.22) is a sliding-mode control with the boundary level. By adopting a boundary level near C , the algorithm in (6.22) shows that the time optimal control in discrete time is not necessarily bang-bang control, that is, the control signal does not always take on extreme values. This resolves the chattering problem encountered by sliding mode control based differentiators. Remark 2 Because a tunable parameter μ is adopted in (6.22), the corresponding boundary curves and the control law in f han (see [7]) are changed. By selecting different parameter μ, one can alter the speed of the signal tracking by adjusting the system damping and further change the phenomenon of phase delay in signal tracking.

72

6 Time-Optimal Control Based Tracking Differentiator with Phase Delay Alleviation

6.3.2 Tracking Differentiator via fsp Algorithm In this subsection, a new tracking differentiator (TD) with the characteristic of phase delay alleviation based on the time-optimal control algorithm, named as f sp, is constructed. The main idea of the proposed TD based on the f sp algorithm is to come up with a discrete-time optimal control (DTOC) algorithm ( f sp) for a double-integral system in discrete-time domain directly. To reduce the phase delay in both signaltracking filtering and differentiation acquisition for the TD, in this work, a parameter μ will be introduced to the f sp algorithm. In doing so, the system damping of the TD is tunable. Specifically, when the state is driven into certain regions around the origin, one can change the system damping via μ in the corresponding control signal sequences to fulfil a faster tracking to obtain a small phase delay. Given a reference signal sequence v(k), k = 0, 1, 2, ... corrupted with a random noise, the following f sp-TD can be constructed ⎧ u(k) = f sp(x1 (k) − v(k), x2 (k), r, c0 h, μ) ⎪ ⎪ ⎪ ⎪ ⎨ x1 (k + 1) = x1 (k) + hx2 (k) ⎪ ⎪ ⎪ ⎪ ⎩ x2 (k + 1) = x2 (k) + hu(k), |u(k)| ≤ r, k = 0, 1, 2, ...

(6.23)

where v is the input signal to be differentiated, x1 is the desired trajectory, x2 is its approximate derivative, c0 is the filtering factor, r is the constraint of the system acceleration and μ is a tunable parameter to adjust the system damping. By applying the f sp algorithm in (6.22)–(6.23), x1 can track v in fastest speed, while x2 gives its approximate differentiation. In practice, μ < 1 can be selected for obtaining a small phase delay.

6.4 Numerical Simulations Based on the proposed TD in (6.23), we compare the performances of signal-tracking filtering and differentiation acquisition for input signals with different levels of noises between the f sp-TD and the f han-TD. The same initial values x10 = v(1), x20 = 0 are chosen. The input signal sequence is v(t) = awgn(sin(5t) + snr ) in all simulations, where the function of awgn is to add white Gaussian noise to the inputs, and snr represents the power of inputs in d BW . Based on extensive experiments in engineering, in particular in maglev train engineering, we have found the range of snr value is [35–45dB]. The sampling step is h = 0.001s. By trial and error, the quickness factor is r0 = 300, and the filtering factor c0 is selected with different values according to the different snr values.

6.4 Numerical Simulations

73

Fig. 6.7 Signal-tracking filtering with an SNR value of 45 dB

Fig. 6.8 Differentiation acquisition with an SNR value of 45 dB

When the input signal is v(t) = awgn(sin(5t) + 45), the results of signal-tracking filtering and differentiation acquisition are shown in Figs. 6.7 and 6.8. While v(t) = awgn(sin(5t) + 35), the results are demonstrated in Figs. 6.9 and 6.10. In the above simulations, for both algorithms, the filtering factor is c0 = 35 when the SNR value of signal is 45 dB, and c0 = 45 when the SNR value of signal is 35 dB, respectively. The system damping for the proposed f sp algorithm is μ = 0.25 for all simulations.

74

6 Time-Optimal Control Based Tracking Differentiator with Phase Delay Alleviation

Fig. 6.9 Signal-tracking filtering with an SNR value of 35 dB

Fig. 6.10 Differentiation acquisition with an SNR value of 35 dB

As shown in Figs. 6.7 and 6.9, both algorithms can track and filter the inputs as the SNR value of signal decreases. However, the proposed f sp-TD has a small phase delay compared with f han-TD by selecting a proper parameter α. From Figs. 6.8 and 6.10, compared with the ideal differentiation of inputs (dv), we can see that both TDs are noise tolerant, and can obtain good differentiation of inputs. But f han-TD has a relatively bigger phase delay than the proposed f sp-TD, which usually cannot meet the engineering requirements. Although f sp-TD has small overshoots, most systems can endure these, in particular, when the systems are with a relatively big

6.4 Numerical Simulations

75

inertia. In conclusion, the proposed f sp-TD achieves better performances of signaltracking filtering and differentiation acquisition with a small phase delay when there exist different levels of noises.

6.5 Conclusion Inevitable phase delay shall change system phase-frequency characteristic, thus affecting system stability. In this chapter, based on the proposed TDs in previous chapters, we have demonstrated two approaches to reducing phase delay in both gap-tracking filtering and velocity acquisition. By adopting a TD group scheme in the Fast-TD, the phase delay can be reduced. But using many TDs in series may make the compensation algorithm complex and difficult to set the parameters for each TD. A new TD was further proposed to reduce the phase delay by altering the system damping via changing the boundary curves of the control law that is used to construct TD. Specifically, a tuning parameter μ has been introduced to the f han algorithm for adjusting the system damping coefficient. In doing so, a new control algorithm ( f sp) that was determined by adopting different boundary curves has been proposed to construct the TD. The proposed f sp algorithm guarantees a faster tracking when the state is driven into the region G(2). The simulation and experiment results have shown that the proposed f sp-TD enables the system with a smaller phase delay in both signal-tracking filtering and differentiation acquisition compared with the f han-TD. This indicates the effectiveness and applicability of the proposed f sp-TD.

References 1. Han J (2009) From PID to active disturbance rejection control. IEEE Trans Ind Electron 56(3):900–906 2. Guo BZ, Zhao ZL (2016) Active disturbance rejection control for nonlinear systems: an introduction. Wiley 3. Xue W, Huang Y, Yang X (2010) What kinds of system can be used as tracking-differentiator. In: Proceedings of the 29th Chinese control conference. IEEE, pp 6113–6120 4. Zhang H, Xie Y, Xiao G, Zhai C, Long Z (2018) A simple discrete-time tracking differentiator and its application to speed and position detection system for a maglev train. IEEE Trans Control Syst Technol 27(4):1728–1734 5. Zhang H, Xie Y, She L, Zhai C, Xiao G (2019) High-precision tracking differentiator via generalized discrete-time optimal control. ISA Trans 95:144–151 6. Zhang H, Xie Y, Xiao G, Zhai C, Long Z, Kang H, Tang J (2018) Tracking differentiator via time criterion. In: 2018 annual American control conference (ACC). IEEE, pp 3514–3519 7. Gao Z (2004) On discrete time optimal control: a closed-form solution. In: Proceedings of the 2004 American control conference, vol 1. IEEE, pp 52–58

Chapter 7

Tracking Differentiators in Real-Life Engineering

Real-time tracking filtering and differentiation estimation of signals are commonly used in the feedback control, the fault detection and isolation and many other fields. In previous work, we have introduced the discrete time optimal control based tracking differentiator in detail. As claimed earlier, DTOC-TD has many advantages compared with sliding-mode-based differentiators, in particular, at the aspects of smoothness and noise tolerance. Further, to reduce the complexity of the f han algorithm, we have designed the Fast algorithm by adoption of a linear criterion in constructing the control signal sequences. Meanwhile, we have introduced two effective methods to improve the phase quality of the proposed TDs. One applies a TD group to compensate the phase delay based on the moving average algorithm, while the other is to introduce a tunable damping coefficient to the boundary level and the control law, that is, the f sp algorithm in order to construct the TD with new structure. These methods are ready to apply in the practical engineering. In this chapter, we will show how we apply the above mentioned TDs in the following three real-life engineering applications. • A real-time, accurate state estimation (SE) is crucial if we are to enhance the power systems’ resilience. Driven by this concern, an increasing number of phasor measurement units (PMUs) are being deployed in power systems. Collecting near real-time and accurate phasors makes PMUs capable of directly measuring the power-system states. Therefore, in the first case study, we will carry out the state estimation regarding the measurements from PMUs. Specifically, the proposed differentiator based on the Fast algorithm and its corresponding TD group are applied to reliable estimation filtering of the system states. We used real-time PMU data to compare between SE filtering by our proposed discrete TD and Kalman filter (KF). • To realize stable suspension control in a maglev transportation, it is necessary to effectively acquire gap and its corresponding velocity signals that can reflect the conditions of the suspension system to participate in designing its feedback controller. In the second case study, based on the gap-tracking filtering and velocity © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_7

77

78

7 Tracking Differentiators in Real-Life Engineering

signals acquired from the proposed f sp-TD, the effectiveness of the TD based feedback control for the maglev suspension system is verified by experimental results, and the superiority of this TD based control scheme is demonstrated in comparison with typical differentiator based feedback control strategy. • The speed and position detection system is a core part of the synchronous traction system in the maglev transportation. It carries out the task of detecting the speed and position of the train, and at the meantime, it provides the speed and position information for the operation control system to achieve centralized control. In the third case study, to amend the distortion of position signals at track joints, the TD based on algorithm Fast is introduced. Also, we use the proposed TD to construct the TD group, employing a moving-average algorithm to compensate for any phase delay.

7.1 Case Study 1: State Estimation in Power Systems 7.1.1 Background Initially proposed by F.C. Schweppe in 1970, power system state estimation (SE) has played a critical role in control and protection of the systems [1, 2]. State estimation, also known as filtering, is a way of using the redundancy of real-time measurements to improve data accuracy. It aims to exclude the random niose-casued error message, monitoring and estimating the running states of a system [3, 4]. In the past, remote terminal units (RTUs) are installed to collect the information on current/voltage magnitudes and flowing power. Such information can only connect power and current magnitude to the voltage-related states with non-linear function, which stimulates the SE algorithm developments at this stage to mainly focus on tackling nonlinear and iterative weighted least-squares (WLS) problems [5, 6]. RTUs measurements are usually not time-stamped. In the processing, some uncertain errors are introduced, resulting in estimated states being polluted. With the advancements of PMUs technologies and their deployments in power systems, the time-stamped and accurate phasors can be recorded at a high sampling rate [7]. This equips systems with the ability of measuring the running states directly. Thanks to the deployment of PMUs, the equations linking measurements and state variables, called measurement model, become linear [8]. Because of such favorable characteristics of PMUs data, there are two alternative SE algorithms we can use, namely the Kalman filter (KF) and the least absolute value (LAV) [9], respectively. Note that LAV and WLS are static estimators since they only work based on the measurements. While the KF belongs to the dynamic estimators, because the process model that describes the time-evolution of running states in power systems is needed as well [10, 11].

7.1 Case Study 1: State Estimation in Power Systems

79

Fig. 7.1 Output of current magnitude SE filtering using the real-time PMU data Table 7.1 Comparisons of the execution time of Fast and K F with same data window width Algorithm Average execution time Fast KF

15.3 s 20.5 s

7.1.2 Experiment Results The raw data, including current and voltage phasors, were recorded during normal operations at a 20-KV power plant in Jiangsu Province, China. The sampling frequency was 4960 Hz. For this processing, we set parameters for TD as follows: sampling period, h = 0.001s; quickness factor, r0 = 800; and filtering factor, c0 = 8. Figure 7.1 shows the raw PMU data and the corresponding processing effect. From Fig. 7.1, we can see that compared with the Kalman filter algorithm, the proposed TD obtains more effective SE filtering outputs than KF. Also, to compare the time consumptions of the two different algorithms in processing the PMUs data with the same data window width in real-time execution, we again adopt the STM32F405 with an upgraded CPU clock speed of 200 MHz. The results are presented in Table 7.1. From the above comparisons, we see that the Fast algorithm reduces the time consumptions for real-time executions. Together with filtering results, we can see that the Fast based state estimation algorithm is more accurate and efficient.

80

7 Tracking Differentiators in Real-Life Engineering

7.2 Case Study 2: Suspension Control System 7.2.1 Background Not like the traditional wheel-on-rail transportation, the maglev transportation replaces wheels by electromagnets and suspends on the guideway through noncontact electromagnetic force [12]. The maglev transportation has become a newgeneration transportation system because it features no risk of derailment, low cost of maintenance, strong climbing and turning ability and less environment impact, to name just a few [13, 14]. Since it was patented in 1934, the maglev transportation technology has obtained a wide range of research and applications in both academy and industry, in particular, in Japan, South Korea, Germany and China [15, 16]. The active suspension control, one of the most challenging issues of the maglev transportation, must be applied to ensure the stability of levitation. On the whole, the suspension control strategy of current commercial operation lines is based on the linear expansion at the balance point of the system where the state feedback or PID law is adopted [17–19]. Meanwhile, researchers have applied various advanced control schemes to design the magnetic suspension control systems [20–23]. In [24], to reject the disturbance and parameter perturbations, Sun et al. proposed an adaptive neural-fuzzy sliding mode controller based on a nonlinear model of the magnetic suspension system and known system states. Considering the wide applications of IoT in maglev transportation, authors also proposed an IoT-based online condition monitor and enhanced adaptive fuzzy control scheme for a medium-low-speed maglev train system [25]. In [26], based on the dynamic model of a hybrid maglev transportation system, a backstepping fuzzy-neural-network control is proposed to deal with the challenges of the complicated control transformation and the chattering in backstepping control. Further, in [27], authors proposed an observer-based adaptive fuzzy-neural-network control for hybrid system where an adaptive observer was designed to estimate velocity signals for the controller utilization. For providing robustness to modelling uncertainties and supplementary loading conditions, Folea et al. [28] designed a special type of an fractional order controller as well as a novel parameters’ tuning procedure in a magnetic levitation system. In [29], to improve the convergence rate and time varying disturbance reject ability, an adaptive nonsingular terminal sliding mode control based on disturbance compensation technique is proposed for the suspension system. The maglev transportation utilizes magnetic suspension and linear motor to propel train with magnets instead of wheels (see Fig. 7.2). Specifically, a transverse force generated from guidance magnet can realize the train guidance. When the train is levitated by suspension electromagnet (exciter) at 8–10 mm, the vehicle will be propelled by linear motor. As shown in Fig. 7.2, a maglev train is levitated by multiple levitation modules. Each levitation module is usually consisted of 4 single-point suspension control systems. Through structure decoupling of suspension chassis, it

7.2 Case Study 2: Suspension Control System

81

Fig. 7.2 The suspension system and its control framework in the maglev transportation

is doable to simplify the magnetic suspension system into a single-point suspension model. Based on references [24, 26], the dynamic model of the single-point suspension can be described as follows: ⎧ ⎪ ⎨ x˙1 = x2 x2 x˙2 = M+m g − mK x32 m 1 ⎪ ⎩ x˙ = x2 x3 − Rx1 x3 + x1 u 3

x2

2K

2K

where the state variables x = [x1 x2 x3 ]T = [z z˙ i]T and the meaning of the parameters of the above model can be easily found in [24, 26]. The feedback control scheme for the single-point suspension system can be seen in Fig. 7.2. Installed at electromagnet, the gap sensor is applied to measure the gap (z) between the upper surface of the electromagnet and the lower surface of the track; while the acceleration sensor is used to acquire the vertical motion acceleration (a) of the electromagnet. Voltage (U I , U I I ), current (I I , I I I ) and temperature (T ) sensors are installed inside the controller. In practice, the gap signals (z) and its corresponding velocity signals (˙z or x2 ) are vital to construct suspension feedback controller. The acceleration sensor is usually applied to acquire speed signals by integrator. The expensive accelerometer however has a relatively high chance to fail because of the harsh operating conditions. Also, there exists a quite large frequency range for the gap signals under different working conditions. For example, the frequency of the gap signals is around 0.5 Hz under the static suspension scenarios. For this scenario, the gap signals cover the DC component. When using the acceleration integration method, the DC component will be enlarged, resulting in losing effectiveness of the speed estimation. One may adopt

82

7 Tracking Differentiators in Real-Life Engineering

a certain filtering method before the acceleration integration, which however may allow phase lead to emerge, making the maglev train unstable. Also, in some work, based on some known dynamic systems, an observer or disturbance estimator is used to estimate the speed signals (˙z or x2 ). However, with complex dynamic model of suspension system and many uncertainties, model based state estimator may fail to estimate the gap and velocity signals. Therefore, in this work, we will design an effective model-free tracking differentiator that has advantageous phase quality to extract velocity signals from gap sensors. Further, we will compare the control performance based on the proposed tracking differentiator and the typical differentiator, respectively.

7.2.2 Experiment Results In this section, we will carry out two different experiments to show the effectiveness and applicability of the proposed f sp-TD. They are: (1) under two different working scenarios in a maglev train, the comparison of gap-tracking filtering and velocity acquisition based on f sp-TD and f han-TD, respectively; and (2) the performance of the proposed TD based control scheme in comparison with a typical differentiator based control scheme. The experiment platform is shown in Fig. 7.3. Therein, the real-time field data reflecting the gap between the electromagnet and the track is collected by a gap sensor (JXCF-TL-KD-02-N), and then is processed by the FPGA inside control panel. The sampling period of the gap sensor is 40 kHz and the FPGA is with the speed of 50 MHz. Specifically, the gap data is collected from the scenarios of static suspension and train climbing, respectively. In these scenarios, the suspension gap is 8 mm. To clearly demonstrate the comparisons on signal-tracking filtering and differentiation acquisition, we let the 8 mm correspond to 0 point in y-axis. Note that the steady-state error within ± 0.5 mm meets the requirements of practical maglev engineering. The f sp-TD was tested and experimentally compared with the f han-TD. To evaluate the f sp algorithm, all involved parameters of both differentiators are selected by the method of trial and error. Therein, the parameter r = 3000 and c0 = 10 are adopted for both TDs, and the µ in f sp-TD is selected as µ = 0.25. The signal processing comparison results including gap signal-tracking filtering and speed acquisition in two scenarios are shown in the following figures. The ideal speed estimation in experiments cannot be obtained because the gap signals are unknown and time variant due to different scenarios. For better comparison of the phase delay between the two TDs, we plot the gap signals in speed estimation for both scenarios. From Figs. 7.4 and 7.5, we can see that the maglev train is rising from 12 mm to the stable suspension gap (8 mm), while from second scenarios in Figs. 7.6 and 7.7, the maglev train is in stable suspension status. The results show that the f sp-TD, compared with the f han-TD, can produce a smaller phase delay for both signal-tracking filtering and speed acquisition in

7.2 Case Study 2: Suspension Control System

Fig. 7.3 Experimental platform of a maglev bogie with suspension control systems

Fig. 7.4 Gap tracking filtering when the train is in rising phase

83

84

7 Tracking Differentiators in Real-Life Engineering

Fig. 7.5 Speed estimation when the train is in rising phase

Fig. 7.6 Gap tracking filtering when the train is in stable suspension

two scenarios, which can meet the requirements of practical maglev engineering. Although f sp-TD has some small overshoots in both scenarios, the maglev train can endure them in a good way as there exists a relatively big inertia in maglev train. This indicates that the effectiveness and applicability of the proposed f sp-TD, demonstrating that it has smaller phase delay by introducing the tuning parameter µ. Now, we conduct the comparison experiments of the suspension control based on f sp-TD based PID, f han-TD based PID and PI controller, respectively. The parameters of both differentiators and the parameters of PID controller are set by the method of trial and error. Specifically, the same parameters r = 3000 and c0 = 10 are

7.2 Case Study 2: Suspension Control System

85

Fig. 7.7 Speed estimation when the train is in stable suspension

Fig. 7.8 The comparison of suspension control performance among three different control scheme

selected for this experiment as those in the above experiments. The K p = 14, K I = 5.6 and K I = 0.5 are set for the PID controller. The suspension control performance is shown in Fig. 7.8.

86

7 Tracking Differentiators in Real-Life Engineering

From Fig. 7.8, we can see that both differentiator based PID control schemes can realize the stable suspension; while using only the PI control scheme, the system will fail in suspension. This is because the suspension control system is a nonminimum phase system: without a proper differentiation block, one is difficult to place the system pole onto the left half plane. The proposed f sp-TD based PID control scheme outperforms f han-TD in transient process with smaller overshoots and better quickness and smaller steady state errors. This demonstrates the superiority of the proposed TD based control scheme.

7.3 Case Study 3: Speed and Position Detection System In this section, experiments are carried out on the speed and position detection system of maglev train to show the ability of filtering, compensating phase delay and amending distortion signals of the proposed TD based on the algorithm Fast. A permanent magnet electrodynamic suspension train uses a linear motion actuator to realize traction function [29, 30]. As shown in Fig. 7.9, the synchronous traction system comprises a speed and position detection system, a radio unit, a ground traction system, and a traction power module. The speed and position detection system is a core part of the synchronous traction system, which is used to receive and process the sensors’ data. It sends the processed data of the speed and position of the train to the traction system in terms of the agreement to realize traction function. Therein, the position sensor can detect inductance changes of long stators’ alveolar structures (see Fig. 7.9) to acquire the position information about the train. In practice, the detection coils of the position sensor face long stators’ alveolar structures [16]. When the position sensor moves along the long stators, it can distinguish the teeth and the slots by detecting changes of inductance, and meanwhile, the position of the train can be detected by counting the number of passed alveolar structures. Then, the position sensor transforms the position information into the output of the magnetic pole phase (from 0 to 60◦ ), where the phase signal between 0 and 60◦ represents the length of one alveolar structure. Afterwards, the speed and position detection system processes the position data in accordance with the requirements of the traction system to compose the magnetic pole phase (from 0 to 360◦ ) for the traction. For prevention of thermal expansion and contraction, the long stator track features numerous stators with many joints (80 mm of the actual displacement) along the track (see Fig. 7.10). These joints distort the outputs of the magnetic pole phase from the position sensors. The expected output of the position sensor when maglev train is passing over track joint is shown in Fig. 7.11. However, because of the track joints, the position signal will be more or less aberrant as the train passes. To amend the distortion of position signals at track joints, the TD based on algorithm Fast is introduced. We use the proposed TD to construct the TD group, employing a moving-average algorithm to compensate for any phase delay. The moving-average algorithm is determined as

7.3 Case Study 3: Speed and Position Detection System

87

Fig. 7.9 Synchronous traction system Fig. 7.10 Track joint in traction system

Fig. 7.11 The expected output of the position sensor when the maglev train passes over track joint

Vˆ (t) =

n 

Cnk (−1)(k+1) Vk (t)

(7.1)

k=1

We choose n = 3, leading to Vˆ (t) = 3V1 (t) − 3V2 (t) + V3 (t). The experimental data are acquired from the speed and position detection system when the train is passing over a track joint. In the experiments, the parameters are set by the trial and error method, adopting values as follows: for the algorithm Fast, the quickness factor is r0 = 100, and the filtering factor is c0 = 40, while for the

88

7 Tracking Differentiators in Real-Life Engineering

Fig. 7.12 Results of magnetic pole phase filtering and phase compensation with the algorithm Fast and Fhan

algorithm Fhan, the quickness factor is r0 = 300, and the filtering factor is c0 = 45. For each algorithm, sampling time step h corresponds to 0.005 s. Figure. 7.12 shows that, when the proposed TD group is used based on the algorithm Fast, the aberrant magnetic pole phase from the position sensor becomes smoother and the aberrant signal is greatly improved. The phase delay is small enough to meet the need of traction system. Furthermore, compared with the TD based on the algorithm Fhan, we can find that the TD based on Fast is superior to the Fhan in filtering and phase compensation. Such findings verify the effectiveness of the TD based on the Fast algorithm.

7.4 Conclusion In this chapter, we have demonstrated the applications of the proposed TDs in three different real-life engineering. First, using the proposed Fast-TD algorithm and phase delay compensation method, the output of state estimation filtering of the field PMU data is smooth and with small phase delay. Without taking complex power system modeling and historical data into account or requesting robustness of parameters’ setting, the proposed TD may provide a promising approach to filter the real-time PMU data, enabling better state estimation and fault detection in power systems. Then, compared with typical differentiator based feedback control strategy in the

7.4 Conclusion

89

suspension system, the superiority of the proposed f sp-TD based control scheme was demonstrated. With effective velocity signals obtained from gap sensors, the feedback control based on the f sp-TD algorithm can ensure the good enough control performance. Third, experiments on the speed and position detection system in a maglev train verified the effectiveness of the TD based on the algorithm Fast in signal processing. With good performance in signal-tracking filtering and differentiation acquisition and less computation resource needed, the proposed TD algorithms with phase delay compensation are ready to use in more engineering applications.

References 1. Gomez-Exposito A, Abur A (2004) Power system state estimation: theory and implementation. CRC Press 2. Dehghanpour K, Wang Z, Wang J, Yuan Y, Bu F (2019) A survey on state estimation techniques and challenges in smart distribution systems. IEEE Trans Smart Grid 10(2):2312–2322 3. Ghahremani E, Kamwa I (2016) Local and wide-area PMU-based decentralized dynamic state estimation in multi-machine power systems. IEEE Trans Power Syst 31(1):547–562 4. Zhao J, Zhang G, Das K, Korres GN, Manousakis NM, Sinha AK, He Z (2016) Power system real-time monitoring by using PMU-based robust state estimation method. IEEE Trans Smart Grid 7(1):300–309 5. Bretas AS, Bretas NG, Braunstein SH, Rossoni A, Trevizan RD (2017) Multiple gross errors detection, identification and correction in three-phase distribution systems WLS state estimation: A per-phase measurement error approach. Electr Power Syst Res 151:174–185 6. Yao Y, Liu X, Zhao D, Li Z (2018) Distribution system state estimation: a semidefinite programming approach. IEEE Trans Smart Grid 7. De La Ree J, Centeno V, Thorp JS, Phadke AG (2010) Synchronized phasor measurement applications in power systems. IEEE Trans Smart Grid 1(1):20–27 8. Terzija V, Valverde G, Cai D, Regulski P, Madani V, Fitch J, Skok S, Begovic MM, Phadke A (2011) Wide-area monitoring, protection, and control of future electric power networks. Proc IEEE 99(1):80–93 9. Zhao J, Gomez-Exposito A, Netto M, Mili L, Abur A, Terzija V, Kamwa I, Pal BC, Singh AK, Qi J, Huang Z (2019) Power system dynamic state estimation: motivations, definitions, methodologies and future work. IEEE Trans Power Syst 10. Gl M, Abur A (2014) LAV based robust state estimation for systems measured by PMUs. IEEE Trans Smart Grid 5(4):1808–1814 11. Soliman SA, El-Hawary ME (2000) Measurement of power systems voltage and flicker levels for power quality analysis: a static LAV state estimation based algorithm. Int J Electr Power Energy Syst 22(6):447–450 12. Lee HW, Kim KC, Lee J (2006) Review of maglev train technologies. IEEE Trans Magn 42(7):1917–1925 13. Yan L (2008) Development and application of the maglev transportation system. IEEE Trans Appl Supercond 18(2):92–99 14. Tandan GK, Sen PK, Sahu G, Sharma R, Bohidar S (2015) A review on development and analysis of maglev train. Int J Res Advent Technol 3(12):14–17 15. Chen D, Yin J, Chen L, Xu H (2016) Parallel control and management for high-speed maglev systems. IEEE Trans Intell Trans Syst 18(2):431–440 16. Liu Z, Long Z, Li X (2015) Maglev trains. In: Springer tracts in mechanical engineering. Springer, Berlin. 17. Liu HK, Chang WS (2007) Double-loop control of maglev train. Control Eng China 14(2):198– 200

90

7 Tracking Differentiators in Real-Life Engineering

18. Liu H, Zhang X, Chang W (2009) PID control to maglev train system. In: 2009 international conference on industrial and information systems. IEEE, pp 341–343 19. Wai RJ, Lee JD (2008) Robust levitation control for linear maglev rail system using fuzzy neural network. IEEE Trans Control Syst Technol 17(1):4–14 20. Ding J, Yang X, Long Z (2019) Structure and control design of levitation electromagnet for electromagnetic suspension medium-speed maglev train. J Vib Control 25(6):1179–1193 21. Sun N, Fang Y, Chen H (2017) Tracking control for magnetic-suspension systems with online unknown mass identification. Control Eng Pract 58:242–253 22. Wei W, Xue W, Li D (2019) On disturbance rejection in magnetic levitation. Control Eng Pract 82:24–35 23. Sun Y, Xu J, Qiang H, Lin G (2019) Adaptive neural-fuzzy robust position control scheme for maglev train systems with experimental verification. IEEE Trans Ind Electron 66(11):8589– 8599 24. Sun Y, Qiang H, Xu J, Lin G (2019) IoT-based online condition monitor and improved adaptive fuzzy control for a medium-low-speed maglev train system. IEEE Trans Ind Inf 25. Wai RJ, Yao JX, Lee JD (2014) Backstepping fuzzy-neural-network control design for hybrid maglev transportation system. IEEE Trans Neural Netw Learn Syst 26(2):302–317 26. Wai RJ, Chen MW, Yao JX (2016) Observer-based adaptive fuzzy-neural-network control for hybrid maglev transportation system. Neurocomputing 175:10–24 27. Folea S, Muresan CI, De Keyser R, Ionescu CM (2015) Theoretical analysis and experimental validation of a simplified fractional order controller for a magnetic levitation system. IEEE Trans Control Syst Technol 24(2):756–763 28. Wang J, Zhao L, Yu L (2020) Adaptive terminal sliding mode control for magnetic levitation systems with enhanced disturbance compensation. IEEE Trans Ind Electron 29. Zhang H, Xie Y, Long Z (2015) Fault detection based on tracking differentiator applied on the suspension system of maglev train. Math Probl Eng 30. Goodall RM (2004) Dynamics and control requirements for ems maglev suspensions. In: Proceedings on international conference on Maglev, pp 926–934

Chapter 8

Summary

In this chapter, we summarize this book and discuss the future work for theories, implementations and applications of tracking differentiator (TD) algorithms.

8.1 Summary of Contributions In this book, we investigated the time optimal control based tracking differentiator algorithms and their applications in some real-life engineering. Time optimal control algorithms with boundary level have advantages at the aspects of chattering alleviation and quickness, which offer a great potential to construct the corresponding differentiators. In particular, we first studied a generalized and simple discrete time optimal control algorithm that can be used to construct the differentiators, and we gave their full convergence analysis. Further, we came up with two approaches to improve the phase quality of the proposed TDs. Our studies then focused on the applications of the proposed TDs in power systems and maglev transportation to achieve effective signal-tracking filtering and differentiation estimation for realizing better state estimation, suspension control and speed and position detection. The main contributions of this book are summarized as follows. • In Chap. 3, we introduced the discrete time optimal control, that is, the f han algorithm in detail, in particular, the determination of the boundary curves based on IRs. To reduce the complexity of the f han algorithm, we designed a new DTOC law (the Fast law) by introducing a linearized criterion in determining the control signal sequence. A general form of DTOC algorithm was proposed to allow flexible selection of different algorithms for different application scenarios. Numerical simulation results indicated that the state trajectories driven by the proposed Fast algorithm is closer to the time optimal curve (the switching curve in the bang-bang control) compared with that of the f han algorithm. The efficiency

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0_8

91

92









8 Summary

of both Fast algorithm and f han algorithm were experimentally evaluated and compared by FPGA and MCU. In Chap. 4, a novel TD based on the discrete-time optimal control, that is, the Fast algorithm was proposed. By adopting a linearized criterion in designing the control algorithm, we obtained a new TD with a simple structure. The filtering mechanism was identified through structure analysis. Through this frequencydomain analysis, a rule of thumb to regulate the parameter r in the TD was given. Numerical simulations showed that the Fast algorithm based TD is effective in filtering and obtaining differentiation. In Chap. 5, the convergence analysis of the DTOC-TD was first investigated, including the f han-TD and Fast-TD. We showed their full convergence by using two different methods. Specifically, the convergence of the f han-TD was given by adopting Lyapunov functions, while the method of state sequence convergence was proposed to prove the convergence of the Fast algorithm. Both proofs guarantee that any given initial state can converge to the steady state within a finite number of steps, which not only makes its applications technically sound, but also provides the theoretical foundation of ADRC. In Chap. 6, in order to improve the phase quality of the TD for better engineering applications, two approaches were presented to reduce phase delay inn both tracking filtering and differentiation acquisition. Specifically, one approach was to introduce a TD group scheme in the Fast-TD, and the other was to alter the structure of the DTOC algorithm by changing the boundary curves. The simulation and experiment results demonstrated that the proposed TDs with phase delay alleviation methods can acquire smaller phase delay both in tracking filtering and differentiation acquisition compared with the f han-TD. Not like model-based observers, the proposed TD provides a model-free approach to obtain the filtering and differentiation estimation, which is ready to use in the real-life engineering. In Chap. 7, we applied the proposed tracking differentiator with phase delay alleviation methods in the real-life engineering. First, we utilized the Fast-TD in processing the filed PMU data to perform the static SE in power systems. From the results, we found that the TD-based SE algorithm has advantages of better accuracy and efficiency over Kalman filter. Second, the f sp-TD was applied to obtain the gap filtering signals and its corresponding velocity information to participate in the feedback controller design in the suspension control system. Compared with the typical differentiator, the proposed TD can ensure better control performance. Third, experiments conducted on the speed and position detection system for a maglev train demonstrated that the proposed tracking differentiator group, with the moving-average algorithm, can filter noises, amending distortion signals effectively and compensating for phase delays when the train is passing over track joints. With good performance in signal-tracking filtering and differentiation acquisition together with a lower computational, the proposed TD algorithms with phase delay compensation are ready to use in more engineering applications

8.2 Future Work

93

8.2 Future Work We come up with some potential future work as presented below.

8.2.1 Extended DTOC Algorithm The disturbances are not investigated in (3.3) for constructing the corresponding DTOC algorithm. Thus, we need to consider the following double-integral plant with perturbations  x˙1 = x2 , x˙2 = u + w(x, t), |u| ≤ r where w(x, t) are perturbations. Perturbations, including uncertainties and external disturbances, can be functions of time t. In the future work, we will investigate the time-optimal solution for the above system and its discrete-time form, where we call it as extended DTOC algorithm. Specifically, we would first need to find its corresponding boundary curves and the characteristic control curve to define the regions that the initial state on the phase plane belongs to. Then, we shall determine the control signal sequences inside and/or outside the different regions to drag the state points back to the origin.

8.2.2 Tracking Differentiator In practice, the sensors’ information may feature quick changes within a certain frequency band with high-frequency noises. Our extensive testing showed that under such cases, the proposed tracking differentiator with fixed setting parameters may degrade in the aspects of filtering and differentiation. To improve the performance of the tracking differentiator for the above mentioned input signals, we will develop an adaptive tracking differentiator in our future work. This adaptive tracking differentiator shall be able to automatically adjust the differentiator’s parameters based on errors between the input signals and the feedback of filtering outputs. As mentioned in Chap. 5, compared with the existing differentiators, the tracking differentiator has many advantages. For example, it requests a weaker constraint on input signals. However, a rigorous proof for bang-bang algorithm based TD is still open, other than the f han algorithm based TD, though filtering properties and stability of some special types of TD have been discussed. We shall investigate these open questions in the near future. Other future investigations on TD will include an analysis of the accuracy of tracking and differentiation for the proposed TDs, and the selection of the optimal TD’s parameters using a heuristic algorithm.

Appendix A

Matlab Codes

A.1 Main Codes In this section, we will attach the main Matlab codes for readers to utilize in their own projects. They include f han-TD, Fast-TD, f sp-TD and the frequency sweep method.

fhan-TD function Demo_Discrete_Time_Optimal_fhan_D close all clear all clc %% parameter setting ncount=100000; Ts=1.0e-4; % the sampling period h=Ts; t=(0:1:ncount-1)*h; fv=1; w0=2*pi*fv; x10=vn(1); x20=0;

% the frequency of the input signals

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 H. Zhang et al., Tracking Differentiator Algorithms, Lecture Notes in Electrical Engineering 717, https://doi.org/10.1007/978-981-15-9384-0

95

96

Appendix A: Matlab Codes

r=90; c0=60;

% the quickness factor (important!) % the filtering factor (important!)

%% input signals for i=1:ncount v(i)=sin(w0*t(i))+sin(3*w0*t(i))+5*t(i)+1; vn(i)=awgn(v(i),20); dv(i)=w0*cos(w0*t(i))+3*w0*cos(3*w0*t(i))+5; end %% Discrete_Time_Optimal_fhan Differentiator algorithm [X1,X2]=TD(@fhan,vn,x10,x20,r,c0,h); %% plot output figure(1) plot(t, X1,'r',t,vn,'g') xlabel('t/s') legend('X1','v') grid figure(2) plot(t,X2,'r',t,dv,'g') xlabel('t/s') legend('X2','dv') grid figure(3) plot(X1,X2,'r') xlabel('x1') ylabel('x2') title('X1-X2 plane') grid

Appendix A: Matlab Codes

%% function fhan function[X1,X2]=TD(fhan,vn,x10,x20,r,c0,h) ncount=length(vn); for i=1:ncount u=fhan(x10-vn(i),x20,r,c0*h); x1=x10+h*x20; x2=x20+h*u; X1(i)=x10; X2(i)=x20; x10=x1; x20=x2; end return function u=fhan(x1,x2,r,h) d=r*h; d0=d*h; y=x1+h*x2; a0=sqrt(d*d+8*r*abs(y)); tmp=abs(y); if tmp>d0 a=x2+(a0-d)*sign(y)/2; else a=x2+y/h; end tmp2=abs(a); if tmp2>d u=-r*sign(a); else u=-r*a/d; end return

97

98

Appendix A: Matlab Codes

Fast-TD function Demo_Discrete_Time_Optimal_Fast3_D close all clear all clc %% parameter setting ncount=6000; h=0.001; t=(0:ncount-1)*h; x10=0; x20=0; r=1200; c0=60; %% input signals for i=1:ncount v(i)=awgn(sin(t(i)),45); dv(i)=cos(t(i)); end %% Discrete_Time_Optimal_Fast3 Differentiator algorithm [X1,X2]=TD(@fast3,v,x10,x20,r,c0,h);

%% plot output figure(1) plot(t, X1,'r',t,v,'g') xlabel('t/s') legend('X1','v') grid figure(2) plot(t,X2,'r',t,dv,'g') xlabel('t/s') legend('X2','dv') grid

Appendix A: Matlab Codes

%% function fast function[X1,X2]=TD(fast3,v,x10,x20,r,c0,h) ncount=length(v); for i=1:ncount u=fast3(x10-v(i),x20,r,c0*h); x1=x10+h*x20; x2=x20+h*u; X1(i)=x10; X2(i)=x20; x10=x1; x20=x2; end return function u=fast3(x1,x2,r,h) z1=x1+h*x2; z2=z1+2*h*x2; if abs(z1)>=h^2*r || abs(z2)>=h^2*r xa=0.5*x2^2/r+0.5*h*abs(x2); xb=0.5*x2^2/r+2.5*h*abs(x2)+h^2*r; xc=0.5*x2^2/r+1.5*h*abs(x2); if x1*x2>=0 u=-r*sign(x1+h*x2); return end if abs(x1)>=(xb) u=-r*sign(x1); return end if abs(x1)d out=-r*sign(a); else out=-r*a/d; end return

101

102

Appendix A: Matlab Codes

The Frequency Sweep Analysis of fhan-TD Part I clear all close all clc T=0.001; %the sampling period Am=1; % the magnitude of inputs c0=1; f=1; %counter for F=0.1:0.5:10 % the frequency range u_1=0; y_1=0; dy_1=0; for k=1:1:20000 time(k)=k*T; u(f,k)=Am*sin(1*2*pi*F*k*T); %% choosing different quickness factor S=1; if S==1 r=100; elseif S==2 r=250; elseif S==3 r=500; elseif S==4 r=750; end %% fhan-TD y(f,k)=y_1+T*dy_1; dy(k)=dy_1+T*fhan(y_1,dy_1,u(f,k),r,c0*T); dy_1=dy(k); uk(k)=u(f,k); yk(k)=y(f,k);

Appendix A: Matlab Codes

103

y_1=yk(k); u_1=uk(k); end f=f+1; end %% storage of filtering data if S==1 save Rfile1 elseif S==2 save Rfile2 elseif S==3 save Rfile3 elseif S==4 save Rfile4

S y; S y; S y; S y;

end %% fhan algorithm function z=fhan(x1,x2,u,r,h) deta=r*h; deta0=deta*h; z=x1-u+h*x2; a0=sqrt(deta^2+8*r*abs(z)); if abs(z)0 ph_e(kk)=ph_e(kk)-360; end f=f+1; end %% plot Bode picture with different

r

figure(1); if S==1 hold on; subplot(2,1,1); semilogx(w,mag_e,'b-h','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Mag.(dB.)'); hold on; subplot(2,1,2); semilogx(w,ph_e,'b-h','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Phase(Deg.)'); elseif S==2 hold on; subplot(2,1,1); semilogx(w,mag_e,'m-d','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Mag.(dB.)'); hold on; subplot(2,1,2); semilogx(w,ph_e,'m-d','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Phase(Deg.)'); elseif S==3 hold on; subplot(2,1,1); semilogx(w,mag_e,'g-s','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Mag.(dB.)'); hold on; subplot(2,1,2); semilogx(w,ph_e,'g-s','linewidth',1.5);grid on; xlabel('rad./s');ylabel('Phase(Deg.)'); elseif S==4 hold on;