117 33 63MB
English Pages 552 [542] Year 2021
Springer Tracts in Mechanical Engineering
Adam Jablonski
Condition Monitoring Algorithms in MATLAB®
Springer Tracts in Mechanical Engineering Series Editors Seung-Bok Choi, College of Engineering, Inha University, Incheon, Korea (Republic of) Haibin Duan, Beijing University of Aeronautics and Astronautics, Beijing, China Yili Fu, Harbin Institute of Technology, Harbin, China Carlos Guardiola, CMT-Motores Termicos, Polytechnic University of Valencia, Valencia, Spain Jian-Qiao Sun, University of California, Merced, CA, USA Young W. Kwon, Naval Postgraduate School, Monterey, CA, USA Francisco Cavas-Martínez, Departamento de Estructuras, Universidad Politécnica de Cartagena, Cartagena, Murcia, Spain Fakher Chaari, National School of Engineers of Sfax, Sfax, Tunisia
Springer Tracts in Mechanical Engineering (STME) publishes the latest developments in Mechanical Engineering - quickly, informally and with high quality. The intent is to cover all the main branches of mechanical engineering, both theoretical and applied, including: • • • • • • • • • • • • • • • • •
Engineering Design Machinery and Machine Elements Mechanical Structures and Stress Analysis Automotive Engineering Engine Technology Aerospace Technology and Astronautics Nanotechnology and Microengineering Control, Robotics, Mechatronics MEMS Theoretical and Applied Mechanics Dynamical Systems, Control Fluids Mechanics Engineering Thermodynamics, Heat and Mass Transfer Manufacturing Precision Engineering, Instrumentation, Measurement Materials Engineering Tribology and Surface Technology
Within the scope of the series are monographs, professional books or graduate textbooks, edited volumes as well as outstanding PhD theses and books purposely devoted to support education in mechanical engineering at graduate and post-graduate levels. Indexed by SCOPUS, zbMATH, SCImago. Please check our Lecture Notes in Mechanical Engineering at http://www.springer. com/series/11236 if you are interested in conference proceedings. To submit a proposal or for further inquiries, please contact the Springer Editor in your country: Dr. Mengchu Huang (China) Email: [email protected] Priya Vyas (India) Email: [email protected] Dr. Leontina Di Cecco (All other countries) Email: [email protected] All books published in the series are submitted for consideration in Web of Science.
More information about this series at http://www.springer.com/series/11693
Adam Jablonski
Condition Monitoring Algorithms in MATLAB®
123
Adam Jablonski Department of Robotics and Mechatronics, Faculty of Mechanical Engineering and Robotics AGH University of Science and Technology Krakow, Poland
ISSN 2195-9862 ISSN 2195-9870 (electronic) Springer Tracts in Mechanical Engineering ISBN 978-3-030-62748-5 ISBN 978-3-030-62749-2 (eBook) https://doi.org/10.1007/978-3-030-62749-2 “amc VIBRO” Logo © AMC TECH, reprinted with permission from AMC TECH. All Rights Reserved “MFPT” Logo © Society for Machinery Failure Prevention Technology (MFPT), reprinted with permission from MFPT. All Rights Reserved “MATLAB logotype” © MathWorks, Inc., reprinted with permissions of the MathWorks, Inc. All Rights Reserved. © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG 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 Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To all the parents who still offer to their children more than just video games and cell phones
Foreword
This book is a welcome addition in the field of machine condition monitoring, one of the most rapidly developing areas within mechanical engineering. Because of this rapid development, it can be difficult for the would-be practitioner to find reliable references relating theory to practice. There are a huge number of academic publications on sometimes obscure signal processing techniques, many of them disagreeing with each other, and not really suitable for practical use, but a relatively small number of reference works with well-proven solutions, which are actually used in practice. This book, whose author has a number of years’ experience in both academia and industry, justifiably makes the claim that it explains not so much the “what” and “why” of efficient condition monitoring, but more “how” to achieve it, using the powerful tools available in the software package MATLAB®. In fact, there is a more than an adequate background of the “what” and “why” to fully understand the suggested procedures, with the justification of the choices, and a well-selected set of references for the topics that do need a more in-depth explanation. Most engineers who have graduated in the past 10–15 years will have used Matlab® during their education, and will have no problem in using it as a model for algorithms in general, and how to put together their own procedures from the examples. The book also explains the use of the extensive toolboxes available in MATLAB®, including the “Predictive Maintenance Toolbox™”, which is extended with each new release, but without being limited to just what it contains. A very important component of the book is how to generate typical signals corresponding to various faults in machine components, from the simplest elements to complex combinations, such as combinations of gears and bearings in planetary gearboxes. This is very valuable for gaining experience in the way in which various factors such as noise (virtually never white, as used in many academic papers) and speed fluctuations affect the results.
vii
viii
Foreword
I recommend this book not only to beginners in the field, but also to experienced practitioners. August 2020
Bob Randall Emeritus Professor University of New South Wales Sydney, Australia
Bob Randall is a visiting Emeritus Professor in the School of Mechanical and Manufacturing Engineering at the University of New South Wales (UNSW), Sydney, Australia, which he joined in 1988. Prior to that, he worked for the Danish company Brüel & Kjær for 17 years, developing their condition monitoring systems, after ten years’ experience in the chemical and rubber industries in Australia, Canada and Sweden. His book “Frequency Analysis”, published by Brüel & Kjær with the last edition in 1987, was widely distributed. He was promoted to Associate Professor in 1996 and to Professor in 2001, and was made an Emeritus Professor on his retirement in 2008. He has degrees in Mechanical Engineering and Arts (Mathematics, Swedish) from the Universities of Adelaide and Melbourne, respectively. He is the invited author of chapters on vibration measurement and analysis in a number of handbooks and encyclopedias, and a member of the editorial boards of three journals. His book Vibration-based Condition Monitoring was published in 2011 by Wiley with a new edition pending. He is the author of more than 350 papers in the fields of vibration analysis and machine diagnostics, and has supervised seventeen Ph.D. projects in those areas. He has lectured in English, French, German, Danish, Swedish and Norwegian. From 1996 to 2011, he was Director of the DSTO (Defence Science and Technology Organisation) Centre of Expertise in Helicopter Structures and Diagnostics at UNSW, researching diagnostics and prognostics of gears and bearings in helicopter gearboxes and gas turbine engines. He is still active in research, for example being a co-author of thirteen journal papers in the past two years.
Preface
This book shows how to write codes in MATLAB® for the most commonly used algorithms in condition monitoring and diagnostic analysis of typical rotary machinery. These algorithms include time-domain analysis, frequency-domain analysis, order tracking, resampling, envelope analysis, and others. For the purpose of general clarity, the book contains some basic theoretical background regarding individual signal processing techniques. The goal of the author is to focus on algorithms; therefore, the vibration theory is presented in a concise way, and the text is oriented on practical signal processing. The book gives a rich reference on synthetic signals generation, as well. Finally, the book for the first time shows how to directly access data from the industrial condition monitoring system (CMS) using MATLAB® .NET libraries, which is a big thing to thousands of researchers. In consequence, this book is directed to students or engineers with particular needs rather than to general academic audience within signal processing courses. As every numerical environment like MATLAB® continuously evolves, it is hard to foresee what is going to change in its digital signal processing functions. Nevertheless, in the author’s opinion, some fundamental knowledge will remain the same; therefore, it is worth to acquire it. In many instances, the book compares the author’s own codes with MATLAB® high-level functions and tutorials. In order to make the book more user-friendly, almost every code is accompanied by a data generating code. For offline users, the book includes results of every code, as well. The book uses a few sets of vibration data. Most of the data is generated within individual codes. In some examples, real signal from a rotary machinery vibstand.mat is used. Additionally, a single signal introduced within Long-Term Fault Development MODE_4_signal_250.mat is used, as well. These two signals, as well as selected MATLAB® codes from the book, are available at the author’s AGH University homepage http://home.agh.edu.pl/*ajab/. Finally, some test-rig data as well as industrial data is used to illustrate the capabilities of modern 3-D signal processing visualization.
ix
x
Preface
I wrote this book being inspired by remarkable R. B. Randal’s Vibration-based condition monitoring (2011). Referring to this illustrious contribution, Randall answers the questions What and Why. My intention is to answer the question How. I hope that this book will be helpful to a large number of students, researchers, software developers, and of course machine diagnostic engineers, to whom I highly recommend to have these two works next to each other on a bookshelf. Krakow, Poland
Adam Jablonski
Acknowledgements
The author would like to acknowledge the help of Tomasz Barszcz from AGH University of Science and Technology for contributing to the possibility to write this book, Jaroslaw Przywieczerski from AMC Tech® for sharing inspiring work ethics, Antoni Hajto from AMC Tech® for support with .NET libraries, Tomasz Bielak from AMC Tech® for support with many answers about computers, Kajetan Dziedziech and Wojciech Staszewski from AGH University of Science and Technology for valuable academic support, and finally my wife Anna for being the most amazing women I have ever met. The book is partially supported by grant No. POIR.04.01.04-00-0115/17 funded by The National Centre for Research and Development, Poland. MATLAB® is a registered trademark of The MathWorks, Inc., and is used with permission within the MathWorks® Book Program (this Book Project number is: BP-032051 and is to be found at https://www.mathworks.com/academia/books. html). See mathworks.com/trademarks for a list of additional trademarks. The MathWorks® does not warrant the accuracy of the text and the correctness of scripts and functions in this book. This book’s use or discussion of MATLAB® software and related Toolboxes does not constitute endorsement or sponsorship by The MathWorks® of a particular pedagogical approach or particular use. For MATLAB® and Simulink product information, please contact: The MathWorks, Inc. 3 Apple Hill Drive Natick, MA, 01760-2098 USA Tel: 508-647-7000 Fax: 508-647-7001 E-mail: [email protected] Web: https://www.mathworks.com How to buy: https://www.mathworks.com/store Find your local office: https://www.mathworks.com/company/worldwide
xi
Contents
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Why Machinery is Measured? . . . . . . . . . . . . . . . . 1.2 What is Signal Processing Method Development? . . 1.3 Commercialization of Novel Diagnostic Techniques 1.3.1 Case-Based Deduction . . . . . . . . . . . . . . . 1.3.2 Supervised Data Acquisition . . . . . . . . . . . 1.3.3 Multidimensional Analysis . . . . . . . . . . . . 1.4 Supporting CMS with MATLAB® . . . . . . . . . . . . . 1.5 The Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
1 1 5 5 5 6 7 7 8 9
2
Principles of Condition Monitoring Systems . . . . . 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 CMS Tasks . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 CMS Classification . . . . . . . . . . . . . . . . . . . . 2.3.1 Tasks-Based Classification . . . . . . . . 2.3.2 Discussion on CMS-Related Glossary 2.3.3 Other Classifications . . . . . . . . . . . . . 2.4 Stationary CMS Architecture . . . . . . . . . . . . . 2.5 CMS Configuration and Implementation . . . . . 2.5.1 Implementation Stages . . . . . . . . . . . 2.5.2 CMS Selection . . . . . . . . . . . . . . . . . 2.5.3 Initial Configuration, Installation, and Commissioning . . . . . . . . . . . . . 2.5.4 Post-Reference Configuration Tuning . 2.5.5 Final System Tuning . . . . . . . . . . . . 2.6 CMS Operation and Support . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
11 11 12 17 18 19 20 21 22 22 24
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
24 26 27 29 29
xiii
xiv
3
4
Contents
Vibration Components Generated by Rotary Machinery 3.1 Hardware Parameters . . . . . . . . . . . . . . . . . . . . . . . 3.2 Vibration Signature . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 The Concept of “Characteristic Frequency” . . . . . . . 3.4 The Concept of “Characteristic Order” . . . . . . . . . . . 3.5 Basic Mechanical Components . . . . . . . . . . . . . . . . 3.5.1 Shafts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 Blades . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.3 Gearboxes . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 Rolling Element Bearings (REBs) . . . . . . . . 3.6 Harmonic Components . . . . . . . . . . . . . . . . . . . . . . 3.6.1 Why Harmonic Components Are Generated in Spectrum? . . . . . . . . . . . . . . . . . . . . . . . 3.6.2 Why Harmonic Components Are Generated in Envelope Spectrum? . . . . . . . . . . . . . . . . 3.6.3 What Are Harmonics of Harmonics? . . . . . . 3.7 Note on Additional Modulations . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
31 31 32 35 36 38 38 39 39 43 44
........
44
. . . .
44 45 46 46
. . . . . . . . . . .
. . . . . . . . . . .
. . . .
. . . . . . . . . . .
. . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Signal Processing Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Basic Preprocessing Algorithms . . . . . . . . . . . . . . . . . . . . 4.1.1 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Windowing and Compensation . . . . . . . . . . . . . . 4.1.3 Trimming and Zero-Padding . . . . . . . . . . . . . . . . 4.2 Basic Processing Algorithms . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Resampling and Order Spectrum Basics . . . . . . . . 4.2.3 Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Combined Processing Algorithms . . . . . . . . . . . . . . . . . . 4.3.1 Signal Envelope and Envelope Spectrum . . . . . . . 4.3.2 Velocity and Displacement Spectrum from Acceleration Signal . . . . . . . . . . . . . . . . . . . . . . 4.3.3 Time Synchronous Averaging (TSA) . . . . . . . . . . 4.4 Instantaneous Speed Calculation and Reconstruction . . . . . 4.4.1 Basic Operations on Real Phase Marker (PM) Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Tachorpm Function . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Explanation of Instantaneous Speed Shape Profile 4.4.4 Extraction of Instantaneous Speed from Tacholess Vibration Signal . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.5 Summarizing Comparison . . . . . . . . . . . . . . . . . . 4.5 Other SP Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. 49 . 49 . 49 . 51 . 55 . 59 . 59 . 90 . 102 . 110 . 110
. . . . 130 . . . . 151 . . . . 166 . . . . 166 . . . . 172 . . . . 174 . . . .
. . . .
. . . .
. . . .
178 191 193 193
Contents
5
6
xv
Vibration-Based Condition Assessment Methods . . . . . . . . . . . . . 5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 MATLAB® Predictive Maintenance Toolbox™ . . . . . . . . . . 5.3 Protection Scalar Health Indicators . . . . . . . . . . . . . . . . . . . . 5.3.1 Acceleration PP . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.2 Acceleration RMS . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.3 Velocity RMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Monitoring Scalar Health Indicators as Trend Data . . . . . . . . 5.4.1 Classification of Monitoring Health Indicators . . . . . 5.4.2 Trend Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Evaluation of Scalar Health Indicators . . . . . . . . . . . . . . . . . 5.5.1 General Evaluation Paths . . . . . . . . . . . . . . . . . . . . 5.5.2 Extraction of Narrowband Signals . . . . . . . . . . . . . . 5.5.3 Evaluation of Spectral Amplitudes of Narrowband Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.4 Evaluation of Spectral Indexes of Narrowband Health Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Extended Role of Scalar Indicators in Diagnostic System . . . 5.7 Diagnostic Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.1 Classification and Selection . . . . . . . . . . . . . . . . . . . 5.7.2 2-D Figures Generated from a Single Continuous Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.3 3-D Figures Generated from a Single Signal (Colormaps) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7.4 3-D Figures Generated from Array of Discontinuous Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8 A Note on Selected Time–Frequency Representations . . . . . . 5.8.1 General Relations . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8.2 Streaming Data Relations . . . . . . . . . . . . . . . . . . . . 5.8.3 Diagnostic Relations . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synthetic Signals Generation Methods . . . . . . . . . . . 6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Sinusoidal Components . . . . . . . . . . . . . . . . . . . 6.2.1 Sinusoidal Template . . . . . . . . . . . . . . . 6.2.2 Basic Operations on a Single Sinusoidal Component . . . . . . . . . . . . . . . . . . . . . 6.2.3 Combinations of Basic Operations . . . . . 6.3 Decaying Pulses . . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 Basic Operations . . . . . . . . . . . . . . . . . 6.3.2 Combinations of Operations . . . . . . . . . 6.3.3 Jitter . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
195 195 198 199 199 199 200 203 203 206 209 209 210
. . 213 . . . .
. . . .
216 222 222 222
. . 226 . . 233 . . . . . .
. . . . . .
234 235 235 237 239 240
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
243 243 244 244
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
245 272 284 284 300 309 312
xvi
Contents
7
Simulating Operational Signals . . . . . . . . . . . . . . . 7.1 Concept Description . . . . . . . . . . . . . . . . . . . 7.2 Simulated Object Description . . . . . . . . . . . . 7.2.1 Mechanical Parameters . . . . . . . . . . . 7.2.2 Characteristic Orders and Frequencies 7.3 Signal Generation Graphical Framework . . . . 7.3.1 Slow Shaft Imbalance . . . . . . . . . . . . 7.3.2 REB Local Inner Race Fault . . . . . . . 7.4 Code Description . . . . . . . . . . . . . . . . . . . . . 7.4.1 Data Acquisition Parameters . . . . . . . 7.4.2 Generation of User Profiles . . . . . . . . 7.4.3 Definition of Principal Static Data . . . 7.5 Signal Components . . . . . . . . . . . . . . . . . . . . 7.5.1 Fast Shaft and Slow Shaft . . . . . . . . . 7.5.2 Gearbox . . . . . . . . . . . . . . . . . . . . . . 7.5.3 Rolling Element Bearing . . . . . . . . . . 7.5.4 Random Noise . . . . . . . . . . . . . . . . . 7.6 Finalization . . . . . . . . . . . . . . . . . . . . . . . . . 7.7 Resultant Signal . . . . . . . . . . . . . . . . . . . . . . 7.7.1 Two-Dimensional Plots . . . . . . . . . . . 7.7.2 Selected Spectrogram Visualization . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
313 313 314 314 314 317 317 319 321 321 321 327 328 328 330 333 337 338 339 339 342 343
8
Simulating Long-Term Machine Fault Development . . . . . . . . . 8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Failure Mode and Failure Development Function (FDF) . . . 8.3 General Scheme of Long-Term Data Generation . . . . . . . . . 8.4 Relations Between Profiles . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Code Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.1 STAGE No. 1: Generate Failure Mode Functions . . 8.5.2 STAGE No. 2: Define Data Acquisition Parameters 8.5.3 STAGE No. 3: Generate Common-Pseudo PFRF . . 8.5.4 STAGE No. 4: Generate (and Store) Common Structural Noise Base . . . . . . . . . . . . . . . . . . . . . . 8.5.5 STAGE No. 5: Generate and Save Signals . . . . . . . 8.6 Generated Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.7 A Note on the Role of Random Numbers . . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
345 345 346 351 355 355 355 356 356
. . . .
. . . .
. . . .
356 357 369 371
Analysis of Long-Term Fault Development . . . . . . . 9.1 How Large Industrial Data Sets Are Analyzed? 9.2 Statistical Data Analysis . . . . . . . . . . . . . . . . . 9.3 Narrowband Spectral Analysis . . . . . . . . . . . . . 9.3.1 General Information . . . . . . . . . . . . . . 9.3.2 Selected Results . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
373 373 375 382 382 383
9
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
Contents
xvii
9.4
Two-Dimensional (Spectral) Comparison . . . . . . . . . . . 9.4.1 General Information . . . . . . . . . . . . . . . . . . . . 9.4.2 Selected Results . . . . . . . . . . . . . . . . . . . . . . . 9.5 Three-Dimensional Visualization . . . . . . . . . . . . . . . . . 9.5.1 General Information . . . . . . . . . . . . . . . . . . . . 9.5.2 Selected Results . . . . . . . . . . . . . . . . . . . . . . . 9.5.3 MATLAB® Code for 3-D Analysis of Multiple Discontinuous Signals . . . . . . . . . . . . . . . . . . . 9.6 Comparison of Methods . . . . . . . . . . . . . . . . . . . . . . . Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
391 391 392 403 403 404
. . . . . . 410 . . . . . . 440 . . . . . . 440
10 Connecting MATLAB® to CMS . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 The Role of a PC Computer . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Data Flow Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Data Type-Based Roles of MATLAB® . . . . . . . . . . . . . . . . 10.4 Data Type Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.5 Array Data and Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Exporting Data from MATLAB® . . . . . . . . . . . . . . . . . . . . . 10.6.1 Overview of Methods . . . . . . . . . . . . . . . . . . . . . . . 10.6.2 Manual Data Export . . . . . . . . . . . . . . . . . . . . . . . . 10.6.3 Programmable Data Conversion . . . . . . . . . . . . . . . 10.6.4 Numerical Data Precision . . . . . . . . . . . . . . . . . . . . 10.7 Importing Data into MATLAB® . . . . . . . . . . . . . . . . . . . . . 10.7.1 Overview of Methods . . . . . . . . . . . . . . . . . . . . . . . 10.7.2 Interactive Data Import . . . . . . . . . . . . . . . . . . . . . . 10.7.3 Programmable Data Import . . . . . . . . . . . . . . . . . . . 10.7.4 Direct Access to CMS Replicated Data Using CMS Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 482 . . 483
11 Development of Interface for Direct Data Access (DDA) . 11.1 Basic Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Step-by-Step Procedure . . . . . . . . . . . . . . . . . . . . . . 11.3 CMS Configuration Handling . . . . . . . . . . . . . . . . . 11.4 Additional Concerns . . . . . . . . . . . . . . . . . . . . . . . . 11.4.1 File Versus Database Data Source . . . . . . . . 11.4.2 Permission Levels . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
485 485 486 497 498 498 499 499
12 Prototype Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 Script-Based Testing of Health Indicators . . . . . . . 12.2.1 MATLAB® Code for Direct Data Access 12.2.2 Shaft Imbalance Example . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
501 501 502 502 508
. . . . .
. . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
441 441 443 444 447 449 452 452 453 454 468 478 478 479 479
xviii
Contents
12.3 GUI-Based Spectral Analysis of Large Data Sets . 12.3.1 MATLAB® Code for Direct Data Access 12.3.2 Shaft Imbalance Example . . . . . . . . . . . . 12.3.3 Pump Cavitation . . . . . . . . . . . . . . . . . . . 12.4 Other Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4.1 CMS Performance Display . . . . . . . . . . . 12.4.2 Threshold Configuration . . . . . . . . . . . . . 12.5 Summary of Prototype Tools . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
509 509 517 519 519 519 521 521
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
About the Author
Adam Jablonski is a lecturer in the Department of Robotics and Mechatronics of the Faculty of Mechanical Engineering and Robotics at the AGH University of Science and Technology in Krakow, Poland, which he joined in 2013. He has been also working in the industry since 2008. After a few years of experience as a diagnostic engineer, he became a senior research analyst in the field of condition monitoring systems of rotary machinery. He developed numerous pioneering signal processing methods, including Protrugram, ICPCP (patent No. PL223044B1 upgraded to ICPCM), automatic validation of vibration signals, model-based threshold configuration in distributed CMS, and others. He graduated from Central Texas College (USA) with Highest Honors (2004), and from AGH University of Science and Technology (Bachelor—2006, Master—2008, Ph.D.—2013). He is the author of nearly one hundred publications in the field of condition monitoring systems, signal processing, and machine diagnostics. He received the Polish Prime Minister Scientific Award in 2014, and won the Outstanding Young Scientists competition of the Polish Ministry of Science and Higher Education in 2013. Since 2018, he has been a Member of the Board of Directors (International Liaison) of the Society for Machinery Failure Prevention Technology (MFPT), USA. He is also an active peer reviewer in the field of signal processing and measurement, and a member of the MathWorks® Book Program.
xix
Abbreviations1
3-D A AAD Acc AD ADC ADE AEOS AES AM ANN AOS AS ATS BP BPF BPFI BPFO BS BSF BW CI CF CK CM CMS CPM CPS
3-Dimensional Amplitude (signal parameter) Averaged Angle-Domain signal Acceleration Angle-Domain signal Analog-to-Digital Converter Angle-Domain Envelope signal Averaged Envelope Order Spectrum Averaged Envelope Spectrum Amplitude Modulation Artificial Neural Network Averaged Order Spectrum Averaged Spectrum Angular-Temporal Spectrum Band-Pass (filter) Blade Pass Frequency (also “VPS” from Vane Pass Frequency) Ball Passing Frequency of the Inner race Ball Passing Frequency of the Onner race Band-Stop (filter) Ball Spin Frequency Bandwidth (in frequency or order domain) Condition Indicator (same as HI, diagnostic indicator, diagnostic feature or signal feature) Center Frequency (or Central Frequency) Correlation Kurtosis Condition Monitoring Condition Monitoring System or Cyclic Modulation Spectrum Cycles Per Minute (also cpm, same as RPM) Cyclic Power Spectrum
1
NOTE: blue refers to units, and red refers to MATLAB® variables used in codes.
xxi
xxii
Abbreviations
CS DAM dB DC DDA DEI df Dis d_ord d_rot DRS DSB DSP dt E ECF EG EO EOS ER ES f
Critical Speed Derivative of Amplitude Modulation Analysis Decibel (relative unit) Direct Current (typically refers to 0 Hz component) Direct Data Access (author’s new entry) Dynamic Energy Index
FD FDF
Frequency-Domain Frequency-Domain Filtering or Fault Development Function (depending on the context) Frequency-Domain Kurtosis Finite Impulse Response Fast Fourier Transform Fast Kurtogram Frequency Modulation Frequency Response Function
FDK FIR FFT FK FM FRF fs FS FTF g GAD GMF GUI HF HOH HP HT
Delta frequency (frequency spectrum resolution)
Displacement Delta order (order spectrum resolution)
Delta rotation (angle-domain resolution) Deterministic (or Discrete)/Random Separation Double SideBand Digital Signal Processing Delta time (time-domain resolution) Envelope signal Envelope Contact Factor Epicyclic Gearbox Energy Operator (also EOP) Envelope Order Spectrum Energy Ratio Envelope Spectrum Scalar: frequency of component (signal parameter), vector: frequency-domain axis
Frequency of sampling (also sampling frequency)
Fast Shaft Fundamental Train Frequency (also “cage frequency”) Gravitational acceleration on Earth commonly accepted as 9.81 m/s^2 Generalized Angular Deterministic (signal) Gear Meshing Frequency Graphical User Interface High Frequency Harmonic Of Harmonic component (author’s new entry) High-Pass (filter) Hunting Tooth or Hilbert Transform (depending on context)
Abbreviations
HTF HI Hz IC ICPCM ICPCP IEC IFFT IIoT IIR IMID Int IRP ISO kHz kW LMP LP LSB m MEMS MN MHI MID mm mV N N/A NB NPG-AM NPG-FM NPM-AM NPM-FM NPQM-AM Nres Nrot Nsamp ord ord OS P-AM
xxiii
Hunting Tooth Frequency Health Indicator (same as CI, diagnostic indicator, diagnostic feature or signal feature) Hertz frequency unit Internal Combustion (engine) Instantaneous Circular Pitch Cyclic Map Instantaneous Circular Pitch Cyclic Power International Electrotechnical Commission Inverse Fast Fourier Transform Industrial Internet of Things Infinite Impulse Response (filter) Integrated Modulation Intensity Distribution Integration Initial Random Phase International Organization for Standardization Kilohertz frequency unit Kilowatt power unit Local Meshing Plane Low-Pass filter Left SideBand Meter unit MicroElectroMechanical Systems Mean Frequency Machine-Human Interface Modulation Intensity Distribution Millimeter (or millimetre) Millivolt Commonly used number of points in original signal
Not Available Narrowband Non-Periodic Generalized Amplitude Modulation Non-Periodic Generalized Frequency Modulation Non-Periodic Monotonic Amplitude Modulation Non-Periodic Monotonic Frequency Modulation Non-Periodic Quasi-Monotonic Amplitude Modulation Number of samples in resampled signal Number of (full) rotations in resampled signal Number of samples per rotation
Order-domain unit Order-domain axis Order Spectrum Periodic Amplitude Modulation
xxiv
P-FM PFRF pi PM PMT PP PSD Q R RCA REB RMS RMSF RN rot RPM RSB RTOS RUL s S SB SBPF SCADA SCD SCohD SER SIL SF SLF SK SN SOE SOI SOS SP SS STD STDF t T TD
Abbreviations
Periodic Frequency Modulation Pseudo-Frequency Response Function (simplified frequency-amplitude characteristics) Sometimes used for π Phase Marker or Phase Modulation (depending on the context) Predictive Maintenance Toolbox™ Peak-to-Peak Power Spectrum Density Question Residual Root-Cause Analysis Rolling-Element Bearing Root-Mean-Square Root-Mean-Square Frequency Random Noise Rotation (angle-domain axis) Rotations (or Revolutions) per Minute (also rpm) Right SideBand Real-Time Operating System Remaining Useful Life Second unit Spectrum SideBand Sideband Power Factor Supervisory Control and Data Acquisition (system) Spectral Correlation Density Spectral Coherence Density Sideband Energy Ratio™ Safety Integrity Level Shape Factor Sideband Level Factor (also SMLF) Spectral Kurtosis Structural Noise Sequence Of Events Signal Of Interest Single-Order Section (filter structure) Signal Processing Slow Shaft Standard Deviation Standard Deviation Frequency Time (time-domain axis) Total signal Time Time-Domain
Abbreviations
TDF TF TSA V Vel VRMS x Xres Y
ZP
xxv
Time-Domain Filtering Time-Frequency or Transfer Function (depending on the context) Time-Synchronous Averaging (actually, typically refers to Angle-Synchronous Averaging) Volt unit Velocity Velocity Root-Mean-Square Commonly used local data variable Commonly used resampled data Commonly used for scaled amplitudes of a one-sided spectrum Zero-Peak
Chapter 1
Introduction
Abstract This Chapter illustrates the role of machine vibration measurement. For this purpose, concepts of system response and system frequency response function from practical perspective are given. In this way, this chapter compares vibration-based condition monitoring with modal analysis of the same object. Next, this Chapter describes how a new concept within condition monitoring becomes an industrial standard. From this Chapter, the reader also learns where MATLAB® could be used as a part of a commercial condition monitoring system.
1.1
Why Machinery is Measured?
Rotary machinery is measured for two general reasons, namely either to assess its technical condition (machine “diagnostics”) or to examine its modal parameters [1]. In the first case, which is within the scope of this book, a signal is recorded under machine’s regular operation and next it is stored, processed, and analyzed in order to gain knowledge about the current technical state, preferably with respect to some referential data. In the latter case, the object is measured to learn about its inherent properties, namely natural frequencies, damping parameters, and modal shapes. Although many modal analysis techniques have been developed over the years, the most common technique requires a controlled, measured force excitation of an object collected in parallel with multi-point system’s response measurement. Both of these measurements approaches are commonly represented in the frequency domain by equation:
Response = Force x Frequency Response Func on (FRF) In practical measurement of rotary machinery, the “response” is the actual data collected by the data acquisition system from a sensor, like accelerometer, mounted on the housing of a machine element.
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_1
1
2
1
Introduction
Fig. 1.1 Common acceleration measurement principle
In the laboratory scenario (with negligible noise floor level and reasonably adjusted dynamic range of the physical “channel”) the left side of the equation is directly known. However, the right-hand side of this equation takes different meaning for the two measurement approaches described above. When machine diagnostics is undertaken, typically only the system’s “response” is measured, as illustrated in Fig. 1.1. In this case, it is hard to tell the versus the contribution of the contribution of the “force” Frequency Response FuncƟon” (FRF) to the resultant spectral amplitudes of the measured signal. In case of a simple modal analysis, the “force” is measured during excitation separately for instance at machine’s standstill, which allows relatively easy calculation of the object’s FRF. This concept is schematically illustrated in Fig. 1.2. In PATH 1, the signal measured by accelerometer is directly measured. In PATH 2, the force signal generated by a modal hammer is measured in parallel. In this case, both signals are used to calculate the FRF.1
1
See for instance https://training.dewesoft.com/online/course/modal-testing-frf for details.
1.1 Why Machinery is Measured?
3
Fig. 1.2 Common acceleration measurement analysis paths
Note that the simplified scheme illustrated in Fig. 1.2 refers to signal amplitude. However, the FRF (just like any FFT-based processing) enables analysis of both, amplitude versus frequency and phase versus frequency. In modal analysis, the phase is used for instance to verify resonant frequencies and to plot modal shapes. In rotary machinery diagnostics, the phase is typically used for signal resampling, which requires additional measurement of phase data (see Sect. 4.2.2). One might think that in order to separate the “force” from the FRF, it is sufficient to measure and subtract the FRF from the operational data, but this is not possible because the FRF of a stopped machine differs from the FRF of a working machine due to additional driving force and load transfers. As a consequence, typical vibration analysis within machine diagnostics assumes a simplified scenario, where that the FRF of the object is constant, and therefore the analysis is oriented towards detection, monitoring and analysis of changes in excitation forces coming from faulty motors, shafts, gearboxes, blades, belts, and bearings. The major number of vibration-based techniques thus assumes that any fault in a mechanical element generates additional forces, which are counterbalanced by newly generated vibrations, generally called “signals of interest” (SOI), and that the major goal of such measurement is to either detect its
4
1
Introduction
presence (if absent earlier), illustrate the relative growth (if reference data is available) or to define the rate of their growth (if prognostics is desired). In some cases of rotary machinery, this analysis is additionally problematic, because some forces are periodic, like gearbox mesh excitation from electrical motor, while some local modal parameters are time-variant, like gearbox meshing stiffness function. Note two signal representations illustrated in Fig. 1.1. When the signal is analyzed in time domain, the response is a so-called “convolution” of the forces and the transfer funcƟon (TF); while in frequency domain, it is a simple multiplication of the forces and the FRF (TF represented in the frequency domain). Referring to Fig. 1.1, convolution is a signal processing filtering function with two functions as input arguments, forces and TF. More precisely, the TF is a pulse response of the system, which acts as a filter. Practically, convolution could be explained as a set of a few mathematical operations on a signal, namely signal reversing, signal shifting, multiplication and integration [2]. The wide range of resulting possible data processing paths within vibration analysis results in variety of sensors, equipment, measuring technology, signal preprocessing, signal processing methods, signal visualization technologies, and condition monitoring system architectures. Some companies have developed vibration-based machine maintenance systems with the use of portable (mobile) vibration analyzers for scheduled vibration measurements. Others rely on more advanced stationary condition monitoring systems (CMS), which process vibration data continuously. Some diagnostic engineers use solely vibration signals, which others additionally use temperature, acoustic emission, etc. Worth mentioning, different vibration analysis paths state different goals, which might include practically any combination of fault detection, fault identification, fault severity assessment, fault prognostics, fault prescription, and fault root-cause analysis. Finally, some vibration-based companies offer so-called troubleshooting services, which are session-based on-site activities, results of which always boil down to a following tandem of questions: • Q1: What is wrong with my machine? • Q2: How can I fix it? Despite enormous development in vibration measurement equipment and vibration signal processing techniques, the abovementioned statements seem to be unchanged, which suggests that a professional machine measurement should not rely on arbitrary equipment, which happened to be available at the present time, but it is an interdisciplinary science, which should take advantage—or at least consider —various measurement and data processing techniques, like, for instance, conceptually proposed by Mendrok in [3].
1.2 What is Signal Processing Method Development?
1.2
5
What is Signal Processing Method Development?
Development of a new signal processing algorithm is an activity, which requires signal processing algorithm and some data. The algorithm is a novel concept, which is implemented as a code. The data could be of two kinds, either real or simulated. As a general rule, it is easier to develop the novel algorithm on a simulated data, because its contents are fully controlled. For this reason, this work illustrates how to generate a variety of simulated components. Finally, the algorithm is validated on a real data. A manual import of real data into a scientific environment like MATLAB® is time-consuming. As an alternative solution, this book illustrates that it is possible to connect MATLAB® to an external, industrial condition monitoring system and therefore to skip the generation of the copy of entire data in a file format that is compatible with MATLAB®. The solutions presented in this book use the AVM4000™ multichannel condition monitoring system manufactured by AMC Vibro®.
1.3
Commercialization of Novel Diagnostic Techniques
Considering the number of papers published monthly in scientific journals, followed by Master theses, PhD dissertations, and patent applications, one might get an impression that some novel, improved signal processing techniques are continuously developed within the field of vibration-based machine diagnostics. However, if one considers simultaneously the number of novel techniques, which are implemented in commercial equipment, the deduction would be different. It is therefore tempting to assume that a significant portion of novel methods is not attractive to practical users. Why? Because commercial condition monitoring systems are expected to give auxiliary information rather than to raise additional questions on data interpretation, which is often the case in academia. “Innovative” methods, so numerously presented in scientific journals, frequently are burdened with three major detriments.
1.3.1
Case-Based Deduction
During a path of academic career, a scientist is expected to publish. In practice, an experienced scientific writer is able to complementary derive and describe a novel technique very quickly after it is preliminarily discovered. Taking into account the current ease in generation of simulated signals, a novel method could be illustrated with relatively low time effort. As a consequence, the performance of many new methods is assessed and verified on the basis of signals generated by a single machine, or single drive-train setup. In this scenario, it is easy to imagine that any subsequent experiment on a different machine is likely to yield much less
6
1
Introduction
satisfactory results. This statement is directly endorsed by many ANN-based methods, training sets of which correspond to a particular object in particular conditions. Hopefully, the evolution of Industrial Internet of Things (IIoT) will eventually provide more data in standardized format from many sources independent hitherto.
1.3.2
Supervised Data Acquisition
The overall performance of a newly developed method could be illustrated using three major types of signals, namely simulated signals, real signals from a test rig, and industrial signals recorded with limited (often negligible) supervision. The synthetic, simulated signals, generated by a software applications, like MATLAB® and others, could easily contain random components, deterministic components, as well as amplitude, frequency or phase modulated components, and could experience decays, jitter, and so on. Nevertheless, assessment illustrated on a simulated signal explicitly is generally not considered sufficient; therefore, it is a common practice to verify the method on a test rig data. Test rigs are real machines tailored to academic, laboratory conditions. Figure 1.3 illustrates a professional test rig for academic research. Such test rigs allow recording a vibration signal under fully supervised and controlled operational and environmental conditions, including desired speed, load, temperature, and practically muted environmental disturbances. In this way, the signal to be investigated is clean, and operational parameters could be adjusted to the novel algorithm’s capabilities, which is opposite to typical industrial circumstances. Moreover, in such laboratory setup, the sensors generally are placed as
Fig. 1.3 Academic test bench [Courtesy of AMC Vibro®, Poland]
1.3 Commercialization of Novel Diagnostic Techniques
7
close to the source of vibrations as possible. This is frequently not the practical case, because such measurements inevitably generate additional costs for a machine working in a real plant.
1.3.3
Multidimensional Analysis
The third major reason why academic techniques have a long way to enter the industrial world is because these methods are typically developed in academic numerical environments with huge computational power and versatile visualization libraries; therefore, they offer multidimensional data representation, like 3-dimensional maps. In consequence, the diagnostic information is not presented in a simple format, but is “somewhere” in the figure. As claimed in [4], simple time and frequency scalar (i.e. one-dimensional) health estimators are still most favorable, although in last years, many valuable techniques (considered later) have been developed and used in academic world, like Kurtogram, Protrugram, MID, ICPCM map or Spectral Coherence Density map for detection of local rolling element bearing faults in the incipient stage [5]. In other words, a machine operator is typically a busy person, which has serious responsibilities, and he or she does not have time for advanced data interpretation. Moreover, some advanced techniques require additional selection of parameters, which significantly change the resultant figures (like window length in spectrogram analysis). In consequence, industrial world shows its inclination towards 2-dimensional data analysis, preferably in form of time trend series. Worth marking, majority of novel signal processing methods published in scientific journals are strictly diagnostic methods, which are supervised methods operating on a single measurement or a relatively small group of measurements for relevant comparison (like various defect size). These methods typically require both, selection of signal processing parameters as well as relatively large knowledge, which enables proper visual interpretation. On the other hand, commercial condition monitoring systems are—as the name implies—inclined towards unsupervised monitoring tasks, which apart from initial configuration settings require occasional tuning, if any. Thus, in majority of systems, diagnostic tools are available for advanced technical condition assessment, but as a rule of thumb, they are not the starting point.
1.4
Supporting CMS with MATLAB®
MATLAB® is a very powerful scientific numerical environment, which is oriented towards convenient multi-dimensional data processing. Nevertheless, expansion of its compatibility with other data sources as well as data and code formats, clearly remarkable since R2009, enables new possibilities for integration of MATLAB® with other environments. In the model accepted in this book, this new, external
8
1
Introduction
environment is a professional distributed condition monitoring system AVM 4000™. In such model, the author has successfully used MATLAB® as a tool for: • Research on innovative signal processing methods to be implemented in CMS, • Development of referential code for implementation of advanced signal processing in CMS, • Development of referential data for numerical verification of methods implemented in CMS, • Development of referential results for numerical verification of CMS output data, • Development of referential characteristic frequencies data for complex drive trains, • Development of prototyping GUI applications for processed data visualization, • Development of prototyping GUI applications for system performance display, • Development of prototyping GUI auxiliary applications for system configuration. Furthermore, MATLAB® has been used for many decades by numerous scientists and engineers for single sessions of user-customized advanced analysis of relatively challenging diagnostic data.
1.5
The Scope
In this book, the author attempts to show that MATLAB® is not limited to data processing of selected group of signals, but it is possible to generate a fixed bond between MATLAB® and a commercial CMS using libraries provided by CMS vendor and to provide a continuous data flow in this way. In this way, MATLAB® standard GUI applications or more advanced MATLAB® compiled standalone applications might be developed independently either by CMS vendor and/or by CMS user. The book is organized as follows: Chapter 2 reviews principles of commercial CMS with the emphasis on CMS classification and CMS tasks; Chapter 3 describes typical signal components generated by machine elements and their translation into a CMS; Chapter 4 is an comprehensive reference on commonly used signal processing methods in MATLAB®; Chapter 5 shows how these signal processing methods are used to generate scalar trend series and various figures, which are used in CMS; Chapters 6–9 show how to generate and analyze synthetic signals in MATLAB®, from a single waveform to a large data set simulating long-term fault development; Chapters 10 and 11 illustrate how to program MATLAB® to use real data from a CMS instead of synthetic data; finally, Chapter 12 gives some examples of prototype tools developed in MATLAB®, which use real CMS data.
References
9
References 1. Ward Heylen, Stefan Lammens, Paul Sas (1998) Modal Analysis Theory and Testing, Katholieke Universiteit Leuven, Faculty of Engineering, Department of Mechanical Engineering, Division of Production Engineering, Machine Design and Automation 2. Tomasz Zielinski (2013) Digital signal processing. From theory to applications. (Original title in Polish: Cyfrowe przetwarzanie sygnalow. Od teorii do zastosowań), WKL 3. Mendrok et al. (2009) Application of modal filtration for damage detection of rotating shaft, Key Engineering Materials, vol 413–414 4. Crabtree CJ, Zappala D, Tavner PJ (2014) Survey of commercially available condition monitoring systems for wind turbines, Technical Report, Durham University School of Engineering and Computing Sciences and the SUPERGEN Wind Energy Technologies Consortium. Available at: https://dro.dur.ac.uk/12497/) 5. Barszcz T (2019) Vibration-based condition monitoring of wind turbines. Springer International Publishing, Applied Condition Monitoring
Chapter 2
Principles of Condition Monitoring Systems
Abstract This Chapter organizes numerous aspects of condition monitoring system, including classification of systems, terminology, configuration, and operation. It explains step-by-step the relation between detection, identification, diagnostics, monitoring, and others. Finally, the Chapter illustrates the how condition monitoring systems are selected and implemented.
2.1
Overview
Considering a plant as a closed environment, its primary task is to assure a non-interrupted production. The production is governed by maintenance actions. The maintenance involves many human activities, including preventive, reactive, and proactive actions. The main object of any condition monitoring system is to support the proactive maintenance part, providing significant information for maintenance scheduling. In this scenario, a CMS somehow informs the maintenance staff about upcoming machine element failure in advance. This information is expected to be clear and as unequivocal as possible. Just like any rotary machinery in a plant is just a costly, necessary tool, any CMS is a costly, auxiliary tool within production maintenance. This approach is schematically illustrated in Fig. 2.1. A packed characterization of a commercial CMS includes analysis of following certain aspects, which need to be thoroughly analyzed and understood. Some aspects are listed below: • • • • • • • • •
What are CMS tasks? What are CMS components? How CMS are classified? What are CMS types and functionalities? How CMS works? Can it be further developed? How it is selected among other competitors? How it is installed? How it is configured?
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_2
11
12
2 Principles of Condition Monitoring Systems
Fig. 2.1 CMS and MATLAB® as maintenance and production auxiliary tools
• • • •
How How How How
is is is is
it it it it
commissioned? tuned? supported and maintained? successfully used?
The remaining part of this Chapter provides brief information, which hopefully helps to answer above questions.
2.2
CMS Tasks
A typical Condition Monitoring System has a few clear tasks, which are expected from it. These tasks include: • • • •
Fault Detection, Fault Identification, Fault Severity Assessment, Prognostics of Health Degradation,
2.2 CMS Tasks
13
• Root Cause Analysis of the Fault, • Prescription. Fault Detection task answers a simple question about the presence of the fault, whether there is a fault or there is not. Typically, this detection takes place on the basis of broadband (like Pear-to-Peak) or wideband (e.g. ISO 20,816 VRMS) estimators. Thus, detection could be done with a relatively small effort, because such systems require just minor configuration. As mentioned, a typical implementation of a Fault Detection system takes advantage of the Velocity Root Mean Square (VRMS) estimator calculated in range from 2 or 10 Hz (depending on the machine speed) up to 1000 Hz. For this estimator, a well-established reference values are available for many machine types. According to the VRMS values, a machine is classified either as “a new one”, one with “unlimited long-term” operation, one with “short-term” allowable operation or one, which should no longer operate because the vibration might cause its damage. In order to find corresponding VRMS levels, first, a few questions must be answered, namely: • • • • •
What is the type of the machine? What is the rated power of the machine? What is the nominal speed of the machine? Is the driving motor integrated or external? Is the shaft rigid or flexible?
Answering these questions plus (in some cases) additional shaft location information, allows selection of proper reference threshold VRMS values and VRMS lower frequency range (2 or 10 Hz). Fault Identification takes two meanings. The first meaning refers to a mechanical element, i.e. it answers a question, which machine element experiences a fault, is it a bearing, a shaft, or a gearbox. The second meaning refers to a so-called “failure mode” of a particular machine element. For instance, a shaft could experience imbalance or certain misalignment. A gear could experience spalling, flaking, or a tooth crack. A rolling element bearing (REB) could experience spalling, pitting, or flaking on an outer and/or inner race or on a rolling element. Moreover, a bearing could experience a cage defect, etc. Therefore, full fault identification frequently gives answers to both questions, namely which element of a machine part is faulty, and what kind of a fault is it. Thus, fault identification requires extra data and signal processing. First, a kinetostatic model of the drive train is needed, which enables generation of narrowband analyses. On the basis of a kinetostatic machine model, frequency ranges or order ranges are defined depending on the frequency or order analysis, respectively. Next, for a particular vibration signal, corresponding spectral indexes are selected, taking into account current spectral resolution. The concept of selection of indexes is described in details in Sect. 5.5.4. When a scalar HI is calculated, it is checked against some threshold values. This concept is illustrated in Fig. 2.2.
14
2 Principles of Condition Monitoring Systems
Fig. 2.2 Left: fault identification path, right: fault detection path, for a single data package
Red-colored blocks in Fig. 2.2 refer to positive result of comparison of narrowband indicators against permissible levels, while green-colored blocks refer to negative result of comparison of wideband indicators against permissible levels. As illustrated in Fig. 2.3, it might happen that all defined wideband estimators typical for detection task are at permissible levels, while some narrowband estimators, designed for fault identification, trespass corresponding threshold levels. In this case, there is no direct fault detection, but fault identification leads to indirect fault detection, since no other fault indicators are positive. This results in a different (somehow paradoxical) process, as illustrated in Fig. 2.3.
2.2 CMS Tasks
15
Fig. 2.3 Indirect fault detection via fault identification
In this scenario, fault identification leads indirectly to fault detection. This happens when a relatively significant change in technical condition caused by a mechanical fault development does not transfer into a relatively large change in signal power.1 For instance, such scenario is observed when a gear fault generates relatively low-energy components concentrated in GMFs or its sidebands cause unnoticeable changes in broadband or wideband estimators. Fault Severity Assessment gives additional information related to the severity or seriousness of detected or identified fault. The severity assessment could be undertaken using either specialized instrumentation on site or on the basis of data analysis, which shifts the objective of CMS from monitoring to diagnostics. From vibrodiagnostics point-of-view, every fault manifests itself in some change in signal characteristics features. Some severity-related features include: • increasing value of additive, phase-locked, deterministic, fault-related component(s), like fundamental shaft frequency, • increasing value of stochastic, frequently distributed, resonance-related components (sometimes also referred to as “noise level”), • changing pulse decay characteristics in a time waveform for REB [1], • modification of the pattern of harmonic components (both carrier and SB components), • modification of the ratio of modulating components to carrier waves [2], • others. 1
See Sect. 5.5.3 for signal power versus signal energy.
16
2 Principles of Condition Monitoring Systems
Over the years, some combinations of health indicators, like the “crest” factor, have been developed to indicate a changing fault severity level, regardless of the signal level. Nevertheless, in most cases, a reliable severity assessment is a part of a complete diagnostic process; therefore, it requires a tool for advanced signal analysis, and is considered as a supervised action. Prognostics is a relatively advanced part, which should tell on operator how much longer it is safe to run the machine. Although many prognostics-related scientific works have been presented in academic world, it turn out that typically, developed prognostics rules are case-based. This happens because the main idea behind prognostics is to calculate an abscissa value for a presumed ordinate value by extrapolation of a curve fitted to historical data. Thus, practical implementation of prognostics assumes TRUE for following: • The collected data represents machine vibrations, • The recorded vibrations represent machine health sufficiently, • The operational characteristics, including operational parameters of a machine are constant, • The threshold level (i.e. abscissa level) corresponds to significant, unwanted machine health condition. Fulfillment of all these conditions is very difficult, especially the last one. Nowadays, statistical, curve-fitting tools are very popular and relatively easy to implement. Statistical modeling enables extrapolation followed by prognostics to some predefined value with outstanding accuracy. The problem is that such accurate calculations do not reflect the actual machine technical condition, because vibration data is inherently variable. In consequence, although verbally attractive, curve-flitting-based prognostics modules have not yet found a solid place within machine condition monitoring in a systematic way. Some recent advanced research in machine prognostics, including various techniques of remaining useful life prediction (RUL) could be found in [3]. Root Cause Analysis (RCA) represents another CMS advancement levels oriented towards explanation of a primary, i.e. root reason for a fault development. The idea is that if a primary, undetected fault “A” caused a detected fault “B”, any maintenance action solving the “B” problem is pointless, because the fault “B” will be generated by a fault “A” as long as fault “A” is present. Although the concept of RCA sounds very attractive, the actual “root causes” described in a literature are either a simple fault identifications or refer to material science [4]. The Prescriptive analytics aims in taking over the descriptive analytics, which is oriented towards a question “What happened?” On the contrary, the prescriptive analytics gives recommendations for corrective or preventive maintenance actions. Although prescriptive part of a CMS sounds attractive, only some general, theoretical concepts have been developed so far [5]. As a consequence, the scope of the recently introduced “Prescription” level partially overlaps with the virtual scope of the RCA.
2.2 CMS Tasks
17
Table 2.1 Typical CMS tasks
Summary All described CMS tasks are summarized in Table 2.1. The Table presents the main question corresponding to each task followed by main CMS feature responsible for its resolution. In addition, the Table lists a general family of functionalities necessary for individual task completion. Concluding, fault detection is the main task of any CMS. In practice, most commercial systems provide successful partial fault identification, if lucky. Fault severity is practically just tackled by a common definition of Warning and Alarm level. The rest of the goals, as far as today, is still at the age of development, and is most frequently presented in academic literature or marketing whitepapers considering individual case studies.
2.3
CMS Classification
Vibration-based condition monitoring systems of rotary machinery come in very formats. Because some features overlap among different types of systems, it is clearly noticed that the classification of CMS does not accept a tree-like shape. However, major classification criteria include CMS tasks, functionality, scale, hardware infrastructure, customization level, data format, and data source types. Following Section presents selected details within a proposed classification.
18
2.3.1
2 Principles of Condition Monitoring Systems
Tasks-Based Classification
Vibration-based CMS clearly differ according to their purpose, which generally includes protection systems, monitoring systems, diagnostic systems, data loggers, or mixture of some or all of them. Each type of these systems has some unique features, which are described. Protection systems are well-established real-time, embedded systems, which constantly read critical machine data, and are always ready to give highest priority signals to the machine control system. Typically, such systems read and analyze process data or relative vibration data, i.e. proximity sensors. Although untypical, protection systems might use absolute vibration signals from accelerometers, but such systems usually have to be carefully tailored to a particular installation, because accelerometers are relatively prone to any mechanical or electrical disturbances and are characterized by a relatively long signal settling time. An example of a protection system is VM600 Vibro-Meter® by Meggit™. Other features of a professional protection system include high quality electronics, highly reliable real-time embedded designs, and high quality signal conditioning and shielding. In contrast to other systems, protection systems offer limited interfaces and configuration. Instead of data analysis features, they are oriented toward unsupervised data collection and processing. When standard acceleration measurement is considered, protection systems are therefore closely connected to the general fault detection CMS task, because typically they operate on norm-based wideband estimators. Monitoring systems are design to provide valuable information for maintenance scheduling. For this purpose, monitoring modules have access to relatively long range of data. This data includes both, standardized wideband estimators as well as dedicated narrowband estimators in any kind of signal domain (time, frequency or order domain). From this perspective, monitoring system combines fault detection and fault identification tasks. Monitoring can be designed to work partially or completely in supervised way. In the first case, monitoring system displays continuously either trend series or refreshes values in a synoptic view (also called a mimic screen), like in SCADA systems. In the latter solution, which is typical for large distributed systems, the data program sends out information about a so-called “event”, which should trigger a series of supervised actions. According to ISO 20816, monitoring system should check suitable data according to permissible lower and higher levels, WARNING and ALARM levels, respectively. As a huge shortcut in practical machine maintenance, these levels are commonly considered to fulfill the fault severity assessment task. More reliable, in simple cases, visual analysis of trend shape might lead to significant machine prognostics deductions. Diagnostic systems are typically fully supervised data processing and visualization modules. As a standard monitoring action, first the data is carefully selected, filtered according to operational conditions, preprocesses, and processed to a suitable algorithm resulting generally in a figure. Worth recalling, useful visualization of a
2.3 CMS Classification
19
vibration raw time waveform, which is a trivial task in MATLAB®, is a functionality only of high class CMS. Other common diagnostic figures include: • • • • • • • • • •
frequency spectrum, order spectrum, averaged frequency spectrum, averaged order spectrum, envelope frequency spectrum, envelope order spectrum, averaged time series (TSA), spectrogram, combined plots (e.g. multiple spectra or time series with trend series), on-demand visualization of band-limited power from historical data.
These figures are used in many different ways. For failure mode identification, data is compared against various patterns of characteristic components with the use of harmonic or sideband cursors. For failure severity assessment, data is compared against predefined or temporarily selected referential signals. For prognostic purposes, data could be processed by classical statistical or modern data science methods. A diagnostic system might have very wide scope of additional functionalities, like data extraction, data export/import and user data processing and live raw data streaming. However, in a suitably configured condition monitoring system, manual data analysis is not a desired action, and should take place only if the particular problem could not be sufficiently addressed by a lower-level monitoring system.
2.3.2
Discussion on CMS-Related Glossary
Although the name “Condition Monitoring System” abbreviated “CMS” is used broadly, the actual meaning of such systems puts some constraints on it. The “condition” refers to any assessment of the current technical condition of an object with possible data on its future state. The “monitoring” part means that the system presents its output in some form, but is excluded from the machine control system. This leads to a clear separation among Protection, Monitoring, and Diagnostics systems. Figure 2.4 illustrates the placement of each of these systems with the respect to general CMS tasks. From the Fig. 2.4, it is clear that a protection system is oriented towards fault detection and is able to shut down a machine automatically. Monitoring and diagnostic systems, on the other hand, might serve all the tasks but automatic machine shut down. In practice, many CMS enable generation of output control signals, making them partly a kind of protection systems, while others offer advanced offline signal processing making them more diagnostics systems. As a consequence, the term “Condition Monitoring System” is nowadays not sufficient to define properly a
20
2 Principles of Condition Monitoring Systems
Fig. 2.4 CMS types and CMS tasks
system, and some basic characteristics of individual hardware and software need to be listed to get a proper about its scope.
2.3.3
Other Classifications
The task-based classification described above is practically independent from other classifications, which include system size, mobility, power source, and data format features. A simple classification of CMS refers to: • basic handheld vibration sensors, like CMAS 100-SL™ • portable analyzers, like AVM 1000DC/P™, • stationary systems, like AVM 4000™. Another simple classification refers to power source, and differentiates between line-powered systems and wireless systems, like AVS 2000R™. It is also worth do separate general-purpose systems, like AVM 4000™ from systems oriented to particular machine or drive-train type, like Foresight HUMS™ system for helicopter monitoring. Next classification isolates database (e.g. SQL) or clued data collection systems from local PC file storage architectures. A close characterization to the one listed above is the important classification of systems with internally coded data, where the system provider fully controls data access and systems, which give unlimited to data access once it is purchased, like AVM 4000™. Moreover, some systems are design just to store raw data during measurement, i.e. so-called “data loggers”, others are designed to present figures (mostly frequency
2.3 CMS Classification
21
spectrum) from currently stored, relatively short averaged signal, while some are able to analyze offline data. Finally, any number of CMS could be compared using a list of their individual, frequency unique functionalities. Such functionalities include for instance mobile data access, plug-and-play data transfer via audio plug, or intelligent data selection for machinery working in non-stationary conditions as well as practically unlimited data visualization engine (AVM 4000™).
2.4
Stationary CMS Architecture
In this Section, the architecture of a full-featured, advanced CMS is considered. It is recommended to analyze the architecture of such systems by associating its element with following groups: • • • •
hardware elements: sensors, cabling, and DAQ and processing unit, virtual data: data files, configuration files, system features: data storage logic, data processing algorithms, system performance: data replication, event generation, data access, data visualization, • user actions: selection of measurement points, system installation, initial configuration preparation, configuration tuning, data analysis, and decision making. All of these elements are somewhat “unfortunately” connected in series mode, as illustrated in Fig. 2.5, so generally, a failure of one block could easily cause malfunction of entire system. A special attention needs to be drawn to the configuration block. Configuration is a part of CMS software which governs its actions. It decides what to do, when to do it, and what data is to be processed. Configuration refers therefore to many aspects, including hardware elements, software elements, measurement parameters, signal processing parameters, and graphical user interface. Some configuration elements include: • • • • • • • • • • •
sampling frequency, vibration signal length, vibration channel names, channel range (along with sensor’s sensitivity), ranges of user operational states, health indicators parameters (spectral RMS vs. power, bandwidth of narrowband analyses, etc.), trend points permanent storage conditions, raw signals permanent storage conditions, warning and alarm threshold values, warning and alarm threshold hysteresis parameters, etc.
22
2 Principles of Condition Monitoring Systems
Fig. 2.5 Graphical representation of CMS architecture main components
Practically, the process of system configuration is never ending process, because even if the mechanical structure is constant, CMS users would generally like to improve their system according to development of everyday technology, like mobile data access or wireless event broadcast. On the other hand, in industrial applicaons, it is always recommended to minimize both, the configuraon scope and configuraon modificaon acons, because both of them do not bring any contribuon themselves; yet, they are a relavely costly acvity.
Taking into account the above, it is possible to list what a classical CMS user can do, namely: • • • • •
read raw live data, read live processed data, read historical data, view system status, read and modify configuration of the system.
The objective of this book is to show that with the use of a modern CMS and MATLAB®, user might become a system designer, thus can do much more.
2.5 2.5.1
CMS Configuration and Implementation Implementation Stages
In practice, every implementation of any CMS to rotary machinery is characterized by some major or minor customization level. The more “typical” the installation, the easier is the complete implementation. A general CMS implementation procedure is graphically illustrated in Fig. 2.6, which illustrates consecutive steps of this process. The first two steps illustrated in Fig. 2.6, namely CMS selection and pre-configuration, are done on the basis of analysis of system requirements. Next, once the system is mounted, it is commissioned and verified. During following post-reference configuration, on the basis of recorded data, some elements (like user
2.5 CMS Configuration and Implementation
23
Fig. 2.6 General scheme for stationary CMS implementation
operational states) are introduced, while others (like time waveform lengths) are tuned. After this modification, the system is running for some time, and final data-driven parameters, like threshold are defined. At this point, the system is ready for a full-time operation. A full completion of system implementation does not mean it is free from support actions. During entire system life cycle, the system manager is continuously responsible for proper configuration tuning, verification of user interactions, and hardware maintenance. These responsibilities range from monitoring of system
24
2 Principles of Condition Monitoring Systems
performance and system settings to long-term hardware policy, taking into account current technological upgrades. During the times of this book, it might be for instance observed that the place of classical, relatively expensive piezoelectric accelerometers might be overtaken by their cheaper MEMS successors in the nearest future.
2.5.2
CMS Selection
Section 2.3 illustrates classification of CMS according to their purpose, tasks, and features. It is therefore clearly seen that a number of possible solutions, regardless of the manufacturer, is tremendous, and consequently the selection of CMS is difficult. Moreover, commercial CMS are almost always closed designs (which is claimed to be changed by IIoT), and a single customer hardly ever has any influence on the development of the system. The selection of a “proper” CMS system needs to start with a thorough analysis of one’s needs rather than analysis of technical specifications of a particular system or even some vendor’s portfolio. The general analysis of needs includes types of physical values to be measured, number of measuring points, power supply and cabling constraints, necessary integration with other systems, required HIs, data acquisition and data processing parameters, system configuration scope, and desired HMI tools. Frequently, such list of requirements is formalized into a so-called Terms of Reference (TOR) document. It is recommended to find most desired solution for individual needs, resulting in a form of a simplified morphological table [6]. Such table enables direct transformation of functional requirements and constraints into specification of technical software and hardware parameters and solutions, as illustrated in Table 2.2. As illustrated in the Table, user functional specification typically refers to various system aspects, not just signals processing features, and should be analyses in a much broader scope. When selected equipment is ready, it can be pre-configured and commissioned.
2.5.3
Initial Configuration, Installation, and Commissioning
In a typical scenario, the system is preconfigured according to one’s needs and general specifications. A typical pre-configuration includes surplus data acquisition parameters and storage conditions as well as preliminary definition of HIs, including various narrowband estimators resulting from kinetostatic drive train analysis. The surplus generally reflects in relatively frequent storage of relatively long raw time signals in relatively large number of measuring points. Additional
2.5 CMS Configuration and Implementation
25
Table 2.2 Example of specification elements
storage of operational data from extra operational channels is also a typical practice at this stage. Figure 2.7. illustrates a graphical representation of some nodes of a part of a system configuration from an advanced, modern CMS. The preliminary configuration usually skips the data-driven configuration elements, which include definition of user states, additional data storage logic constraints, and thresholds. Simultaneously, the HIs (“Analyses” in the Fig. 2.7) are preferably set with a safe margin, which enables their future data-driven tuning. After hardware installation, the system is ready to be commissioned. During commissioning, a detailed inspection of the installation is done, including validation of electronic readings, proof of sufficient system performance and availability, followed by validation of data transfer and data processing modules. Additional verification2 of system performance is always recommended as well. Depending on individual characteristics of the monitored object, especially taking into account the variability of operational conditions, the reference period might take from a few days up to a few weeks. However, for outdoor machinery operating in significantly changing season temperature conditions, the full reference period might be significantly extended.
2
In the accepted notation, verification concerns usefulness of the system, whereas validation refers to proper implementation of specification.
26
2 Principles of Condition Monitoring Systems
Fig. 2.7 Partial CMS configuration tree [Courtesy of AMC Vibro®]
2.5.4
Post-Reference Configuration Tuning
During this stage, all but a few configuration elements are introduced or finally tuned on the basis of referential data. The post-reference configuration modification is typically done on the basis of supervised reference data analysis performed by an experienced diagnostic engineer, and typically includes: • • • •
definition of user operational states, definition of additional HIs calculations and data storage constraints, optimization (mainly reduction) of vibrational and operational channels, modification of data processing parameters (Fs, lengths of raw vibration signals), • modification of definitions of HIs (add/remove), • modification of parameters of existing HIs (e.g. spectral analyses). In order to maximize the performance and minimize the cost of the system, modification is oriented towards reduction of physical channels and HIs, except when the supervised analysis recommends opposite. If necessary, the system operates again for some time with a tuned configuration, before it is finally tailored.
2.5 CMS Configuration and Implementation
2.5.5
27
Final System Tuning
A large part of a typical, final CMS tuning concerns definition of threshold (i.e. warning and alarm levels) for each active HI. Definition of alarm levels is a very important and very difficult task, and should be never performed careless. For a diagnostic engineer, the fundamental question is: • How to set alarm levels for a given data set? The answer to this question is not straightforward because the question is … too short. Data from a wind turbine has completely different characteristics (e.g. statistical parameters) than data from a steady-speed gas turbine; therefore, the algorithm, the reference level and the relative permissible vibration growth is different. Vibration-based norms, see [7], pages 22–23 recommend to use 6–8 dB growth for Warning (refer to 2–2.5 growth, respectively) and 10 dB growth for Alarm (equivalent to relative 10 growth). However, the norms do not give a clear recipe how to determine this reference level. Figure 2.8 illustrates this problem graphically. In case of steady values illustrated in Fig. 2.8, the selection of reference level is clear. Worth mentioning, if data has many steady levels, the norms recommend to consider only the highest vibration level (in this case Reference level 2). In case of data characterized by relatively large variance, illustrated in Fig. 2.9, the selection of a reference level is not only difficult but it is always subjective. As a consequence, its correctness cannot be confirmed analytically. It is the usefulness, which is going to be confirmed by practical usefulness. Some recommendations for handling such data are as follows: • separate data according to user-defined operational states, • do not use Gaussian distribution-based statistical tools, if your data does not pass normal distribution tests (typically it will not pass), • define a rule for outliers removal, • do not consider noise-level data, • do not consider relatively small data set, • remove HIs, which are not useful, • keep advanced settings (like hysteresis parameters) constant for all HIs, if possible, • avoid pointless accuracy (first decimal point in majority of cases is enough), • check your thresholds visually on periodic bases, if possible, • redefine threshold levels after any modification of measurement path (e.g. different sensor location, different cables or sensors, different data processing) or any mechanical action (e.g. part replacement or reassembly). Generally, the only commonly used vibration-based indicator from accelerometer, for which permissible levels are given in absolute numbers, is the band-limited root mean square of the velocity of vibrations, so-called “Velocity RMS”. The VRMS permissible levels are very easily found in books, norms or interned; however, it is
28
2 Principles of Condition Monitoring Systems
Fig. 2.8 Example of threshold settings—simple case [Courtesy of AMC Vibro®]
Fig. 2.9 Example of threshold settings—challenging case [Courtesy of AMC Vibro®]
important to know that classification of machine group is not just its nominal power, but also foundation type, construction type, and speed (for machinery running below 600 RPM, the low pass filter is set to 2 Hz). The threshold definition requires additional, in-state reference period, especially when first reference data has led to definition of user operational states, which classify the data according to user’s rules. Most commonly, these rules are based on custom selection of permissible ranges of values of process parameters or vibration-data feedback. Since user states might significantly modify individual data sets, it is recommended to record new sets for threshold definition.
2.6 CMS Operation and Support
2.6
29
CMS Operation and Support
As mentioned in Sect. 2.4, the list of standard user actions within CMS usage is relatively limited. In most desired scenario, a CMS user does not perform any interaction with the CMS at all, and is just a receiver of significant information from the system. However, industrial practice shows that practically it is never the case, and CMS do require continuous attention. One of such ubiquitous CMS detriments are false alarms generated by threshold trespasses. In this case, the CMS operator needs to either redefine the thresholds or fix the malfunction element of the vibration measurement path. Industrial practice clearly shows that after some time of CMS operation, a maintenance engineer either finds the particular CMS solution helpful for maintenance or becomes frustrated with the additional workload necessary for “CMS maintenance”. The content of this book is therefore designed to minimize some CMS bottleneck duties and to maximize the significant diagnostic information extracted from vibration data.
References 1. Sawalhi N, Randall RB (2011) Vibration response of spalled rolling element bearings: observations, simulations and signal processing techniques to track the spall size. Mechan Syst. Process 25(3):846–870 2. Pattabiraman TR, Srinivasan K, Malarmohan K (2015) Assessment of sideband energy ratio technique in detection of wind turbine gear defects. Case Stud Mechan Syst Signal Process 2:1–11 3. Hofmeister JP (2019) Prognostic health monitoring overview and theory of operation (White Paper), Ridgetop Group, Inc. www.researchgate.net 4. Sheng S, McDade M, Errichello R (2011) Wind turbine gearbox failure modes—a brief. In: ASME/STLE international joint tribology conference, Los Angeles, California. https://www. nrel.gov/docs/fy12osti/53084.pdf 5. Kans M, Galar D (2016) The impact of maintenance 4.0 and Big Data analytics within strategic asset management. In: Proceedings of MPMM 2016, 6th international conference on maintenance performance measurement and management, 28 November 2016, Lulea, Sweden 6. Evbuomwan NFO (1997) Generation of design solutions using morphological analysis. In: International conference on engineering design, ICED 97 Tampere, August 19–21 7. Randall RB (2011) Vibration-based condition monitoring: industrial, aerospace and automotive applications. Wiley
Chapter 3
Vibration Components Generated by Rotary Machinery
Abstract This Chapter describes what signal components are generated by individual machine elements, such as shafts, blades, gearboxes, and rolling-element bearings (REBs). The Chapter also illustrates the concept of characteristics “orders” in parallel to characteristic frequencies. Finally, it gives practical information concerning various harmonic components.
3.1
Hardware Parameters
Vibration analysis is a branch of science covering wide variety of objects—from large constructions to tiny electronic elements, frequencies—from slow motion tower sways to short transient responses caused by faulty bearings, and amplitudes —from visible and sensible displacements of mechanical elements to extremely small motions, detection of which requires precise laboratory equipment and noise-free conditions. This Chapter, as well as entire book, considers so-called “drivetrain” of common rotary machinery, which limits the range of abovementioned values. Such drivetrain refers to a motor, shafts, gearboxes, blades, pumps, and rolling-element bearings (REB), and is typical in a variety of machinery in almost all industry branches. For such machinery, the most common range of analyzed frequencies is from 2 Hz to 10–15 kHz. In case of amplitudes, the maximum and minimum values need to be considered separately. The maximum vibration amplitude is calculated as intersection of the maximum value of the sensor’s amplitude range and the maximum value of the physical channel range—which for a typical accelerometer with sensitivity equal to 100 mV g , and a vibration card with ±5 V input electrical range—is calculated in a following way: 100½mV 1½g 5½V x½g
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_3
31
32
3 Vibration Components Generated by Rotary Machinery
from which the physical channel range is: x¼
5½V 1½g ¼ 50½g 0:1½V
Worth mentioning, individual designs of different vibration sensors mounted to the structure, somehow contribute to its FRF; therefore, in practice, vibration signals collected with the same acquisition parameters but with different sensors might be noticeable different. Likewise, mounting technique as well as impedance of the cables influences final data, as well.
3.2
Vibration Signature
When vibration (acceleration) signal is collected from selected drivetrain elements, it is typical to study so-called “vibration signatures”. A vibration signature is a description of vibration signal, which could be precisely characterized mainly in terms of: • • • • • •
Signal Signal Signal Signal Signal Signal
class, structure, period, amplitude, phase, stationarity characteristics.
The classification of vibration signals is well established in [1] (see Fig. 2.17 p. 41), and extended by Antoni [2] and Urbanek et al. in [3]. In some works, the order of major classification is reversed, but this is virtually irrelevant, as illustrated in Fig. 3.1.
Fig. 3.1 Equivalent major classifications of signals
3.2 Vibration Signature
33
In this Chapter, faulty shafts, blades, and gearboxes are assumed to generate multiple stationary deterministic components, whereas faulty REBs are assumed to generate cyclostationary (therefore non-stationary) random components, precisely pulse responses (or shortly “pulses”), which induce random noise. In case of deterministic signals, the structure of a signal could be described in terms of number of its sub-components, typically integer (but sometimes also rational) multiplies of the fundamental component. In case of pulses, the structure refers to content of the modulated signal, e.g. frequency range of narrowband noise. Signal period is a basic property of any deterministic component. For REB-induced pulses (cyclostationary components), it is most frequency called pulse “repetition rate”, as illustrated in Fig. 3.2. Signal amplitude is another basic property of every component and is the most commonly used signal parameter, which describes the technical condition of a given mechanical element. However, for considered machinery type and vibration analysis limited to acceleration signals, the “true” amplitude of vibration components are hardly ever used, simply because they easily vary from one period (or repetition rate) to another. In practice, some averaged or normalized versions of signal amplitude (like power or RMS, see Sect. 5.5) are calculated. Worth mentioning, for deterministic signal analyzed in a regular spectrum, the amplitude directly represents signal amplitude; however, in case of pulses analyzed in envelope spectrum, the spectral components represent amplitude “processed” by a low-pass filter. Signal phase is crucial parameter for variety of signal analysis technique (instantaneous speed calculation, modal analysis, advanced shaft analysis [4], supervised gearbox analysis [5, 6], but in most commonly used signal processing paths within conditioning monitoring of machinery considered in this book, it is neglected. This cancelation is done whenever the absolute value is calculated from Fourier Transform coefficients:
Fig. 3.2 Period versus repetition rate
34
3 Vibration Components Generated by Rotary Machinery
x = rand(6,1); X = fft(x) abs(X) angle(X)
% signal amplitude (magnitude of each component) % signal (initial) phase of each component (in radians)
The significant difference in the usage of amplitude and phase characteristics comes also from the fact that typically phase analysis requires precise parallel acquisition from multiple signals, whereas this condition is not mandatory for long-term amplitude-based monitoring, which greatly simplifies system designs, thus significantly reduces its costs. Finally, the stationarity characteristics describe (vaguely) how the signal changes in time. Worth mentioning, a simple differentiation rule whether a given signal is stationary or not does not exist. Even when some stationarity indicators are considered, the final judgment is still the matter of some subjectively accepted threshold. The general concept is illustrated in Fig. 3.3. One could simply state that every real signal collected from an accelerometer is not only always non-stationary (due to inevitable non-zero speed fluctuations) but also random (due to inevitable electrical noise); however, in practical condition monitoring-oriented signal analysis, the concept of stationarity is different—it is used in following way: • When nominally deterministic, stationary components (shaft-, blades-, or gearbox-induced) are considered, for small speed variations, signals are resampled, and these components are typically investigated in order spectrum. • When random cyclostationary components (which induce pulses) are considered, they are typically investigated in envelope or envelope order spectrum. • When significantly random and/or deterministic non-stationary signals are considered, time–frequency analysis (like waterfall or spectrogram) are preferable. From this point-of view, it is also concluded that in terms of identification of spectral components, a regular frequency spectrum, which is typically available in portable systems (without phase marker signal), is suitable only for analysis of
Fig. 3.3 From stationary-to-non-stationary signals
3.2 Vibration Signature
35
stationary deterministic components, which are generated by certain machine elements only at steady machine speed.
3.3
The Concept of “Characteristic Frequency”
In most desired scenario, every mechanical component of a given drivetrain generates a unique set of vibration components, from which a vibration signature is generated, as illustrated in Fig. 3.4. The considered vibration analysis assumes that every mechanical element of a drivetrain of rotary machinery generates repeatable, oscillatory—thus periodic motion, the period of which, for convenience, is converted into frequency. The characteristic frequencies enable association of spectral components with mechanical elements. However, due to speed fluctuation, these components tend to become smeared. Note, the higher the frequency of a component, the more susceptible it is the spectral smearing. For this purpose, vibration-based analysis prefers to use so-called “order” analysis, where components are located on a reference-speed normalized scale, in place of frequency analysis.
Fig. 3.4 Characteristic frequencies of gearbox (frequency domain), shaft (frequency domain) and REB (time domain)
36
3.4
3 Vibration Components Generated by Rotary Machinery
The Concept of “Characteristic Order”
In order-domain analysis, a vibration signal is collected in parallel with a reference speed signal, called a “phase marker”. Typically, phase marker gives one per shaft rotation, and the signal is resampled with respect to it. Although the common, new number of samples per rotation should be equal to at least the maximum number of samples in considered signal, very often, the new number of samples per rotation is calculated as averaged number of samples in considered signal and rounded towards nearest power of 2 for computational power purposes. Table 3.1 illustrates a simple comparison of two scenarios. In first scenario, calculations are done just in frequency domain. Here, speed information is not typically available, so a user enters its value manually. Next, corresponding characteristic frequencies are calculated using this input speed. In second scenario, a fixed value of reference shaft (always 1) is defined, so all characteristic orders are fixed, i.e. they have the same value regardless of machine speed. When characteristic frequencies are needed, these orders are multiplied by machine speed value, which is calculated automatically by the system (since this step is necessary for resampling).
Table 3.1 Comparison characteristic frequencies and characteristic orders
Frequency domain
Order domain
MANUAL INPUT Machine speed
FIXED INPUT 16
[Hz]
1
[ord]
CharacterisƟc frequency 1
16,0
[Hz]
CharacterisƟc order 1
1,0
[ord]
CharacterisƟc frequency 2
32,0
CharacterisƟc frequency 3
48,0
[Hz]
CharacterisƟc order 2
2,0
[ord]
[Hz]
CharacterisƟc order 3
3,0
[ord]
16
[Hz]
CharacterisƟc frequency 1
16,0
[Hz]
CharacterisƟc frequency 2
32,0
[Hz]
CharacterisƟc frequency 3
48,0
[Hz]
DATA-DRIVEN OUTPUT
Reference shaŌ order
FIXED OUTPUT
DATA - EXTRACTED SPEED Machine speed
DATA-DRIVEN OUTPUT
3.4 The Concept of “Characteristic Order”
37
NOTE: The main step in both scenarios - the kinetosta c analysis, which illustrates rela ve ra os of consecu ve drivetrain elements is exactly the same, and is done in order domain.
As a step-by-step procedure, the characteristic frequencies in order-based system are calculated as follows: Steps Realized Without Vibration Data (1) Calculation of “independent” subsets of characteristic orders for individual drivetrain elements (so-called “kinetostatic” analysis), i.e. for each shaft, gearbox, bearing, etc. (2) Selection of a referential shaft; typically fastest driving motor in the drivetrain, (3) Concentration of all subsystems into a single system with a referential shaft, This concept is schematically illustrated in Fig. 3.5. The drivetrain chain starts with the referential shaft, which always has order equal to one. Next, individual components are added to the previous component. In this sense, the output order of the xi-1 element becomes the input order to the xi element. At this point all characteristic “frequencies” could be placed on the order spectrum abscissa. In practice, for monitoring of trends of these components, almost every characteristic order is converted from a spectral value to into a spectral range (see Sect. 5.5.4) for details. Steps Realized With Vibration Data (1) Determination of the referential shaft (average) speed in [Hz]—scaling factor, (2) Recalculation of all characteristic orders (multiplication by scaling factor). Note that once all subsets of characteristic frequencies are connected into a single chain, the rescaling is automatically replicated to all characteristic orders. After this rescaling, all defined characteristic frequencies corresponding to individual mechanical elements at given (average) speed could be located in the frequency
Fig. 3.5 Schematic realization of machine characteristic orders
38
3 Vibration Components Generated by Rotary Machinery
spectrum abscissa. Following Sections illustrate how characteristic frequencies are calculated for common rotary machine elements, i.e. shafts, blades, gearboxes, and rolling element bearings.
3.5 3.5.1
Basic Mechanical Components Shafts
Shafts generate multiplies of the shaft speed. Typically, first three harmonics of the shaft speed are tracked for imbalance or misalignment detection. Considering a drivetrain with a reductor of 23/67 ratio and an imbalance on the slow shaft, the characteristic orders are as follows: • referential shaft order: 1 • gearbox ratio: 23/67 = 0.343 • slow shaft order: 0.343 The corresponding order spectrum is illustrated in Fig. 3.6. For frequency-axis analysis, Fig. 3.7, the system uses machine averaged speed. This speed is calculated as average of individual instantaneous speeds from one rotation to another. In this case, the average speed is equal to 2989 RPM, which is equivalent to 2989/ 60 Hz = 49.82 Hz. Since this is the speed of the referential shaft, the slow shaft speed is equal to 49.82 Hz * 0.343 = 17.1 Hz. Because the signal is 1 s long, this accuracy is order of magnitude higher than the spectral resolution (1 Hz), so the imbalance component is located at 17 Hz.
Fig. 3.6 Shaft imbalance in order spectrum
3.5 Basic Mechanical Components
39
Fig. 3.7 Shaft imbalance in frequency spectrum [Courtesy of AMC Vibro®]
3.5.2
Blades
3.5.2.1
Common-Speed Machinery
For machinery working at common speed range, e.g. 600–3000 RPM, the blades typically generate characteristic frequency equal to the shaft speed times the number of blades called “blade pass frequency” (BPF). Note that in order domain, this is simply the number of blades.
3.5.2.2
Fast-Speed Machinery
In case of high speed machinery, it is common that the characteristic frequencies of blades extend the range of common deterministic frequencies entering the range of structural frequencies. For instance, for a turbine running at 7300 RPM, a shaft with 120 blades generates a BPF equal to: 7300/60 * 120 = 14600 Hz (120th order) Worth mentioning, typically, this characteristic frequency is often modulated by the 120 Hz shaft speed.
3.5.3
Gearboxes
3.5.3.1
Parallel Gearboxes
Figure 3.8 shows a scheme of a simple one-stage parallel gearbox. For such gearbox, the basic characteristic frequency is the so-called “Gear Meshing Frequency” (commonly abbreviated GMF) calculated as:
40
3 Vibration Components Generated by Rotary Machinery
GMF ¼ V1 Z1 ¼ V2 Z2; where: • • • •
V1—speed of the INPUT shaft, V2—speed of the OUPUT shaft, Z1—number of teeth on the INPUT shaft, Z2—number of teeth on the OUTPUT shaft.
When the input shaft (also called “driving shaft) has larger rotational speed than the output shaft, the gear set is called “reductor”. In opposite scenario, it is called “multiplicator”. For the most common range of operational speed and sampling frequency, which is 600 RPM–3000RPM and 10 kHz–25 kHz, respectively, the speed sensor is located at the fastest shaft to provide highest accuracy. For the considered gearbox, a typical set of characteristic frequencies includes following: • • • • •
INPUT shaft harmonics, OUPUT shaft harmonics, GMF harmonics, GMF sidebands with harmonics, REB characteristic frequencies.
Depending on the gearbox design (especially type of teeth), speed, load, size, and control type, the vibration signature might be very different. For some gearboxes over a dozen of GMF harmonics is monitored. For others, GMF practically does not
Fig. 3.8 One-stage parallel gearbox scheme [Courtesy of AMC Vibro®]
3.5 Basic Mechanical Components
41
exist, and the condition monitoring is based on sideband analysis. As a general rule of thumb, gearboxes should be diagnosed at nominal temperature, highest speed, and at least 40% load. Otherwise, vibration signature easily yields false alerts, like in case of gearbox rattling on idle gear for some constructions. An example of a list of possible characteristic orders for the considered design, which includes first 4 GMF harmonics and corresponding 2 first pairs of sidebands, is presented in Table 3.2. More details on calculation of characteristic orders and characteristic frequencies of this particular gearbox design are given in Sect. 7.2.2. Figure 3.9 illustrates a fragment of a typical order spectrum, which contains the GMF (order 23), Slow
Table 3.2 Example of one-stage parallel gearbox characteristic frequencies
GMF harmonics
order
Gearbox.GMFx1
23,00
Gearbox.GMFx2
46,00
Gearbox.GMFx3
69,00
Gearbox.GMFx4
92,00
GMF sidebands
order
GMF sidebands c.d.
order
Gearbox.GMFx1+Gear1x1
24,00
Gearbox.GMFx3+Gear1x1
70,00
Gearbox.GMFx1+Gear1x2
25,00
Gearbox.GMFx3+Gear1x2
71,00
Gearbox.GMFx1+Gear2x1
23,34
Gearbox.GMFx3+Gear2x1
69,34
Gearbox.GMFx1+Gear2x2
23,69
Gearbox.GMFx3+Gear2x2
69,69
Gearbox.GMFx1-Gear1x1
22,00
Gearbox.GMFx3-Gear1x1
68,00
Gearbox.GMFx1-Gear1x2
21,00
Gearbox.GMFx3-Gear1x2
67,00
Gearbox.GMFx1-Gear2x1
22,66
Gearbox.GMFx3-Gear2x1
68,66
Gearbox.GMFx1-Gear2x2
22,31
Gearbox.GMFx3-Gear2x2
68,31
Gearbox.GMFx2+Gear1x1
47,00
Gearbox.GMFx4+Gear1x1
93,00
Gearbox.GMFx2+Gear1x2
48,00
Gearbox.GMFx4+Gear1x2
94,00
Gearbox.GMFx2+Gear2x1
46,34
Gearbox.GMFx4+Gear2x1
92,34
Gearbox.GMFx2+Gear2x2
46,69
Gearbox.GMFx4+Gear2x2
92,69
Gearbox.GMFx2-Gear1x1
45,00
Gearbox.GMFx4-Gear1x1
91,00
Gearbox.GMFx2-Gear1x2
44,00
Gearbox.GMFx4-Gear1x2
90,00
Gearbox.GMFx2-Gear2x1
45,66
Gearbox.GMFx4-Gear2x1
91,66
Gearbox.GMFx2-Gear2x2
45,31
Gearbox.GMFx4-Gear2x2
91,31
42
3 Vibration Components Generated by Rotary Machinery
Fig. 3.9 Example of gearbox vibration signature around GMFx1 [Courtesy of AMC Vibro®]
Shaft multiple sidebands (order 0.343), and referential Fast Shaft sidebands (order 1). For typical gearbox designs, shaft harmonics and bearing frequencies are calculated exactly the same way as if considered separately.
3.5.3.2
Epicyclic Gearboxes and Multi-stage Gearboxes
Calculation of characteristic orders for epicyclic gearboxes, especially for multi-stage custom designs easily becomes a difficult task, even for experienced engineers, because calculations for such designs often must be done by hand from scratch. As reference, the reader is referred to [7–9] or academic books on kinetostatic analysis—a part of general science of mechanisms and machine theory. When performing calculations, some statements might be helpful: • many popular quick methods refer only to a popular planetary design (with fixed ring), • many popular quick methods assume that the number of teeth is a function of gear diameter, which is not true for gearboxes with modified teeth (where the number of teeth on sun gear plus twice the number of teeth on a planet is not equal to the number of teeth on the ring gear), • it is rather difficult to see all characteristic frequencies on a spectrum at once, • names of EG failure modes are not unified, so it is recommended to analyze frequencies with association to particular faults, e.g. “local ring fault frequency” versus “ring overroll frequency”. Moreover, vibration signature from such gearboxes typically includes multi-stage modulations, which are hard to predict. Some modulations are generated by the motion itself, like rotation planets circulating around the sun gear, while others
3.5 Basic Mechanical Components
43
occur periodically as a function of hunting tooth (HT) gearbox characteristics [10]. Therefore, for vibration analysis of relatively slow-speed gearboxes, a full analytical examination of characteristic orders, including HT orders is recommended.
3.5.4
Rolling Element Bearings (REBs)
Faulty REB (with a local defect) induces a structure with a repetition rate determined by the characteristic frequency of individual failure mode. Such signal is therefore characterized by two separate phenomena. First phenomenon is a single pulse, which reflects object’s modal characteristics. Here, typically, the range of structural frequencies is determined, which means that the carrier wave is a non-trivial, non-uniform, multi-band noise. Numerous examples representing faulty REB-induced signals and their representations are given in Sects. 4.3.1, 7.5.3, 9.4.2.4 and 9.5.2.3, as well as in the following Section. For prac cal analysis, it is a common observa on, that for individual machinery, spectral bands induced by faulty REBs are significantly different.
In this sense, a single faulty REB-induced response could be considered as a single pulse excitation of the structure. The second phenomenon refers to the RATE at which these excitations take place. This rate is typically called a bearing “characteristic frequency”. Classically, the characteristic frequency directly reflects REB commonly known failure modes (BPFI, BPFO, FTF, and BSF). The equations for calculation of characteristic frequencies (actually orders) of rolling element bearing are commonly available [11]; therefore only selected information is given here. A REB is an element, which is always placed on some shaft. Therefore, the relative order of its shaft needs to be calculated first. This is of additional challenge for instance for REBs holding planet’s shaft. Comparing bearings with fixed outer ring (most popular) and fixed inner ring, all frequencies but cage frequency (also called “Fundamental Train Frequency”—FTF) are calculated the same way. The spinning frequency of the rotating element is sometimes named BSF (from Ball Spin Frequency) or 2xBSF. This is because some scientists assume that the signal is transferred to the accelerometer only through the REB outer race, while others claim that since a faulty rolling element hits both, outer and inner race, this frequency is doubled. Finally, it is worth mentioning that commonly known equations for calculation of BPFO, BPFI, FTF, and BSF are derived from a single general equation, which could be also used for calculation of REB characteristic frequencies with both races rotating.
44
3.6 3.6.1
3 Vibration Components Generated by Rotary Machinery
Harmonic Components Why Harmonic Components Are Generated in Spectrum?
To answer this question one needs to recall fundamental two examples of Fourier analysis. The first example is the Fourier Transform of a pure sinusoidal wave, which is a single spectral component, typically represented on spectrum as a single vertical line. The second common example considered in reverse order is the horizontal line in spectrum, which is generated as a Fourier Transform of the Dirac’s delta function. Thus, one could ask the following question: what could possibly generate a spectral pattern that is somewhere “between” a single spectral deterministic component and a spectral horizontal line. Logically, considering the above, the source time-domain signal must be something periodical “between” the Dirac’s delta and a pure sinusoidal signal. Indeed, any signal that is deterministic and periodic, yet it is not defined as a single sinusoidal component, generates a family of harmonic components. For instance, if a gearbox generates a GMF with harmonics, this means that the generated signal is periodic, but it is not a pure sinusoidal component (here due to periodical phase modulation resulting from deflection of teeth in contact). Generally, the presence of any harmonic components is never desired form condition monitoring point of view. However, for some machinery, like reciprocating machinery, such components are inevitable because they are naturally generated by healthy machinery.
3.6.2
Why Harmonic Components Are Generated in Envelope Spectrum?
The former Section considers spectral harmonics of deterministic components. In this Section, deterministic components in envelope spectrum are considered. When a REB experiences a single local fault, it induces the structure, i.e. the bearing and its housing) each time a rolling element “enters” the fault. Typically, this structure has a number of narrowband structural resonances measured in kHz. Therefore, the time waveform of the envelope of pulses is periodic, but it is not a single sinusoidal component, as illustrated in Fig. 3.10. From basic Fourier series theory, such periodic signal, as well as other common periodic shapes (like square or triangular wave), needs a number of harmonics to be generated. Therefore, as a general rule, the increase of the amplitude and the number of harmonics of REB characteristic frequency is a sign of REB fault development.
3.6 Harmonic Components
45
Fig. 3.10 REB high-frequency signal with its envelope
3.6.3
What Are Harmonics of Harmonics?
Considering a simple gearbox, the GMF is often modulated by shafts, input and output shaft. Both of these shafts generate modulations, typically amplitude modulation (AM). Just like GMF has multiple harmonics, each GMF harmonic might have sidebands (from one, two or more shafts). Thus, it is commonly observable that during gearbox fault development, harmonics of sidebands appear around harmonics of GMF, so they are shortly called “harmonics of harmonics” (HOH). Figure 3.11 illustrates a schematic multiple HOH. The Fig. 3.11 illustrates three GMFs (1, 2, and 3). Each GMF harmonic is modulated by a slow shaft with speed V1 and a fast shaft with a speed V2. Each sideband has additional harmonic component. For instance, the “HOH” component pointed in Fig. 3.11 is called: “the second fast shaft harmonic of the slow shaft right sideband of the second GMF harmonic”, or shortly “GMFx2 + 2V2”.
Fig. 3.11 Shaft sidebands as multiple GMF HOH components
46
3 Vibration Components Generated by Rotary Machinery
Note that the location of individual sidebands is found by measuring their frequency from the modulated component—not from the beginning of the frequency/ order axis. As clearly seen in Fig. 3.11, for complex gearbox designs with multiple shafts and ratios, identification of all gearbox-generated components, i.e. GMF harmonics and sidebands harmonics quickly becomes challenging. From practical point-of-view, it is worth mentioning that such multiple-stage designs require relatively long signals to provide sufficient spectral resolution (1/T or fs/N) and high-fidelity resampling to avoid spectral smearing for relatively high frequency harmonics.
3.7
Note on Additional Modulations
Modulation describes a phenomenon, where parameters of one signal change according to parameters of another signal. For some machinery, modulations are natural, while for others they indicate machine fault. In vibration-based analysis, typically three modulation types are considered, namely amplitude modulation (AM), frequency modulation (FM), and a phase modulation (PM). These modulations might refer to both, deterministic and random components. For instance, a REB with inner race fault (and rotating inner race) generates simultaneously AM of the periodically induced random structural resonances and deterministic envelope waveform with the period equal to the shaft speed, which results in spectral sidebands around BPFI (see Sect. 7.7.1). Likewise, a faulty gearbox might induce pulses or it might modify the GMF. In the first case, the repetition rate would be observable only in envelope spectrum, while in the latter case, it will be additionally visible on regular spectrum as GMF sidebands. Some amplitude modulations, like modulation generated by EG planets passing under a sensor are clearly visible on a raw time waveform; others are not, and require additional processing to detect. When it comes to FM and PM, it is worth to realize that in many cases, they might be used interchangeably, because FM refers to angular speed, PM refers to angle, and the derivative of angle (the difference with respect to time) is angular speed, so frequently it is just the matter of notation. This concept is further discusses during generation of synthetic signals.
References 1. Randall RB (1987) Frequency analysis. Bruel & Kjaer 2. Antoni J (2005) Blind separation of vibration components: principles and demonstrations. Mech Syst Signal Process 19:1166–1180 3. Urbanek J et al (2017) Normalization of vibration signals generated under highly varying speed and load with application to signal separation. Mech Syst Signal Process 82:13–31
References
47
4. Muszynska A (1995) Vibrational diagnostics of rotating machinery malfunctions. Int J Rotating Mach 1(3–4):237–266. https://downloads.hindawi.com/journals/ijrm/1995/102137. pdf 5. McFadden PD (1986) Detecting fatigue cracks in gears by amplitude and phase demodulation of the meshing vibration. J Vib Acoust Stress Reliab Des 108:165–170 6. Randall RB (2005) Use of the acceleration signal of a gearbox in order to perform angular resampling (with limited speed fluctuation). Mech Syst Signal Process 19(4):766–785 7. Ferguson RJ (1983) Short cuts for analyzing planetary gearing. Mach Des 55–58. https:// www.me.unm.edu/*starr/teaching/me314/planetary.pdf 8. Kurth F (2012) Efficiency determination and synthesis of complex-compound planetary gear transmissions. Technische Universitat Munchen 9. Vicuna CM (2009) Contributions to the analysis of vibrations and acoustic emissions for the condition monitoring of epicyclic gearboxes, Faculty of Georesources and Materials Engineering of the RWTH Aachen University 10. Dziedziech K, Dworakowski Z, Jablonski A (2019) Epicyclic gearbox fault detection by Instantaneous Circular Pitch Cycle Map. Mech Syst Signal Process 121:600–614 11. Randall RB (2011) Vibration-based condition monitoring: industrial, aerospace and automotive applications. Wiley
Chapter 4
Signal Processing Algorithms
Abstract This chapter is self-contained repository on signal processing algorithms, which are used in condition monitoring of rotary machinery. All codes are written in MATLAB®. Each technique is accompanied by description, exemplary figure, full code, and comments. Codes cover windowing, compensation, zero-padding, filtering, resampling, integration, envelope analysis, Time-Synchronous Averaging (TSA), and phase marker processing.
4.1 4.1.1
Basic Preprocessing Algorithms Scaling
Although by a common definition, “vibrations” refer to oscillatory displacement, typically vibration measurements are done using sensors sensitive to acceleration. A raw vibration signal recorded from an accelerometer enters data acquisition unit as voltage proportional to measured acceleration measured in “g”. This is a reason, why sensitivity of accelerometers is given in “mV/g”. Typically, for rotary machinery, sensors with sensitivity in range from 10 to 500 mV/g are used. First sensors are used for large vibrations, i.e. diesel engine, whereas latter ones are used for low vibrations, e.g. measured on housing of gearboxes or bearings of relatively slow speed shafts. Although many systems display signals and estimators in unit “g”, this refers to values of acceleration, only. Two reasons for scaling signal values exist, namely, if signal values are expected to be displayed in SI units or if velocity or displacement values need to be calculated. In both cases, a signal in “g” units has to be converted into “m/s^2” in the first place. Since 1 g equals approximately to 9.81 m/s^2, in order to convert signal in “g” into “m/s^2”, its amplitudes have to be multiplied by 9.81: >> x = x*9.81
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_4
49
50
4 Signal Processing Algorithms
Fig. 4.1 Arbitrary signal presented in [g] units and [m/s^2]
Clearly, for general engineering purposes, one might accept that signal displayed in “g” has 10 times smaller peak-to-peak values than the same displayed in “m/ s^2”, which is illustrated in Fig. 4.1. Figure 4.1 is generated using following code: fs T dt t
= = = =
1e4; .2; 1/fs; dt:dt:T;
% % % %
sampling frequency total signal time time resolution time base
% generate arbitrary signal x = .1*sin(2*pi*10*t)+.8*sin(2*pi*50*t)+.4*sin(2*pi*200*t); % plot signal waveform in [g] and [m/s^2] figure; subplot(121); plot(t,x);xlabel('Time [s]');ylabel('Amplitude [g]');grid on; subplot(122); plot(t,9.81*x);xlabel('Time [s]'); ylabel('Amplitude[m/2^2]'); set(gca,'fontsize',8); grid on;
For conversion of an acceleration signal into a velocity signal, the signal needs to be further converted from m/s^2 into m/s, which means it needs to be integrated with respect to time. Practical digital integration techniques are described in Sect. 4.2.3. Integration does not require additional scaling. In the final step, a signal represented in “m/s” units is typically converted into “mm/s”, simply because real objects generate relatively low velocity values, i.e. in a typical range of 0.1–20 “mm/s”. Conversion of signal values from “m/s” into “mm/s” is done by multiplication its values by 1000: >> x = x*1000;
4.1 Basic Preprocessing Algorithms
51
Further conversion of velocity signal into displacement signal does not include additional scaling, but just another integration, in order to convert “mm/s” into “mm”. Again, displacement is typically illustrated not in SI meters, but in “mm” units, due to relatively low displacement values. A full example of conversion of a real vibration signal from baseline “g” units into “mm” is illustrated in Sect. 4.3.2. For spectral visualization or spectral-based scalar indicators, scaling might be implemented either on original time-domain signal or directly on spectral values. For a regular spectrum, the scaling is done by simple multiplication by 9.81. However, for power spectrum or power-estimators, this factor must also be squared. Worth mentioning, for indicators presented as RMS values, the values are scaled by 9.81, because the power-square factor is canceled by the root operation.
4.1.2
Windowing and Compensation
The concept of signal windowing has been developed to minimize detrimental influence of spectral leakage, caused by imperfect matching of phase of individual components at the beginning and at the end of a signal under processing. Therefore, when some practically useful window is applied to a signal, all signal components simply equal zero at the beginning, and at the end of the signal. Thus, when a signal is “repeated” during the calculation of the Fourier Transform, phase mismatch does not exist. However, the concept of signal windowing has been extended to a degree, where many windows are generally insignificant within condition monitoring system signal processing techniques. Since development of a new window requires just any formulation of a new combination of basic mathematical function, many “windows” have been defined over years, including Hann, Kaiser, etc. Following code illustrates implementation of signal windowing: win = hann(length(x)); y = x'.*win;
% hann window % windowed signal
From practical point-of-view, signal windowing is of real importance when relatively short signals are analyzed. Figure 4.2 illustrates two sinusoidal signals of similar frequency, different length, and comparable out-of-phase characteristics referring to the beginning and the end of the signal. Both signals are windowed using MATLAB® “hann” function. As a result, both signals are no longer out-of phase at the beginning and at the end, as illustrated in Fig. 4.2.
52
4 Signal Processing Algorithms
Fig. 4.2 Illustration of signal windowing
Comparing spectral representations of both signals, it is clear that for a shorter signal, windowing has minimized components introduced by spectral leakage in much greater degree, comparing to the longer signal. The change is marked on both graphs with a grey circle. Application of a window to a signal has three major results: • it minimizes the artificial noise level (desirable), • it generates a wider mainlobe of deterministic components (undesirable), • it decreases amplitudes of deterministic components (undesirable). Figure 4.2 is generated using following code:
4.1 Basic Preprocessing Algorithms
53
fs = 1e3; dt = 1/fs; freq = 5.17;
% sampling frequency % time resolution % frequency [Hz], which generates non-integer No. of cycles
T t N df f
% % % % %
= = = = =
1; dt:dt:T; length(t); 1/T; 0:df:fs/2;
total signal time time base number of samples in the signal frequency resolution frequency axes
% ------------------ Signal % TIME DOMAIN DATA x = 1*cos(2*pi*freq*t); win = hann(length(x)); y = x'.*win;
#1 -------------------------------------------% cosine signal % hann window % windowed signal
% FREQUENCY-DOMAIN DATA X = abs(fft(x)); % original signal: 2-sided spectrum amplitudes X = X(1:N/2+1)/(N/2); % original signal: 1-sided scaled spectrum amplitudes Y = abs(fft(y)); % windowed signal: 2-sided spectrum amplitudes Y = Y(1:N/2+1)/(N/2); % windowed signal: 1-sided scaled spectrum amplitudes subplot(221); plot(t,x); hold on; plot(t,win,'r--'); plot(t,-win,'r--'); plot(t,y,'g'); set(gca,'fontsize',8); xlabel('Time [s]');ylabel('Amplitude');grid on; subplot(222); plot(f,X); hold on; plot(f,Y); xlim([0 20]); xlabel('Frequency [Hz]');grid on; legend('Original signal','Windowed signal'); set(gca,'fontsize',8); % ------------------ Signal #2 -------------------------------------------T = 4; % total signal time t = dt:dt:T; % time base N = length(t); % number of samples in the signal df = 1/T; % frequency resolution f = 0:df:fs/2; % frequency axes % TIME DOMAIN DATA x = 1*cos(2*pi*freq*t); win = hann(length(x)); y = x'.*win;
% cosine signal % hann window % windowed signal
% FREQUENCY-DOMAIN DATA X = abs(fft(x)); % original signal: 2-sided spectrum amplitudes X = X(1:N/2+1)/(N/2); % original signal: 1-sided scaled spectrum amplitudes Y = abs(fft(y)); % windowed signal: 2-sided spectrum amplitudes Y = Y(1:N/2+1)/(N/2); % windowed signal: 1-sided scaled spectrum amplitudes subplot(223); plot(t,x); hold on; plot(t,win,'r--'); plot(t,-win,'r--'); plot(t,y,'g'); set(gca,'fontsize',8); xlabel('Time [s]');ylabel('Amplitude');grid on; subplot(224); plot(f,X); hold on; plot(f,Y); xlim([0 20]); xlabel('Frequency [Hz]');grid on; legend('Original signal','Windowed signal'); set(gca,'fontsize',8);
The influence of windowing on signal power could be reversed by compensation of signal amplitudes. The compensation factor depends on the particular window applied, but generally might be as high as 50%. Worth mentioning, compensation factors have to be applied to all deterministic components in a signal, as illustrated
54
4 Signal Processing Algorithms
Fig. 4.3 Illustration of influence of windowing on spectral peak amplitudes
in Fig. 4.3. Continuing, Fig. 4.3 illustrates a sum of the previously introduced 5.17 Hz component and another, high frequency additive component. In this example, amplitudes of both, low-frequency and high-frequency components are lowered by about 50%. Figure 4.3 is generated using following code:
fs = 1e4; dt = 1/fs; freq = 5.17;
% sampling frequency % time resolution % frequency [Hz], which generates non-integer No. of cycles
T t N df f
% % % % %
= = = = =
1; dt:dt:T; length(t); 1/T; 0:df:fs/2;
total signal time time base number of samples in the signal frequency resolution frequency axes
% TIME DOMAIN DATA x = 1*cos(2*pi*freq*t) + .2*cos(2*pi*freq*100*t); win = hann(length(x)); % hann window y = x'.*win; % windowed signal
% cosine signal
% FREQUENCY-DOMAIN DATA X = abs(fft(x)); % original signal: 2-sided spectrum amplitudes X = X(1:N/2+1)/(N/2); % original signal: 1-sided scaled spectrum amplitudes Y = abs(fft(y)); % windowed signal: 2-sided spectrum amplitudes Y = Y(1:N/2+1)/(N/2); % windowed signal: 1-sided scaled spectrum amplitudes subplot(121); plot(t,x); hold on; plot(t,win,'r--'); plot(t,-win,'r--'); plot(t,y,'g'); set(gca,'fontsize',8); xlabel('Time [s]');ylabel('Amplitude');grid on; subplot(122); semilogx(f,X); hold on; semilogx(f,Y); xlabel('Frequency [Hz]');grid on; legend('Original signal','Windowed signal'); set(gca,'fontsize',8);
4.1 Basic Preprocessing Algorithms
55
Note, when compensation is applied to non-linear indicators, other compensation factors need to be applied. For instance, considering RMS value: (1-sqrt(1/N*sum(y.^2)) / sqrt(1/N*sum(x.^2)))*100 ans = 39.1418
it is clear that the compensation factor here is close to 1.4.
4.1.3
Trimming and Zero-Padding
4.1.3.1
Overview
Although MATLAB® enables operation of time series of practically any length, industrial signal processing libraries, as well as high-speed algorithms operate on signals, length of which equals to some predefined set of values. Considering CMS algorithms development, two major reasons for modification of signal length exist: • adoption of signal length to power of 2 for processing (typically FFT), • extraction of full rotation(s) for the purpose of calculation of resampled signal for order analysis. In practice, signals have length equal to the acquisition time (in seconds) multiplied by the sampling frequency, e.g. 250,000 samples for a 10 s signal sampled with 25 kHz sampling frequency or 44,100 samples for a 1s signal sampled with 44,100 kHz sampling frequency. If calculations are to be done on shorter or longer version of a given signal, signal is trimmed or extended with zeros (so called zero-padded). In consequence, signal trimming could be either one-sided or two-sided operation, whereas zero-padding is typically just one-sided operation. One-sided trimming is a trivial operation, which limits a signal to a defined number of points N: x = x(1:N),
where N is equal to desired number of points. Two-sided trimming typically is relevant to some other time series, e.g. a signal representing instantaneous speed. In this case, signal is trimmed according to selected number of rotations. Extraction of a single rotation is practically done, where a precise measurement is to be recorded, and a machine needs some time to
56
4 Signal Processing Algorithms
reach a steady speed. In this case, a single rotation is selected from a longer signal. Considering a desired single rotation (in deliberately small scale), for a phase marker signal: [ 0 0 0 1 0 0 0 0 0 0 1 0 0],
followed by data: [ 3 2 1 9 1 3 1 4 2 5 2 8 1],
the trimmed version of a signal equals to [9 1 3 1 4 2 5] or [1 3 1 4 2 5 2]. However, if some further signal processing based on difference equations is expected, it is recommended to trim the signal preserving phase marker points on both sided of a signal, resulting in the sequence [9 1 3 1 4 2 5 2]. This trimming, which typically accepts N rotations of a reference shaft, is undertaken in order to minimize spectral leakage and spectral smearing during analysis of phase-locked components, and is a sine-qua-non condition for successful resampling process. For practical case, where speed (phase marker) and data signals are sampled in parallel, it is common to trim the signal to the full first and last rotation, as in the following example: PM_ind var
= find(PM); % indexes of all phase markers (PM) = [PM_ind(1), PM_ind(end)]; % index of first and last PM
x_trimmed = x(var(1):var(2));
% signal “closed” at both sides
For further calculations, it is also typical to trim the phase marker signal in the same way, i.e.: PM_trimmed
= PM(var(1):var(2));
% PM left on both sides of the signal
As indicated above, one-sided operations include both, trimming as well as zero-padding, whereas two-sided operations typically include just trimming.
4.1.3.2
Numerical Example of One-Sided Preprocessing
Considering a 1s signal sampled at 25 kHz, a signal with 25,000 samples is available. If the length of a signal has to be modified to be equal to some power of 2, a new number of samples equal to some power of 2 could be considered, for instance: 2^13, 2^14, 2^15, and 2^16. For the first two powers, the signal is trimmed, whereas for last to powers, the signal is zero-padded. Percentage-wise level of signal modification is calculated as follows and summarized in Table 4.1.
4.1 Basic Preprocessing Algorithms
57
Table 4.1 Summary of signal modification K 13 14 15 16
New No. of samples: 2^K 8192 16384 32768 65536
Modificaon type trimming trimming zero-padding zero-padding
Change 67% 34% 31% 162%
4 8162 16384 25000 32768 65536
Time [ms]
3
2
1
0
0
100
200
300
400
500
Evaluation number Fig. 4.4 Time of calculation of FFT for different signal lengths (The calculations standard PC with Intel Core i7-3770 CPU @ 3.4 GHz during everyday operation; results change slightly every time)
>> abs(round((1-(2.^(13:16))./25000)*100)) ans = 67 34 31 162
From the Table, it is clear that either trimming to 16,384 samples or zero-padding to 32,768 are most desirable, because they modify a signal least. However, as illustrated in Fig. 4.4, lowering the number of samples to 2^14 significantly reduces the computational time, which is of utmost importance for embedded systems. Following code generates 5 series of predefined length and measures the FFT computational power. For individual length, the calculation is repeated five hundred times in order to avoid some random comparison results (notice especially first few calculations).
58
4 Signal Processing Algorithms
clear; clc; x = 1:25000; N = length(x); K = [2.^(13:14), 25e3, 2.^(15:16)]; for i = 1:length(K) new_N = K(i); if new_N < N y = x(1:new_N); elseif new_N == N y = x; else y = [x, zeros(1,new_N-N)]; end for k = 1:500 tic, fft(y); t = toc; elapsed(k,i) = t*1000; end end
% signals trimmed % signal unchanged % signals zero-padded
figure;hold on; plot(elapsed(:,1),'b'); plot(elapsed(:,2),'g'); plot(elapsed(:,3),'r'); plot(elapsed(:,4),'m'); plot(elapsed(:,5),'k'); h = legend('8162','16384','25000','32768','65536'); f = 10; set(h,'fontsize',f); xlabel('Evaluation number','fontsize',f); ylabel('Time [ms]','fontsize',f); set(gca,'fontsize',f);
Worth noticing, calculation of the FFT for 25,000 samples is just slightly slower than calculation of the FFT for 32,768 samples, yet the difference in signals’ lengths is over 30%.
4.1.3.3
Influence on a Spectrum
The influence of a trimming or zero-padding on a spectrum of a signal needs to be considered with reference to signal characteristics. Typically, the longer the signal, the more precise the spectrum due to better, i.e. more accurate, spectral resolution. However, when full rotations of a component are of dominant significance, a slight extension of a signal resulting in out-of-phase characteristics generally is detrimental to signal’s spectrum. In consequence, analysis of influence of trimming and zero-padding on synthetic, deterministic signals and on real signals might lead to seemingly different results. From industrial diagnostics point-of-view, these operations are generally acceptable. Lastly, it is important to keep in mind that zero-padding lowers the RMS value of a signal, while trimming has no influence on it.
4.2 Basic Processing Algorithms
4.2
59
Basic Processing Algorithms
4.2.1
Filtering
4.2.1.1
Overview
MATLAB® offers many filtering functions and utilities for both, beginners and advanced users. This group of tools includes mainly: • • • • • •
filter design functions and GUIs, filter analysis functions and GUIs, filter visualization GUI, filter implementation functions, integrated tool for filter design, analysis, and visualization (Filter Designer), Interactive Filter Assistant.
For decades, MATLAB® filtering tools have been modified and extended significantly, so it is recommended to update the knowledge on current functions. For sure, the current Filter Designer tool (replacement of former FDAtool) as well as new quick filtering functions (e.g. lowpass function) make filter design and implementation much easier than ever. Nevertheless, the flexibility of filter designs in MATLAB®, which is desired by advanced users, might give some hard time to new users. For instance, in R2019a documentation, the MATLAB® butter function is present in both “Analog Filter Design and Analysis” section and “Digital Filter Design” section. This is because this function covers both, analog and digital design. For digital filters, the filter output [b,a] or [z,p,k] coefficients of the butter function refer to Z-domain transfer function, whereas for analog filter design, they refer to S-domain transfer function. For state-space representation in both domains, the reader is referred to precise equations given in MATLAB® butter interactive documentation. Due to occasional incompleteness of some function description, it is generally recommended to check three sources of knowledge for MATLAB® self-learning, namely: • online MathWorks® documentation, • MATLAB® offline documentation (F1), • function text description (press Ctrl+D on highlighted function name). For instance, considering MATLAB® R2019a, the function designFilter has similar name to the function designfilt, but it is responsible for completely different thing; the variable filt, which is used in the DSP “Design a Filter in Fdesign—Process Overview” documentation to represent a filter object has the same name as MATLAB® filt function used for generation of discrete-time transfer function object of a tf class. Worth mentioning, although the mentioned filt is a variable, it is a so-called “system object”, which accepts input variables in the same way as filt function, i.e.:
60
y = filt(x); sys = filt(num,den);
4 Signal Processing Algorithms
% Digital Signal Processing Toolbox (DSP) support % Control System Toolbox support
which means that in this case MATLAB® might do different actions depending on the current workspace variables used as inputs. As mentioned earlier, this flexibility requires some extra caution from beginners. In practical implementation to common digital data, filters available in MATLAB® are various digital filters, which were developed internally by discretization of analog filter designs. For further reference on this subject, see MATLAB® Help on buttap and bilinear functions, which describe the process of designing of analog filters and the process of generation of a digital filter from the analog design, respectively. Although it is possible to design practically any kind of filter manually in MATLAB®, for beginning filter designers, MATLAB® offers a variety of simplified design methods, which are described in this Chapter. From author’s experience, it is sometimes convenient to be familiar with a few different filter design paths; therefore, a few selected methods are described in details with examples of use. Selected methods include standard time-domain functions and filter design graphical support. Additionally, examples of user frequency-domain filters are covered, which are commonly used in commercial CMS. A simplified scheme on possible filter design and implementation in MATLAB® is illustrated in Fig. 4.5. Firstly, Fig. 4.5 illustrates that MATLAB® allows design and implementation of both, analogue and digital filters. These filters could generate filter objects or transfer function coefficients. Secondly, these filter objects or filter coefficients are used along with the input signal by filter or fftfilt functions to filter the input signal. Tertiary, Fig. 4.5 presents six types of digital filter tools in MATLAB®, namely: • quick functions, introduced in MATLAB® 2018a, • general digital filter design function designfilt, introduced in 2014a, • general digital filter design functions fdesign and design, introduced in 2009a, • graphical user interface (GUI) tools, • individual IIR and FIR designs, • user frequency-domain functions. As indicated by Fig. 4.5, quick filtering functions as well as designfilt generate filter objects of a digitalFilter class, whereas fdesign function (followed by design function) as well as filterBuilder GUI and filterDesigner GUI generate filter objects of various DSP System Toolbox™ classes (class example is shown in the graph). Additionally, filterDesigner GUI enables filter coefficients export. Furthermore, the graph shows that filterBuilder GUI and filterDesigner GUI enable automatic generation of filter design code, which uses the fdesign and design functions.
4.2 Basic Processing Algorithms
61
Fig. 4.5 Selected filter design and implementation possibilities in MATLAB®
Next, Fig. 4.5 shows a list of four examples of commonly-used functions, which enable quick data filtering without designing the filter itself. Finally, Fig. 4.5 shows that MATLAB® offers different filter implementation paths, which is explained in details as a starting point in the following section.
4.2.1.2
Filtering Paths and Filter Data Structures
Filters could be applied in MATLAB® in two general ways, which is illustrated in Fig. 4.6. In the first scenario, signal is directly filtered by one of “quick” filtering functions. These functions, which enable quick filtering, were introduced in R2018a, and include following commands: • • • •
lowpass, highpass, bandpass, bandstop.
62
4 Signal Processing Algorithms
Fig. 4.6 General signal filtering schemes in MATLAB®: a direct signal filtering, and b signal filtering using filter data
In second scenario, the user first designs a filter and stores its parameters (named in MATLAB® “filter data”) either as numerical coefficients or as filter object, and then calls filtering function with both, the signal and the filter data—as input arguments. Numerical coefficients of filters are easily generated by command line functions such as butter and cheby1, or by Filter Designer GUI using “File ! Export” option. Depending on the selected method or user options, numerical filter coefficients are stored either as numerator and denominator [b,a] of a transfer function, as filter zeros, poles, and gain values [z,p,k] or in a so-called “SOS” format described later. Filter objects are other filter representation in MATLAB®. These objects could be of various classes (e.g. digitalFilter, dfilt, or fdesign class). Referring back to Fig. 4.5, filter objects are commonly generated by: • designfilt function, • design (followed by fdesign) functions,
4.2 Basic Processing Algorithms
63
• Filter Builder GUI, • Filter Designer GUI, • lowpass, etc. function (with additional second output variable). Since different MATLAB® functions might generate filters in different representations, many functions for filter structure conversion are available as well. For instance, function tf2zp converts coefficient in [b,a] to [z,p,k] representation, while zp2tf converts [z,p,k] to [b,a]. The other common filter structure conversion functions are convert and sos methods. The latter method refers to a so-called “second-order sections (SOS)” design, which is common for industrial software libraries outside MATLAB®. The SOS structures are special cases of so-called “biquadratric” filter sections, where a filter is represented as a sum of parallel biquads (i.e. a ratio of two quadratic functions in discrete-time domain). Note that the filter conversion could be also performed automatically in the Filter Designer GUI using “Edit ! Convert Structure” option. Since MATLAB® documentation on filtering along with numerous books on filter design and implementation using MATLAB® are easily available, following sections are reduced to basic examples of time-domain filtering as well user frequency-domain filtering. Additionally, MATLAB® DSP System Toolbox™ offers more filter design and analysis functions for modeling of real-time data stream, as well as extra tools for multiple filter structure conversions, both directed to advanced users.
4.2.1.3
Quick Command Line Filtering
In many cases, the goal of filtering is simply to perform a quick and standard filtering operation on a given single signal stored as a variable in MATLAB® default double numerical format. The standard, time-domain filtering includes lowpass, highpass, bandpass, and stopband filtering using identical MATLAB® commands: • • • •
highpass, lowpass, bandpass, bandstop.
Following code shows selected ways how to apply an example of a highpass filter. Implementation of other filters is performed analogously. For demonstration purposes, the code generates a 1 s noise signal sampled with 25 kHz, and filters it with highpass filter with cutoff frequency equal to 4 kHz:
64
4 Signal Processing Algorithms
N x
= 25e3; = rand(1,N)*10;
x cutoff fs df f
= = = = =
x - mean(x); 4000; 25e3; fs/N; 0:df:fs/2;
% % % % % % % %
number of samples generate and "upscale" noise (for clear visualization) remove DC (for clear visualization) frequencies below this value [Hz] are removed sampling frequency frequency resolution (equal to 1/duration) frequency axis
y = highpass(x,cutoff,fs); % FILTERS signal x and stores as y % Original time waveform X = abs(fft(x)); X = X(1:N/2+1)/(N/2); plot(f,X); hold on;
% Full-resolution spectrum calculation - step 1 % Full-resolution spectrum calculation - step 2
% Filtered signal Y = abs(fft(y)); Y = Y(1:N/2+1)/(N/2); plot(f,Y,'--');
% Full-resolution spectrum calculation - step 1 % Full-resolution spectrum calculation - step 2
% Axis description and settings axis tight; title('Full-resolution spectrum'); xlabel('Frequency [Hz]'); ylabel('Amplitude'); legend('Original signal','Filtered signal') set(gca,'fontsize',8);
Figure 4.7 illustrates full-resolution spectra of the original time waveform and of the resultant, filtered signal. Note that direct calling of this function without the output arguments: >> highpass(x,cutoff,fs)
plots automatically a time waveform and a power spectrum (in dB) of both signals, as illustrated in Fig. 4.8. Although such filtering might be very useful, a user needs to know that when this highpass function is called with default parameters, Matlab® automatically designs “optimum” filter. As a consequence, some designs could be very difficult to build outside Matlab®. Table 4.2 shows examples of designs, one for illustrated 4 kHz cutoff frequency, the other for 10 Hz cutoff frequency. In many situations, filtering requires more attention. In such cases, it is recommended to use filtering objects, which enable additional filter analysis, as presented in following section.
4.2 Basic Processing Algorithms
65
Fig. 4.7 Simple highpass filtering using highpass command with default settings
Fig. 4.8 Plots generated automatically by highpass function called without output arguments
4.2.1.4
Advanced Command Line Filtering
4.2.1.4.1 Quick Functions (digitalFilter Class) Previous Section shows quick, direct filtering, when initial results are expected immediately, without any detailed filter analysis. Note that calling the considered highpass function with additional output argument stores the digital filter object
66
4 Signal Processing Algorithms
Table 4.2 Comparison of filter structures Parameter Cutoff frequency Filter type Filter length Design method Steepness Stop-band aenuaon
Filter 1 4 kHz FIR 149 (numerator) Kaiser window 0.85 (default) 60 dB (default)
Filter 2 10 Hz IIR5 24 (4 secons x 6) Ellipc 0.85 (default) 60 dB (default)
of a digitalFilter class used for filtering, which is very useful, if one wants to see the filter characteristics: [y,d] = highpass(x,cutoff,fs) Coefficients: [1×149 double] FrequencyResponse: ImpulseResponse: SampleRate: StopbandAttenuation: PassbandRipple: StopbandFrequency: PassbandFrequency: DesignMethod:
'highpass' 'fir' 25000 60 0.1000 3372 4000 'kaiserwin'
(depends on 'Steepness' and 'StopbandAttenuation') (user defined) (depends on 'Steepness' (user defined) (directly 'StopbandAttenuation') (depends on 'Steepness') (user defined)
Clearly, for many CMS-oriented purposes such filter is not attractive, because it is simply too large and it is of FIR type, which is slower than IIR counterpart. Moreover, referring to the documentation, this type of functions allows defining only three design parameters, namely “Steepness”, “StopbandAttenuation” and “ImpulseResponse”; therefore, when a filter of user-defined order is to be designed, other filter design methods needs to be used. The methods are illustrated in following sections.
Designfilt Function (digitalFilter Class) Previously illustrated generation of a digital filter object using the highpass function with default parameters is equivalent to following call of the designfilt function:
4.2 Basic Processing Algorithms
67
d = designfilt('highpassfir',... 'StopbandFrequency',3372,... 'PassbandFrequency',4000,... 'PassbandRipple',0.1, ... 'StopbandAttenuation',60,... 'SampleRate',25000,... 'DesignMethod','kaiserwin');
Note that both, the quick filtering function (like considered highpass) as well as the designfilt function generate variable of the same digitalFilter class. Clearly, in many CMS-oriented signal processing tasks, this syntax is not a convenient way of filter design, because typically in such systems, filters are characterized by: • • • • •
filter type: highpass, lowpass, bandpass or bandstop, filter order: commonly 4th order for embedded system, filter response type: typically IIR for amplitude-based calculations, filter cutoff frequencies (one for HP and LP filters, two for BP and BS filters), sampling frequency fs: typically 20 kHz–2^15 kHz.
Thus, a commonly used 4th order high-pass Butterworth IIR filter with a 10 Hz cutoff frequency is designed using the designfilt function as follows: d = designfilt('highpassiir','FilterOrder',4,'HalfPowerFrequency',10,... 'DesignMethod','butter','SampleRate',25000);
or d = designfilt('highpassiir','FilterOrder',4,'HalfPowerFrequency',10,... 'SampleRate',25000); % Equivalent syntax
At this point, the reader is encouraged to take a look at the so-called “Name-Value Pair Arguments” section of the designfilt function documentation to see what parameters are allowed for individual filter designs, and why these calls are equivalent. Referring back to Fig. 4.5, once the filter object is designed, the signal might be filtered using either filter function or fftfilt function (valid only for FIR designs, and recommended only for relatively large time series operations). Note that in contrary to the highpass function, when filter function is used, it is not necessary to specify the sampling frequency, because it is stored in the digitalFilter class object “d”: y = filter(d,x); % FILTERS signal x using object “d” and stores as “y”
Lastly, calling the designfilt function with the filter object as a single input argument: designfilt(d)
% Filter Design Assistant
68
4 Signal Processing Algorithms
opens the Filter Design Assistant GUI, which enables easy filer modification.
Fdesign and Design Functions (DSP Toolbox™) Considered fdesign and design functions are a part of the DSP (Digital System Processing) System Toolbox™. First of all, the reader is encouraged to use a current, online documentary for these functions, which is much broader than the offline MATLAB® support (F1), for instance in 2018b version. This toolbox is a powerful tool for various digital signal processing techniques, which are far beyond the scope of a common CMS-oriented vibration data processing. Referring back to Fig. 4.5, these functions generate filter objects of various classes, which could be used to filter a typical, offline vibration signal. Nevertheless, the DSP System toolbox™ enables more advanced processing of “live” data streaming, for which the reader is redirected to filter DSP System object™ reference pages. For a typical filter implementation within CMS algorithm development, filter object generated by design function are used the same way as objects generated by designfilt function (although they are of different object classes), as illustrated in Figs. 4.5 and 4.9. In the first step, a filter object of fdesign class (e.g. fdesign.highpass class) is generated using user specifications. Next, these design function generates a filter System object™ of various DSP classes. Finally, a standard vibration data is filtered using universal filter function. For concise reference, following example illustrates how to design and use the commonly used, 4th order high-pass Butterworth IIR filter with a 10 Hz cutoff frequency:
Fig. 4.9 Filter design and (offline) filter implementation procedure using fdesign and design functions
4.2 Basic Processing Algorithms
69
h = fdesign.highpass('N,F3dB',4,10,25000); d = design(h,'butter'); y = filter(d,x);
% fdesign.highpass class % dfilt.df2sos class % filter signal x
This filter is equivalent to the previously illustrated filter generated with the designfilt function. However, when both filter object are analyzed via the Filter Visualization Tool (or equivalently viewed via info(d) in the command line), their descriptions vary. Although both filter objects have “Direct-Form II, Second-Order Sections” filter structure, this information is displayed only for the current filter. Also, worth mentioning, the filter coefficients stored in the digitalFilter class object (designfilt function) are already multiplied by the gain, whereas for filters generated via desing functions, they are not.1 Note: as a general rule, when gain is not specified, it is embedded in the first filter section and is not recommended because of possible erratic coefficients scaling. The final considered set of command line functions are MATLAB® functions, which enable generation of filter data as a set of coefficients. These functions are presented in following section.
Butter Function (Filter Coefficients) Referring to Sect. 4.2.1.1, MATLAB® offers a set of dedicated functions, which return filter coefficients. Some of these functions are: • butter, • cheby1, • fir1. In this section, the method butter is described. This function enables quick, 2-step data filtering. For better visualization, the highpass cutoff frequency, as well as sampling frequency, is modified. % % % % %
Filter order Filter type Filter design Cutoff frequency Sampling frequency
= = = = =
4 highpass IIR Butterworth 50 Hz 750 Hz
[b,a] = butter(4,50/(750/2),'high'); y = filter(b,a,x);
% Use when filter is to be applied % Filter data x (e.g. rand(1,1e4))
When coefficient of both filter objects are displayed in via “Filter Coefficients” tab in the Filter Visualization Tool, they are not multiplied by the gain.
1
70
4 Signal Processing Algorithms
Clearly, the filter implementation is as usual. As mentioned in Sect. 4.2.1.2, MATLAB® enables various filter structures and structure conversions. Following code illustrates how these conversions are useful when filters designed using different techniques are compared. [z,p,k] = butter(4,50/(750/2),'high'); % Use when filter is to be analyzed [sos,g] = zp2sos(z,p,k); % For precise numerical analysis [sos ] = zp2sos(z,p,k); % For quick visual analysis (FVTool) d = designfilt('highpassiir','FilterOrder',4,'HalfPowerFrequency',50,... 'SampleRate',750); % equivalent filter [b1,a1] = sos2tf(d.Coefficients); [z1,p1,k1] = sos2zp(d.Coefficients);
% Numerical comparison with [b,a] % Numerical comparison with [z,p,k]
Calling following code, it is clearly seen that considered representations are almost identical, i.e. they differ just by numerical round-off errors: format long; disp([a',a1']) 1.000000000000000 -2.909049493252732 3.283996026668637 -1.687645499468675 0.331503438845899
1.000000000000000 -2.909049493252733 3.283996026668639 -1.687645499468676 0.331503438845899
For quick visual comparison, it is recommended to use to Filter Visualization GUI: fv = fvtool(d,sos,'Fs',750); legend(fv,'designfilt','butter SOS');
% or fvtool(d,b,a,'Fs',750) % for visual comparison
Worth mentioning, the butter function accepts fs/2 as an input argument. Moreover, for bandpass and bandstop filters, the input order is given as N/2.
4.2.1.5
GUI-Supported Filtering
Filter Design Referring back to Fig. 4.5, MATLAB® offers three main GUI tools for filter design, namely: • FilterBuilder (opened by FilterBuilder in the command line), • FilterDesigner (opened by FilterDesigner in the command line or via APPS ! Filter Designer), • Filter Assistant (opened by d = designfilt in the command line). Figure 4.10 illustrates how to set the parameters and options in the FilterBuilder window to build exactly the same filter as presented in Sect. 4.2.1.4 using fdesign and design functions.
4.2 Basic Processing Algorithms
71
Fig. 4.10 Typical filter desing using FilterDesigner GUI
Note that the marked field “Code Generation” enables automatic generation of MATLAB® code, which generates the filter with the use of fdesign and design functions, as illustrated in Fig. 4.5. The marked “Apply” button generates a corresponding filter object in the base workspace. Note that such GUI design enables immediate desing of multiple filters, just by changing the variable name in the upper edit field. MATLAB® 2019 release additionally enables direct conversion to system object, which is for advanced users. Moreover, calling: >> filterBuilder()
in workspace enables convenient filter modification. Referring to Fig. 4.5, MATLAB®, the second filter-support GUI is called Filter Designer, earlier known as Filter Design and Analysis Tool (opened by calling FDAtool workspace command). Filter Designer is probably the most favorable tool for filtering-oriented signal processing among MATLAB® users. On one hand, it allows quick filter desing, but on the other hand, it offers a wide variety of
72
4 Signal Processing Algorithms
Fig. 4.11 Example of a 4th order high-pass filter design with 25 kHz sampling frequency and 4 kHz cutoff frequency and with enabled View ! (user) Specification mask
filter-related operations. An example of a filter desing via Filter Designer is illustrated in Fig. 4.11. Filter Builder allows generation of filters in various ways. For a full list of possibilities see Export Filer Designer ! Export Filer Designer GUI main menu option. When filter is to be use in MATLAB®, it is recommended to store the filter as digital filter Object, as illustrated in Fig. 4.12. Alternatively, filter could be stored as second-order section “SOS” and “Scale Values” coefficients (see Fig. 4.5). When filter coefficients are to be stored as numerator and denominator, the filter has to be first converted by selecting Edit ! Convert to Single Section from the GUI main menu. Note that although filter designs via Filter Builder and Filter Designer are eventually the same, the order of user selection of “Frequency Specification” (see “Magnitude” panel in Filter Designer) and filter calculating “Algorithm” (see “Desing” panel in Filter Designer) is reversed, which might be of additional difficulty for beginners. According to Fig. 4.13, both GUIs enable automatic code generation using fdesing and design functions; however, the code generated by Filter Builder uses lower-case description for name-value pairs of parameters and uses “dB”-
4.2 Basic Processing Algorithms
73
Fig. 4.12 Typical filter desing path using Filter Builder
related notation, whereas Filter Designer uses capital letters for name-value pairs of parameters and used “frequency”-related notation, or instance: 'n,f3db' and F3dB = 10;
% 3-dB Frequency
versus 'N,F3dB' and Fc = 10;
% Cutoff Frequency
Although these differences are meaningless form the code-point-of-view, they might unnecessarily suggest some changes for beginners. Visually, dialog windows opened via designfilt function and filterBuilder call are similar; however, some distinct differences could be noted, as illustrated in Fig. 4.13. As observed in Fig. 4.13, the list of filter designs for a designfilt function is more precise than the general list in the listbox generated by calling filterBuilder. Moreover, the input variable names are also different. When designfilt is called with a filter object as input parameter, the parameters in the window match this filter. Finally, note that the Filter Design Assistant window is practically a limited version of the main Filter Builder window.
Filter Implementation of GUI-Generated Filters Both filter design GUIs, namely the Filter Builder and Filter Designer enable quick and robust generation of digital filters. Referring to Fig. 4.5, these digital filters—typically objects, but also represented by filter coefficients—could be used to filter input signal using the filter function (or in some cases the filtfilt function, see Sect. 4.2.1.1) exactly in the same way as described in Sect. 4.2.1.4.
74
4 Signal Processing Algorithms
Fig. 4.13 Comparison of dialog windows for designfilt and filterBuilder
Filter Analysis Most common ways of GUI-supported filter analysis include operations: • via Filter Visualization Tool by calling fvtool() command in workspace, • via Filter Designer (after filter is designed, see Sections ‘Filter Design’ and 4.2.1.8), • via Filter Designer (by filter importing from workspace), • by selecting “View Filter Response” in the Filter Builder (after filter is designed, see section ‘Filter Design’), • calling the function info() in workspace. Although main filter analysis features, like Magnitude and Phase Response, Impulse and Step Response, Pole and Zero Plot, and Filter Coefficient view are the same in Filter Designer and FVtool, these tools somehow differ. Most commonly noted differences are as follows: • FVtool enables analysis of multiple filters at one time, • FVtool accepts additionally filter objects of digitalFilter class, • Filter Designer immediately shows updated filter response after filter modification, • Filter Designer works also with filters stored as filter coefficients.
4.2 Basic Processing Algorithms
75
As a consequence, it is worth to remember that: • Filter Designer GUI does not support digitalFilter objects (functions design, highpass, etc.), • Filter Builder GUI does not support digitalFilter objects (functions design, highpass, etc.). Recalling, while quick filtering functions (e.g. lowpass) as well as designfilt function generate filter objects of the digitalFilter class, other filter design tools, i.e. design function, Filter Builder GUI and Filter Designer GUI generate filter objects of classes different than digitalFilter (e.g. dfilt.dffir class), recalling: DF_obj = designfilt('lowpassiir','FilterOrder',4,... % digitalFilter class 'HalfPowerFrequency',4000,... 'DesignMethod','butter','SampleRate',25000); FB_obj = design(fdesign.lowpass('n,f3db',... 4, 4000, 25000), 'butter'); [b,a] = butter(4,4000/(25000/2),'low');
% df2sos class % omitted in examples % tf coefficients
These different filter formats somewhat make it difficult to compare filter characteristics precisely. Therefore, a comparison or modification of individual filters might require some a priori filter structure conversion. For instance, comparison of filter object generated by FilterDesigner and filter (coefficients) generated by butter function could be conducted in two directions: PATH 1: External SOS-to-transfer-function conversion (1) Generate filter using butter function: [b,a]
(2) (3) (4) (5)
= butter(4,4000/(25000/2), 'low' );
Open the Filter Designer by calling filterDesigner in workspace Design corresponding filter Save the filter using File ! Export…! Coefficients Convert the filter object generated by Filter Designer: [b_FD,a_FD] = sos2tf (SOS,G);
(6) Compare filter coefficients. NOTE: When filter object is generated via designfilt function, steps 2–4 are replaced from the top call in the upper code, and step 5 is replaced by calling: [b_DF,a_DF] = sos2tf(DF_obj.Coefficients);
PATH 2: Internal SOS-to-transfer-function conversion (7) Generate filter using butter function: [b,a]
= butter(4,4000/(25000/2), 'low');
(8) Open the Filter Designer by calling filterDesigner in workspace
76
(9) (10) (11) (12)
4 Signal Processing Algorithms
Design corresponding filter Select Convert to Single Structure form Edit menu tag Save the filter using File ! Export… ! Coefficients Compare filter coefficients.
Nevertheless, all of these filters of various classes could be visually compared using the Filter Visualization tool fvtool . Finally, the function info returns simple text information about the digital filter. 4.2.1.6
User Frequency Domain Filtering
Synthetic Signal Description User frequency-domain filtering scripts are illustrated on the basis of a synthetic signal consisting of three components: • stationary deterministic sinusoidal components, A = 0.05, f = 25, • stationary narrowband random noise, 75–100 Hz, • stationary deterministic sinusoidal components, A = 0.05, f = 25. The signal is 10 s long, and is sampled with sampling frequency equal to 1000 Hz. illustrates a fragment of the signal waveform and a full-resolution spectrum. Note that for further easier comparison, the spectrum illustrates scaled, one-sided spectral amplitudes plotted on a two-sided spectral axis. The signal and Fig. 4.14 are generated using following code:
Fig. 4.14 Time waveform and spectrum of the synthetic signal
4.2 Basic Processing Algorithms % Generate common signal clear; close all; clc; rng(0); my_color = [.85,.325,.098]; my_xlim = [-.25,.25]; fs dt T t N df
= = = = = =
1000; 1/fs; 10; dt:dt:T; length(t); fs/N;
77
% reset random number generator % USER-defined color % USER-zoom % % % %
sampling frequency time resolution total signal time signal time vector
% spectral resolution
c1 = .05*sin(2*pi*25*t); % COMPONENT 1: low frequency sinus c2 = bandpass(rand(1,N),[75,100],fs); % COMPONENT 2: middle-frequency noise c3 = .01*sin(2*pi*150*t); % COMPONENT 3: high frequency sinus x X amp f_half f_full
= = = = =
c1 + c2 + c3; fft(x); abs(X(1:N/2+1))/(N/2); 0:df:fs/2; 0:df:fs-df;
% % % % %
total signal complex numbers one-sided spectral amplitudes full-resolution half frequency axis full-resolution full frequency axis
figure; subplot(211); plot(t,x); xlabel('Time [s]'); ylabel('Amplitude'); title('Time waveform'); set(gca,'fontsize',8); xlim([0 1]); ylim(my_xlim); grid on; subplot(212); plot(f_half,amp); hold on; plot([fs/2,fs/2],[0 .06],'k:'); xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution spectrum one-sided spectrum'); legend('Original signal','Spectrum range'); set(gca,'fontsize',8); xlim([0 fs]); ylim([-.005 .055]);grid on;
Low-Pass Filtering Low-pass filtering in frequency domain enables cancelling high-frequency components with a perfect filter characteristics, as illustrated in Fig. 4.15.
78
4 Signal Processing Algorithms
Fig. 4.15 Frequency-domain LP filtering using time waveform and two-sided, full-resolution spectrum
Due to MATLAB® implementation of the FFT, which returns the coefficients as [0 … fs/2 … fs), the spectral components are mirrored with respect to fs/2 frequency; thus, LP filtering requires DC removal and zeroing in one spectral range, as illustrated in Fig. 4.15. Worth mentioning, for more complex signals, the filtered signal might experience additional distortion at the beginning and at the end. Such distortions are typically simply deleted. Figure 4.15 is generated using following code.
4.2 Basic Processing Algorithms
79
% User LOW-PASS filtering in the frequency domain cutoff = 50; % USER low-pass cutoff frequency [Hz] cutoff_ind = ceil(cutoff/df); % force integer index (to the left) Y = X;
% copy X for the LOW-PASS filter demo
Y(1) = 0; Y(cutoff_ind+1:end-cutoff_ind+1) = 0; y = ifft(Y);
% Remove DC component % zero values in range [0,fs] % back to time domain
figure; subplot(211);plot(t,x); hold on; plot(t,y); xlabel('Time [s]');ylabel('Amplitude');title('Time waveform'); legend('Original signal','LP filtered signal'); set(gca,'fontsize',8); xlim([0 1]); ylim(my_xlim); grid on; subplot(212); plot(f_full,abs(X/N)); hold on; plot([0,cutoff], [0.03 .03] ,'-.','color',my_color); plot(f_full,abs(Y/N)); legend1 = legend(gca,'show'); set(legend1,'AutoUpdate','off'); legend('Original signal','LP filter mask','LP filterd signal'); plot([cutoff,cutoff], plot([cutoff,fs-cutoff], plot([fs-cutoff,fs-cutoff], plot([fs-cutoff,fs-df],
[.03,0] [0,.0] [0,.03] [.03,.03]
,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color);
xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution two-sided spectrum'); set(gca,'fontsize',8); ylim([-.005 .055]);grid on;
High-Pass Filtering High-pass filtering in frequency domain enables cancelling low-frequency components with a perfect filter characteristics, as illustrated in Fig. 4.16.
80
4 Signal Processing Algorithms
Fig. 4.16 Frequency-domain HP filtering using time waveform and two-sided, full-resolution spectrum
Due to MATLAB® implementation of the FFT, which returns the coefficients as [0 … fs/2 … fs), the spectral components are mirrored with respect to fs/2 frequency; thus, HP filtering removal and zeroing in two spectral ranges (of which the first one includes DC removal), as illustrated in Fig. 4.16. Worth mentioning, for more complex signals, the filtered signal might experience additional distortion at the beginning and at the end. Such distortions are typically simply deleted. Figure 4.16 is generated using following code:
4.2 Basic Processing Algorithms
81
% User HIGH-PASS filtering in the frequency domain cutoff = 125; % USER high-pass cutoff frequency [Hz] cutoff_ind = ceil(cutoff/df); % force integer index (to the left) Y = X;
% copy X for the HIGH-PASS filter demo
Y(1) = 0; % Remove DC component Y(2:cutoff_ind) = 0; % zero values in range [0 , fs/2] Y(end-cutoff_ind + 2:end) = 0; % zero values in range [fs/2 , fs] y = ifft(Y);
% back to time domain
figure; subplot(211);plot(t,x); hold on; plot(t,y); xlabel('Time [s]');ylabel('Amplitude');title('Time waveform'); legend('Original signal','LP filtered signal'); set(gca,'fontsize',8); xlim([0 1]); ylim(my_xlim); grid on; subplot(212); plot(f_full,abs(X/N)); hold plot([0,cutoff], [0 0] plot(f_full,abs(Y/N));
,'-.','color',my_color);
legend1 = legend(gca,'show'); set(legend1,'AutoUpdate','off'); legend('Original signal','HP filter mask','HP filterd signal'); plot([cutoff,cutoff], [0,.03] plot([cutoff,fs-cutoff], [.03,.03] plot([fs-cutoff,fs-cutoff],[.03,0] plot([fs-cutoff,fs-df], [0,0] plot([0,cutoff], [0 0]
,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); % again
xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution two-sided spectrum'); set(gca,'fontsize',8); ylim([-.005 .055]);grid on;
Band-Stop Filtering Band-stop filtering in frequency domain enables cancelling of selected narrowband components with a perfect filter characteristics, as illustrated in Fig. 4.17.
82
4 Signal Processing Algorithms
Fig. 4.17 Frequency-domain BS filtering using time waveform and two-sided, full-resolution spectrum
Due to MATLAB® implementation of the FFT, which returns the coefficients as [0 … fs/2 … fs), the spectral components are mirrored with respect to fs/2 frequency; thus, BS filtering requires DC removal and zeroing in two spectral ranges, as illustrated in Fig. 4.17. Worth mentioning, for more complex signals, the filtered signal might experience additional distortion at the beginning and at the end. Such distortions are typically simply deleted. Figure 4.17 is generated using following code:
4.2 Basic Processing Algorithms
83
% User BAND-STOP filtering in the frequency domain from = 50; till = 125;
% USER first bandpass range [Hz]
cutoff_ind(1) = ceil(from/df); cutoff_ind(2) = ceil(till/df);
% force integer index (to the left) % force integer index (to the left)
Y = X;
% copy X for the BAND-STOP filter demo
Y(1) = 0; % Remove DC component Y(cutoff_ind(1)+1:cutoff_ind(2)) = 0; % 1st gap (like LP/HP) Y(end-cutoff_ind(2)+2:end-cutoff_ind(1)+1) = 0; % 2nd gap (like HP/LP) y = ifft(Y);
% back to time domain
figure; subplot(211);plot(t,x); hold on; plot(t,y); xlabel('Time [s]');ylabel('Amplitude');title('Time waveform'); legend('Original signal','BS filtered signal'); set(gca,'fontsize',8); xlim([0 1]); ylim(my_xlim); grid on; subplot(212); plot(f_full,abs(X/N)); hold on; plot([0,cutoff_ind(1)],[0 0] ,'-.','color',my_color); plot(f_full,abs(Y/N)); legend1 = legend(gca,'show'); set(legend1,'AutoUpdate','off'); legend('Original signal','BS filter mask','BS filterd signal'); % Replot the first line plot([0,from], plot([from,from], plot([from,till], plot([till,till], plot([till,fs-till], plot([fs-till,fs-till], plot([fs-till,fs-from], plot([fs-from,fs-from], plot([fs-from,fs-df],
[.03 .03],'-.','color',my_color); [.03,0] ,'-.','color',my_color); [0,0] ,'-.','color',my_color); [0,.03] ,'-.','color',my_color); [.03,.03],'-.','color',my_color); [.03,0] ,'-.','color',my_color); [0,0] ,'-.','color',my_color); [0,.03] ,'-.','color',my_color); [.03,.03],'-.','color',my_color);
xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution two-sided spectrum'); set(gca,'fontsize',8); ylim([-.005 .055]);grid on;
Band-Pass Filtering Band-pass filtering in frequency domain enables selection of precise narrowband components of interest with a perfect filter characteristics, as illustrated in Fig. 4.18.
84
4 Signal Processing Algorithms
Fig. 4.18 Frequency-domain BP filtering using time waveform and two-sided, full-resolution spectrum
Due to MATLAB® implementation of the FFT, which returns the coefficients as [0 … fs/2 … fs), the spectral components are mirrored with respect to fs/2 frequency; thus, BS filtering—in this case multiple—requires zeroing in 2n + 1 spectral ranges (of which the first one includes DC removal), as illustrated in Fig. 4.18. Worth mentioning, for more complex signals, the filtered signal might experience additional distortion at the beginning and at the end. Such distortions are typically simply deleted. Figure 4.18 is generated using following code:
4.2 Basic Processing Algorithms
85
% User multiple BAND-PASS filtering in the frequency domain from_1 = 20; % USER first bandpass range [Hz] till_1 = 30; from_2 = 145; till_2 = 155;
% USER second bandpass range [Hz]
cutoff_ind_1(1) = ceil(from_1/df); cutoff_ind_1(2) = ceil(till_1/df);
% force integer index (to the left)
cutoff_ind_2(1) = ceil(from_2/df); cutoff_ind_2(2) = ceil(till_2/df);
% force integer index (to the left) % force integer index (to the left)
Y = X;
% copy X for the BAND-PASS filter demo
Y(1)
= 0; % Remove DC component
Y(2:cutoff_ind_1(1)) = 0; % 1st gap (like HP) Y(cutoff_ind_1(2)+1:cutoff_ind_2(1)) = 0; % 2nd gap (like LP/HP) Y(cutoff_ind_2(2)+1:end-cutoff_ind_2(2)+1) = 0; % 3rd gap (like LP) Y(end-cutoff_ind_2(1)+2:end-cutoff_ind_1(2)+1) = 0; % 4th gap (like HP/LP) Y(end-cutoff_ind_1(1)+2:end) = 0; % 5th gap (like HP) % NOTE: For a single-component filtration use following simplified code: % Y(2:cutoff_ind_1(1)) = 0; % Y(cutoff_ind_1(2):end-cutoff_ind_1(2)+2) = 0; % Y(end-cutoff_ind_1(1)+2:end) = 0; y = ifft(Y);
% 1st gap (like HP) % 2nd gap (like LP) % 3rd gap (like HP)
% back to time domain
figure; subplot(211); plot(t,x); hold on; plot(t,y); xlabel('Time [s]'); ylabel('Amplitude'); title('Time waveform'); legend('Original signal','BP filtered signal'); set(gca,'fontsize',8); xlim([0 1]); ylim(my_xlim); grid on; subplot(212); plot(f_full,abs(X/N)); hold on; plot([0,from_1],[0 0] ,'-.','color',my_color); plot(f_full,abs(Y/N)); legend1 = legend(gca,'show'); set(legend1,'AutoUpdate','off'); legend('Original signal','BP filter mask','BP filterd signal'); plot([0,from_1],[0 0] plot([from_1,from_1], plot([from_1,till_1], plot([till_1,till_1], plot([till_1,from_2], plot([from_2,from_2], plot([from_2,till_2], plot([till_2,till_2], plot([till_2,fs-till_2], plot([fs-till_2,fs-till_2], plot([fs-till_2,fs-from_2], plot([fs-from_2,fs-from_2], plot([fs-from_2,fs-till_1], plot([fs-till_1,fs-till_1], plot([fs-till_1,fs-from_1], plot([fs-from_1,fs-from_1], plot([fs-from_1,fs-df],
[0,.03] [0.03,.03] [0.03,0] [0,0] [0,.03] [0.03,.03] [0.03,0] [0,0] [0,0.03] [0.03,0.03] [0.03,0] [0,0] [0,0.03] [0.03,0.03] [0.03,0] [0,0]
,'-.','color',my_color); % again ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color); ,'-.','color',my_color);
xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution two-sided spectrum'); set(gca,'fontsize',8); ylim([-.005 .055]);grid on;
86
4 Signal Processing Algorithms
4.2.1.7
Function Reference
Following codes present extracted codes for filtering used in previous sections. These codes include user functions for low-pass, high-pass, band-stop, and band-pass filtering, respectively. function
[y] = Filter_signal_LP(x,fs,cutoff)
% DESCRIPTION % Function performs low-pass (LP) filtering in the frequency domain. Works % for even numbers only. % % % %
INPUT x - vector of real time signal fs - sampling frequency in {Hz] cutoff - cutoff frequency of the LP filter in [Hz]
% OUTPUT % y - vector of filtered real time signal % EXAMPLE % [y] = Filter_signal_LP(x,fs,10); % removes frequencies from 10 Hz to fs/2 x N df cutoff_ind
= = = =
x(:); length(x); fs/N; ceil(cutoff/df);
% force columns vector % spectral resolution % force integer index
X = fft(x); X(1) = 0; X(cutoff_ind+1:end-cutoff_ind+1) = 0;
% Remove DC component % single gap in the range (0:fs)
y = ifft(X);
% back into time domain
function
[y] = Filter_signal_HP(x,fs,cutoff)
% DESCRIPTION % Function performs high-pass (HP) filtering in the frequency domain. Works % for even numbers only. % % % %
INPUT x - vector of real time signal fs - sampling frequency in {Hz] cutoff - cutoff frequency of the HP filter in [Hz]
% OUTPUT % y - vector of filtered real time signal % EXAMPLE % [y] = Filter_signal_HP(x,fs,10); x N df cutoff_ind
= = = =
x(:); length(x); fs/N; ceil(cutoff/df);
% removes frequencies from 0 to 10 Hz
% force columns vector % spectral resolution % force integer index
X = fft(x); X(1) = 0; X(2:cutoff_ind) = 0; X(end-cutoff_ind + 2:end) = 0;
% Remove DC component % 1st gap in the range (0:fs/2] % 2nd gap in the range [fs/2:fs)
y = ifft(X);
% back into time domain
function [y] = Filter_signal_BS(x,fs,cutoff) % DESCRIPTION % Function performs band-stop (BS) filtering in the frequency domain. Works % for even numbers only.
4.2 Basic Processing Algorithms % % % %
87
INPUT x - vector of real time signal fs - sampling frequency in {Hz] cutoff - cutoff frequencies of the BS filter in [Hz]
% OUTPUT % y - vector of filtered real time signal % EXAMPLE % [y] = Filter_signal_BS(x,fs,[10,20]); %removes freq . from 10 to 20Hz x N df
= x(:); = length(x); = fs/N;
% force columns vector % spectral resolution
cutoff_ind(1) = ceil(cutoff(1)/df); cutoff_ind(2) = ceil(cutoff(2)/df);
% force integer index (to the left) % force integer index (to the left)
X = fft(x); X(1) = 0; % Remove DC component X(cutoff_ind(1)+1:cutoff_ind(2)) = 0; % 1st gap - range (0:fs/2] X(end-cutoff_ind(2)+2:end-cutoff_ind(1)+1) = 0; % 2nd gap - range [fs/2:fs) y = ifft(X);
% back into time domain
function [y] = Filter_signal_BP(x,fs,cutoff) % DESCRIPTION % Function performs band-pass (BP) filtering in the frequency domain. Works % for even numbers only. % % % %
INPUT x - vector of real time signal fs - sampling frequency in {Hz] cutoff - cutoff frequencies of the BP filter in [Hz]
% OUTPUT % y - vector of filtered real time signal % EXAMPLE % [y] = Filter_signal_BP(x,fs,[10,20]); % removes all but 10 to 20 Hz x N df
= x(:); = length(x); = fs/N;
% force columns vector % spectral resolution
cutoff_ind(1) = ceil(cutoff(1)/df); cutoff_ind(2) = ceil(cutoff(2)/df);
% force integer index (to the left) % force integer index (to the left)
X = fft(x); X(1) X(2:cutoff_ind(1)) X(cutoff_ind(2):end-cutoff_ind(2)+2) X(end-cutoff_ind(1)+2:end) y = ifft(X);
= = = =
0; 0; 0; 0;
% % % %
Remove DC 1st gap 2nd gap 3rd gap -
component range (0:fs/2] range (0:fs) range [fs/2:fs)
% back into time domain
88
4 Signal Processing Algorithms
Next section illustrates how MATLAB® filtering tools could be used for easy generation of filter coefficients to be used outside MATLAB®. 4.2.1.8
Beyond MATLAB®—Filter Coefficients in C Language
As demonstrated in this book, MATLAB® might serve as an auxiliary tool for development of condition monitoring software. In some cases, MATLAB® is used to develop prototype tools; however, it could be used as a reference for precise signal operations as well. For instance, when one has to implement a particular filter in an embedded system, MATLAB® could be used to provide filter coefficient really quickly. The current example illustrates subsequent steps how to obtain coefficients of a common 4th order IIR Butterwort high pass filter with 25 kHz sampling frequency and 4000 Hz cutoff frequency. Firstly, open the Filter Designer GUI by typing following command in the command window (or select “Filter Designer” from the APPS menu: >> filterDesigner
Secondly, design the filter according to its desired characteristics, as illustrated in Fig. 4.19. Tertiary, choose a proper filter design type from the “Edit” menu tag, as shown in Fig. 4.20. Typical filter structures include so-called “Single Section”
Fig. 4.19 Filter design via filter designer GUI
4.2 Basic Processing Algorithms
89
Fig. 4.20 Filter structure conversion
Fig. 4.21 Header generation
design and “Second-Order Sections” design. Next, select “Generate C header” from the “Targets” menu tab, as shown in Fig. 4.21. Then, select proper data type for the coefficients, as illustrated in Fig. 4.22. Next, save the coefficient in a (default name) fdacoefs.h text file. For the selected Single Section structure, the C-coefficients are presented in Fig. 4.23.
Fig. 4.22 Generate C header window
90
4 Signal Processing Algorithms
Fig. 4.23 Filter coefficients of a 4-th order IIR Butterworth single-section structure filter with sampling frequency 25 kHz and a cutoff frequency 4 kHz for C language
These NUM and DEN coefficients could be used in C language either as parameters for predefined library functions or coefficient of manually developed filter equations. Detailed information on filter implementation in C language could be found in [1].
4.2.2
Resampling and Order Spectrum Basics
4.2.2.1
General Concept
In practical diagnostic analysis, resampling is a signal processing methods, which shrinks or stretches a real vibration signal according to another, referential sinusoidal signal. Typically, this referential signal is presented as binary signal or a more accurate encoder signal. Thus, resampling is an attractive alternative to (outdated) synchronous data collection. Resampling is used to minimize spectral smearing of deterministic, phase-locked components (i.e. such, the frequency of which changes along with machine speed). Naturally, the higher speed fluctuation and the higher nominal frequency of component of interest, the resampling is more remarkable. Nevertheless, resampling should not be used for relatively large speed fluctuations (within considered single signal), because for such speed changes, the frequency content typically changes
4.2 Basic Processing Algorithms
91
significantly due to the machine FRF. Such “permissible” speed fluctuation limit is difficult to define, and it is variable in different speed range, but one could accept 3% as general limit (45 RPM for nominal 1500 RPM). Another words, it is recommended to use resampling only to modify the shape of smeared sha locked components of a vibra on signals, sta s cal proper es of which (peak value, power, rms, etc.) do not change significantly over me.
After resampling, the signal is presented in angular domain. However, for convenience, this domain is directly converted into consecutive rotations (counterpart of the time domain). Note that typically, resampling is used to generate spectrum, where data is plotted with respect to consecutive orders (counterpart of the frequency domain), which are called Order Spectrum (OS). NOTE: the general concept of signal resampling, order spectra and time-synchronous averaging (TSA) is naturally continued in Sect. 4.3.
4.2.2.2
Dictionary
Signal pre-processing and signal processing techniques, which resample vibration signal are (unfortunately) described in literature using different notations, like “revolution” and “rotation” or “angle” and “phase”. As a consequence, the same operations might be apparently different. Moreover, the abscissa axis (horizontal) might be labeled differently as well, although they represent the same thing. For this reason, a dictionary of notations is introduced. • PM Phase Marker signal, “1” value per every rotation of the referential shaft, “0” elsewhere • ratio user relative ratio with respect the referential shaft (with value “1”) • Nsamp number of samples per rotation (of the referential shaft); commonly, this value is calculated as mean value of raw signal, twice of this mean value (default in the codes), or as a first power of 2 greater than the mean value2; counterpart of the sampling frequency fs in time-domain • Nrot number (integer) of rotations in the resampled signal • Xres resampled waveform; Note: Xres = Nrot Nsamp • Nres number of sample in the resampled signal; counterpart of N in time-domain
2
See Ref. [2] for details, p. 119.
92
4 Signal Processing Algorithms
• d_rot angular resolution; counterpart of dt in time-domain • d_ord spectral resolution in order-domain; counterpart frequency-domain • rot angular axis; counterpart of t in time-domain • ord order axis; counterpart of f in frequency-domain.
of
df
in
The presented dictionary is not designed to be understood as fixed, but it might help to compare the presented codes with others. Details of calculation of individual variables and their cross-relations are given in Sects. 4.3.1.4 and 5.5.4.
4.2.2.3
List of Operations
Resampling is done in following steps: (1) Collect simultaneously vibration signal and referential phase marker (PM) or encoder signal (2) Convert PM signal to a binary signal (ones at rotation timestamp, zeros otherwise) (3) Trim both signals to full rotations (4) Define new, constant number of samples per rotation (5) Generate new rotations axis (counterpart of t = dt:dt:T) (6) INTERPOLATION #1: calculate precise (new) timestamps corresponding to new axis (7) INTERPOLATION #2: interpolate original signal with respect to these new timestamps (8) Trim the signal to even number of rotations (for easier processing). Note that in contrast to a standard one-per rotation PM referential speed signal, encoder signal enables additional analysis of regular speed fluctuations within individual cycle. Nevertheless, in both cases, the PM data is a data vector of the same length as the vibration signal. Since the MATLAB® resample function requires two integer values to define the resampling ration, generally it is not suitable for signal resampling presented in this section. In presented examples, a quick interpolation function interp1 with a pchip interpolation method is used. A detailed analysis of the influence of interpolation function on the shape of spectral components is given in [3]. Generally, one pulse per rotation is sufficient to perform efficient resampling. For offline, precise calculations, advanced interpolation function should be used, but due to computation limitation, in practical, embedded condition monitoring systems, a simple linear interpolation is used.
4.2 Basic Processing Algorithms
4.2.2.4
93
Simplified Algorithm
This algorithm is used when the referential phase marker (PM) signal is on the shaft of interest. For conciseness of the simplified algorithm, additional comments regarding interpolation are placed in the following advanced version. function [Xres,Nrot] = Resample_signal_simplified(x,PM,fs,Nsamp) % DESCRIPTION % Function resamples a vibration signal according to a 1-pulse per rotation % Phase Marker (PM) signal, recorded in parallel % % % % %
INPUT x PM fs Nsamp
-
time signal phase marker binary vector sampling frequency new number of samples per rotation (optional)
% OUTPUT % Xres - resampled signal % Nrot - number of full rotations if nargin == 3 Nsamp = round(2 * mean(diff(find(PM)))); % determine Nsamp auto. if mod(Nsamp,2) Nsamp = Nsamp + 1; end end LastPM = find(PM,1,'last'); FirstPM = find(PM,1); x = x( 1:LastPM); PM = PM(1:LastPM);
x = x( FirstPM + 1:end); PM = PM(FirstPM + 1:end);
% trim x to full rotations % trim PM to full rotations
N dt t
= length(x); = 1/fs; = dt:dt:N*dt;
% No. of samples in signal "x" % time resolution % time vector of signal "x"
PM PMtime NoPMrot
= find(PM); = PM * dt; = length(PM);
% indexes of "1" in phase marker (PM) % time, when PM are "1" % No. of rotations of referential PM
PMrotScale RotScale RotTime Xres
= = = =
1:1:NoPMrot; linspace(0, NoPMrot, NoPMrot * Nsamp); interp1(PMrotScale, PMtime, RotScale,'pchip'); interp1(t,x,RotTime,'pchip');
Nrot = floor(length(Xres)/Nsamp); Xres = Xres(1: Nrot * Nsamp);
% % % %
auxiliary new base interp. #1 interp. #2
% new number of full rotations % force even length of resampled signal
94
4 Signal Processing Algorithms
4.2.2.5
Advanced Algorithm
This algorithm is used when shaft of interest has different rotational speed than the referential shaft (which generates PM signal), and when it is desired that this shaft of interest has order “1” after signal resampling. Naturally, such resampling must include another scaling of signal’s time base. This scaling is expressed in the order “ord” variable. function [Xres,Nrot] = Resample_signal_ord(x,PM,fs,ratio,Nsamp) % % % % % %
DESCRIPTION Function is an extended version of "Resample_signal_simplified", and it enables resampling with respect to a USER-specified order ratio. For instance, if the drive train has multiple gearboxes and a single PM signal, function enables generation of signals, where order 1 corresponds to any, USER-selected shaft
% % % % % % %
INPUT x PM fs ratio
-
time signal phase marker binary vector sampling frequency USER relative order ratio of the shaft of interest , using "1" is equivalent to "Resample_signal_simplified" function Nsamp - new number of samples per rotation (optional)
% OUTPUT % Xres - resampled signal % Nrot - number of full rotations if nargin == 4 Nsamp = round(2 * mean(diff(find(PM)))); % determine Nsamp auto. if mod(Nsamp,2) Nsamp = Nsamp + 1; end
% force even No. of samples
end LastPM = find(PM,1,'last'); FirstPM = find(PM,1);
% index of last "1" in PM data % index of first "1" in PM data
% Trim the vibration signal and PM signal to full rotations. Note: % "LastPM" must be first x = x( 1:LastPM); x = x( FirstPM + 1:end); % trim x to full rotations PM = PM(1:LastPM); PM = PM(FirstPM + 1:end); % trim PM to full rotations N dt t
= length(x); = 1/fs; = dt:dt:N*dt;
% No. of samples in signal "x" % time resolution % time vector of signal "x"
PM
= find(PM);
% indexes of "1" in phase marker (PM)
4.2 Basic Processing Algorithms PMtime NoPMrot PMrotScale
= PM * dt; = length(PM); = 1:1:NoPMrot;
95 % time, when PM are "1" % No. of rotations of referential PM % auxiliary
RotScale = linspace(0, NoPMrot, NoPMrot * ratio * Nsamp); % Upsample the stationary vector of reference rotations. For instance, if % original binary vector PM contains 515 instances of "1" (covers 515 % rotations, each with different time), a straightforward vector summing up % these rotations is created (0:1:515), and is divided into such number of % parts, which assure a desired number of samples (Nsamp) per rotation % of a shaft of interest with relative order equal to "ratio". % Next, two interpolations are performed: % INTERPOLATION #1: % The first interpolation finds real times for each resampled data points % (corresponding to "ordRotScale"), i.e. to increments in rotations % of the shaft of interest (with relative order "ratio"). RotTime = interp1(PMrotScale, PMtime, RotScale,'pchip'); % interpolation #1 % INTERPOLATION #2: % The second interpolation is a "standard" interpolation, which finds % signal amplitudes for new time vector. Since the rotational speed might % experience some constant values in-a-row, it is reasonable to use the % Piecewise Cubic Hermite Interpolating Polynomial (PCHIP also known as % CUBIC) for the first interpolation. However generally, it is more % accurate to use the SPLINE interpolation for amplitudes, since typical % real signals are "smooth". Xres = interp1(t,x,RotTime,'pchip'); % interpolation #2 Nrot = floor(length(Xres)/Nsamp); Xres = Xres(1: Nrot * Nsamp);
4.2.2.6
% new number of full rotations % force even length of resampled signal
Example 1—Synthetic Data
Figures 4.24 and 4.25 illustrate a typical, single sinusoidal component with a frequency modulation, which simulates a machine variable speed and display its time/ angular waveform and frequency/order spectrum. A detailed description of generation of such components is given in Sect. 6.2.2.2. Figures 4.24 and 4.25 are generated with following code:
96
4 Signal Processing Algorithms
Fig. 4.24 Time and angular waveforms of a single component with variable frequency
Fig. 4.25 Frequency and order spectra of a single component with variable frequency
4.2 Basic Processing Algorithms
97
fs dt T t N
= = = = =
1000; 1/fs; 10; dt:dt:T; length(t);
% % % % %
USER sampling frequency time resolution USER total signal time time base No. of samples in the signal
Ac f0 f1 x
= = = =
2; .25; 3; Ac * chirp(t,f0,T,f1);
% % % %
carrier signal amplitude initial frequency final frequency USER synthetic signal
% RESAMPLING PRE-PROCESSING: Recover phase markers (PM) from data [PM] = Get_phase_markers(x); % see Section 4.4.4.2.2 % RESAMPLING [xRes,Nrot] = Resample_signal_simplified(x,PM,fs);
% auto-calculated Nsamp
% CALCULATE AXES: time/angle and corresponding frequency/order % Calculate resampled signal parameters Nres = length(xRes); % number of samples in resampled signal Nsamp = Nres/Nrot; % number of samples per rotation (like fs) % Calculate axis for signal in time domain - done at the beginning % Calculate axis for signal in angular domain d_rot = 1/Nsamp; rot = d_rot:d_rot:Nrot; % counterpart of "t = dt:dt:T"; % Calculate spectral axes df = 1/T; f = 0:df:fs/2; % time / frequency domain d_ord = 1/Nrot; ord = 0:d_ord:Nsamp/2; % angle / order domain % SPECTRAL AMPLITUDES: frequency & order X = abs(fft(x)); X = X (1:N /2+1)/(N /2); Xres = abs(fft(xRes)); Xres = Xres(1:Nres/2+1)/(Nres/2); % AUXILIARY VISUALIZATION VARIABLE: Construct PM vector of resampled signal PMres = zeros(1,Nres); PMres(Nsamp:Nsamp:Nres) = 1; % FINAL PLOTTING % Plot signals in time / angular domain figure; subplot(211); plot(t,x); xlabel('Time [s]'); ylabel('Amplitude'); grid on; hold on; title('Time waveform'); plot(t,PM); legend('original signal','PM'); set(gca,'fontsize',8); subplot(212); plot(rot,xRes); xlabel('Rotations'); ylabel('Amplitude'); grid on; hold on; title('Angualar waveform'); plot(rot,PMres); legend('resampled signal','PM (angle domain)'); axis tight; ylim([-2 2]); set(gca,'fontsize',8); % Plot spectra in frequency / order domain figure; subplot(211); plot(f,X); xlabel('Frequency [Hz]'); ylabel('Amplitude'); grid on; title('Frequency spectrum'); xlim([0 25]); ylim([0 2]); legend('original signal'); set(gca,'fontsize',8); subplot(212); plot(ord,Xres); xlabel('Order'); ylabel('Amplitude'); grid on; title('Order spectrum'); xlim([0 12]); ylim([0 2]); legend('resampled signal'); set(gca,'fontsize',8);
Next example illustrates resampling of a real signal.
98
4.2.2.7
4 Signal Processing Algorithms
Example 2—Real Data
This section illustrates analysis of a real machinery signal vibstand.mat3 collected form the Vibstand™ test-rig. The signal is collected form the housing of a 1-stage parallel gearbox. The gearbox has a ratio equal to 23/67, which comes from the No. of teeth on the gear on the referential Fast Shaft and the No. of teeth on the gear on the Slow Shaft (see Sect. 7.2.1 for the kinetostatic scheme). The task is to resample the data is such way that the order 1 will correspond to the Slow Shaft, not the referential Fast Shaft. For this purpose, the extended Resample_signal_ord function is used as follows: ratio = 23/67; % relative resampling order (RRO) Resample_signal_ord(x,PM,fs,ratio,Nsamp); % resample original signal
Figure 4.26 illustrates a full-resolution spectrum of the original acceleration signal and a full-resolution spectrum of its two resampled versions. For reference, Fig. 4.26 shows a spectrum resampled with respect to the referential Fast Shaft (typical situation), as well. The order range for both order spectra is the same, because it is depends on the Nsamp parameter, which is calculated from original data; thus, it must be common for all user relative resampling orders (RRO). This range is equal to Nsamp/2. Note that the gear meshing frequency component (GMF), displayed in all spectra, is placed in different locations because it is calculated differently in following way: • frequency spectrum: Z1 * Avg_speed = 23 * 1/(mean(diff(find(PM)))*dt) = 1132,4 [Hz] • order spectrum FS: Z1 * 1 = 23 * 1 = 23 [ord] • order spectrum SS: Z2 * 1 = 67 * 1 = 67 [ord] As illustrated in Fig. 4.26, the RRO has also some influence on the general spectral shape. Figure 4.26 is generated using the vibstand.mat4 data and following code:
3
Available @ http://home.agh.edu.pl/ajab/. Available @ http://home.agh.edu.pl/ajab/.
4
4.2 Basic Processing Algorithms clear;close all;clc load('vibstand.mat');
99 % available @ http://home.agh.edu.pl/~ajab/
PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % PM data x = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration waveform fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; % fs dt N T t
= = = =
1/fs; length(x); N*dt; dt:dt:T;
% % % %
% Kinematic data z1 = 23; z2 = 67; ratio = z1/z2;
time resolution No. of samples in the signal total signal time [s] time base
% No. of teeth on the referential Fast Shaft % No. of teeth on the referential Slow Shaft % gearbox ratio (reductor)
% RESAMPLING PRE-PROCESSING % For display purposes, set Nsamp to average No. of samples Nsamp = round(mean(diff(find(PM)))); if mod(Nsamp,2) Nsamp = Nsamp + 1; % force even Nsamp end % RESAMPLING [xResFS,NrotFS] = Resample_signal_ord(x,PM,fs,1, Nsamp); % USER Nsamp [xResSS,NrotSS] = Resample_signal_ord(x,PM,fs,ratio,Nsamp); % USER Nsamp % CALCULATE AXES: time/angle and corresponding frequency/order % Calculate resampled signal parameters NresFS = length(xResFS); % number of samples in resampled signal NresSS = length(xResSS); % number of samples in resampled signal NsampFS = NresFS/NrotFS; NsampSS = NresSS/NrotSS;
% number of samples per rotation (like fs) % number of samples per rotation (like fs)
% Calculate axis for signal in time domain - done at the beginning % Calculate axis for signal in angular domain d_rotFS = 1/NsampFS; % reference d_rotSS = 1/NsampSS; rotFS = d_rotFS:d_rotFS:NrotFS; % reference rotSS = d_rotSS:d_rotSS:NrotSS; % Calculate spectral df = 1/T; d_ordFS = 1/NrotFS; d_ordSS = 1/NrotSS;
axes f = 0:df:fs/2; ordFS = 0:d_ordFS:NsampFS/2; ordSS = 0:d_ordSS:NsampSS/2;
% frequency domain % referential order axis % order axis
% SPECTRAL AMPLITUDES: frequency & order X = abs(fft(x)); X = X (1:N /2+1)/(N /2); XresFS = abs(fft(xResFS)); XresFS = XresFS(1:NresFS/2+1)/(NresFS/2); % ref. XresSS = abs(fft(xResSS)); XresSS = XresSS(1:NresSS/2+1)/(NresSS/2); % FINAL PLOTTING % Plot spectra in frequency / order domain figure; subplot(311); plot(f,X); xlabel('Frequency [Hz]'); ylabel('Amplitude'); grid on; title('Frequency spectrum'); axis tight; set(gca,'fontsize',8); subplot(312); plot(ordFS,XresFS); xlabel('Order'); ylabel('Amplitude'); grid on; title('Order 1: Fast (referential) Shaft'); set(gca,'fontsize',8);axis tight; subplot(313); plot(ordSS,XresSS); xlabel('Order'); ylabel('Amplitude'); grid on; title('Order 1: Slow Shaft'); axis tight; set(gca,'fontsize',8);
The nominal frequency of the GMF (calculated above) is equal roughly to 1132 Hz. Figure 4.27 illustrates instantaneous speed of the referential Fast Shaft.
100
4 Signal Processing Algorithms
Fig. 4.26 Full-resolution spectra: frequency spectrum (top), order spectrum with respect to Fast Shaft (center), and order spectrum with respect to Slow Shaft (center)
The instantaneous speed is calculated and displayed using following code: inst_Speed = 1./(diff(find(PM))*dt); figure; plot(inst_Speed,'color',[.85,.325,.098]); xlim([0 length(inst_Speed)]); title('Instantaneous speed'); xlabel('Rotations'); ylabel('Speed [Hz]'); set(gca,'fontsize',8); grid on;
Thus, the average FS speed and SS seed are equal to: disp(mean(inst_Speed)); disp(mean(inst_Speed)*23/67);
% average Fast Shaft speed: 49.24 Hz % average Slow Shaft speed: 16.90 HZ
4.2 Basic Processing Algorithms
101
Fig. 4.27 Referential Fast Shaft instantaneous speed
For further investigation, Fig. 4.28 shows replotted Fig. 4.26 with a (manual) zoom around the GMF component marked. For frequency spectrum, the FS sidebands and SS sidebands are calculated by adding and subtracting 49.24 Hz and 16.90 Hz from the nominal GMF, respectively. For order spectrum calculated with respect to the referential Fast Shaft, the FS sidebands correspond to order 1, while SS sidebands correspond to order 0.343 (23/67). Analogously, for order spectrum calculated with respect to the Slow Shaft, FS sidebands correspond to order 2.91 (67/23), while SS sidebands correspond to order 1. Note that the frequency spectrum is characterized by relatively small peak amplitudes due to spectral smearing, even for such small speed variation as 0.44%: iS = inst_Speed; % instantaneous speed fluct = max(max(iS)-mean(iS),mean(iS)-min(iS))/mean(iS)*100 % 0.44 percent
Moreover, the order spectrum calculated with respect to the referential Fast Shaft has precise FS sidebands and smeared SS sidebands, while the order spectrum calculated with respect to the Slow Shaft (23/67 = 0.3433 relatively to the Fast Shaft) has precise SS sidebands and smeared FS sidebands. Further aspects of calculation of instantaneous frequency from the PM data or from the vibration signal itself are presented in Sect. 4.4.
102
4 Signal Processing Algorithms
Fig. 4.28 Representation of GMF component with SS and FS first double-sidebands in frequency domain and order domain with different RRO
4.2.3
Integration
Numerical integration is a very broad subject, and it is well-described in the literature [4]. However, when CMS-data is considered, numerical integration is usually used to convert Acceleration vibration signal to Velocity signal, and sometimes to convert Velocity vibration signal to Displacement signal, which limits the scope of integration methods. These complete processes are described in Sect. 4.3.2 with full-featured source codes. The current section illustrates three selected techniques for signal integration, namely:
4.2 Basic Processing Algorithms
103
• cumsum function, • cumtrapz function • user quick function: function [xInt] = Calculate_Integrated(x,fs) % COMMENTS % Earlier HP signal filtering recommended. % Taking "dt" out of the loop changes result in MATLAB of the (e-10) order. % INPUT % x - real time signal % fs - sampling frequency % OUTPUT % x - integrated real time signal x = x(:); N = length(x); x = x - mean(x);
% force column vector % length of the original signal % remove DC component before integration
xInt = x; xInt(1) = 0;
% cumulative variable % set first point manually to "0"
for i = 2:N xInt(i) = xInt(i-1)+x(i)/fs; end
% division by fs is multiplication by dt
xInt = xInt - mean(xInt);
% remove DC component after integration
Worth mentioning, practical implementation of integration within machine diagnostics typically involves a priori signal filtering using a high-pass filter to avoid cumulating of numerically-generated signal distortion, which could be understood as a low-order or low-frequency artifacts.
4.2.3.1
Noise-Free Synthetic Signal
Figure 4.29 illustrates a noise-free sinusoidal component and its integrals calculated using three considered integration techniques. The top plot in Fig. 4.29 is generated when the mean value of integrated signal is not removed after integration using the cumsum and cumtrapz functions. The bottom plot in Fig. 4.29 represents integrated signals, where mean (DC) component is removed after integration. The difference between in results between the cumtrapz function and the cumsum function are at the order of 10^-3: >> figure; plot(Int_cs - Int_ct)
However, this difference is due to the phase shift. When amplitudes are considered:
104
4 Signal Processing Algorithms
>> max(Int_cs) - max(Int_ct),
the difference is at the order of 10^-15. The difference in results between the cumsum function and user Calculate_Integrated function (for this example) are at the order of 10^-15: >> figure; plot(Int_cs - Int_user)
Therefore, in might be accepted that from the diagnostic point-of-view, these differences are negligible, and any standard integration algorithm is generally suitable. Figure 4.29 is generated with following code:
Fig. 4.29 Comparison of integration techniques for noise-free signal (USER zoom)
4.2 Basic Processing Algorithms
105
% Define colors MatlabColors = colororder; c1 = MatlabColors(1,:); c2 = MatlabColors(2,:); c3 = MatlabColors(5,:); c4 = MatlabColors(4,:);
% % % % %
Necessary when yyaxis is used USER color #1 USER color #2 USER color #3 USER color #4
% Signal parameters fs = 2000; dt = 1/fs; T = 10; t = dt:dt:T;
% % % %
USER time USER time
sampling frequency resolution total signal time base
% ----- fragment of the code to be modified -------------------------x = 7*sin(2*pi*100*t); % USER noise-free signal % --------------------------------------------------------------------Int_cs Int_ct
= cumsum(x) /fs; = cumtrapz(x)/fs;
% integrate using cumulative sum % integrate using "cumulative % trapezoidal numerical
integration" Int_user = Calculate_Integrated(x,fs)'; % integrate using USER function % PLOT DATA where MEAN value is KEPT for CUMSUM and CUMTRAPZ figure;subplot(211); yyaxis left; plot(t,x,'color',c1); grid on; xlim([0 .025]); xlabel('Time [s]'); ylabel('Amplitude'); title('Mean value KEPT for cumsum and cumtrapz') yyaxis right;
plot(t,Int_cs, '--o','color',c2); hold on; plot(t,Int_ct, '-', 'color',c3); plot(t,Int_user,'.', 'color',c4); legend('original','cumsum','cumtrapz','user'); ylabel('Integrated'); set(gca,'fontsize',8);
% PLOT DATA where MEAN value is REMOVED for CUMSUM and CUMTRAPZ Int_cs = Int_cs - mean(Int_cs); % remove mean value Int_ct = Int_ct - mean(Int_ct); % remove mean value subplot(212); yyaxis left;
yyaxis right;
plot(t,x,'color',c1); grid on; xlim([0 .025]); xlabel('Time [s]'); ylabel('Amplitude'); title('Mean value REMOVED for cumsum and cumtrapz') plot(t,Int_cs, '--o','color',c2); hold on; plot(t,Int_ct, '-', 'color',c3); plot(t,Int_user,'.', 'color',c4); legend('original','cumsum','cumtrapz','user'); ylabel('Integrated'); set(gca,'fontsize',8);
106
4.2.3.2
4 Signal Processing Algorithms
Noisy Synthetic Signal
When a random noise is added to the signal generated by a code from previous section, i.e. when: % ----- fragment of the code to be modified --------------------------x = 7*sin(2*pi*100*t); % USER noise-free signal % ---------------------------------------------------------------------
is replaced with: % ----- fragment of the code to be modified --------------------------rng(5); % Use this rng value x = 7*sin(2*pi*100*t) + 2*(rand(1,length(t))-.5); % USER noisy signal % ---------------------------------------------------------------------
resultant plots for data with and without mean value removed after integration (NOTE: in full time scale) are as presented in Fig. 4.30. Clearly, the user function performs better, because the integrated signal should oscillate around zero the same way as the original signal does. However, this improvement is due only to following line, which is inside the user Calculate_Integrated function: x = x - mean(x);
% remove DC component before integration
Fig. 4.30 Comparison of integration techniques for noisy signal
4.2 Basic Processing Algorithms
107
Fig. 4.31 Comparison of integration techniques for noisy HP filtered signal
This problem is generally solved by initial HP signal filtering5, for instance: % ----- fragment of the code to be modified -------------------------rng(5); % Use this rng value x = 7*sin(2*pi*100*t) + 2*(rand(1,length(t))-.5); % USER noisy signal x = highpass(x,10,fs); % filter the signal with 10 Hz cutoff frequency % ---------------------------------------------------------------------
As observed in Fig. 4.31, (right vertical axis is manually adjusted by calling ylim([-0.03,0.03])), results of all considered integration techniques are visually the same. When detailed spectral analysis is considered, MATLAB® cumsum and cumtrapz functions show slightly better performance than the simple user Calculate_Integrated function, especially at frequencies close to zero.
4.2.3.3
Real Signal
The current example illustrates practical integration of a real vibration signal collected from a REB housing with a general purpose industrial accelerometer.6 The machine experiences a slight speed variation, which is typical even for machinery working in “stationary” conditions. The data is collected using 25 kHz sampling frequency. Figure 4.32 illustrates time waveforms of the original acceleration signal and its integrals using considered techniques. Different HP cutoff frequencies are analyzed for each technique. Note: HP filtering and integration are used when a NOTE: for conciseness, in this section, HP filtering is done via highpass function. In other places, function butter with manual parameters or Filter_signal_HP user function is used 6 Available @ http://home.agh.edu.pl/ajab/. 5
108
4 Signal Processing Algorithms
Fig. 4.32 Analysis of different integration techniques with different HP cutoff frequency filter settings for real vibration signal analysis
velocity signal or displacement signal is calculated from the acceleration signal. Both processes are illustrated in details in Sect. 4.3.2. As observed in Fig. 4.32, real signals require relatively high HP cutoff frequencies, like 5 Hz, regardless of the integration technique used. Note that the top two graphs have over order of magnitude larger amplitude range. Regarding CMS-oriented purposes, a HP filter cutoff frequency more than 10 Hz is typically not used for integration, as velocity data is significant for relatively low frequencies (no more than 1 kHz), which is evidently a contradiction. As a general rule, the longer the signal to be integrated, the higher HP filter cutoff frequency is required.
4.2 Basic Processing Algorithms
109
Finally, plots corresponding to 5 and 10 Hz cutoff frequencies clearly show that integration using MATLAB® cumsum or cumtrapz functions is practically free from low-frequency artifacts. However, since these particular functions are generally not available outside MATLAB®, the user function Calculate_Integrated is used throughout this book for referential purposes. Figure 4.32 is generated using following code: load vibstand.mat;
% Available @ http://home.agh.edu.pl/~ajab/
% Define colors MatlabColors = colororder; c1 = MatlabColors(1,:); c2 = MatlabColors(2,:); c3 = MatlabColors(5,:); c4 = MatlabColors(4,:); x fs dt N T t
= = = = = =
% % % % %
Necessary when yyaxis is used USER color #1 USER color #2 USER color #3 USER color #4
avtb_2019_Machine_1_02_Motor_bearing(:,2); 25e3; 1/fs; length(x); N*dt; dt:dt:T;
% % % % % %
time waveform sampling frequency time resolution No. of samples total signal time [s] time base
% USER filter cutoff frequencies HP_cutoff(1) = 0; % no HP filtering HP_cutoff(2) = 2; % first common HP filter cutoff frequency: 2Hz HP_cutoff(3) = 5; % second common HP filter cutoff frequency: 5Hz HP_cutoff(4) = 10; % third common HP filter cutoff frequency: 10Hz % FILTER y(:,1) = y(:,2) = y(:,3) = y(:,4) =
SIGNAL x; highpass(x,HP_cutoff(2),fs); highpass(x,HP_cutoff(3),fs); highpass(x,HP_cutoff(4),fs);
% original signal % filter the signal (quick way) % filter the signal (quick way) % filter the signal (quick way)
% INTEGRATE using different methods and PLOT for k = 1:4 Int_cs = cumsum(y(:,k)) /fs; Int_cs = Int_cs - mean(Int_cs); Int_ct = cumtrapz(y(:,k))/fs; Int_ct = Int_ct - mean(Int_ct); Int_user = Calculate_Integrated(y(:,k),fs)'; subplot(4,1,k); yyaxis left;plot(t,x,'color',c1); grid on; ylabel('Amplitude'); str = ['HP cutoff frequency: ',num2str(HP_cutoff(k)),'Hz']; title(str); yyaxis right; plot(t,Int_cs, '--o','color',c2); hold on; axis tight; plot(t,Int_ct, '-', 'color',c3); plot(t,Int_user,'.', 'color',c4); ylabel('Integrated'); end % FINAL LABELING legend('original','cumsum','cumtrapz','user'); xlabel('Time [s]'); set(gca,'fontsize',8);
It is therefore concluded that for prac cal CMS-oriented implementa on of signal integra on, the HP filter se ngs and filter characteris cs have generally more influence on the resultant integrated signal than the selected integra on technique.
Further analysis of practical implementation of integration is illustrated in Sect. 4.3.2.
110
4.3
4 Signal Processing Algorithms
Combined Processing Algorithms
4.3.1
Signal Envelope and Envelope Spectrum
4.3.1.1
Overview
Signal envelope analysis is a very well-known approach to fault detection and identification within condition monitoring systems for many decades. Typically, within analysis of vibration signal, enveloping is used to extract second-order cyclostationary components, like periodic structural responses generated by faulty rolling-element bearings [2, 5–7]. Signal envelope also shows modulations of various kinds, including modulations of GMF or amplitude modulation of bearing characteristic frequencies. In this section, two aspects of Envelope Analysis are covered, namely Diagnostic Goals of Envelope Analysis and Methods of Calculation of Envelope Signals. Diagnostic Goals Within the first category, which considers diagnostic goals, envelope analysis typically is used: • as a benchmark method for rolling element bearing diagnostics (REB), • for visualization of additional amplitude modulation (AM) effects for REB diagnostics, • for visualization of AM gearbox-generated deterministic components, • for visualization of AM gearbox-generated random components. As a benchmark method for REB diagnostics, envelope analysis enables detection of a repetition rate, at which families of structural, i.e. random components are induced. Moreover, envelope analysis enables visualization of additional amplitude modulation of this pattern, e.g. for faulty, rotating bearing inner race [2]. In case of gearbox diagnostics, where modulations of different type could be present (i.e. amplitude modulation AM, frequency modulation FM, and phase modulation PM), envelope analysis refers to AM modulations explicitly, and might accept two scenarios. In first scenario, envelope analysis enables clear visualization of AM components, like gear mesh frequency (GMF) sidebands. In opposite to REB diagnostics, where the carrier signal is random, for gearbox diagnostics, the carrier signal, i.e. the GMF, is deterministic. In second scenario, where gearbox fault generates pulses carried by high frequency structural noise, the diagnostic methodology is pretty much the same as in the case of REBs. Table 4.3 summarizes abovementioned statements with respect to the class of both, modulated and modulating components. At this stage, it is important to point out that the envelope calculations settings are different depending on the diagnostic purpose. For REB diagnostics and such gearbox failures, which induce structural frequencies, it is recommended to high-pass (in particular cases band-pass) filter the signal, in order to remove all phase-locked components, i.e. all components, which are related to speed. On the other hand, for the purpose of diagnostics gearbox failures, which generate
4.3 Combined Processing Algorithms
111
Table 4.3 Classification of typical components analyzed with signal envelope Mechanical element
Class of modulated (carrier) signal
Modulating signal
REB with local fault
Random (family of numerous narrowband noise corresponding to structural frequencies of housings of bearings)
Healthy gearbox
Determinisc, phase-locked GMF with harmonics
Faulty gearbox
Any of determinisc, phase-locked harmonics of GMF
Determinisc series of harmonic components of REB characterisc fault frequency Determinisc sinusoid (one for top, one for boom of carrier) represenng speed of shas Series of determinisc harmonics of sinusoids (one for top, one for boom of carrier) represenng speed of shas
Faulty gearbox
Random (family of numerous narrowband noise corresponding to structural frequencies of gear wheels and a housing of a gearbox)
Deterministic series of harmonic components of gearbox characterisc fault frequency
sideband amplitude modulations of GMFs, filtering must not cancel out GMFs of interest. It is actually common to band pass a vibration signal around these GMFs, when other components are considered as disturbances or as noise. Envelope Calculation Techniques This book covers classical, time-domain-filtering-based method and frequencydomain method using Hilbert Transform (HT). The latter solution is especially attractive, where perfect cutoff frequencies or where narrowband filtering is desired. Thus, the signal processing path within envelope analysis might be different for individual vibration sources, which typically is reflected in different envelope calculation algorithms. Following sections firstly describe MATLAB® ready-to-use, envelope analysis-oriented tools. Secondly, a simple, classical example is illustrated. Tertiary, analytical considerations regarding various envelope calculation techniques are described. As a result, a general, user envelope calculation function is proposed. In the remaining part, spectral examples are illustrated using a synthetic signal introduce in Chap. 7. Each example refers to a different, yet equally common path.
4.3.1.2
MATLAB® Documentation and Functions
MATLAB® R2019b includes at least five major documentation topics on REB-oriented envelope analysis, which are summarized in Table 4.4. These documents are a valuable reference for the subject of envelope analysis.
112
4 Signal Processing Algorithms
Selected functions, which MATLAB® within envelope analysis include mainly: • function • function • function
envelope , kurtogram, envspectrum .
Table 4.4 Selected MATLAB® documentation sources on REB-oriented envelope analysis
4.3 Combined Processing Algorithms
113
A complete documentation on these functions is available offline in MATLAB® help and on MathWorks® website. As a supplementary material to the abovementioned documentation, following sections illustrate how to write low-level enveloping functions, which could serve as a prototype for CMS development. NOTE: It is highly recommended to read the introductory Section on Resampling (Sect. 4.2.2) prior to the following Sections.
4.3.1.3
Step-by-Step Classical Time-Domain Signal Envelope Example
Classical calculation of the envelope signal from vibration signal involves following operations (exactly in this order): • high-pass signal filtering, • signal rectification, • low-pass signal filtering. High pass filtering is used to remove phase-locked components, like shaft harmonics, gear mesh frequencies, blade pass frequencies, and other frequencies, which are typically in a frequency range below structural frequencies. Note that such signal is a basis for so-called Peak Vue™ analysis.7 Rectification is used mainly for three reasons. Firstly, it provides a more accurate shape for the low pass filter. Secondly, it reduces the signal for envelope calculation to its positive values, which makes the implementation of the low-pass filtering really easy. Last, but not least, it limits the signal modulation to one side, which significantly simplifies its processing.
Fig. 4.33 Time waveform of pulses generated by a faulty REB
7
See https://www.emerson.com/documents/automation/white-paper-peakvue-analysis-for-antifrictionbearing-fault-detection-ams-en-39106.pdf or http://by.genie.uottawa.ca/*liang/Facilities_files/Equipment/ IMI%20bearing%20fault%20detector/PeakVu%20and%20other%20IMI%20documents/ConferenceIMI.pdf.
114
4 Signal Processing Algorithms
Low-pass filtering retrieves the repetition rate of the pulses, which is not present as individual frequency component in the signals. Moreover, the low-pass filter theoretically cancels the original structural (high) frequencies. As a result, the spectrum of the envelope signal shows just the repetition rate of pulses. The common presence of harmonic components in envelope spectrum is explained in Sect. 3.6. Figure 4.33 illustrates synthetic REB-induced pulses and three consecutive shaft harmonics. Figure 4.33 is generated by following code: my_position y_lim_tv y_lim_s x_lim_tv x_lim_s
= = = = =
[100 300 500 200]; [-5 5]; [0 1.1]; [0 0.05]; [0 6000];
% USER figure size % common display ranges
% General parameters and variables fs = 25e3; % USER sampling frequency T = 1; % USER signal total time dt = 1/fs; % time resolution N = T*fs; % total number of samples in the signal t = dt:dt:T; % time vector of the entire signal df = 1/T; % spectral resolution ax = 0:df:fs/2; % frequency axis % Low-frequency shaft harmonics A = [1 .75 .5]; f = 100*(1:3);
% Shaft harmonic amplitudes % Shaft harmonic frequencies
Shaft = A(1)*sin(2*pi*f(1)*t) + ... A(2)*sin(2*pi*f(2)*t) + ... A(3)*sin(2*pi*f(3)*t); % High frequency REB-induced pulses Ac = 5; % USER carrier amplitude fc = 4000; % USER carrier frequency fp = 250; % USER frequency of pulses dr = -.5*fc; % USER pulse decaying rate Tp = 1/fp; % total time of a single pulse tp = dt:dt:Tp; % time vector of a single pulse n = length(tp); % length of one pulse (in No. of points) p = exp(dr*tp)*Ac.*sin(2*pi*fc*tp); % single pulse No_pulses = ceil(N/n)+1; REB = repmat(p,1,No_pulses); REB = REB(1:N); % Construct final signal sig = Shaft + REB; % Plot time signal figure('Position',my_position); plot(t,sig); xlabel('Time [s]'); ylabel('Amplitude'); xlim([x_lim_tv(1) x_lim_tv(2)]); ylim([y_lim_tv(1) y_lim_tv(2)]); set(gca,'XTick',[0:0.01:0.05]); set(gca,'fontsize',8);
% extra pulse for boundary conditions % replicate and tile pulses % trim part of last pulse if necessary
4.3 Combined Processing Algorithms
115
Fig. 4.34 Full-resolution spectrum (USER zoom)
Note, advanced techniques for generation signals containing REB-induced pulses are given in Sect. 6.3. Figure 4.34 illustrates a full-resolution spectrum of the generated signal. Note that the 4 kHz carrier frequency is deterministic (synthetic); therefore, the REB-induced sidebands are clearly visibly. Additionally, Fig. 4.34 illustrated three dominant, low-frequency shaft harmonics. Figure 4.34 is calculated and displayed with following code: % Calculate spectrum of the raw signal Y_sig = abs(fft(sig)); Y_sig = Y_sig(1:N/2+1)/(N/2); % Plot spectrum figure('Position',my_position); plot(ax,Y_sig); grid on; xlim([x_lim_s(1) x_lim_s(2)]); ylim([y_lim_s(1) y_lim_s(2)]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
Next, Figs. 4.35 and 4.36 illustrate time waveform and a full-resolution spectrum of high-pass filtered signal.
Fig. 4.35 HP-filtered signal
116
4 Signal Processing Algorithms
Fig. 4.36 HP-filtered signal spectrum
Note that after HP filtering, the low-frequency Shaft harmonic components are removed, and the spectrum contains practically only faulty REB-induced components. Figures 4.35 and 4.36 are generated and displayed with following code: % FILTER SIGNAL HP HP_cutoff = 2000; % USER HP cutoff frequency [Hz] [b1,a1] = butter(4,HP_cutoff/(fs/2),'high'); % calculate HP filter coeff. sig_HP = filter(b1,a1,sig); % filter the signal with HP % Plot HP time signal figure('Position',my_position); plot(t,sig_HP); xlabel('Time [s]'); ylabel('Amplitude'); xlim([x_lim_tv(1) x_lim_tv(2)]); ylim([y_lim_tv(1) y_lim_tv(2)]); set(gca,'XTick',[0:0.01:0.05]); set(gca,'fontsize',8); % Calculate HP signal spectrum Y_sig_HP = abs(fft(sig_HP)); Y_sig_HP = Y_sig_HP(1:N/2+1)/(N/2); % Plot HP signal spectrum figure('Position',my_position); plot(ax,Y_sig_HP); grid on; xlim([x_lim_s(1) x_lim_s(2)]); ylim([y_lim_s(1) y_lim_s(2)]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
Next, Figs. 4.37 and 4.38 illustrate time waveform and a full-resolution spectrum of LP-filtered absolute value of the previously HP-filtered signal. Note that the pulses are transformed into a set of sinusoidal harmonic components.
4.3 Combined Processing Algorithms
117
Fig. 4.37 Time waveform of a HP-filtered signal and LP-filtered signal
Fig. 4.38 LP-filtered signal with HP-filtered reference and corresponding envelope spectrum
Note the important envelope feature—the spacing of REB-induced characteristic components in the envelope spectrum is exactly the same as spacing of sidebands around the carrier frequency in the regular spectrum (see Fig. 4.36). Figures 4.37 and 4.38 are generated and displayed using following code:
118
4 Signal Processing Algorithms
% FILTER SIGNAL LP LP_cutoff = 500; % USER LP cutoff frequency [Hz] [b2,a2] = butter(4,LP_cutoff/(fs/2),'low'); % calculate HP filter coeff. sig_LP = filter(b2,a2,abs(sig_HP)); % filter the signal abs with LP % Plot LP time signal figure('Position',my_position); plot(t,sig_HP); hold on; plot(t,sig_LP,'LineWidth',1); legend('HP','LP'); xlabel('Time [s]'); ylabel('Amplitude'); xlim([x_lim_tv(1) x_lim_tv(2)]); ylim([y_lim_tv(1) y_lim_tv(2)]); set(gca,'XTick',[0:0.01:0.05]); set(gca,'fontsize',8); % Calculate LP signal spectrum Y_sig_LP = abs(fft(sig_LP)); Y_sig_LP = Y_sig_LP(1:N/2+1)/(N/2); % Plot LP signal spectrum figure('Position',my_position); plot(ax,Y_sig_LP,'Color',[.85 .325 .098]); grid on; xlim([x_lim_s(1) x_lim_s(2)]); ylim([y_lim_s(1) y_lim_s(2)]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
4.3.1.4
Analytical Considerations
The above example refers to processing of a stationary signal entirely in time domain and displaying its full-resolution spectra in Hz units. However, in practical CMS processing, three other major paths need to be considered. This complete set of four possible paths within calculation of Envelope signal and Envelope Spectrum is illustrated in Fig. 4.39. Figure 4.39 illustrates four pairs of major paths for calculation of signal envelopes and corresponding spectra: • PATH 1: TD-filtered envelope signal and its spectrum • PATH 2: FD-filtered envelope signal and its spectrum (with reduced parameters) • PATH 3: TD-filtered envelope of resampled signal and its order spectrum • PATH 4: FD-filtered envelope of resampled signal and its order spectrum (with reduced parameters) Individual PATHS are described below. PATH 1 is considered to be a so-called “classical” envelope calculation. This technique uses subsequent HP signal filter, signal rectification (absolute value), and signal LP filtering. Therefore, it is relatively easily design with RLC electrical
4.3 Combined Processing Algorithms
119
Fig. 4.39 Common envelope-based signal processing paths
circuits. For digital realizations, it is commonly implemented with a pair of 4-th order Butterworth IIR filters. For typical rotary machinery, when this path is used, the HP cutoff frequency is set from 1 to 4 kHz, while the LP cutoff frequency is set to 500 Hz. As a general rule, the LP cutoff frequency should be higher than the frequency of the highest harmonic in the envelope signal. This path is the only case, where all signal acquisition parameters remain unchanged. PATH 2 is used when enveloping of a signal filtered with perfect-edge cutoff frequencies is desired. This is generally convenient, plus it is useful to deal with detrimental high-frequency components. Moreover, it is commonly used to demodulate around deterministic carrier frequencies (like GMF). Since it requires FFT and IFFT operations, it requires digital libraries. Note that in this path the frequency range is defined similarly to band-pass filtering; however, it is not—it refers to Hilbert Transform of a signal defined by this frequency range. As a result, the envelope signal has fewer samples than the original signal, while its total time remains unchanged. Consequently, the time resolution of the envelope signal and the frequency range of its envelope frequency spectrum are reduced (more precisely, points in time waveform are more separated, while the envelope frequency spectrum has lower range).
120
4 Signal Processing Algorithms
PATH 3 is realized like PATH 1 for previously resampled signal. Recalling from Sect. 4.3.4, for machinery working with variable speed, a phase marker (PM) signal is collected in parallel to a vibration signal. Such PM signal represents instantaneous rotational (referential) machine speed. The resultant envelope signal is generated with respect to angle (expressed as consecutive rotations). The resultant envelope order spectrum (EOS) is with respect to consecutive orders. Note that the spectral resolution is equal to the reciprocal of the number of rotations (in this book Table 4.5 Modification of signal parameters with respect to envelope calculation technique and signal type PATH No. 1
2
3
4
Filtering domain Time (Buerworth)
Frequency (Hilbert)
Angle (Buerworth)
Order (Hilbert)
INPUT parameters HP_cutoff [Hz] LP_cutoff [Hz] fs
bandwidth_start [Hz] bandwidth_stop [Hz] fs
HP_cutoff [ord] LP_cutoff [ord] Nsamp
bandwidth_start [ord] bandwidth_stop [ord] Nsamp
Scalar values modiications fs = const T = const N = const
fs_new = (N_new/N) · fs T = const N_new (new number of points in the signal)
Nsamp (user) = const Nrot = const Nres = const
Nsamp_new = (Nres_new/Nres) · Nsamp Nrot = const Nres_new (new number of points in the signal)
Time/angle and spectral axis modiications TIME AXIS [s] dt = 1/fs t = dt:dt:T FREQUENCY AXIS [Hz] df = 1/T (also fs/N) f = 0:df:fs/2 NOTE: all parameters remain unchanged TIME AXIS [s] dt_new = 1/fs_new t_new = dt_new : dt_new : T FREQUENCY AXIS [Hz] df = 1/T (also fs_new/N_new) f_new = 0:df: fs_new/2 NOTE: spectral resoluon the same as in PATH 1, but smaller frequency range ANGLE AXIS [rotaons] d_rot = 1/Nsamp rot = d_rot:d_rot:Nrot ORDER AXIS [ord] d_ord = 1/Nrot (also Nsamp/Nres) ord = 0:d_ord:Nsamp/2 NOTE: Nres is the No. of points in resampled signal (Nrot*Nsamp) ANGLE AXIS [rotaons] d_rot_new = 1/Nsamp_new rot_new = d_rot_new : d_rot_new : Nrot ORDER AXIS [ord] d_ord = 1/Nrot (also Nsamp_new/Nres_new) ord_new = 0:d_ord: Nsamp_new/2 NOTE: spectral resoluon the same as in PATH 3, but smaller order range
4.3 Combined Processing Algorithms
121
noted as Nrot), while the spectral range is equal to the half of the user-selected new number of samples per rotation (in this book noted as Nsamp). PATH 4 is a composition of PATH 2 and PATH 3, namely, the signal envelope and spectrum calculation technique is taken from path No. 2, while the resampled source signal is the same as in PATH 3. As a result, the envelope of the resampled signal has fewer samples than the resampled signal, while its total number of rotations remains unchanged. Consequently, the angular resolution of the envelope of resampled signal and the order range of its envelope order spectrum are reduced (more precisely, points in angle-domain waveform are more separated, while the envelope order spectrum has lower range). Consider a vibration signal sampled with a sampling frequency fs, and N total number of points. Thus, the signal total length T equals N/fs seconds. Naturally, the signal covers some non-integer number of rotations. After resampling, the signal is trimmed to integer number offull rotations (or revolutions) Nrot and has a new, constant number of samples per rotation Nsamp with a new total number of samples Nres = Nrot Nsamp. During signal envelope and corresponding spectrum calculations, these parameters might experience some changes, which are summarized in Table 4.5. For each PATH and corresponding filter domain, the Table gives a list of parameters, which are used. Next, the Table shows, which signal parameters are changed during processing, and which remain constant. Finally, for each path, the Table gives a formula for corresponding frequency or order spectrum abscissa scale. Most important remarks concerning practical implementation of these paths are given as comments in the Table. In case of frequency-domain filtering technique using Hilbert transform, one does not define filter cutoff frequencies, but frequency (or order) range, from which analytical signal is generated. As a general rule, this frequency range should cover as much as possible of the frequency range of structural responses; yet, the signal in this range should be free from detrimental deterministic components. Commonly, this means that the range is from some frequency (or order) to the Nyquist frequency (fs/2 or Nsamp/2). Worth noting, this starting frequency could be the same as the HP cutoff frequency for time-domain filtering, e.g. corresponding to 1–4 kHz (here the average speed could be used for conversion). Note that the listed domains are additionally characterized by following relationship: Time domain signal [s]
FFT
Frequency domain signal [Hz]
Angle domain signal (i.e. resampled signal) [rot]
FFT
Order domain signal [ord]
Following section presents a user general function, which calculates signal envelope. This function is based on Table 4.5. 4.3.1.5
General Envelope Calculation Function
Following function enables realization of all four common paths presented in the previous section. For PATHS 1 and 2, the function accepts scalar input parameters
122
4 Signal Processing Algorithms
in [Hz] units. For PATHS 3 and 4, the function accepts scalar parameters in [order] units. Additionally, for paths 2 and 4, which use Hilbert Transform, the function returns selected reduced signal parameter, namely new sampling frequency fs for path 2 and new number of samples per rotation Nsamp for PATH 4. function [x_env,out] = Generate_envelope(x,domain,f1,f2,f3) % DESCRIPTION % The function calculates envelope signal. The envelope could be calculated % in 4 different ways, i.e. in time domain or in frequency domain, for % both, resampled and non-resampled data. % % % %
REFERENCE Ho D., Randall R. B.: Optimization of bearing diagnostics techniques using simulated and actual bearing fault signals, Mechanical Systems and Signal Processing, Vol. 14, 2000.
% % % % %
INPUT For Time/Angle Domain filtering (Butterworth): f1 - High Pass filter cutoff frequency [Hz] or order [ord] f2 - Low Pass filter cutoff frequency [Hz] or order [ord] f3 - sampling frequency [Hz] or number of samples per rotation [Nsamp]
% % % %
For Frequency/Order Domain filtering (Hilbert Transform): f1 - bandwidth starting frequency [Hz] or order [ord] f2 - bandwidth ending frequency [Hz] or order [ord] f3 - sampling frequency [Hz] or number of samples per rotation [Nsamp]
% OUTPUT % x_env - envelope signal (same domain as "x"). NOTE: x_env is always even. % out - new sampling frequency (if changed) or new number of samples per % oration (if changed) if strcmpi(domain,'TD') [b,a] = butter(4,f1/(f3/2),'high'); x_HP = filter(b,a,x); [b,a] = butter(4,f2/(f3/2),'low'); x_env = filter(b,a,abs(x_HP)); elseif strcmpi(domain,'FD') res from till X
= = = =
f3/length(x); floor(f1/res); floor(f2/res)-1; fft(x);
% BAND SHIFTING shifted_spectrum = X(from:till-1);
% "-1" due to the "fence-post" rule
% AMPLITUDE DOUBLING AND ZERO-PADDING (Equivalent to Hilbert transform) shifted_spectrum = shifted_spectrum * 2; shifted_spectrum(end+1:length(shifted_spectrum)*2) = zeros; % TRANSFORMATION INTO COMPLEX ANALYTIC SIGNAL AND CALCULATE AMPLITUDES analytic_signal = ifft(shifted_spectrum); x_env = abs(analytic_signal); end out = length(x_env)/length(x) * f3;
% new "fs" or new "Nsamp" for 'FD'
A typical use of this function for each path is given in the next section.
4.3 Combined Processing Algorithms
4.3.1.6
123
PATH 1: Envelope Spectrum from Time-Domain Filtered Signal
This and following three sections use a synthetic signal simulating REB inner race fault (with rotating inner race). The signal is sampled with 25 kHz, lasts for 10 s, and the nominal speed is 50 Hz. A complete generation of this signal is given in Chap. 8 (signal index 250). Additionally, the signal is available under the name MODE_4_signal 0250.mat.8 Referring to Sect. 7.2, the faulty REB is placed on the so-called “Slow Shaft”, nominal speed of which is equal to 50 23/67 = 17.16 Hz. The nominal characteristic bearing BPFI order is 8.82 (with respect to the referential Fast Shaft), so the characteristic order is: 23/67 8.82 = 3.0278, and the characteristic frequency is 23/67 8.82 50 = 151.388 Hz. Figure 4.40 illustrates plots generated via PATH No. 1. Figure 4.40 illustrates both, the BPFI REB characteristic frequency with many harmonics, as well as Slow Shaft amplitude modulations (AM). Figure 4.40 is generated and plotted using following code:
Fig. 4.40 Envelope signal and envelope spectrum for PATH No. 1
8
Available @ http://home.agh.edu.pl/ajab/.
124
4 Signal Processing Algorithms
clear;close all;clc; load 'MODE_4_signal 0250.mat';
% available @ http://home.agh.edu.pl/~ajab/
% INPUT variables % data - vibration signal % PM - binary phase marker signal N T dt t
= = = =
length(data); N/fs; 1/fs; dt:dt:T;
% % % %
number of points in the original data total time of the original data [s] time resolution of the original data [s] time scale of the original data [s]
% ------ PATH 1: Envelope spectrum from time-domain filtered signal ------HP_cutoff = 4000; LP_cutoff = 500; x_env X X df f
= = = =
% USER HP filer cutoff frequency [Hz] % USER LP filer cutoff frequency [Hz]
= Generate_envelope(data,'TD',HP_cutoff,LP_cutoff,fs);
abs(fft(x_env-mean(x_env))); X(1:N/2+1)/(N/2); 1/T; 0:df:fs/2;
% spectral amplitudes % same as: df = fs/N % frequency axis
figure; subplot(211); plot(t,x_env); grid on; xlabel('Time [s]'); ylabel('Amplitude'); title('Time domain filtering: Envelope Signal (user ZOOM)'); set(gca,'fontsize',8); subplot(212);plot(f,X); grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Time domain filtering: Envelope Spectrum (user ZOOM)'); set(gca,'fontsize',8);
4.3.1.7
PATH 2: Envelope Spectrum from Frequency-Domain Filtered Signal
Figure 4.41 illustrates plots generated via PATH No. 2. Note that comparing with Fig. 4.40, the time waveform of the envelope has significantly different SNR. Both envelope spectra, although have different amplitude levels, practically have the same shape. Figure 4.41 is generated and plotted using following code:
4.3 Combined Processing Algorithms
125
Fig. 4.41 Envelope signal and envelope spectrum for PATH No. 2 % ---- PATH 2: Envelope spectrum from frequency-domain filtered signal ---% NOTE: Uses spectral resolution "df = 1/T" from PATH 1 band_start band_stop
= 4000; % USER Hilbert-based starting frequency [Hz] = fs/2; % USER Hilbert-based ending frequency [Hz]
[x_env,fs_new] = Generate_envelope(data,'FD',band_start,band_stop,fs); N_new X X dt_new t_new f_new
= = = = = =
length(x_env); abs(fft(x_env-mean(x_env))); X(1:N_new/2+1)/(N_new/2); 1/fs_new; dt_new:dt_new:T; 0:df:fs_new/2;
% No. of points REDUCED! % % % %
spectral amplitudes Time resolution REDUCED! new time base Spectral range REDUCED!
figure; subplot(211); plot(t_new,x_env); grid on; xlabel('Time [s]'); ylabel('Amplitude'); title('Hilbert FD filtering: Envelope Signal (user ZOOM)'); set(gca,'fontsize',8); subplot(212); plot(f_new,X); grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Hilbert FD filtering: Envelope Spectrum (user ZOOM)'); set(gca,'fontsize',8);
126
4.3.1.8
4 Signal Processing Algorithms
PATH 3: Envelope Order Spectrum from Angle-Domain Filtered Signal
Figure 4.42 illustrates plots generated via PATH No. 3. Most of all, the envelope spectrum has practically the same shape as both previous spectra. Note that comparing with Figs. 4.40 and 4.41, the envelope signal in angular domain demonstrates periodical AM of the BPFI REB characteristic frequency slightly worse; however, the Envelope Order Spectrum (EOS) has clear AM sidebands. Figure 4.42 is generated and plotted using following code:
Fig. 4.42 Envelope signal and envelope spectrum for PATH No. 3
4.3 Combined Processing Algorithms
% % % %
127
--- PATH 3: Envelope order spectrum from angle-domain filtered signal --Uses following variables from PATH 1: HP_cutoff [Hz] LP_cutoff [Hz]
Nsamp = round(2 * mean(diff(find(PM)))); % double average Nsamp if mod(Nsamp,2) Nsamp = Nsamp + 1; end
% force even number of points
[Xres,Nrot] = Resample_signal_simplified(data,PM,fs,Nsamp); HP_cutoff LP_cutoff
= HP_cutoff * Nsamp/fs; = LP_cutoff * Nsamp/fs;
% transform [Hz] to [ord] (average) % transform [Hz] to [ord] (average)
x_env
= Generate_envelope(Xres,'TD',HP_cutoff,LP_cutoff,Nsamp);
Nres = length(Xres); X = abs(fft(x_env-mean(x_env))); X = X(1:Nres/2+1)/(Nres/2);
% different No. of points
d_rot = 1/Nsamp; rot = d_rot:d_rot:Nrot;
% angular resolution % counterpart of "t = dt:dt:T";
d_ord = 1/Nrot; ord = 0:d_ord:Nsamp/2;
% order resolution, also Nsamp/Nrot % order axis
% spectral amplitudes
figure; subplot(211); plot(rot,x_env); grid on; xlabel('Angle [Rotations]'); ylabel('Amplitude'); title('Angle domain filtering: Envelope of Resampled Signal (user ZOOM)'); set(gca,'fontsize',8); subplot(212); plot(ord,X); grid on; xlabel('Order'); ylabel('Amplitude'); title('Angle domain filtering: Envelope Order Spectrum (user ZOOM)'); set(gca,'fontsize',8);
4.3.1.9
PATH 4: Envelope Order Spectrum from Order-Domain Filtered Signal
Figure 4.43 illustrates plots generated via PATH No. 4.
128
4 Signal Processing Algorithms
Fig. 4.43 Envelope signal and envelope spectrum for PATH No. 4
Like in previous case, the envelope spectrum has practically the same shape as all previous spectra; just the amplitude level is different. Comparing with plots corresponding to PATH 1–3, the envelope signal in angular domain does not clearly demonstrate periodical AM of the BPFI REB characteristic frequency; however, the spectrum has clear AM sidebands. Figure 4.43 is generated and plotted using following code:
4.3 Combined Processing Algorithms
129
% --- PATH 4: Envelope order spectrum from order-domain filtered signal --% Uses following variables from PATH 2: % band_start [Hz] % band_stop [Hz] % % % %
Uses following variables from PATH 3: Nsamp Xres Nrot
band_start band_stop
= band_start * Nsamp/fs; = band_stop * Nsamp/fs;
% transform [Hz] to [ord] (average) % transform [Hz] to [ord] (average)
[x_env,Nsamp_new] = ... Generate_envelope(Xres,'FD',band_start,band_stop,Nsamp); Nres_new = length(x_env); % different "Nres" vs. PATH 3 X = abs(fft(x_env-mean(x_env))); X = X(1:Nres_new/2+1)/(Nres_new/2); % spectral amplitudes d_rot_new = 1/Nsamp_new; rot_new = d_rot_new:d_rot_new:Nrot;
% angular resolution % counterpart of "t = dt:dt:T";
d_ord ord_new
% order resolution, also Nsamp/Nrot % order axis
= 1/Nrot; = 0:d_ord:Nsamp_new/2;
figure; subplot(211); plot(rot_new,x_env); grid on; xlabel('Angle [Rotations]'); ylabel('Amplitude'); title('Hilbert FD filtering: Envelope of Resampled Signal (user ZOOM)'); set(gca,'fontsize',8); subplot(212); plot(ord_new,X); grid on; xlabel('Order'); ylabel('Amplitude'); title('Hilbert FD filtering: Envelope Order Spectrum (user ZOOM)'); set(gca,'fontsize',8);
4.3.1.10
Summary
Concluding, calculation of Envelope Spectrum (ES) from resampled signal, resulting in a so-called “Envelope Order Spectrum” (EOS) enables automatic tracking of clear, speed-independent characteristic orders. However, comparing a pair of Figs. 4.40 and 4.41 (frequency-domain calculations) with corresponding pair of Figs. 4.42 and 4.43 (order-domain calculations) this benefit is at the cost of some loss of envelope characteristic patterns in angle-domain versus time-domain, which take place during transformation from time-domain to angle-domain.
130
4 Signal Processing Algorithms
4.3.2
Velocity and Displacement Spectrum from Acceleration Signal
4.3.2.1
Overview
Currently, most of vibration signals are recorded as acceleration due to versatile features of accelerometers, both, classical piezoelectric and modern MEMS designs. In some cases, however, it is recommended to use velocity signal, which needs to be generated synthetically from acceleration digital data. Velocity signals are especially useful to analyze relatively low-frequency components, like shaft components. Worth mentioning, velocity spectrum is generally a poor choice for analysis of structural resonances, like REB diagnostics or cavitation diagnostics. Current section illustrates calculation of velocity spectrum in frequency domain and in order domain, i.e. from resampled signal. The calculations are illustrated with the use of simple simulated signals followed by real signal from rotary machinery working in non-stationary conditions. Additionally, the section covers so-called “omega arithmetics” as a quick way of velocity spectrum calculation directly in the frequency domain.
4.3.2.2
Algorithms in a Nutshell
A complete calculation and presentation of a velocity spectrum in the frequency domain involves following steps: (1) (2) (3) (4) (5) (6)
HP filtration (optional a priori DC component removal) Integration Scaling (acceleration-to-velocity) Calculation of spectral amplitudes (Hz) Calculation of spectral resolution (Hz) Velocity spectrum display.
Generally, steps 1 and 2 might be realized with use of different parameters or even with different techniques. In order domain, the algorithm is slightly extended, and includes following steps: (1) HP filtration (optional a priori DC component removal) (2) Integration (3) Scaling (acceleration-to-velocity)
4.3 Combined Processing Algorithms
(4) (5) (6) (7)
131
Resampling Calculation of spectral amplitudes (order domain) Calculation of spectral resolution (order domain) Velocity spectrum display (order domain).
Individual operations, which could be treated independently, are described below. Note that in some cases, they refer to signal processing techniques introduced earlier in this Chapter; therefore, corresponding references are given.
4.3.2.3
Signal Processing Blocks
4.3.2.3.1 HP Filtration Filtering functions are described in details in Sect. 4.2.1. Modern vibration-based CMS frequently take advantage of the DSP libraries, and use frequency domain filtering. Within the current Chapter, the function Filter_signal_HP from Sect. 4.2.1.7 is used: function % INPUT % x % fs % cutoff
[x] = Filter_signal_HP(x,fs,cutoff) - vector of real time signal – sampling frequency – High pass filter cutoff frequency
% OUTPUT % x - vector of integrated real time signal
Naturally, in each case, frequency-domain filtering could be replaced by time-domain filtering using various techniques described in Sect. 4.2.1. The comparison of frequency-domain filtering and time-domain filtering within velocity spectrum generation is demonstrated in Sect. 4.3.2.
4.3.2.3.2 Integration As mentioned in Sect. 4.2.3, integration could be performed in many formalized ways [1]. However, for diagnostic purposes, a simple method could be used, because individual integration technique has typically less influence on the final “shape” of Velocity Spectrum than other parts of the algorithm. This simplified integration is also given in Sect. 4.2.3: function [xInt] = Calculate_Integrated(x,fs) % INPUT % x - vector of real time signal % OUTPUT % x - vector of integrated real time signal
132
4 Signal Processing Algorithms
A comparison of this rectangular integration with the so-called “omega arithmetics” is given at the end of this section.
4.3.2.3.3 Signal Scaling The acceleration signals are either expressed in [g] or in [m/s^2]. The first unit comes directly from the electrical characteristics of accelerometers, which are described by the so-called “sensitivity”—expressed in [mV/g]. The latter one, on the other hand, is the only unit, which is included in the worldwide International System of Units (SI), so in a sense is the only “legal” unit. The velocity signal is expressed in [mm/s]. Sometimes, the velocity-based values are further modified, like “Velocity RMS”, which means that each velocity value is post-processed. Acceleration signal in [g] units is converted to [mm/s] according to following equation: 1g ¼ 9:81
m mm mm ¼ 9:81 1000 2 ¼ 9810 2 ; s2 s s
which is expressed in MATLAB® simply as: x_scaled = 9.81*1000*x; % convert [g] to [mm/s^2]
Note that the integration changes
1 s2
to 1s .
4.3.2.3.4 Resampling Signal resampling is additionally used when Velocity Spectrum is calculated in the order domain. A complete, simplified resampling function in a form: function [Xres,Nrot] = Resample_signal_simplified(x,PM,fs,Nsamp) % INPUT % x - time signal % PM - phase marker binary vector % fs - sampling frequency % Nsamp - new number of samples per rotation (optional) % OUTPUT % Xres - resampled signal % Nrot - number of full rotations
is given in Sect. 4.2.2.4.
4.3 Combined Processing Algorithms
133
4.3.2.3.5 Calculation of Spectral Amplitudes When Velocity spectrum is calculated in frequency domain, the spectral amplitudes are for instance calculated in usual way: Y = fft(x); N = length(Y); Y = abs(Y(1:N/2))/(N/2); % spectral, scaled amplitudes
For Velocity spectrum calculated in the order domain, the spectral amplitudes are calculated practically in the same way: Y = fft(Xres_closed); N = length(Y); Y = abs(Y(1:N/2))/(N/2); % spectral, scaled amplitudes
4.3.2.3.6 Calculation of Spectral Resolution When Velocity spectrum is calculated in frequency domain, the spectral resolution is calculated in usual way: resolution = 1/T or fs/length(x);
Likewise, when Velocity spectrum is calculated in order domain, the spectral resolution is calculated in following way: resolution = 1/Nrot or Nsamp/length(Xres);
Having the resolution and the Y variables, both, velocity spectrum in the frequency domain as well as velocity spectrum in the order domain could be plotted. Next section illustrates examples of calculations of Velocity spectra.
134
4 Signal Processing Algorithms
4.3.2.4
Examples
4.3.2.4.1 List of Signals In this section, three examples for velocity spectrum visualization are considered: Simulated signal sig1: • • • •
sampling frequency: length: content: constant speed:
25 kHz 10 s sinusoidal component (A = 7, f = 100 Hz, phase shift = 0) YES
Simulated signal sig2: • sampling frequency: • length: • content:
25 kHz 10 s sinusoidal component (A = 7.13, f = 97.23 Hz, phase shift = 0) NO (random fluctuations around 97.23 Hz “nominal speed”)
• constant speed: Real signal vibstand.mat9: • • • •
sampling frequency: length: content: constant speed:
25kHz, 13 s real NO
4.3.2.4.1 Single Sinusoidal Component First example illustrates calculation of a velocity spectrum in frequency domain of a basic sinusoidal component with amplitude 7 and frequency 100 Hz. The resultant spectra are illustrated in Fig. 4.44. Note that for the sinusoidal component sig1 ¼ 7 sinð2 p 100 tÞ, the corresponding amplitude in velocity spectrum is calculates as: 7
9
1 9:81 1000 ¼ 109:2917 2 p 100
Available @ http://home.agh.edu.pl/ajab/.
4.3 Combined Processing Algorithms
135
Fig. 4.44 Acceleration and velocity spectrum of signal sig1
A complete source code for this test is given below: % ----------------% Data parameters fs = 25e3; T = 10; dt = 1/fs; t = dt:dt:T; N = length(t);
Simulated signal "sig1" --------------------% % % % %
USER sampling frequency USER total signal length time resolution time axis number of points in the signal
% Generate and process data sig1 = 7 * sin (2*pi*100*t); sig1_HP_02 = Filter_signal_HP(sig1,fs,2); sig1_Int_02 = Calculate_Integrated(sig1_HP_02,fs); sig1_Int_02_scaled = 9.81*1000*sig1_Int_02;
% % % %
generate filter HP (2Hz) integrate scale
% Calculate spectral amplitudes (acceleration and velocity) Y_Acc = fft(sig1); Y_Acc = abs(Y_Acc(1:N/2+1))/(N/2); Y_Vel = fft(sig1_Int_02_scaled); Y_Vel = abs(Y_Vel(1:N/2+1))/(N/2); % Display acceleration spectrum and velocity spectrum (zoom) df = fs/N; f = 0:df:fs/2; figure; subplot(121); plot(f,Y_Acc); ylabel('Acceleration [g]'); set(gca,'fontsize',8);
title('sig1 - Acceleration Spectrum'); xlabel('Frequency [Hz]'); xlim([0 110]);
subplot(122); plot(f,Y_Vel,'r'); title('sig1 - Velocity Spectrum'); ylabel('Velocity [mm/s^2]'); xlabel('Frequency [Hz]'); set(gca,'fontsize',8); xlim([0 110]); ylim([0 120]); % ------------------------- END ------------------------------
136
4 Signal Processing Algorithms
Fig. 4.45 Acceleration and velocity spectrum of signal sig2
4.3.2.4.3 Variable Speed Component The next example considers a sinusoidal component with non-integer amplitude and frequency values plus some frequency modulation (simulating speed fluctuation). The resultant spectra are illustrated in Fig. 4.45. Note that for the sinusoidal component with a nominal speed, sig2 ¼ 7:13 sinð2 p 97:23 tÞ, the corresponding amplitude in velocity spectrum is calculates as: 7:13
1 9:81 1000 ¼ 114:4929 2 p 97:23
which is almost equal to the amplitude of the component in Fig. 4.45. A complete source code for this test is given below:
4.3 Combined Processing Algorithms
% ----------------% Data parameters fs = 25e3; T = 10; dt = 1/fs; t = dt:dt:T; N = length(t);
137
Simulated signal "sig2" --------------------% % % % %
USER sampling frequency USER total signal length time resolution time axis number of points in the signal
FM_m = 9; profile = sin(2*pi*.5*t);
% USER speed fluctuation (i.e. FM) coefficient % USER speed fluctuation (i.e. FM) profile
% Generate and process data sig2 = 7.13 * sin(2*pi*97.23*t + 2*pi*FM_m*(cumsum(profile)*dt)); sig2_HP_02 = Filter_signal_HP(sig2,fs,2); % filter HP (2Hz) sig2_Int_02 = Calculate_Integrated(sig2_HP_02,fs); % integrate sig2_Int_02_scaled = 9.81*1000*sig2_Int_02; % scale % Resample acceleration and velocity signals % NOTE: The Nrot value is the same for Acc and Vel signals, so it is % calculated only once PM = Get_phase_markers(sig2); % see Section 4.4.4.2.2 [sig2_Res,Nrot] = Resample_signal_simplified(sig2,PM,fs); % Section 4.2.2.4 [sig2_Res_02] = Resample_signal_simplified(sig2_Int_02_scaled,PM,fs); % Auxiliary variables % NOTE: The Nres value is the same for Acc and Vel signals, so it is % calculated only once Nres = length(sig2_Res); % number of points in resampled signal Nsamp = Nres/Nrot; % number of samples per rotation (auto) % Calculate spectral amplitudes (acceleration and velocity) Y_res_Acc = fft(sig2_Res); Y_res_Acc=abs(Y_res_Acc(1:Nres/2+1))/(Nres/2); Y_res_Vel = fft(sig2_Res_02);Y_res_Vel=abs(Y_res_Vel(1:Nres/2+1))/(Nres/2); % Display acceleration spectrum and velocity spectrum (USER zoom) d_ord = 1/Nrot; % corresponding to "df" in sig1 ord = 0:d_ord:Nsamp/2; % corresponding to "f" in sig1 figure; subplot(121); plot(ord,Y_res_Acc); ylabel('Acceleration [g]'); set(gca,'fontsize',8);
title('sig2 - Velocity Spectrum'); xlabel('order'); xlim([0 1.5]);
subplot(122); plot(ord,Y_res_Vel,'r'); title('sig2 - Velocity Spectrum'); ylabel('Velocity [mm/s^2] [g]'); xlabel('order'); set(gca,'fontsize',8); xlim([0 1.5]); ylim([0 120]); % ------------------------- END --------------------------------
4.3.2.4.4 Real Rotary Machinery Signal The third example is a real signal from a Vibstand™ machinery. This example is used to illustrate the influence of the selection between two common HP cutoff frequencies used for velocity spectra calculations, namely:
138
4 Signal Processing Algorithms
Fig. 4.46 Comparison of the influence of HP cutoff frequency on velocity frequency spectrum
• cutoff frequency 1 = 2 Hz, • cutoff frequency 2 = 10 Hz. Both of these values come from the ISO vibration-based norm 20816 (former ISO 10816). The comparison is illustrated in Fig. 4.46 (frequency domain) and in Fig. 4.47 (order domain). Clearly, for many instances, the HP cutoff frequency is simply not enough, because the velocity signal in relatively low frequencies quickly gets high values. Note that for frequency-domain filtering (FDF) used in this example, the frequency content of both velocity spectra is, of course, the same; however, in order domain it
Fig. 4.47 Comparison of the influence of HP cutoff frequency on velocity order spectrum
4.3 Combined Processing Algorithms
139
is slightly different due to accepted order of operations, i.e. integration followed by resampling. A complete source code for this test is given below:
% ----------------- Real signal "sig3" --------------------% PART 1 - FREQUENCY DOMAIN load('vibstand.mat'); % available @ http://home.agh.edu.pl/~ajab/ fs = 25e3; % 25 kHz sampling freq. sig3 = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data
sig3_HP_02 sig3_HP_10
= Filter_signal_HP(sig3,fs,2); = Filter_signal_HP(sig3,fs,10);
% HP filter 2 Hz % HP filter 10 Hz
sig3_Int_02 = Calculate_Integrated(sig3_HP_02,fs); sig3_Int_10 = Calculate_Integrated(sig3_HP_10,fs);
% integrate % integrate
sig3_Int_02_scaled = 9.81*1000*sig3_Int_02; sig3_Int_10_scaled = 9.81*1000*sig3_Int_10;
% scale first signal % scale second signal
% Calculate spectral amplitudes N = length(sig3); Y = fft(sig3); Y = abs(Y(1:N/2+1))/(N/2);
% Acceleration - original signal
Y_02 = fft(sig3_Int_02_scaled); Y_02 = abs(Y_02(1:N/2+1))/(N/2); % Velocity Y_10 = fft(sig3_Int_10_scaled); Y_10 = abs(Y_10(1:N/2+1))/(N/2); % Velocity % Display two velocity spectra and reference acceleration spectrum (zoom) df = fs/N; f = 0:df:fs/2;
figure; yyaxis left; plot(f,Y); yyaxis right; plot(f,Y_02); plot(f,Y_10,'k.');
ylabel('Acceleration [g]'); hold on; ylabel('Velocity [mm/s^2]');
grid on; xlim([0 26]); ylim([0 1.4]); xlabel('Frequency [Hz]'); title('Frequency spectrum'); legend('Acceleration','Velocity HP: 2Hz','Velocity HP: 10Hz'); set(gca,'fontsize',8); % PART 2 - ORDER DOMAIN PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % phase markers % Resample acceleration and velocity signals % NOTE: The Nrot value is the same for Acc and Vel signals, so it is % calculated only once [sig3_Res,Nrot] = Resample_signal_simplified(sig3,PM,fs); % Section 4.2.2.4 [sig3_Res_02] = Resample_signal_simplified(sig3_Int_02_scaled,PM,fs); [sig3_Res_10] = Resample_signal_simplified(sig3_Int_10_scaled,PM,fs); % % Auxiliary variables % NOTE: The Nres value is the same for Acc and Vel signals, so it is % calculated only once Nres = length(sig3_Res); % number of points in resampled signal Nsamp = Nres/Nrot; % number of samples per rotation (auto)
140
4 Signal Processing Algorithms
% Calculate spectral amplitudes Y_res = fft(sig3_Res); Y_res = abs(Y_res (1:Nres/2+1))/(Nres/2); Y_res_02 = fft(sig3_Res_02); Y_res_02 = abs(Y_res_02(1:Nres/2+1))/(Nres/2); Y_res_10 = fft(sig3_Res_10); Y_res_10 = abs(Y_res_10(1:Nres/2+1))/(Nres/2); % Display two velocity spectra and reference acceleration spectrum (zoom) d_ord = 1/Nrot; % corresponding to "df" in sig1 ord = 0:d_ord:Nsamp/2; % corresponding to "f" in sig1 figure; yyaxis left; plot(ord,Y_res); ylabel('Acceleration [g]'); yyaxis right;plot(ord,Y_res_02); hold on; plot(ord,Y_res_10,'k.');ylabel('Velocity [mm/s^2]');grid on; xlim([0 .6]); ylim([0 1.4]); xlabel('Frequency [Hz]'); title('Order spectrum'); legend('Acceleration','Velocity HP: 2Hz','Velocity HP: 10Hz'); set(gca,'fontsize',8);
4.3.2.5
Influence of Filtering Domain
The signal processing paths illustrated so far in this section use a custom algorithm for signal filtering in the frequency domain. However, sometimes a time-domain classical filtering needs to be used. Thus, it is important to investigate how the final velocity spectrum differs according to the selected HP filtering domain. Figure 4.48 illustrates a comparison between TDF and FDF for both HP filters, 2 Hz cutoff frequency and 10 Hz cutoff frequency.
Fig. 4.48 Comparison of time domain and frequency domain filtering
4.3 Combined Processing Algorithms
141
As illustrated in Fig. 4.48, for both considered cutoff frequencies (2 and 10 Hz), time-domain filters with relatively small order (here order 4), might easily generate high velocity values for relatively low-frequency components. A complete source code for this test is given below: % ----------------- FDF vs. TDF --------------------load('vibstand.mat'); % Available @ http://home.agh.edu.pl/~ajab/ fs = 25e3; % 25 kHz sampling freq. sig3 = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data N = length(sig3); % number of points % Filter the signal in the frequency domain sig3_HP_02 = Filter_signal_HP(sig3,fs,2); sig3_HP_10 = Filter_signal_HP(sig3,fs,10); % Filter signal in time domain [b,a] = butter(4,2/(fs/2),'high'); sig3_HP_02_butter = filter(b,a,sig3); [b,a] = butter(4,10/(fs/2),'high'); sig3_HP_10_butter = filter(b,a,sig3); % % % %
% filter order 4, cutoff freq. 2Hz % filter order 4, cutoff freq. 10Hz
------------------------------------------------------------------------NOTE: When object-oriented filtering is used (for instance for 10 Hz cutoff frequency), like this:
% Fc % fo % h_10
= 10; % cutoff frequency 10 Hz = 4; % filter order: 4 = fdesign.highpass('N,F3dB', fo, Fc, fs);
% Hd_10 = design(h_10, 'butter'); % sig3_HP_10_butter = filter(Hd_10,sig3); % % % % %
% HP filter 2 Hz (FDF) % HP filter 10 Hz (FDF)
% filter the signal (TD)
Then, the resultant, filterd signal is slightly different than signal filtered using "butter" function. Worth mentioning, differences are clearly visible only for a few lowest frequencies of a full-resolution frequency spectrum. Practically, these differences are meaningless. -------------------------------------------------------------------------
% Integrate sig3_Int_02 sig3_Int_10 sig3_Int_02_butter sig3_Int_10_butter
= = = =
Calculate_Integrated(sig3_HP_02,fs); % FD-filt. signal Calculate_Integrated(sig3_HP_10,fs); % FD-filt. signal Calculate_Integrated(sig3_HP_02_butter,fs); % TD-filt. Calculate_Integrated(sig3_HP_10_butter,fs); % TD-filt.
% Scale sig3_Int_02_scaled sig3_Int_10_scaled sig3_Int_02_scaled_butter sig3_Int_10_scaled_butter
= = = =
9.81*1000*sig3_Int_02; % 9.81*1000*sig3_Int_10; % 9.81*1000*sig3_Int_02_butter;% 9.81*1000*sig3_Int_10_butter;%
% Calculate Y_02 Y_10 Y_02 Y_10
spectral amplitudes = fft(sig3_Int_02_scaled); = fft(sig3_Int_10_scaled); = abs(Y_02(1:N/2+1))/(N/2); = abs(Y_10(1:N/2+1))/(N/2);
Y_02_butter Y_10_butter Y_02_butter Y_10_butter
= = = =
fft(sig3_Int_02_scaled_butter); fft(sig3_Int_10_scaled_butter); abs(Y_02_butter(1:N/2+1))/(N/2); abs(Y_10_butter(1:N/2+1))/(N/2);
FD-filtered FD-filtered TD-filtered TD-filtered
sig. sig. sig. sig.
% FD-filtered signal % FD-filtered signal
% TD-filtered signal % TD-filtered signal
142
4 Signal Processing Algorithms
% Generate frequency axis df = fs/N; f = 0:df:fs/2; % Display spectra figure; subplot(211); hold on; grid on; plot(f,Y_02); plot(f,Y_02_butter,'--'); xlim([0 21]); ylim([0 1.5]); title('FDF vs. TDF (butter): 2Hz cutoff frequency'); ylabel('Velocity [mm/s^2]'); xlabel('Frequency [Hz]'); legend('FDF','butter'); set(gca,'fontsize',8); subplot(212); hold on; grid on; plot(f,Y_10); plot(f,Y_10_butter,'--'); xlim([0 21]); ylim([0 0.62]); title('FDF vs. TDF (butter): 10Hz cutoff frequency'); ylabel('Velocity [mm/s^2]'); xlabel('Frequency [Hz]'); legend('FDF','butter'); set(gca,'fontsize',8); % ------------------------- END -----------------------------------------
4.3.2.6
Omega Arithmetics
For quick velocity spectrum calculations, sometimes a so-called “Omega Arithmetics” is used, which comes directly from the analytical consideration of integration of a sinusoidal component, i.e.: Z A sinð2 p f Þdt ¼ A
1 cosð2 p f Þ 2pf
Clearly, for spectral analysis of velocity signal this means that the frequency “candidates” remain the same and that each velocity amplitude is calculated from acceleration spectrum using 1/(2*pi*f) coefficient. Figure 4.49 illustrates the comparison of a velocity spectrum calculated using FDF filtering and TD integration with the omega arithmetics algorithm. Clearly, for some cases, omega arithmetics requires a suitable manual selection of the initial frequency range to be neglected; otherwise, spectral components might quickly reach very high values (as frequency f approach 0, the coefficient approaches Inf). However, the omega arithmetics has the advantage of being a reverse operation.
4.3 Combined Processing Algorithms
143
Fig. 4.49 Omega Arithmetics versus filtering + integration
A complete source code for this test is given below: % ----------------- OMEGA ARITHMETICS DEMO --------------------load('vibstand.mat'); % Available @ http://home.agh.edu.pl/~ajab/ fs = 25e3; % 25 kHz sampling freq. sig3 = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data N = length(sig3); % number of points % Process data as already illustrated sig3_HP_02 = Filter_signal_HP(sig3,fs,2); % filter HP (2Hz) sig3_Int_02 = Calculate_Integrated(sig3_HP_02,fs); % integrate sig3_Int_02_scaled = 9.81*1000*sig3_Int_02; % scale Y_Vel = fft(sig3_Int_02_scaled); Y_Vel = abs(Y_Vel(1:N/2+1))/(N/2); % Vel. spectral values df = fs/N; % frequency resolution f = 0:df:fs/2; % frequency axis % Process data with "Omega Arithmetics" Y_Acc = fft(sig3); % Regular "acceleration" processing Y_Acc = abs(Y_Acc(1:N/2+1))/(N/2); % Acceleration spectral values f_omega = df:df:fs/2; Y_omega = Y_Acc(2:end)'./(2*pi*f_omega); Y_omega_scaled = 9.81*1000*Y_omega;
% "Omega" frequency axis % Omega Arithmetics % Scale Acc. to Vel.
% Compare velocity spectra (zoom) figure; hold on; grid on; plot(f,Y_Vel); plot(f_omega,Y_omega_scaled,'--'); xlim([0 21]); ylim([0 2.1]);
% USER zoom % USER zoom
title('Omega Arithmetics vs. filtering + integration'); ylabel('Velocity [mm/s^2]'); xlabel('Frequency [Hz]') legend('Filt + Int (2 Hz)','omega'); set(gca,'fontsize',8); % ------------------------- END --------------------------------
144
4 Signal Processing Algorithms
Following section illustrates further concept of “displacement spectrum”. 4.3.2.7
Displacements Spectrum
4.3.2.7.1 General Concept Sections 4.3.2.7.1–4.3.2.7.3 described how velocity frequency spectrum and velocity spectrum in order domain could be generated from a raw acceleration signal. The basic physical phenomenon used in both cases is the fact that velocity is the “integral” of the acceleration. Because analogously displacement is the “integral” of the Velocity, symbolically written as: Z Z mm Displacement½mm ¼ Velocity ¼ Acceleration½g s it seems possible to calculate the displacement performing another integration on the velocity signal. Note that the conversion from acceleration in [g] to velocity in [mm/s] included additional scaling due to conversions of units; this time it is not necessary. For conciseness, this section considers two cases: Simulated signal sig1: • • • • •
sampling frequency: length: content: constant speed: HP cutoff frequency:
25 kHz 10 s sinusoidal component (A = 7, f = 100 Hz, phase shift = 0) YES 2 Hz
Real signal vibstand.mat10: • • • • •
sampling frequency: length: content: constant speed: HP cutoff frequency:
25 kHz, 13 s real NO 10 Hz
Note that in case of displacement spectrum, it is recommended to verify the time characteristics of the signal, as well.
10
Available @ http://home.agh.edu.pl/ajab/.
4.3 Combined Processing Algorithms
145
4.3.2.7.2 Single Sinusoidal Component For the first example with sig1 (used previously for velocity spectrum, the amplitude of the single spectral component 7 sinð2 p f Þ is calculated as follows: Acc = 7; Vel = 7*1/(2*pi*100)*9810; Dis = Vel * 1/(2*pi*100);
% Vel == 109.2917 % Dis == 0.1739
Fig. 4.50 Displacement spectrum of sig1
146
4 Signal Processing Algorithms
Figure 4.50 illustrates time waveforms and spectral representations of Acceleration, Velocity, and Displacement signals. Figure 4.50 is generated using following code: % ----------------% Data parameters fs = 25e3; T = 10; dt = 1/fs; t = dt:dt:T; N = length(t);
Simulated signal "sig1" --------------------% % % % %
USER sampling frequency USER signal length time resolution time axis number of points in the signal
% Calculate Velocity signal sig1 = 7 * sin (2*pi*100*t); sig1_HP = Filter_signal_HP(sig1,fs,2); sig1_Int = Calculate_Integrated(sig1_HP,fs); sig1_Int_scaled = 9.81*1000*sig1_Int;
% % % %
generate filter HP (2Hz) integrate scale
% Calculate Displacement signal sig1_Int_Int = Calculate_Integrated(sig1_Int_scaled,fs); % Calculate spectral amplitudes Y_Acc = fft(sig1); Y_Vel = fft(sig1_Int_scaled); Y_Dis = fft(sig1_Int_Int);
% integrate
(acceleration, velocity, and displacement) Y_Acc = abs(Y_Acc(1:N/2+1))/(N/2); Y_Vel = abs(Y_Vel(1:N/2+1))/(N/2); Y_Dis = abs(Y_Dis(1:N/2+1))/(N/2);
% Display time waveforms subplot(211); yyaxis left; hold on; plot(t,sig1, '-','color',[0 ,.447,.741]); % Acc plot(t,sig1_Int_scaled, '-','color',[.85,.325,.098]); % Vel xlabel('Time [s]'); ylabel('Acc:[g] or Vel:[mm/s]'); set(gca,'YColor',[.15,.15,.15]); yyaxis right;
plot(t,sig1_Int_Int, 'color',[.929,.694,.125]);% Dis ylabel('Dis:[mm]'); set(gca,'YColor',[.929,.694,.125]); legend('Acceleration','Velocity','Displacement'); set(gca,'fontsize',8); xlim([0 .1]); grid on;
% Spectral resolution and axis df = fs/N; f = 0:df:fs/2; % Display acceleration spectrum and velocity spectrum (USER zoom) subplot(212); yyaxis left; hold on; plot(f,Y_Acc, '-','color',[0 ,.447,.741]); % Acceleration plot(f,Y_Vel, '-','color',[.85,.325,.098]); % Velocity ylabel('Acc:[g] or Vel:[mm/s]'); xlabel('Frequency [Hz]'); set(gca,'YColor',[.15,.15,.15]); yyaxis right;
plot(f,Y_Dis, 'color',[.929,.694,.125]); % Displacement ylabel('Dis:[mm]'); legend('Acceleration','Velocity','Displacement'); set(gca,'fontsize',8); set(gca,'YColor',[.929,.694,.125]); xlim([97 103]); grid on; % ------------------------- END ------------------------------
4.3 Combined Processing Algorithms
147
4.3.2.7.3 Real Rotary Machinery Signal Section 4.3.2.4.4 demonstrates how to calculate a velocity spectrum form a real vibration signal collected from a Vibstand™ test rig. This section illustrates, how this signal could be integrated further to calculate the displacement spectrum. The velocity data is also displayed for reference. Figure 4.51 illustrates all three time waveforms. Top graph illustrates original acceleration signal with a clear Imbalance component (roughly 16 Hz). The bottom graphs show velocity and displacement signals. As observed in Fig. 4.51, the Velocity and Displacement waveforms present the Imbalance-generated component more clearly than the acceleration signal, which is a fundamental phenomenon used in vibration-based diagnostics. Also, note the phase shift resulting from fundamental trigonometric integral properties: Z Acceleration ! Velocity : Velocity ! Displacement :
Z
sin ¼ cos cos ¼
Z cos ¼ sin
Moreover, in practical implementations, the initial part of velocity and displacement signals are deleted due to initial signal distortion, as illustrated in Fig. 4.51.
Fig. 4.51 Time waveforms of sig3: Acceleration (top), Velocity (bottom), and Displacement (bottom)
148
4 Signal Processing Algorithms
Figure 4.51 is generated with following code: % ----------------- Real signal "sig3" --------------------load('vibstand.mat'); % Available @ http://home.agh.edu.pl/~ajab/ fs = 25e3; % sampling frequency sig3 = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data N = length(sig3); % No. of point dt = 1/fs; % time resolution T = N*dt; % signal total time t = dt:dt:T; % time axis % Calculate Velocity signal sig3_HP = Filter_signal_HP(sig3,fs,10); sig3_Int = Calculate_Integrated(sig3_HP,fs); sig3_Int_scaled = 9.81*1000*sig3_Int;
% filter HP (10Hz) % integrate % scale
% Calculate Displacement signal sig3_Int_Int = Calculate_Integrated(sig3_Int_scaled,fs);
% integrate
% Display time waveforms figure; subplot(211); plot(t,sig3); % Acceleration - original waveform xlim([0 .5]); ylim([-1.2 1.2]); ylabel('[g]'); xlabel('Time [s]'); legend('Acceleration'); set(gca,'YColor',[0,.447,.741]); grid on; subplot(212); yyaxis left;
yyaxis right;
plot(t,sig3_Int_scaled, '-','color',[.85,.325,.098]); % Vel ylabel('[mm/s]'); xlabel('Time [s]'); set(gca,'YColor',[.85,.325,.098]); ylim([-30 30]); grid on plot(t,sig3_Int_Int, 'color',[.929,.694,.125]);% Dis ylabel('[mm]'); legend('Velocity','Displacement'); set(gca,'fontsize',8); set(gca,'YColor',[.929,.694,.125]); xlim([0 .5]); ylim([-.3 .3]);
Figure 4.52 illustrates all three full-resolution spectra. Top graph illustrates a spectrum from original acceleration signal. The central graph shows spectra from velocity signal, and finally the bottom graph show spectrum generated from the displacement signal. As observed in Fig. 4.52, analogously to the time waveform, velocity and displacement spectra present the Imbalance-generated component more clearly than the acceleration spectrum. Figure 4.52 is generated with following code:
4.3 Combined Processing Algorithms
149
Fig. 4.52 Spectra of sig3: Acceleration (top), Velocity (bottom), and Displacement (bottom) % #1: FULL RESOLUTION spectra % Calculate spectral amplitudes Y_Acc = fft(sig3); Y_Vel = fft(sig3_Int_scaled); Y_Dis = fft(sig3_Int_Int);
(acceleration, velocity, and displacement) Y_Acc = abs(Y_Acc(1:N/2+1))/(N/2); Y_Vel = abs(Y_Vel(1:N/2+1))/(N/2); Y_Dis = abs(Y_Dis(1:N/2+1))/(N/2);
% Calculate frequency scale df = fs/N; f = 0:df:fs/2; % Display spectra (zoom) figure; subplot(311); plot(f,Y_Acc); % Acceleration - original waveform xlim([0 500]); ylim([0 .03]); title('Full-resolution spectra (zoom)') ylabel('[g]'); legend('Acceleration'); set(gca,'YColor',[0,.447,.741]); grid on; subplot(312);
plot(f,Y_Vel,'-','color',[.85,.325,.098]); xlim([0 500]); ylim([0 .9]); ylabel('[mm/s]'); legend('Velocity'); set(gca,'YColor',[.85,.325,.098]); grid on;
% Velocity
subplot(313);
plot(f,Y_Dis,'color',[.929,.694,.125]); % Displacement xlim([0 500]); ylim([0 .013]); ylabel('[mm]'); legend('Displacement'); set(gca,'YColor',[.929,.694,.125]); xlabel('Frequency [Hz]'); set(gca,'fontsize',8); grid on;
150
4 Signal Processing Algorithms
Fig. 4.53 Spectra of sig3 in dB scale: Acceleration, Velocity, and Displacement
A complementary comparison of the acceleration, velocity, and displacement spectra could be performed using pwech spectra, which typically are potted in dB scale, and illustrated in Fig. 4.53. Clearly, the values of displacement spectral components fall very quickly comparing to acceleration and velocity spectra. For this reason, in prac cal analysis, velocity spectrum is typically used to track frequency (or their order counterparts) components in the range 2-150 Hz, while the displacement spectrum generated by double integra on of the original accelera on signal is used just in special situa ons.
4.3 Combined Processing Algorithms
151
The code for dB-spectra generation, presented in Fig. 4.53 is as follows: % #2: PWELCH (dB) % Calculate spectral amplitudes (acceleration, velocity, and displacement) [pxx_Acc,f_pxx] = pwelch(sig3, [],[],[],fs); [pxx_Vel ] = pwelch(sig3_Int_scaled,[],[],[],fs); [pxx_Dis ] = pwelch(sig3_Int_Int, [],[],[],fs); % Display spectra figure; subplot(211); yyaxis left;hold on; plot(f_pxx,20*log10(pxx_Acc), '-','color',[0 ,.447,.741]);%Acc plot(f_pxx,20*log10(pxx_Vel), '-','color',[.85,.325,.098]);%Vel title('PWELCH spectra'); ylabel('dB: Acc or Vel]'); set(gca,'YColor',[.15,.15,.15]); yyaxis right;plot(f_pxx,20*log10(pxx_Dis), 'color',[.929,.694,.125]); %Dis ylabel('dB: Displacement'); legend('Acceleration','Velocity','Displacement'); set(gca,'fontsize',8); set(gca,'YColor',[.929,.694,.125]); axis tight; grid on; subplot(212); yyaxis left;hold on; plot(f_pxx,20*log10(pxx_Acc), '-','color',[0 ,.447,.741]);%Acc plot(f_pxx,20*log10(pxx_Vel), '-','color',[.85,.325,.098]);%Vel ylabel('Acc:[g] or Vel:[mm/s]'); xlabel('Frequency [Hz]'); set(gca,'YColor',[.15,.15,.15]); yyaxis right;plot(f_pxx,20*log10(pxx_Dis),'color',[.929,.694,.125]); %Dis ylabel('Dis:[mm]'); title('zoom: 0-250Hz'); legend('Acceleration','Velocity','Displacement'); set(gca,'fontsize',8); set(gca,'YColor',[.929,.694,.125]); xlim([0 250]); ylim([-200 0]); grid on;
4.3.3
Time Synchronous Averaging (TSA)
4.3.3.1
Overview
From CMS algorithm development point-of-view, this section is a continuation of the basic information presented in Sect. 4.2.2. Time Synchronous Averaging (TSA) is a powerful vibration signal analysis tool, which enables extraction of periodic, so called phase-locked signal components from a noisy vibration signal or from other phase-locked components (with other periods). This technique is particularly useful for extraction of gearbox-generated periodic components, like gear meshing components (GMF) [8], but it also could be used for detection of REB faults [9]. In general, TSA averages a vibration signal with respect to some referential signal. Probably most typically, the referential signal is a one-per revolution “pulse”, which is called a “phase marker”. This topic is covered in details in Sect. 4.2.2. Therefore, although the name of the technique includes “time”-based averaging, it might be somehow confusing, because typically the averaging within TSA is rather rotational (angle-based).
152
4 Signal Processing Algorithms
The current section first includes analysis of resampled signal, as a crucial TSA step. Next, selected aspects of resampled signal spectral analysis are presented, as an extension to Sect. 4.2.2, where basic theory on signal resampling is covered. Finally, order spectrum of TSA signal is compared with both, frequency and order spectrum. Since practical TSA analysis frequently includes averaging the same vibration signal (with a single PM referential speed data) with respect to different periods (i.e. shafts), this scenario is considered throughout this section. This is what differs the presented codes from the MATLAB® tsa function briefly reviewed at the beginning of this section. Additional consideration on TSA, including analysis and comparison of different numerical techniques are found in [10].
4.3.3.2
Time-Domain and Angle-Domain Waveforms
MATLAB® “tsa” Function The general concept of calculation of the time-synchronous signal via MATLAB® tsa function is essentially the same as calculation using user’s code presented in this section, and includes following steps: (1) (2) (3) (4)
signal signal signal signal
trimming, resampling (2 signal interpolation), reshaping averaging (along rotations).
Figure 4.54 illustrates a TSA signal generated using the MATLAB® function.
Fig. 4.54 Example of a TSA signal
tsa
4.3 Combined Processing Algorithms
153
Following code generates Fig. 4.54 using real vibration signal “vibstand.mat”11: load('vibstand.mat');
% Available @ http://home.agh.edu.pl/~ajab/
PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % Phase Marker x = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; dt = 1/fs; tp = find(PM) .* dt;
% calculate timestamps of PM-pulse instances
[ta,~,p,rpm] = tsa(x,fs,tp); % calculate TSA signal % NOTE: % The “ta” is because the fastest rotation (the one with smallest % number of samples per rotation) has 506 samples: min(diff(find(PM))). % Since “ta” is averaged over rotations, the number of rotations is % irrelative for its size. % % % %
Referring to Table 4.5 from Section 4.3.1.4, “p” is because when resampling is done with respect to original PM signal (like here), the new angular axis is generally angular_resolution:angular_resolution:1 So, he angle vector “p” is equivalent to:
% 0:1/Nsamp:1/Nsamp:1-1/Nsamp - (MATLAB way) % 1/Nsamp:1/Nsamp:1 - other common way (accepted in this book), % where Nsamp = 506 (calculated above). % % % %
The “rpm” is calculated with respect to the fastest rotation: 60*fs/(min(diff(find(PM)))). However, in commercial CMS, this variable is calculated as the mean value: 60*fs/(mean(diff(find(PM)))), which in this case gives about 10 RPM difference.
plot(p,ta); axis tight; % plot TSA signal xlabel('Rotation'); ylabel('Amplitude'); title('TSA-signal calculated with MATLAB "tsa" function'); set(gca,'fontsize',8); grid on;
Note that in practical TSA implementations, the new constant number of samples per rotation is not determined by the fastest rotation, like MATLAB® tsa function does,12 but it is calculated either: • as he next power of 2 equal or above the average number of samples in all rotations (where computational power matters [2], or • as integer multiple of the average number of samples in all rotations (when maximum accuracy is desired (author’s recommendation).
11
Available @ http://home.agh.edu.pl/ajab/. See Matlab’s® file tsa.m (line 123): “We use the number of points in the minimum segment period”.
12
154
4 Signal Processing Algorithms
Although for relatively small speed variations, MATLAB® tsa works fine, selection of new number of samples, which is smaller than any rotation represented by the signal, inevitably introduces theoretical aliasing to the signal. For further reference, see Fig. 2, page 769 in [11]. In addition to time-domain and angle-domain signal processing operation within TSA described in this section, the MATLAB® tsa function enables calculations in frequency domain, as well. Further examples on implementation of the tsa function are found at MathWorks® documentation.13 Most importantly, note that this function requires a priori generation of the rpm vector of exactly the same length of the vibration signal (in samples). For a typical vibration, 1-per rotation phase marker data, this means that the rpm variable must be generated using selected interpolation technique.
4.3.3.2.2 User Analysis of Rational Transmission Ratios Previous section illustrates quick signal resampling using the MATLAB® tsa function. However, as mentioned, for practical analysis of vibration signal, an extra user code is presented in order to allow user selection of new number of samples per rotation Nsamp and, most importantly, to allow generation of TSA signal with respect to a shaft, the order of which is not an integer multiple of the referential shaft. For further illustration of the problem, the reader is encouraged to compare the given tPulseIn and tPulseOut variables given in MATLAB® “Vibration Analysis of Rotating Machinery14” support topic with the PM data used in this section. The considered scheme is illustrated in Fig. 4.55. The precise order calculated by MATLAB® is: format long; z1 = 23; z2 = 67; FS = 1; SS = FS * z1/z2; disp(SS); 0.343283582089552
13
% number of teeth on the gear on the Fast Shaft (pinion) % number of teeth on the gear on the Slow Shaft % Fast Shaft (referential shaft) order % Slow Shaft (referential shaft) order
https://www.mathworks.com/help/signal/ref/orderspectrum.html and https://www.mathworks. com/help/signal/examples/order-analysis-of-a-vibration-signal.html. 14 https://www.mathworks.com/help/signal/examples/vibration-analysis-of-rotating-machinery. html.
4.3 Combined Processing Algorithms
155
Fig. 4.55 Configuration scheme of (referential) Fast Shaft (order 1) and Sow Shaft with rational ratio 23/67
Figure 4.56 illustrates three representations of a 10 s vibration signal vibstand.mat15 collected from a rolling-element bearing housing of the Vibstand™ test rig with a sampling frequency 25 kHz. Basic information on resampling of this particular signal are given in Sect. 4.2.2. The first representation (Fig. 4.56 top) is a regular time waveform. The second representation (Fig. 4.56 bottom, “Fast Shaft” series) is a waveform of a complete (actually slightly trimmed) signal, which represents a vibration data resampled with respect to the referential Fast Shaft. Note that the nominal Fast Shaft speed is 50 Hz (actual speed is slightly smaller due to applied load). Therefore, during resampling following parameters are calculated: • • • •
fs = 25 kHz T = 13 s N = T * fs = 13 * 25,000 = 325,000 samples speed = 50 Hz ! nominal No. of samples per rotation is fs/50 = 25,000/50 = 500 samples • No. of rotations (Fast Shaft) = N/nominal_Nsamp = 325,000/500 = 650 rotations • No. of rotations (Slow Shaft) = N/nominal_Nsamp * (23/67) = 650 * (23/67) = 223 rotations.
15
Available @ http://home.agh.edu.pl/ajab/.
156
4 Signal Processing Algorithms
Fig. 4.56 Original and resampled signal
The third representation (Fig. 4.56 bottom, “Slow Shaft” series) is another complete waveform, which represents the vibration signal resampled with respect to the Slow Shaft. Clearly, it is visually “shorter”, because the number of rotations of the Slow Shaft is smaller than the number of rotations of the Fast Shaft in the same signal of length T. Figure 4.56 is generated using following code:
4.3 Combined Processing Algorithms clear;close all;clc; load('vibstand.mat');
157
% available @ http://home.agh.edu.pl/~ajab/
PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); x = avtb_2019_Machine_1_02_Motor_bearing(:,2);
% Phase Marker % vibration data
fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; dt N T t
= = = =
1/fs; length(x); N*dt; dt:dt:T;
% ------------- TIME / ANGLE WAVEFORMS ------------------------------% Resample signal z1 = 23; % No. of teeth on the referential Fast Shaft z2 = 67; % No. of teeth on the referential Slow Shaft ord = z1/z2; % gearbox ratio (reductor) % For display purposes, set Nsamp to average No. of samples Nsamp = round(mean(diff(find(PM)))); if mod(Nsamp,2) Nsamp = Nsamp + 1; % force even Nsamp end % NOTE: If the Nsamp parameter is not scaled for resampling with reference % to the Slow Shaft, the new constant number of samples per rotation, % i.e. the Nsamp would (in this case) be ca. 67/23 = 2.9 times % smaller than the average No. of samples in every Slaw Shaft % rotation, which is NOT PERMISSIBLE by definition Nsamp_FS = Nsamp; % The Fast Shaft is the referential shaft generating PM Nsamp_SS = round(Nsamp*1/ord); % see explanation above [xResFS,NrotFS] = Resample_signal_ord(x,PM,fs,1, Nsamp_FS); % Fast Shaft [xResSS,NrotSS] = Resample_signal_ord(x,PM,fs,ord,Nsamp_SS); % Slow Shaft % NOTE: Signals presented in angle domain cannot be significantly plotted % against signals in time domain. So, multiple plots are created. d_rev_FS = 1/Nsamp_FS; % angular resolution of FS-resampled signal d_rev_SS = 1/Nsamp_SS; % angular resolution of SS-resampled signal rot_FS = d_rev_FS:d_rev_FS:NrotFS; % rot. axis for FULL resampled signal FS rot_SS = d_rev_SS:d_rev_SS:NrotSS; % rot. axis for FULL resampled signal SS % FIGURE 1 - original TD waveform and resampled waveforms in FULL scale figure; subplot(211); plot(t,x); axis tight; xlabel('Time [s]'); ylabel('Amplitude [g]'); title('Original time waveform - FULL scale'); legend('Original'); set(gca,'fontsize',8); subplot(212);
plot(rot_FS,xResFS); hold on plot(rot_SS,xResSS); axis tight; xlabel('Rotation'); ylabel('Amplitude [g]'); title('Resampled waveforms (FS & SS) - FULL scale'); legend('Fast Shaft', 'Slow Shaft'); set(gca,'fontsize',8);
158
4 Signal Processing Algorithms
Fig. 4.57 Original and resampled signal—USER zoom
Figure 4.57 illustrates a USER zoom of Fig. 4.56, i.e. first 0.25 s and 4 rotations of each shaft. Note that since this time corresponds to ca. 4 rotations of the Slow Shaft (1/(50 * 23/67) * 4), these waveforms are similar, yet when full rotations are considered, the beginning part of the original signal is typically trimmed (here ca. 0.015 s), which clearly shifts the signal. Figure 4.57 is generated using following code: % FIGURE 2 - original TD waveform and resampled waveforms - USER zoom figure; subplot(211); plot(t,x); grid on; xlim([0,.25]); ylim([-2,2]); xlabel('Time [s]'); ylabel('Amplitude [g]'); title('Original time waveform - USER zoom'); legend('Original'); set(gca,'fontsize',8); subplot(212);
plot(rot_FS,xResFS); hold on plot(rot_SS,xResSS); axis tight; grid on; xlim([0,4]); % visually approximated xlabel('Rotation'); ylabel('Amplitude [g]'); title('Resampled waveforms (FS & SS) - USER zoom'); legend('Fast Shaft', 'Slow Shaft'); set(gca,'fontsize',8);
4.3 Combined Processing Algorithms
159
Fig. 4.58 Top: original signal trimmed to first Slow Shaft full rotation, center: resampled signals —first FS and SS rotations, bottom: averaged signals (1 rotation)
In the next step, signal averaging is considered. Note that this time, the original signal is trimmed, i.e. it starts at time corresponding to the first phase marker, as illustrated in Fig. 4.58. Comparing Figs. 4.57 and 4.58 it is clearly observable that TSA, or actually, angle-synchronous averaging clearly reveals gearbox GMF waveform, not observed otherwise. Figure 4.58 bottom, clearly shows details of vibration signal generated by individual 23 teeth of the gear located on the Fast Shaft and details of vibration signal generated by individual 67 teeth of the gear located on the Slow Shaft.
160
4 Signal Processing Algorithms
NOTE: The presented averaging technique is a baseline for many advanced gearbox diagnos cs techniques.
Figure 4.58 is generated using following code: % Rearrange signal according to selected shaft of interest TS_FS = reshape(xResFS,Nsamp_FS,NrotFS); % Signal "cut" according to FS TS_SS = reshape(xResSS,Nsamp_SS,NrotSS); % Signal "cut" according to SS % Average matrix - calculate TSA TSA_FS = mean(TS_FS,2); TSA_SS = mean(TS_SS,2);
% Fast Shaft TSA-signal % Slow Shaft TSA-signal
rot_TSA_FS = d_rev_FS:d_rev_FS:1; rot_TSA_SS = d_rev_SS:d_rev_SS:1;
% angular axis for FS-averaged signal % angular axis for SS-averaged signal
% Approximate selected (first) full rotation in the original time waveform PM_ind = find(PM); % indexes of Phase Marker "ones" avg_SS_rot_time = Nsamp*dt*(1/ord); t_First_rot_start = PM_ind(1) * dt; % 1st rot. start t_First_rot_SS_end = t_First_rot_start + avg_SS_rot_time; % 1st SS rot. end % FIGURE 3 - Arbitrarily selected rotation from original waveform and % resampled waveforms plus TSA (averaged, resampled waveforms) figure; subplot(311); plot(t,x); axis tight; grid on; xlim([t_First_rot_start,t_First_rot_SS_end]); xlabel('Time [s]'); ylabel('Amplitude [g]'); title('Original time waveform - FIRST rotation'); legend('Original'); set(gca,'fontsize',8); subplot(312);
plot(rot_FS,xResFS); hold on; plot(rot_SS,xResSS); grid on; axis tight; xlim([0,1]); % first rotation of FULL resampled signal xlabel('Rotation'); ylabel('Amplitude [g]'); title('Resampled waveforms (FS & SS) - FIRST rotation'); legend('Fast Shaft', 'Slow Shaft'); set(gca,'fontsize',8);
subplot(313);
plot(rot_TSA_FS,TSA_FS); hold on plot(rot_TSA_SS,TSA_SS); grid on; axis tight; xlabel('Rotation'); ylabel('Amplitude [g]'); title('FS and SS TSA (averaged resampled) FULL waveform'); legend('Fast Shaft', 'Slow Shaft'); set(gca,'fontsize',8);
Following two sections extend the presented angle-domain analysis to corresponding order-domain (spectral) analysis. 4.3.3.3
Resampled Signals Spectral Analysis
Prior to this section, the reader is encouraged to acquire basic information on signal resampling and configuration of the test-rig, from which data is collected, given in Sect. 4.2.2. The code used in this section is a continuation of the code form the
4.3 Combined Processing Algorithms
161
previous section. Current section illustrates details of order spectrum analysis in following steps: • gearbox-oriented analysis (introduced in Sect. 4.2.2.7), • shafts-oriented analysis. Figure 4.59 illustrates a full-resolution frequency spectrum (top) and two order spectra generated from the same signal (bottom). Figure 4.59 clearly shows that at first sight all considered spectra are different. However, they properly represent vibration signal. Note that the Fast Shaft has a smaller (average) number of samples per rotation than the Slow Shaft, so the order range is proportionally lower (recalling, it is equal to 1/Nsamp). As a consequence, when plotted together, the order spectrum calculated with respect to the Fast Shaft seems “shrinked”. On the other hand, since Fast Shaft is faster than the Slow Shaft, it covers more rotations, so the spectral resolution is better (smaller value, recalling 1/Nrot—also known as 1/Nrot). As a result, both representations have the same number of points.16
Fig. 4.59 Full-resolution, full-range frequency spectrum and order spectra
16
Actually, for typical resampling algorithms, which trim signals to full rotations, the total number of points in the signal might vary, because different cycles are trimmed differently.
162
4 Signal Processing Algorithms
Figure 4.60, which is a USER-zoomed version of Fig. 4.59, with additional manual labeling, illustrates analogous representation of spectral data referring to Slow Shaft and Fast Shaft components. Most importantly, note how the Slow Shaft component is represented better in terms of smearing, when the signal is resampled with respect to the Slow Shaft (itself). Such observation is a common rule for any order spectrum calculation scenarios. Figures 4.59 and 4.60 are generated using following code: % ------------- SPECTRA OF FULL RESAMPLED SIGNALS -------------------% Auxiliary NresFS = length(xResFS); % number of samples in resampled signal NresSS = length(xResSS); % number of samples in resampled signal % Calculate spectral amplitudes X = abs(fft(x)); X = X(1:N/2+1)/(N/2); % original signal XresFS = abs(fft(xResFS)); XresFS = XresFS(1:NresFS/2+1)/(NresFS/2); % FS XresSS = abs(fft(xResSS)); XresSS = XresSS(1:NresSS/2+1)/(NresSS/2); % SS % Calculate spectral axes (frequency and order) df = 1/T; f = 0:df:fs/2; % original signal (TD) doFS = 1/NrotFS; ord_FS = 0:doFS:Nsamp_FS/2; % FS-resampling order scale doSS = 1/NrotSS; ord_SS = 0:doSS:Nsamp_SS/2; % SS-resampling order scale % FIGURE 4 - frequency and order spectra of resampled signals - FULL scale figure; subplot(211); plot(f,X); axis tight; grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Frequency spectrum of original signal - FULL scale'); legend('Original'); set(gca,'fontsize',8); subplot(212); plot(ord_FS,XresFS); hold on; plot(ord_SS,XresSS); axis tight; grid on; x1 = Nsamp_FS/2; plot([x1,x1],[0,max(XresSS)],':','color',[0,.45,.74]); xlabel('Order'); ylabel('Amplitude'); title('Order spectra of resampled signals (FS&SS)-FULL scale'); legend('Fast Shaft', 'Slow Shaft','FS range'); set(gca,'fontsize',8); % Figure 4.60 is generated with manually edited labels and USER zoom.
4.3.3.4
TSA Signals Spectral Analysis
This section continues previously considered example of the test-rig data and continues previously introduced MATLAB® codes. Recalling, previously illustrated full-resolution order spectra are generated directly from resampled signals. This time, before calculation of spectral values, the signal is averaged, resulting in Averaged Order Spectrum (AOS). Spectral averaging is general concept, which is
4.3 Combined Processing Algorithms
163
Fig. 4.60 Full-resolution, full-range frequency spectrum and order spectra—USER zoom
used for calculation of so-called periodograms, PSD or pwelch spectra. In these cases, the averaging is realized either to: • obtain a desired spectral resolution, • obtain desired number of spectral lines, • obtain spectral average from desired number of signal fragments. The current section, however, refers to a different, special kind of averaging, namely averaging governed by mechanical element, typically shaft or gearbox. This averaging is currently frequency called “Time-Synchronous Averaging (TSA)” although technically, it is an Angle-Synchronous Averaging.
164
4 Signal Processing Algorithms
Fig. 4.61 Comparison of TSA-spectrum with full-resolution Order Spectrum and full-resolution frequency Spectrum
Figure 4.61 illustrates (for reference) a full-resolution frequency Spectrum (S), a full-resolution order spectra and the Order Spectrum (OS) of the TSA signal, which should be considered as a special case of the Averaged Order Spectrum (AOS), typically called TSA-spectrum.
4.3 Combined Processing Algorithms
165
Note that the TSA-spectrum displayed in linear scale displays only major deterministic components present in the signal, i.e. fundamental Slow Shaft component and harmonics of the gearbox GMF. Note also that for individual shafts, data corresponding to other shafts is practically filtered out (a typical situation). Figure 4.61 is generated using following code: % ------------- SPECTRA OF TSA SIGNALS -------------------------% Auxiliary N_TSA_FS = length(TSA_FS); % number of samples in TSA-FS signal N_TSA_SS = length(TSA_SS); % number of samples in TSA-SS signal % Calculate spectral amplitudes X_TSA_FS=abs(fft(TSA_FS)); X_TSA_FS=X_TSA_FS(1:N_TSA_FS/2+1)/(N_TSA_FS/2); X_TSA_SS=abs(fft(TSA_SS)); X_TSA_SS=X_TSA_SS(1:N_TSA_SS/2+1)/(N_TSA_SS/2); % Calculate spectral axes (frequency and order) % NOTE: for both Shafts the averaged data refers to a single rotation; % thus, the spectral resolution is 1/No._of_rotations, which is 1 ord_FS_TSA = 0:1:Nsamp_FS/2; % FS-resampling order scale ord_SS_TSA = 0:1:Nsamp_SS/2; % SS-resampling order scale % FIGURE %
- Frequency spectrum (full resolution), order spectra (full resolution), and TSA spectra - USER zoom
% Approximate the frequency corresponding to the 300th order. NOTE: since % the new No. of samples per rotation for Slow Shaft is roughly 2.91 times % greater than for the original PM signal (and FS), the order scale for % this Shaft is 2.91 times wider. For visual purposes, it is desired to % display order spectra in the range from 0 [ord] to 300 [ord], so the % corresponding (AVERAGE VALUE!) frequency range is: ord_range = 300; avg_speed = mean(fs./diff(find(PM))); % from 1./(Nsamp*dt) f_range = ord_range*avg_speed; figure; subplot(311); plot(f,X); axis tight; xlim([0 f_range]); grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Frequency spectrum of original signal (300th order)'); legend('Original'); set(gca,'fontsize',8); subplot(312); plot(ord_FS,XresFS); hold on; grid on; plot(ord_SS,XresSS); axis tight; xlim([0 ord_range]); x1 = Nsamp_FS/2; plot([x1,x1],[0,max(XresSS)],':','color',[0,.45,.74]); xlabel('Order'); ylabel('Amplitude'); title('Order spectra of resampled signals (FS & SS) - USER zoom'); legend('Fast Shaft', 'Slow Shaft','FS range'); set(gca,'fontsize',8); subplot(313); plot(ord_FS_TSA,X_TSA_FS); hold on; grid on; plot(ord_SS_TSA,X_TSA_SS); axis tight; xlim([0 ord_range]); plot([x1,x1],[0,max(X_TSA_SS)],':','color',[0,.45,.74]); xlabel('Order'); ylabel('Amplitude'); title('Order spectra of TSA signals (FS & SS) - USER zoom'); legend('Fast Shaft', 'Slow Shaft','FS range'); set(gca,'fontsize',8);
166
4.4 4.4.1
4 Signal Processing Algorithms
Instantaneous Speed Calculation and Reconstruction Basic Operations on Real Phase Marker (PM) Signal
Figure 4.62 illustrates a fragment of the acceleration time waveform and corresponding simultaneously collected phase marker (PM) signal from the referential shaft. The real data is stored in the vibstand.mat17 file (see Sect. 4.2.2.7 for signal details). Note that since the PM signal is collected at exactly the same timestamps as the vibration signal, it is possible to map the PM signal to precisely selected data points of the vibration signal, as illustrated in Fig. 4.62. Alternatively, PM signal is plotted as a zero-value vector with “1”s at these timestamps. Following code generates the Fig. 4.62:
Fig. 4.62 Vibration waveform with correspond phase markers
17
Available @ http://home.agh.edu.pl/ajab/.
4.4 Instantaneous Speed Calculation and Reconstruction
167
load('vibstand.mat'); % available @ http://home.agh.edu.pl/~ajab/ PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % Phase Marker x = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; N dt T t
= = = =
length(x); 1/fs; N*dt; dt:dt:T;
PM_i = find(PM); PM_t = t(PM_i); figure; yyaxis left;
yyaxis right;
% % % %
total number of samples in the original signal time resolution of original signal total time of original signal original signal time vector
% Phase Marker indexes % Phase Marker timestamps in original time vector "t"
plot(t,x); hold on; xlim([0 1]); ylim([-1 1]); xlabel('Time [s]'); ylabel('Amplitude [g]'); stem(PM_t,x(PM_i),'linewidth',2); ylim([-1 1]); ylabel('Amplitude [g]');
title('Location of Phase Markers (PM) in original waveform - USER zoom'); legend('Vibration signal','PM signal'); set(gca,'fontsize',8);
Because in this data, the PM sensor is located at the driving’s motor shaft; thus, the referential shaft is also the Fast Shaft (see Fig. 4.55). The instantaneous speed is calculated according to following recipe: PM find(PM) diff(find(PM))
% Phase Marker signal, e.g. [0 0 0 1 0 0 0...0 0 1 0 0...] % indexes of "ones" in PM, e.g. [50 351 549...] % how much samples is in individual, subsequent rotation
diff(find(PM))*dt 1./(diff(find(PM))*dt)
% % % %
how much time (in [s]) each rotation lasts shaft frequency during each rotation [Hz] NOTE: each rotation has constant frequency NOTE: each frequency is calculated independently
60./(diff(find(PM))*dt)
% shaft speed during each rotation [RPM] % SHORTLY: fs*60./diff(find(PM)) mean(fs*60./diff(find(PM))) % mean speed [RPM]
Figure 4.63 illustrates the so-called machine “instantaneous speed” using this algorithm. Note that the sharp peaks in Fig. 4.63 actually refer to a relatively precisely constant speed, because from the clearly observable five resolution level, two are within measurement error. Nevertheless, even from such data it might be concluded that at the beginning of the signal (about 0.2–1.8 s) the speed was smaller than at the end of the signal (from about 11 s till the end)—see Fig. 4.67 for further analysis. Following code generates Fig. 4.63:
168
4 Signal Processing Algorithms
Fig. 4.63 Raw instantaneous speed calculated from a binary referential shaft phase marker signal
inst_FS_time = diff(PM_i)*dt; % times of individual FS rotations inst_FS_freq = 1./inst_FS_time; % frequency [Hz] of individual FS rotations inst_FS_RPM = inst_FS_freq*60; % speed [RPM] of individual FS rotations figure; plot(PM_t(2:end),inst_FS_RPM); xlim([0 T]); grid on; ylabel('Speed [RPM]'); title('Fast Shaft instantaneous speed'); xlabel('Time [s]'); set(gca,'fontsize',8);
When vibration analysis is conducted with respect to instantaneous rotational speed (most commonly resampling, order analysis, and TSA), the vibration waveforms and PM signals are typically plotted against consecutive shaft rotations, not time. Such presentation is referred to as “angular domain” representation, and is illustrated in Fig. 4.64. Figure 4.64 illustrates three different representations of the same, referential PM signal in angular domain, i.e. with respect to consecutive referential shaft (Fast Shaft) rotations. The top plot illustrates time of individual referential shaft rotations. The center plot shows direct instantaneous frequency, where independent rotations have individual, constant frequency. The bottom graph, presenting instantaneous speed in RPM units, is essentially the same as Fig. 4.63, where the speed is plotted against time, not rotations.
4.4 Instantaneous Speed Calculation and Reconstruction
169
Fig. 4.64 Different representation of the PM signal in angle domain
Because in this particular signal, the speed is nearly constant, these two considered plots look the same. If however, for instance, the very last rotation would be significantly slower than the rest, then in the original PM signal, the number of zeros between the two last instances of “1” would be significantly larger, and: • the significantly lower value of the speed would be the same on both graphs, • the spacing between two last PM points would be different in these plots—in the time-domain plot this spacing would be significantly bigger, while in the angle-domain plot the spacing would not change because it is speed-independent.
170
4 Signal Processing Algorithms
Finally, it is observed than the top plot in Fig. 4.64 appears to be “upside-down” in comparison to the center and bottom plots. This is simply because it represents time periods, which are reciprocal of the frequency. The Hz-to-RPM conversion is just a scalar value multiplication, so the shape of the graph does not change. Figure 4.64 is generated with following code: Nrot = length(PM_i); RotAX = 1:Nrot-1; figure; subplot(311);
% number of rotations of referential shaft % axis for consecutive rotations
plot(RotAX,inst_FS_time); axis tight; grid on; ylabel('Time [s]'); title('Time of each Fast Shaft rotation');
subplot(312);
plot(RotAX,inst_FS_freq,'r'); axis tight; grid on; ylabel('Frequency [Hz]'); title('Fast Shaft instantaneous frequency');
subplot(313);
plot(RotAX,inst_FS_RPM, 'g'); axis tight; grid on; ylabel('Speed [RPM]'); title('Fast Shaft instantaneous speed'); xlabel('Fast Shaft rotation'); set(gca,'fontsize',8);
Many times, when instantaneous speed is calculated from the tacho signal, literature recommends to use some kind of interpolation methods. Most commonly the reader encounters „linear”, „cubic”, „spline”, and „pchip” (Piecewise Cubic Hermite) interpolation techniques. When such techniques are used in MATLAB®, two things need special attention: • the precise meaning of these character descriptions changes in MATLAB® over time, so it is recommended to follow corresponding documentation (for instance interp1 function), • when signal processing involves multiple interpolations (for instance speed recovery followed by signal resampling), it is recommended to analyze signal distortion introduced by these operations, • when some functions are called within speed calculation process, it is not always immediately obvious, where the interpolation takes place. The latter issue is presented in Figs. 4.65, 4.66 and 4.70 (following section).
4.4 Instantaneous Speed Calculation and Reconstruction
Fig. 4.65 Interpolation implemented to raw PM data set
Fig. 4.66 Interpolation implemented to raw PM data set (USER zoom)
171
172
4 Signal Processing Algorithms
Figures 4.65 and 4.66 are generated using following code: user_AX
= linspace(0,length(RotAX),length(PM));
% user number of points
vq_linear = interp1(RotAX,inst_FS_RPM,user_AX,'linear'); vq_pchip = interp1(RotAX,inst_FS_RPM,user_AX,'pchip'); vq_spline = interp1(RotAX,inst_FS_RPM,user_AX,'spline'); figure; hold on; grid on; axis tight; plot(RotAX, inst_FS_RPM); plot(user_AX, vq_pchip); plot(user_AX, vq_spline);
% same as "linear" interpolation % same as "cubic"
title('Directly interpolated Fast Shaft instantaneous speed'); xlabel('Fast Shaft rotation'); ylabel('Fast Shaft speed [RPM]'); legend('none (linear)','cubic (pchip)', 'spline'); set(gca,'fontsize',8);
4.4.2
Tachorpm Function
In 2016b version, MATLAB® introduced the tachorpm function, which extracts the speed signal from tachometer pulses in [RPM] units. However, most of CMS-originated data provides a so-called “tacho” signal in a binary form (0, 0, 0, 1, 0, 0, …, 0, 0, 1, 0, 0, 0, 00, 1, …, etc.) already. Recalling, in most common scenario, this is 1-per rotation information (standard phase marker) or many-per rotation data for advanced, encoder units. This, the tachorpm function could be used not only to process the raw tacho (typically voltage) signal, but also to post-process the binary, digital tacho signal. Note that this function returns the instantaneous speed vector of the same size as original PM size, which is of a special benefit. Figure 4.67 illustrates the instantaneous speed in [RPM] calculated via tachorpm function.
Fig. 4.67 Instantaneous speed in [RPM] calculated via tachorpm function
4.4 Instantaneous Speed Calculation and Reconstruction
173
Figure 4.67 is generated using following code: load('vibstand.mat'); % available @ http://home.agh.edu.pl/~ajab/ PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % Phase Marker x = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; [rpm,t,tp] = tachorpm(PM,fs); figure; yyaxis left;
yyaxis right;
plot(t,x); xlim([0 length(x)/fs]); xlabel('Time [s]'); ylabel('Amplitude [g]'); title('Time waveform with instantaneous speed'); plot(t,rpm,'LineWidth',2); grid on; ylabel('Speed [RPM]'); set(gca,'fontsize',8);
Note, in order to get the speed in Hz nits, it is sufficient to divide the results by 60. For further analysis, the reader is encouraged to compare the set of common values of the time vector “t” and calculated values of timestamps of individual pulses in “tp”: [values,indexes] = intersect(tp,t); % see gaps in the "indexes" variable
Figure 4.68 additionally shows he relationship between the new, constant number of samples per rotation of the Fast Shaft with the detected pulse locations variable “tp”.
Fig. 4.68 Referential Fast Shaft instantaneous speed expressed in Nsamp and tp
174
4 Signal Processing Algorithms
As illustrated in Figs. 4.63, 4.64, 4.65, 4.66, 4.67 and 4.68, instantaneous speed could be displayed in many different ways, both in terms of abscissa and ordinate. Nevertheless, interpolated or not, all of the presented ways are valid. Figure 4.68 is generated with following code: figure; yyaxis left;plot(diff(find(PM))); xlim([0 length(tp)]); xlabel('Number of Fast Shaft rotation'); ylabel('Number of points per each Fast Shaft title('Instantaneous speed: Nsamp and "tp"');
rotation');
yyaxis right; plot(diff(tp)); grid on; ylabel('Time of each Fast Shaft rotation'); legend('diff ( find ( PM ) )','"tachorpm" function'); set(gca,'fontsize',8); % Note that the diff(find(PM)) syntax is equivalent to MATLAB code: [~,locs] = findpeaks(PM); diff(locs);
4.4.3
Explanation of Instantaneous Speed Shape Profile
Clearly, the profile of the instantaneous Fast Shaft speed presented in Figs. 4.63, 4.64, 4.65 and 4.68 differs significantly from the smooth profile in Fig. 4.67. Recalling, the instantaneous speed presented in the first set refers to a time difference between individual pulses, while the later one is an output variable from the MATLAB® tachorpm function called with default parameters. In order to explain this difference, Fig. 4.69 illustrates individual variables referring to the instantaneous speed calculation when the tachorpm function is called. In order to run such experiment, following code is executed with a breakpoint located inside the tachorpm function. Figure 4.69 uses following debugging-mode variables: • • • • •
T rpmPulse tout rpm rpm
—function tachorpm, line 122 (MATLAB® 2019a), —function tachorpm, line 125 (MATLAB® 2019a), —function tachorpm, line 130 (MATLAB® 2019a), —function tachorpm, line 136 (MATLAB® 2019a), —function tachorpm, line 139 (MATLAB® 2019a), renamed to “rpm_linear”.18
Note that the rpm_linear variable must be generated manually, because it is outside the conditional if statement.
18
Following code must be called manually: rpm = interp1(tPulse,rpmPulse, tout,'linear','extrap');
4.4 Instantaneous Speed Calculation and Reconstruction
175
Fig. 4.69 Step-by-step generation of smooth rpm profile
Note that the interpolation realized by the tachorpm function has smoothened out any instantaneous speed “peaks” present in other profiles illustrated in Fig. 4.69, limiting the overall peak speed fluctuation to 2953–2955 rpm. Figure 4.69 is generated using following code:
176
4 Signal Processing Algorithms
% NOTE: inside the tachorpm function, breakpoint @ line 140; line 139 % called again with a renamed output variable "rpm_linear" figure; subplot(411); plot(T); xlim([0 length(T)]); grid on; xlabel('Rotation'); ylabel('Time [s]'); title('TACHORPM: period between pulse centers'); set(gca,'fontsize',8); subplot(412);
plot(rpmPulse); xlim([0 length(T)]); grid on; xlabel('Rotation'); ylabel('Speed [RPM]'); str='TACHORPM: RPM values at the center points between pulse centers'; title(str); set(gca,'fontsize',8); subplot(413);
plot(tout,rpm_linear); xlim([0 tout(end)]); grid on; xlabel('Time [s]'); ylabel('Speed [RPM]'); str='TACHORPM: instantaneous speed calculated using linear interpolation'; title(str); set(gca,'fontsize',8); subplot(414);
plot(tout,rpm); xlim([0 tout(end)]); grid on; xlabel('Time [s]'); ylabel('Speed [RPM]'); str='TACHORPM: instantaneous speed calculated using least-squares spline'; title(str); set(gca,'fontsize',8);
In the current section, two interpolation scenarios are presented. One interpolation, which could be called “local” interpolation, refers to calculation of the n-th degree polynomial function for n-consecutive data points of the speed profile. The second interpolation, which is used in the MATLAB® tachorpm function refers to interpolation of the entire speed profile with n-th degree polynomial function. Worth noting, the MATLAB® tachorpm function uses 10 degree polynomial function for the latter purpose19. Figure 4.70 illustrates a change of the overall rpm profile as a function of different degree of the interpolating polynomial function. Note that the top graph is the same as graph in Fig. 4.69, where tachorpm function is used with default parameters. As concluded from Fig. 4.70, the precise shape generated by the tachorpm function solely depends on the degree of the polynomial used for calculations, namely, the larger the degree the more “rippled” is the profile. Finally, it is concluded that for similar results, degree of the polynomial should be proportional to signal length (in seconds).
Internal code of the Matlab’s® tachorpm function is based on the “IEEE Std 181-2003 IEEE Standard on Transitions, Pulses, and Related Waveforms (Sect. 5.3.2)”, see tachorpm ! risetime/falltime ! transdurs ! pctreflev
19
4.4 Instantaneous Speed Calculation and Reconstruction
177
Fig. 4.70 Influence of the degree of the polynomial interpolating function on the rpm profile generated by the MATLAB® tachorpm function
178
4 Signal Processing Algorithms
Figure 4.70 uses with a following modification of the previously introduced MATLAB® code: % Inside the tachorpm function, breakpoint @ line 136 figure; for k = 10:10:40 b = linspace(tPulse(1),tPulse(end),k); sp = spline(b,rpmPulse(:)'/spline(b,eye(length(b)),tPulse(:)')); subplot(4,1,k/10); plot(tout,ppval(sp,tout)); grid on; title(['Polynomial order: ',num2str(k)]); ylabel('Speed [RPM]'); end xlabel('Time [s]'); set(gca,'fontsize',8);
The last section of the instantaneous speed calculation and reconstruction section covers the topic of speed reconstruction from a raw vibration signals.
4.4.4
Extraction of Instantaneous Speed from Tacholess Vibration Signal
4.4.4.1
Overview
This section illustrates two general methods for instantaneous speed reconstruction. The first set of methods refers to simple case, where the vibration signal—due to its basic shape—itself could be viewed as a tachometer signal, which is typically met in synthetic vibration signals. The second set of methods refers to analysis of real, complex, noisy signals from rotary machinery. As shown, the latter methods are (as far as current literature shows) somehow supervised.
4.4.4.2
Simple Sinusoidal Signals
4.4.4.2.1 Findpeaks Function For simple signals, where local signal peaks correspond to the machine instantaneous referential speed signal (either one pulse-per-rotation or N-pulses per rotation), MATLAB® offers a user-friendly findpeaks function, which returns a vector of local maxima (peaks) and the indices at which the peaks occur. Additionally,
4.4 Instantaneous Speed Calculation and Reconstruction
179
Fig. 4.71 Visualization of pulse detection
findpeaks
might return widths of the peaks and the prominences of the peaks, as
well.20
4.4.4.2.2 User Pulse Detection Function Similarly to the previous section, the current section illustrates a simple user code for instantaneous speed reconstruction when the vibration signal is simple. More precisely, when the shape of the entire signal is closely related to the true corresponding tacho signal. This function is used for synthetic signals in this book to obtain instantaneous speed of the referential shaft. Figure 4.71 illustrates the idea. Following is a simple code implementing the concept. The function stores indices where the input signal x crosses zero value. Note that this simple function does not perform any interpolation to calculate more accurate zero-crossing time instances. For advanced approximations, the reader is referred to [10].
20
A complete information on this function is found at: https://www.mathworks.com/help/signal/ ref/findpeaks.html (R2019b).
180
4 Signal Processing Algorithms
function [PM] = Get_phase_markers(x) % DESCRIPTION % Function returns a set of Phase Markers for a vibration signal x. Note: % the signal must be a single sinusoidal components. % INPUT % x - raw vibration signal % OUTPUT % PM - a binary vector with "1" and approximated PM-pulses and zeros % otherwise N = length(x); PM = zeros(1,N);
% No. of samples in the signal % initial PM signal
for i = 1:N-1 if x(i+1) < x(i) if x(i+1) < 0 && x(i) > 0 PM(i+1) = 1; end end end
% CONDITION #1 % CONDITION #2 and CONDITION #3 % falling edge passes through zero
The performance of the Get_phase_markers function is illustrated on 4 examples, names of which are stored in the str variable, namely: str{1} str{2} str{3} str{4}
= = = =
'Constant frequency signal'; 'Periodically FM signal'; 'Chirp signal'; 'Non-periodically FM signal';
The code uses following additional short function: function [inst_Freq] = Get_inst_freq(fs,PM) dt = 1/fs; PM_ind = find(PM); inst_Freq = 1./(diff(PM_ind)*dt);
Figure 4.72 illustrates four signals with corresponding theoretical instantaneous speed profile and its calculated counterpart. Clearly, for all FM signals, the recovered speed is accurate; however, for the signal with constant speed, this simple, direct user method shows some minor, artificial speed changes.
4.4 Instantaneous Speed Calculation and Reconstruction
Fig. 4.72 Speed recovery from simple sinusoidal signals using user simple function
181
182
4 Signal Processing Algorithms
Figure 4.72 is generated by a following code: % NOTE: details on construction of FM signals and non-periodically FM % signals, including the definition of the generate_smooth_profile % function are given in Section 6.2.2.1.5 fs T dt t N df
= = = = = =
Ac fc FM_m fm f0 f1
25e3; 10; 1/fs; dt:dt:T; length(t); 1/T;
% % % % % %
USER sampling frequency USER total signal time time resolution time axis total number of points in the signal spectral resolution
= = = = = =
% % % % % %
carrier signal amplitude carrier frequency NON-MONOTONIC FM: modulation depth PERIODIC FM: modulation frequency MONOTONIC FM: initial frequency MONOTONIC FM: final frequency
10; 20; 5; 2; fc - FM_m; fc + FM_m;
my_ylim{1} my_ylim{2} my_ylim{3} my_ylim{4}
= = = =
[.98*fc ,1.02*fc]; [fc-FM_m ,fc+FM_m]; [0 ,fc + 2*FM_m]; my_ylim{2};
% % % %
USER USER USER USER
profile = generate_smooth_profile(fs,T); x(:,1) x(:,2) x(:,3) x(:,4)
= = = =
Ac Ac Ac Ac
* * * *
= = = =
% see Section 6.2.2.1.5
sin(2*pi*fc*t); sin(2*pi*fc*t - FM_m/fm*cos(2*pi*fm*t));%ignore initial phase chirp(t,f0,T,f1,'quadratic'); sin( 2*pi*fc*t + 2*pi*FM_m*(cumsum(profile)*dt) );
inst_freq(:,1) inst_freq(:,2) inst_freq(:,3) inst_freq(:,4) str{1} str{2} str{3} str{4}
zoom zoom zoom zoom
= = = =
fc*ones(1,N); fc + FM_m*sin(2*pi*fm*t); (f1-f0)/(f1-f0)^2*(t.^2) + f0; fc + FM_m*profile;
'Constant frequency signal'; 'Periodically FM signal'; 'Chirp signal'; 'Non-periodically FM signal';
figure; for i = 1:size(x,2) PM = Get_phase_markers(x(:,i)); % see Section 4.4.4.2.2 PM_ind = find(PM); IF_axis = PM_ind(1:end-1)*dt; IF_data = Get_inst_freq(fs,PM); % see Section 4.4.4.2.2 subplot(4,1,i); yyaxis left; plot(t,x(:,i)); ylabel('Amplitude'); title(str{i}); set(gca,'FontSize',8); yyaxis right; plot(t,inst_freq(:,i),'-','color',[.8500 .3250 .0980]); hold on; yyaxis right; plot(IF_axis,IF_data,'k:','MarkerSize',10); ylabel('Frequency [Hz]'); end xlabel('Time [s]'); legend('signal','theoretical inst. freq.','recovered
inst. freq.');
Following section illustrates alternative solution based on phase demodulation.
4.4 Instantaneous Speed Calculation and Reconstruction
183
4.4.4.2.3 Signal Phase Demodulation According to [11], instantaneous speed could be reconstructed by unwrapping of the phase of the analytic signal associated with a selected frequency band of the original waveform shortly called “phase demodulation”. At first however, in this simple case, the entire signal is processed according to following scheme: y pa upa omeg insF
= = = = =
hilbert(x); angle(y); unwrap(pa); diff(upa); omeg*fs/2/pi;
% % % % % %
generate analytic signal phase angle via atan2 unwrap phase angle instantaneous angular velocity instantaneous frequency [Hz] SHORTLY: diff(unwrap(angle(hilbert(x))))*fs/2/pi;
As shown earlier, when a real, noisy vibration signal is processed, the processing scheme is slightly different, because it additionally requires frequency band selection. Figure 4.73 illustrates instantaneous speed recovery from simple sinusoidal components introduced in the previous section. As it is show, his filtering is by definition an arbitrary, user choice. Comparing to Fig. 4.72, phase demodulation does not introduce any artifacts to the constant speed signal, but it has some problems to precisely recover the chirp signal boundaries. Figure 4.73 is generated by adding following code to the previous code: figure; for i = 1:size(x,2) IF_axis = t(2:end); IF_data = diff(unwrap(angle(hilbert(x(:,i)))))*fs/2/pi; subplot(4,1,i); yyaxis right; plot(t,inst_freq(:,i),'-','color',[.8500 .3250 .0980]); hold on; plot(IF_axis,IF_data,'k:','MarkerSize',10); ylabel('Frequency [Hz]'); title(str{i}); grid on; set(gca,'FontSize',8); ylim(my_ylim{i}); yyaxis left;
set(gca,'YColor','k'); set(gca,'YTickLabel','');
end xlabel('Time [s]'); legend('theoretical inst. freq.','demodulated inst. freq.'); set(gca,'FontSize',8);
The current and the previous sections refer to simple (typically synthetic) signals. Next sections refer to real vibration signal analysis.
184
4 Signal Processing Algorithms
Fig. 4.73 Speed recovery from simple sinusoidal signals using phase demodulation
4.4.4.3
Complex Real Signals
4.4.4.3.1 General Concept Referring to previous sections, many speed extraction methods are illustrated on a simple signal with clear deterministic components changing over time. However, in a typical acceleration signal form a rotary machinery, the referential shaft speed component (a so-called “1xRPM”), which is to be recovered—or first—separated, is not a dominant component; plus it is typically merged in noise. Moreover, for majority of rotary machinery, this 1xRPM component has a relatively low frequency (from 10 to 50 Hz). As a consequence, it is not as much influenced by speed fluctuations as other phase-locked components.
4.4 Instantaneous Speed Calculation and Reconstruction
185
Therefore, for prac cal reconstruc on of instantaneous speed from a raw vibra on signal, a rela vely high-frequency phase-locked component is used, which experiences rela vely large spectral smearing; yet, it is rela vely clearly represented in a me-frequency domain.
Depending on the signal characteristic, according to Table 1 from [12] methods presented in this section could be divided into two major categories: • method based on frequency demodulation—for limited speed fluctuation, • method based on time-frequency ridge detection—for large speed fluctuations, • method based on time-frequency user polygon—for large speed fluctuations and large noise. In such scenarios, the process of instantaneous speed reconstruction is always somehow supervised, which makes it difficult to implement it as an automatized signal preprocessing within CMS data preprocessing. Following sections briefly recall existing methods with some supplementary material on practical usage. A detailed comparison of these methods is given in [12].
4.4.4.3.2 Limited Speed Fluctuation (Direct Phase Demodulation) As stated in [12], this method requires a precise selection of frequency band of a relatively high-frequency component. This concept is illustrated in Fig. 4.74. Worth mentioning, selection of such component inevitably requires some a priori knowledge of its relative order with respect to the referential shaft component (1xRPM), which is common for all presented methods. Typically, this information is used to define a frequency band of interest, where the smeared component is present. Figure 4.75 illustrates a full-resolution spectrum calculated from the “vibstand.mat”21 signal zoomed around the GMFx1 component.
Fig. 4.74 Selection of frequency band 21
Available @ http://home.agh.edu.pl/ajab/.
186
4 Signal Processing Algorithms
Fig. 4.75 Selection of frequency band for speed recovery
The user selection of the marked frequency band is used to define a band pass filter characteristics. Figure 4.76 illustrates instantaneous speed calculated via phase demodulation of the selected GMFx1 component. In contrast to section ‘Signal Phase Demodulation’, which demonstrated operations on the entire signal, this time, the signal need to be filtered around the GMFx1 nominal frequency (user-selected 1131–1135 Hz). Note, at this point, the phase demodulation could be done in two paths, from which the latter one is preferable:
Fig. 4.76 Speed recovery using phase demodulation from a bandpass filtered signal and from analytical signal constructed in the frequency domain
4.4 Instantaneous Speed Calculation and Reconstruction
187
PATH 1: filter the signal ! calculate analytical signal from time-domain signal ! demodulate phase PATH 2: select indexes corresponding to positive frequencies ! IFFT ! demodulate phase The illustrates resultant instantaneous speed calculated using these two paths. Note, since the band is relatively narrow, a user frequency-domain filter (see Sect. 4.2.1.6 for reference) is used within PATH 1. Regular, time-domain filtering for such purpose is generally not appropriate. As observed in Fig. 4.76, both paths perform similarly. Additional changes (in this case in favor of the PATH 2) are observed at the beginning and the end of the recovered speed vector. Nevertheless, it is clearly seen that in both cases, the boundaries need to be neglected. Figure 4.76 is generated using following code: load('vibstand.mat'); % available @ http://home.agh.edu.pl/~ajab/ x = avtb_2019_Machine_1_02_Motor_bearing(:,2); fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; % PATH 1: Filter the signal around the GMFx1 y_1 = Filter_signal_BP(x,fs,[1131,1135]); instFreq_1 = diff(unwrap(angle(hilbert(y_1))))*fs/2/pi; instSpeed_1 = instFreq_1/23*60; % GMF is 23rd order, Hz-->RPM % PATH 2: Construct analytical signal in frequency domain N = length(x); df = fs/N; f_full = 0:df:fs; % redefine f to full scale indexes = find( (f_full >= 1131) & (f_full RPM
dt = 1/fs; t = dt:dt:N*dt-dt;
% Note: the time vector is one sample less
figure; plot(t,instSpeed_1); hold on; plot(t,instSpeed_2); grid on; xlim([ -.5,N*dt+.5]); xlabel('Time [s]'); ylabel('Speed [RPM]'); legend('FD-BP filtered Hilbert','user Hilbert (IFFT)'); set(gca,'fontsize',8);
4.4.4.3.3 Urbanek’s Two-Step Procedure in RPM Track Tool The MATLAB® rpmtrack function, based on [13], is designed to analyze a single vibration waveform by visual determination of order-related component in
188
4 Signal Processing Algorithms
time-frequency representation. This function is generally used by the MATLAB® RPM Tracker GUI, which opens automatically, when the function is called. In standard usage of this function via RPM Tracker GUI, the user points a single component of known relative order with respect to the referential shaft in the time-frequency representation, and the function returns the instantaneous speed of the referential shaft in RPM units. The method is originally called a “two-step” procedure, because first signal resampling (rough speed recovery) is used to pre-separate the time-variant component of interest. Since MATLAB® online R2019b documentation22 only offers analysis of synthetic signals, the current section illustrates how to use this function to analyze real vibration data (stored in vibstand.mat23), used previously. In [12] it is stated that this method is designed to analyze signals with relatively large speed change, which is not desired in classical condition monitoring systems. In order to recover the instantaneous speed from a real vibration signal, following steps are recommended: Step 1: open the RPM Tracker GUI: >> [rpm,tout] = rpmtrack(x,25e3);
Step 2: analyze the signal to determine the most distinguishable component, preferably with highest frequency In this case, the fundamental GMF component (roughly 50 Hz * 23 = 1150 Hz is selected. Note, the spectrogram implies that the speed is nearly constant. Recall to the Sect. 4.2.2.7 for detailed signal description. NOTE: since the GMFx1 component is at rela ve order 23 with respect to the referen al sha , this number must be entered to the “Order” edit user control prior to speed es ma on.
Step 3: Locate a point on the spectrogram via “Add” menu button Step 4: Select “estimate” from the menu. The resultant speed estimation is displayed in RPM units the bottom axes of the RPM Tracker. The GUI tool additionally offers RPM data export and generation of the GUI-based script. Clearly, from Fig. 4.77 it is deducted that the RPM Tracker estimated the speed in reasonable boundaries up to 7th second. In order to improve this results, more points are placed on the spectrogram, as illustrated in Fig. 4.78. Comparing Figs. 4.77 and 4.78, it is clear that placing more point on the GMF-component-of-interest has significantly improved the instantaneous speed estimation. Additionally, the RPM Tracker enables automatic code generation, which is useful for reference. In this case:
22
https://www.mathworks.com/help/signal/ref/rpmtrack.html. Available @ http://home.agh.edu.pl/ajab/.
23
4.4 Instantaneous Speed Calculation and Reconstruction
189
Fig. 4.77 Instantaneous speed estimation via RPM Tracker—trial #1 (one-point estimation)
Fig. 4.78 Instantaneous speed estimation via RPM Tracker—trial #2 (multiple-point estimation)
190
4 Signal Processing Algorithms
% MATLAB Code from rpmtrack GUI % Generated by MATLAB 9.6 and Signal Processing Toolbox 8.2 % Generated on 23-Oct-2019 15:05:21 % Set sample rate Fs = 25000.0000; % Set order of ridge of interest order = 23.0000; % Set ridge points on ridge of interest ridgePoints = [... 0.1505 1125.9791;... 2.0090 1125.9791;... 4.0130 1125.9791;... 6.0089 1125.9791;... 8.0129 1125.9791;... 10.0088 1125.9791;... 12.0047 1125.9791]; % Estimate RPM [rpm,tout] = rpmtrack(x,Fs,order,ridgePoints,... 'Method','stft',... 'FrequencyResolution',17.4100,... 'PowerPenalty',Inf,... 'FrequencyPenalty',0.0000,... 'StartTime',0.0000,... % Requires slight increase 29 for manual calling 'EndTime',13.0000); % Requires slight decrease for manual calling
The average speed calculated returned by the rpm variable is rather accurate: >> mean(rpm) 2.955670955466113e+03
As concluded, the rpmtrack function is dedicated to recover the instantaneous speed from signals, which experience relatively large speed fluctuations and where a clear ridge in the time-frequency representation can be defined.
4.4.4.3.4 Polygon-Based Reconstruction In previous section, a semi-automatic method for ridge tracking in time-frequency representation was presented. However, as described in [12], when a vibration signal is highly noisy and highly non-stationary, it might require a fully manual selection of the time-frequency polygonal region-of-interest (ROI). In this paper, the authors show how the MATLAB® impoly function from Image Processing Toolbox™ could be used to filter the vibration signal directly from the spectrogram. Such operation could be understood as standard filtering of individual signal sections, each with a new set of filter coefficients. In this sense, the manually drawn time-frequency polygon returns these coefficients. Reference [12] presents a complete description of this method along with full-featured MATLAB® codes in Appendix. The paper also compares this method with other two methods described previously.
4.4 Instantaneous Speed Calculation and Reconstruction
4.4.5
191
Summarizing Comparison
As deducted from the whole section, it is possible to calculate instantaneous machine speed from the phase marker data (either raw or processes binary data) or to recover this data from a raw vibration signal. In most substantial scenario in commercial machine monitoring and diagnostics, these techniques are used to obtain order spectra via angular resampling. For this reason, signals with relatively small speed fluctuation are desired, such as one in the “vibstand.mat” file. For final analysis, Fig. 4.79 illustrates selected, previously calculated and displayed data on one graph: – instantaneous speed calculated directly from PM signal (rpm_PM), – instantaneous speed calculated with tachorpm function applied to the PM signal (rpm_TACHO), – speed recovered via direct phase demodulation (rpm_PD), – speed recovered via RPM Tracker tool (rpm_TRACK). As concluded from Fig. 4.79, the output of all illustrated techniques for speed calculation and speed recovery gives noticeably different results. Figure 4.79 is generated using following code:
Fig. 4.79 Recovered instantaneous speed
192
4 Signal Processing Algorithms
clear; close all;clc load('vibstand.mat');
% available
PM = avtb_2019_Machine_1_02_Motor_bearing(:,1); % Phase Marker x = avtb_2019_Machine_1_02_Motor_bearing(:,2); % vibration data fs = avtb_2019_Machine_1_02_Motor_bearing_metadata.SamplingRate; N dt T t
= = = =
length(x); 1/fs; N*dt; dt:dt:T;
PM_i inst_FS_time inst_FS_freq inst_FS_RPM
= = = =
% % % %
total number of samples in the original signal time resolution of original signal total time of original signal original signal time vector
find(PM); diff(PM_i)*dt; 1./inst_FS_time; inst_FS_freq*60;
% % % %
Phase Marker indexes times of individual FS rotations frequency [Hz] of individual FS rotations speed [RPM] of individual FS rotations #1
rpm_TACHO = tachorpm(PM,fs); df = fs/N;
f_full indexes fft_a X fft_a(indexes) my_hilbert instFreq_2 instSpeed_2
%#2
% NOTE: due to numerical rounding, in this case, % df = 1/T and df = fs/N generate % different "indexes" vectors, i.e. for % df = fs/N, it is one point larger = = = = = = = =
0:df:fs; % redefine f to full scale find( (f_full >= 1131) & (f_full .01-dt,1) and % find(t , it is calculated in the original time domain as: Acc_PPi = max(x) - min(x);
This estimator is almost always considered in condition monitoring, but its contribution is limited to rather severe fault detection. Sometimes, Acc_PP is noted as Acc_ZP, which stands for maximum “zero-to-peak” value and is calculated simply as: Acc_ZP = max(x);
The Acc_PP health indicator is characterized by relatively high variance; therefore, it is recommended to average its value where possible. Finally, Acc_PP is relatively susceptible to any signal disturbances, saturation, random pulses, etc.
5.3.2
Acceleration RMS
This health indicator is a broadband estimator, because all signal components are considered.
200
5 Vibration-Based Condition Assessment Methods
For x < 1xN > , it is calculated in the original time domain as: N = length(x); Acc_RMS = sqrt(1/N * sum(x.^2));
Note that the MATLAB® function rms uses the conjugate, not the power function to calculate the square: y = sqrt(mean(x .* conj(x)));
The Acc_RMS health indicator is characterized by relatively low variance, because it is already time-normalized. Finally, Acc_RMS is relatively insensitive to small signal disturbances or short random pulses or any other components, which might be high in amplitude, but do not carry lot of energy.
5.3.3
Velocity RMS
5.3.3.1
Overview
This health indicator is a wideband estimator, because typically the velocity signal calculated from a standard accelerometer is useful in the range from a few Hz to about 1 kHz. Depending on the machine nominal speed, according to ISO 20816, the lower boundary for this indicator is either 2 Hz (speed greater than 120 RPM) or 10 Hz (speed greater than 600 RPM), which might require different filtering technique. This estimator is of special interest in condition monitoring, because considering all other estimators, it represents practically most accurately the energy emitted by rotary machinery [2], see precisely 3rd paragraph on page 7.
5.3.3.2
VRMS Calculated in Time-Domain
In time-domain, the VRMS is calculated in following way: • • • • • •
Remove DC component HP or BP filter signal (in time-domain) Integrate the signal (in time-domain) Scale the signal to Velocity units [mm/s] Remove DC component Calculate the RMS of the filtered, integrated signal.
First operation, the DC removal is simple. The following filtering operation might be realized differently, because different digital filter type could be used (either HP or BP) and different design could be used (various FIR filters or various
5.3 Protection Scalar Health Indicators
201
IIR filters). Moreover, individual filter could be of different order and could be designed with different cutoff frequency, a possibly other parameters (which depend of filter design). Recalling, possible time-domain filtering scenarios are given in Sect. 4.2.1. Most commonly, for practical, amplitude-based signal processing, 4th order IIR HP Butterworth designs are used with single 10 Hz (or 2 Hz) cutoff frequency. BP filters are rarely used because the Velocity signal typically is meaningless above 1 kHz. Next, the signal is integrated (see Sect. 4.2.3) and scaled (see Sect. 4.3.2.3.3) to [mm/s]. Typically, the DC component sis removed again. Clearly, up to this point, these steps are identical as the scheme for Velocity Signal and Velocity Spectrum calculation given in Sect. 4.3.2. Lastly, the RMS value of the signal is calculated. An example of a code calculating the VRMS value of an arbitrary synthetic signal in time-domain is given below: fs T dt t N
= = = = =
25e3; 10; 1/fs; dt:dt:T; length(t);
% % % % %
sampling frequency total signal length time resolution time axis number of point in the signal
rng(0); x = 7*sin(2*pi*100) + rand(1,N);
% for repeatable results % USER arbitrary signal
x
% Step 1: remove DC
= x - mean(x);
fo = 4; fc = 10; [b,a] = butter(fo,fc/(fs/2),'high'); y = filter(b,a,x);
% USER filter order % USER filter HP cutoff frequency % Step 2: HP filtering
% [b,a] = butter(fo,1000/(fs/2),'low'); % y = filter(b,a,y); yInt yInt yInt VRMS
= = = =
Calculate_Integrated(y,fs); yInt*9810; yInt - mean(yInt); sqrt(1/N*sum(yInt.^2));
% % % %
% LP-filtering SKIPPED ON PURPOSE % LP-filtering SKIPPED ON PURPOSE Step Step Step Step
3: 4: 5: 6:
see Section 4.2.3 scale to [mm/s] remove DC RMS of filtered signal
Note that when additional, 1 kHz LP filter is applied to the Velocity signal (or— equivalently—when the HP filter is replaced with similar BP filter), the VRMS value typically changes by less than 2%; therefore, for most cases just the HP filter is applied.
5.3.3.3
VRMS Calculated in Frequency-Domain
In frequency-domain, the VRMS is calculated in following way: • • • •
Transform the time domain signal into frequency domain via FFT Calculate one-sided, scaled spectral acceleration amplitudes Scale extracted Acceleration components to Velocity (omega arithmetics) Scale the spectral values to [mm/s]
202
5 Vibration-Based Condition Assessment Methods
• Determine indexes of spectral components corresponding to bandpass cutoff frequencies • Calculate RMS in the frequency domain (replace 1/N with 1/2) Following code illustrates how to calculate the VRMS estimator in the most common range, i.e. from 10 Hz to 1 kHz in the frequency domain. fs T dt t N
= = = = =
25e3; 10; 1/fs; dt:dt:T; length(t);
% % % % %
sampling frequency total signal length time resolution time axis number of point in the signal
rng(0); % for repeatable results x = 7*sin(2*pi*100) + rand(1,N); % USER arbitrary signal X X
= abs(fft(x)); = X(1:N/2+1)/(N/2);
% Step 1: calculate spectral values
df f Y Y
= = = =
% % % %
spectral resolution frequency axis Step 2: "Omega arithmetics" Step 3: scale Velocity to [mm/s]
cutoff_start = 10; cutoff_stop = 1000; i_start = floor(cutoff_start/df); i_stop = floor(cutoff_stop/df);
% % % %
Define starting cutoff frequency [Hz] Define ending cutoff frequency [Hz] Calculate index corresponding to 10Hz Calculate index corresponding to 1kHz
Y = Y(i_start:i_stop); VRMS = sqrt(1/2*sum(Y.^2));
% Step 4: selected bandpass components % Step 5: RMS of filtered Velocity signal
fs/N; 0:df:fs/2; X(2:end)./(2*pi*f(2:end)); Y*9810;
Analogously to previously illustrated time domain calculations, if the variable is replaced with end value, the final VRMS value practically does not change. Finally, note that if spectral values are not used for other calculations, the code could be further optimized by reversing following operations: first, select VRMS indexes, next, calculate “Omega arithmetics”.
i_stop
5.3.3.4
Practical Considerations
Both presented VRMS calculation methods are valid. However, they differ in both, accuracy and computational time. Table 5.2 presents VRMS values and averaged computational time calculated for the previously introduced USER arbitrary synthetic signal and for a real signal vibstand.mat.1 The VRMS value calculated in frequency-domain is typically slightly lower, because the filtering characteristics is steeper comparing to time-domain filtering. On the other hand, the computational time (on a standard PC computer) is similar in all cases.
1
Available @ https://home.agh.edu.pl/*ajab/.
5.3 Protection Scalar Health Indicators
203
Table 5.2 Comparison of VRMS calculation methods
The final decision concerning the VRMS calculation algorithm is frequently made taking into account the embedded system characteristics, not the scientific accuracy, and it varies from one solution to another. In typical vibration-based protection systems, the presented PP, RMS, and VRMS estimators are calculated relatively frequency, e.g. every second in real-time. If the system is big enough, the historical values of these estimators (or at least their compressed representation) are available, resulting in a “monitoring” functionality.
5.4 5.4.1
Monitoring Scalar Health Indicators as Trend Data Classification of Monitoring Health Indicators
A monitoring system offers much wider variety of scalar HI-s than a vibration-based protection system, because typically it does not work in real-time environment, so it has much more “time” to buffer the data and to perform calculations. Commonly, a variety of HI-s are calculated from much longer acceleration signals comparing to a protection system. The original, raw acceleration signals might reach 10, 20, 60, 100 and more seconds. As a consequence, monitoring systems frequently offer averaged, broadband and wideband HI-s, a large variety of narrowband HI-s, as well as residual, compound, and post-processed estimators. Typically, the broadband or wideband estimators common for both, protection and monitoring system are calculated from different time waveforms; therefore, they are repeated in this Section to some extent. Figure 5.3 illustrates a classification of most commonly HI-s encountered in general purpose vibration-based condition monitoring systems. As illustrated in Fig. 5.3, first set of broadband estimators, like PP or RMS are calculated directly from the time waveform. After translation into frequency domain —first FFT block—narrowband estimators in the frequency domain are calculated. Next, the envelope of the signal enables calculation of broadband envelope HI-s, typically Envelope PP and Envelope RMS, which are efficient in detection of cyclostationary components (like local REB fault-generated components). After translation into frequency domain, the envelope signal enables tracking of predefined cyclostationary components, like BPFO, BPFI, FTF (cage) or BSF of REBs local faults.
204
5 Vibration-Based Condition Assessment Methods
Fig. 5.3 Classification of sources for calculation of commonly used scalar monitoring HI-s
The frequency-domain narrowband health indicators are generally used for condi on monitoring of machinery opera ng under sta onary opera onal condi ons.
In parallel, the acceleration signal is resampled, i.e. it is converted from a time to angle domain. This operation requires additional phase marker signal (or less common synchronous sampling). Analogously to previous scenarios, resampled signal is used to calculate broadband and narrowband HI-s, as well as their envelope counterparts. The narrowband HI-s are used to track deterministic (in this case so-called “phase-locked”) components, like shaft harmonics or GMF harmonics, while narrowband HI-s from its envelope signal are widely used to track predefined, phase-locked cyclostationary components (like local REB fault-generated components). The order-domain narrowband health indicators are generally used for condi on monitoring of machinery opera ng under non-sta onary opera onal condi ons, especially (slightly) variable rota onal speed .
5.4 Monitoring Scalar Health Indicators as Trend Data
205
When extraction of a periodic signal from a noisy background is of greater interest than the resolution of the signals, the resampled signal is averaged, resulting in a TSA waveform. As shown in [3], almost any scalar statistical broadband or narrowband health indicator could be calculated from the TSA signal. The TSA signal is also used to compute indicators from so-called “residual” signals, which are defined as TSA signals with removed clear, phase-locked components, mainly shaft harmonics and GMF harmonics [3]. Naturally, any of broadband or narrowband scalar indicators might be calculated from the residual signal as well. However, it is important to remember that the in contrast to FFT, enveloping or resampling, TSA requires a major “user” parameter for calculations (the averaging cycle) which could be of additional benefit for diagnostic analysis, but typically is a serious detriment for unsupervised condition monitoring. Figure 5.3 illustrates that practically all but envelope HI-s are generated from both, acceleration and velocity signals. Further integration of original acceleration signal into displacement signal typically is not recommended due to inevitable numerical errors, especially for relatively long signals (e.g. for more than 10 s for a commonly used industrial 25 kHz sampling frequency). For many decades, a number of additional, scalar health indicators have been proposed by researchers. The indicators include time-domain broadband indicators, narrowband frequency domain indicators, residual indicators, compound indicators, and model-based indicators. A review of these indicators along with formulas is given in [4], and includes: • • • • • • • • • • • • • • • • • • • • • •
Standard deviation (STD) Kurtosis Shape factor (SF) Energy ratio (ER) Energy operator (EOP or EO) Zero Order Figure of Merit (FM0) Fourth Order Figure of Merit (FM4) M6A M8A NA4 and NA4* NB4 Delta RMS Sideband level factor (SLF or SMLF) Sideband index CAL4 Clearance factor Impulse indicator Correlated Kurtosis (CK) Mean frequency (MN) Frequency center (FC) Root mean square frequency (RMSF) Standard deviation frequency (STDF) Spectral Kurtosis (SK)
206
5 Vibration-Based Condition Assessment Methods
• Shannon Entropy • and finally Fourth Order Normalized Power (NP4). A data processing scheme of selected statistical HI-s is given in [5]. Further extension of indicators, including: • • • •
G2 (ratio of the amplitude of the GMFx2 to the amplitude of GMFx1 Amplitude Modulation Analysis AM Frequency Modulation Analysis FM and finally Derivative of the Amplitude Modulation Analysis DAM
is given in [6]. A case study illustrating a common level of inconsistency of such indicators in fault detection is given in [7]. Other possible way of constructing vibration-based health indicators include statistical evaluation of post-processed data, e.g.: • Envelope Contact Factor ECF in [8], plus indicators merging of families of spectral bands according to mechanical design, e.g.: • Dynamic Energy Index DEI [Dynamic Energy Index (DEI) in [9], or rational indicators, like: • Sideband Power Factor (SBPF) in [10], • and finally Sideband Energy Ratio (SER)™ in [11]. For some of these indicators, a universal MATLAB® code might not be given, because they require specific, individual input data. For others, only a general concept of a “component” is given, which does not give a clear recipe how to calculate. For these indicators, individual implementations might vary; moreover, the same implementation with signals of different acquisition parameters might vary, as well. From the prac cal CMS opera on point-of-view, it is worth to note that any indicator, which requires either integra on (like VRMS) or includes a denominator (like crest, kurtosis or SER™) is more error prone to any random signal disturbances than other indicators, resul ng in higher False Alarm Rate .
Lastly, indicators based on the tracking of nth harmonic along with a family of m sidebands, like SER™ or SBPF require a priori selection of n and m, which is difficult, and always arbitrary.
5.4.2
Trend Data
Referring to Fig. 5.2, in monitoring systems, scalar HI-s are used in two general ways, described below.
5.4 Monitoring Scalar Health Indicators as Trend Data
207
Trend events Firstly, the HI-s from current signals are compared against permissible levels (like in a protection system). As described in Sect. 2.5.5, the permissible threshold levels are typically set either on the basis of norms (most commonly VRMS from ISO 10816 or its 20816 successor) or are set in a data-driven mode. In addition, monitoring systems frequently offer additional threshold classes, like “Warning” and “Alarm” levels, and threshold-related actions, like SOE searching and events’ acknowledgements. For convenient notification, modern monitoring systems offer attractive integration with portable devices, like smartphones using wireless communication architecture. Generation of trend plots Secondly, values of HI-s from current signals are plotted against time together with their historical values, generating so-called “trend plots”. Such plots are generally recognized as most practical tools in condition monitoring, because a suitable selection of broadband/wideband indicators or definition of frequency/order band for narrowband indicators, together with appropriate input data results in reliable fault detection, fault identification, and fault development tracking. Figure 5.4 Illustrates how trend plots are generated. As illustrated in Fig. 5.4, from every continuous vibration signal, a set of predefined HI is calculated. Most frequently, all types of HI-s in a set (broadband, wideband and narrowband) are calculated simultaneously from a given vibration
Fig. 5.4 Generation of trend plots
208
5 Vibration-Based Condition Assessment Methods
Fig. 5.5 An example of time series of three scalar indicators: PP, RMS, and VRMS
signal. Typically, individual sets of HI-s are stored asynchronously, because they are calculated from signals, which are buffered according to the machine operational conditions. Nevertheless, for stationary operational conditions, condition monitoring systems typically store these sets of health indicators in fixed time periods, e.g. every 10 min. An example of a “trend” plot of three scalar indicators typically used in a protection system is illustrated in Fig. 5.5. Frequently, scalar indicators calculated from vibration data are displayed along with operational data, although their time resolution might differ significantly, because some scalar indicators are calculated and stored asynchronously according to data storage logic, while process parameters are typically stored synchronously. Figure 5.6 illustrates an example of an asynchronous, shaft-related scalar HI displayed together with a synchronous speed value. In MATLAB®, trend plots are typically generated using the plot command with time data followed by values, i.e. plot( , ). Worth mentioning, standard MATLAB® plotting functions enable either single or double vertical axis. In older MATLAB® versions, the double vertical axis was generated using the
Fig. 5.6 An example of time series of an asynchronous narrowband component with a synchronous process parameter
5.4 Monitoring Scalar Health Indicators as Trend Data
209
plotyy command, whereas since 2016, double y-axis is generated via yyaxis function. Although trend graphs as condition assessment methods are generally in favor in commercial CMS, they are characterized by two disadvantages. Firstly, trend plots assume that defined scalar indicators cover all possible fault modes. This is simply not always true, because manifestation of some failure modes is practically unpredictable. Secondly, trend plots offer fault identification only when they accurately represent filtered signal components corresponding to known predefined elements, which calls for further diagnostic analysis of various figures in diagnostic systems.
5.5 5.5.1
Evaluation of Scalar Health Indicators General Evaluation Paths
As illustrated in Fig. 5.3, scalar health indicators might be calculated from numerous types of input data, including time waveform and its spectral amplitudes, envelope waveform and its spectral amplitudes, their “resampled”, TSA or residual counterparts from both, the acceleration and partially from the velocity signal. In case of spectral analysis, the number of possible bandwidths is practically unlimited; therefore, many CMS operate on tremendous total number of indicators. Nevertheless, from the signal processing point-of-view, only two types of indicators are illustrated in Fig. 5.3, i.e. indicators calculated by running an individual algorithm with the entire signal as an input (PP, RMS, kurtosis, crest, etc.) and indicators, which are calculated by running an individual algorithm against specifically preselected “narrow-band” data. General evaluation paths are illustrated in Fig. 5.7. The first set of indicators are broadband health indicators and are calculated directly either from amplitudes of raw time waveforms, their envelope waveforms, resampled waveforms, their envelopes, TSA signals or residual signals. The second set of indicators are narrowband health indicators, which are calculated from amplitudes of selected frequency/order components, i.e. from narrowband signals. Narrowband signals are obtained by filtering input signals with bandpass filters. These filters are applied either in time domain or in frequency/ order domain; however, when a relatively narrow bandpass filters are considered, the frequency/order domain filters are in favor, as illustrated in Fig. 5.7. Typically, mul ple narrowband HIs are calculated from the same spectral data by selec on of data corresponding to certain ranges of spectral indexes; therefore, this process is frequently referred to as “narrowband component extrac on”.
Extraction of a typical narrowband signal is illustrated in the next Section. When narrowband scalar indicators are evaluated, the amplitude representation needs to be selected, e.g. sum, power, or RMS values, which is described in Sect. 5.5.3. When
210
5 Vibration-Based Condition Assessment Methods
Fig. 5.7 Evaluation of broadband, wideband, and narrowband scalar health indicators
narrowband indicators are calculated using frequency or order domain, evaluation of spectral indexes requires additional consideration, which is described in Sect. 5.5.4. Recalling, when a so-called wideband indicators are calculated (like VRMS), the filtering is done either in the time domain or in the frequency domain, depending on individual setup.
5.5.2
Extraction of Narrowband Signals
Following code illustrates narrowband signal extraction step-by-step. First, narrowband signal is presented in time-domain (plus its zoom), and in frequency-domain, in Figs. 5.8, 5.9, and 5.10, respectively. The signal is a simple sinusoidal component merged in noise. Next, the signal is filtered in the frequency domain. Corresponding frequency range is marked. Finally, the narrowband signal in time-domain is presented in Fig. 5.11.
Time domain waveforms Broadband signal
Amplitude
0.5
Narrowband signal
0
-0.5
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Time [s]
Fig. 5.8 Example of noisy signal and filtered sinusoidal component
0.8
0.9
1
5.5 Evaluation of Scalar Health Indicators
211
Time domain waveforms Broadband signal
Amplitude
0.5
Narrowband signal
0
-0.5
0.02
0.04
0.06
0.08
0.1
0.12
0.14
Time [s]
Fig. 5.9 Example of noisy signal and filtered sinusoidal component—USER zoom
Full resolution spectrum 0.4 Broadband Extracted
Amplitude
0.3
limit
X 100 0.2
limit
Y 0.2934
0.1
0 50
60
70
80
90
100
110
120
130
140
150
0.8
0.9
1
Frequency [Hz]
Fig. 5.10 Spectral representation of the extracted component 90–110 Hz Time domain - filtered signal 0.4
Amplitude
0.2
0
-0.2
-0.4
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Time [s]
Fig. 5.11 Time-domain representation of the extracted (frequency-domain filtered) signal
As illustrated in Figs. 5.10 and 5.11, the zero-peak (or PP/2) values in both domains, i.e. frequency domain and time domain are different. Of course, the sum and average values of both data sets are also different, as the sum of in time-domain is theoretically equal zero (here 1.0008e-14).
212
5 Vibration-Based Condition Assessment Methods
Figures 5.8, 5.9, 5.10, and 5.11 are generated using following code: %% GENERATE SIGNAL fs = 1e3; dt = 1/fs; T = 1; t = dt:dt:T; N = length(t);
% % % % %
USER 1 kHz sampling frequency constant time resolution USER 1 second total time time vector number of points (samples) in the signal
rng(0); x = .3*sin(2*pi*100*t) + rand(1,N)-.5; Fc1 = 90; Fc2 = 110;
% sinusoidal component in noise
% USER starting cutoff frequency: 90 Hz % USER ending cutoff frequency: 110 Hz
%% PLOT ORIGINAL TIME-DOMAIN SIGNAL TD_fig = figure('Position',[300 300 550 180]); % save handle for future plot(t,x,'b'); axis tight; grid on; xlabel('Time [s]'); title('Time domain waveforms');ylabel('Amplitude');set(gca,'fontsize',8); %% Y Y Y Y
CALCULATE SPECTRUM VALUES = fft(x); % Fast Fourier Transform (complex output) = abs(Y); % spectral amplitudes - absolute value of complex numbers = Y(1:N/2+1); % one-sided spectrum, including DC and fs/2 components = Y/(N/2); % scaling with respect to the number of samples
%% PLOT FULL RESOLUTION SPECTRUM df = 1/T; % spectral resolution, also: fs/N f = 0:df:fs/2; % frequency vector S_fig = figure('Position',[300 300 550 180]); % save handle for future plot(f,Y); xlim([50 150]); ylim([0 .4]);title('Full resolution spectrum'); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8); %% GET AND PLOT FILTERED TIME-DOMAIN SIGNAL x_NB = Filter_signal_BP(x,fs,[Fc1,Fc2]); % See Section 4.2.1.7 set(0,'CurrentFigure',TD_fig); hold on;% select back the first figure plot(t,x_NB,'r','linewidth',2); % emphasize filtered signal legend('Broadband signal','Narrowband signal'); figure('Position',[300 300 550 180]); % additional plot of filtered signal plot(t,x_NB,'r'); grid on; title('Time domain - filtered signal'); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); %% EXTRACT from till selected_y selected_f
AND PLOT NARROWBAND SPECTRAL COMPONENTS: 90Hz-110Hz = Fc1/df + 1; = Fc2/df + 1; = Y(from:till); % spectral amplitudes of interest = f(from:till); % corresponding frequency indexes
set(0,'CurrentFigure',S_fig); hold on; % select back spectrum figure plot(selected_f,selected_y,'r'); plot([selected_f(1), selected_f(1)] ,[0,.4],'k:'); plot([selected_f(end),selected_f(end)],[0,.4],'k:'); legend('Broadband','Extracted','limit','limit');
The current example illustrates the actual “narrowband” component in both, time and frequency domain, which is considered as a “narrowband HI”. However, in a typical CMS scenario, when the signal is transferred into frequency/order domain, the proper indexes are selected, the defined HI value is calculated without any representation in time/angle domain.
5.5 Evaluation of Scalar Health Indicators
213
Full resolution spectrum 0.4 selected__y 0.3
Broadband
What to do with these
Extracted
Value [g]
selected values? 0.2
0.1
0 50
60
70
80
90
100
110
120
130
140
150
Frequency [Hz]
Fig. 5.12 Illustration of the problem of selection of NB HI evaluation function
5.5.3
Evaluation of Spectral Amplitudes of Narrowband Signals
Once the narrowband signal is extracted in the frequency or order domain, it is always the case that the following question arises: What to do with selected values? —as illustrated in Fig. 5.12. Individual selection of evaluation function is based on particular application. For instance when shaft Imbalance is tracked, typically the peak value of the RPMx1 is calculated, because it is characterized by a large dynamics, so referring to Fig. 5.12 it is: RPMx1 = max(selected_y);
On the other hand, when REB condition is monitored using regular spectrum, typically the RMS value of a relatively wide bandwidth of a high frequency (HF) region is calculated. In practice, the evaluation function is selected after answering following questions: • Q1: Does the evaluation need to be domain-independent (i.e. interchangeable between time and frequency domains)? • Q2: Does the evaluation need to have a clear formal (scientific, mathematical) meaning? • Q3: What is more important, the dynamics, i.e. quick response to a fault development or reliability, i.e. relatively small variance (as these features typically contradict themselves)? If the selected HI has to be domain-independent, typically spectral energy, power or RMS calculated using the Parseval’s Theorem are used. If the evaluation has to have commonly used scientific meaning, additional power density algorithm is used. When trend dynamics are of upmost interest, the peak-based algorithms are used. On the contrary, when the reduction of false alert is of major concern, reflecting in desired HI variance minimization, the square root function-based algorithms are in favor. Following code illustrates how to program each evaluation function in MATLAB®. Recalling the code from the previous Section, four variables are considered:
214 x y x_NB selected_y
5 Vibration-Based Condition Assessment Methods - vibration signal, a sinusoidal component in noise. - scaled amplitudes of a one-sided spectrum. - time signal filtered in the frequency domain in the 90–110 Hz band. - extracted spectral amplitudes of interest, corresponding to 90–110 Hz band.
Following code shows how to calculate most commonly used health indicators common for both, time and frequency domains. For the general reference and conciseness within formulas development, the indicators are first calculated for broadband signals x and Y: %% HEALTH INDICATORS FROM A BROADBAND SIGNAL - BEFORE FILTERING % Time-domain TD_BB_E = sum (x.^2); % Energy 1.231944716173106e+02 TD_BB_P = 1/N*sum (x.^2); % Power 0.123194471617311 TD_BB_RMS = sqrt(1/N*sum (x.^2)); % RMS 0.350990700186359 % Frequency-domain: directly from Parseval's Theorem FD_BB_E = 1/N*sum(abs(fft(x)).^2); % Energy 1.231944716173108e+02 FD_BB_P = 1/N^2*sum(abs(fft(x)).^2); % Power 0.123194471617311 FD_BB_RMS = 1/N*sqrt(sum(abs(fft(x)).^2));% RMS 0.350990700186359 % RMS simplified from: % sqrt(1/N^2*sum(abs(fft(x)).^2)) % ------ CALCULATIONS FROM SCALED SPECTRAL AMPLITUDES REQUIRE ------------% ------------------ FOLLOWING REARRANGEMENT -----------------------------% 1) Unscale the scaled amplitudes - multiply by scaling factor (N/2) % 2) Multiply results by 2 to ”make up” for the second part of the spectrum % So, from the Parseval's Theorem, the Energy in frequency domain equals: % 1/N * sum(abs(fft(x)).^2) % Thus, the Energy calculated from ”scaled, one-sided” amplitudes equals: % 1/N * 2 * sum((Y*(N/2)).^2) % which is simplified by: % 2/N * (N/2)^2 * sum(Y.^2) = % = 2/N * N^2/4 * sum(Y.^2) = % = 1/2 * N * sum(Y.^2), % resulting in final: % N/2 * sum(Y.^2) % ----------------------- REARRANGEMENT END -------------------------------
% Frequency-domain: from scaled spectral amplitudes FD_BB_E_sc = N/2*sum(Y.^2); % Energy 1.234198267452035e+02 % Power 0.123419826745204 FD_BB_P_sc = 1/2*sum(Y.^2); FD_BB_RMS_sc = sqrt(1/2 * sum(Y.^2)); % RMS 0.351311580716041
%% HEALTH INDICATORS FROM A NARROWBAND SIGNAL - AFTER FILTERING % Time-domain signal filtered in frequency domain TD_NB_E = sum (x_NB.^2); % Energy 45.245600402317550 TD_NB_P = 1/N*sum (x_NB.^2); % Power 0.045245600402318 TD_NB_RMS = sqrt(1/N*sum (x_NB.^2)); % RMS 0.212710132345212 % Frequency-domain: directly from Parseval's Theorem FD_NB_E = 1/N*sum(abs(fft(x_NB)).^2); % Energy FD_NB_P = 1/N^2*sum(abs(fft(x_NB)).^2); % Power FD_NB_RMS = 1/N*sqrt(sum(abs(fft(x_NB)).^2)); % RMS
45.245600402317571 0.045245600402318 0.212710132345212
% Frequency-domain: from scaled spectral amplitudes FD_NB_E_sc = N/2*sum(selected_y.^2); % Energy FD_NB_P_sc = 1/2*sum(selected_y.^2); % Power FD_NB_RMS_sc = sqrt(1/2 * sum(selected_y.^2)); % RMS
45.479670816123836 0.045479670816124 0.213259632411115
5.5 Evaluation of Scalar Health Indicators
215
As illustrated, for narrowband health indicators calculated from scaled spectral amplitudes, the final values do not exactly match the “true” time-domain values, but these differences, as a rule, are insignificant. Other commonly used evaluation function for narrowband spectral HI-s include: bandwidth NB_peak NB_peak_sq NB_sum NB_sum_sq NB_sum_norm_N NB_sum_norm_BW NB_sum_sq_norm_N NB_sum_sq_norm_BW
= = = = = = = = =
Fc2-Fc1; max(selected_y); max(selected_y.^2); sum(selected_y); sum(selected_y.^2); 1/length(selected_y) * sum(selected_y); 1/bandwidth * sum(selected_y); 1/length(selected_y) * sum(selected_y.^2); 1/bandwidth * sum(selected_y.^2);
The last evaluation function, i.e. the sum of squares of scaled, one-sided spectral amplitudes of the narrowband signal divided by its bandwidth is a common spectral power density estimator. Table 5.3 Illustrates the values and the relative change of all listed indicators for a 100% increase of the deterministic component in the considered signal, i.e.: rng(0); Signal 1 rng(0); Signal 2
= 0.3*sin(2*pi*100*t) + rand(1,N)-.5;
% original signal
= 0.6*sin(2*pi*100*t) + rand(1,N)-.5;
% doubled sin component
Such increase could be for instance caused by a growing machine Imbalance. The results of sensitivity of each HI with respect to 100% increase of the amplitude of the sinusoidal, deterministic component are illustrated in the Table. Values of each HI are calculated from selected_y, i.e. values of a scaled, one-sided spectrum corresponding to the frequency band from 90 to 110 Hz. Note that in practice, the final range of values of individual HI depends on the selected units in the system. When system operates in [g] units, all but high-amplitude shaft harmonics have almost always initial spectral amplitudes smaller than 1. In this case, any “power” representation inevitably places the final value closer to 0, while any square root places it closer to 1. This is the reason, why except signal energy, the sum and peak values from Table 5.3 are characterized by highest values. Naturally, for original amplitudes greater than 1, the consequences are opposite. In case of velocity representations, typical significant values are greater than 1. However, when the sensitivity of individual HI is considered, i.e. when relative change is tracked, the Table indicates that any evaluation function which squares the data increases HI dynamics, while any evaluation, which includes normalization of sum of values decreases HI dynamics Summarizing, in a typical scenario, when narrowband health indicators are calculated from spectral amplitudes, the input signal represents scaled amplitudes of a full resolution, one sided spectrum:
216
5 Vibration-Based Condition Assessment Methods
Table 5.3 Illustration of the influence of the signal change on values of individual HI-s
Y Y Y Y
= = = =
fft(x); abs(Y); Y(1:N/2+1); Y/(N/2);
% % % %
Fast Fourier Transform (complex output) spectral amplitudes - absolute value of complex numbers one-sided spectrum, including DC and fs/2 components scaling with respect to the number of samples
For evaluation of a scalar value of a narrowband HI, only selected “fragment” of Y is taken into account: selected_y = Y(index_start:index_stop);
Next, the values of enter some evaluation function: HI_val = evaluation_function(selected_y);
The most common functions include peak value, peak value of square values, sum, sum of squares, energy, power, and RMS.
5.5.4
Evaluation of Spectral Indexes of Narrowband Health Indicators
When narrowband scalar indicators are calculated, it is always necessary do select certain set of amplitude values, from which it is calculated. This set of amplitude values is selected on the basis of the bandwidth, which is calculated in advance
5.5 Evaluation of Scalar Health Indicators
217
bandwidth
80
90
100
analog value
110
Indexes
120
8
9
10
11
12
Order
Fig. 5.13 The concept of evaluation of spectral indexes for narrowband health indicators, left: by range, right: by value
(with respect to analytical center frequency). The bandwidth is always initially calculated as an analogue, i.e. continuous value, and it is might be finally represented as either as a range, e.g. 90–110 Hz or a single component name, like 3rd shaft harmonic. Figure 5.13 illustrates both concepts. Definition of a relatively wide band consisting of a spectral range with starting and ending values for tracking of the development of amplitude of a single theoretical components, demonstrated in Fig. 5.13 (left) is easily justified. First of all, such definition handles slight variations of operational speed. Secondly, it is more robust, simply, it is more stable. Tertiary, it compensates for mismatch between theoretical values and true frequencies/orders of components due to all kinds of slips or transmission errors. Finally, it might enable definition of narrowband HI for frequencies or orders, which are not accurately represented due to limited spectral resolution. For a range definition, the fundamental question is as follows: How to map any theoretical band with a fixed set of spectral indexes? To answer this question, following issues need to be considered: • Method of bandwidth definition • Spectral resolution of the data, from which narrowband HI is going to be calculated • Direction of location of nearest index • Minimum required No. of spectral indexes. Method of bandwidth definition Commonly, the bandwidth is calculated in three stages. First, the single frequency (or order) corresponding to a given machine element is calculated. Typically, it is called the “center frequency” CF. Secondly, the “analog”, (theoretical, symbolic)
218
5 Vibration-Based Condition Assessment Methods
bandwidth is calculated either using percent of the frequency/order (here Band Width BW) or number of “resolution points” Nres, respectively: band = [CF-CF*BW/2 : CF+CF*BW/2] band = [CF-Nres : CF+Nres]
Finally, when the signal is available, on the basis of its acquisition parameters, the final indexes are calculated. Spectral resolution of the data, from which narrowband HI is going to be calculated Every spectral components, like shaft harmonic, GMF, BPFO, BPF, and others is calculated on the basis of the kinetostatic analysis of the drive train of a rotary machine. For instance, for a machine having a reference input shaft, a gearbox connected directly to the referential shaft, with gears having Z1 = 23 and Z2 = 67 teeth, and the gearbox output shaft, the speed of the output shaft is equal to the ratio of the gearbox times the speed of the input shaft: V_Hz = r * = 23/67 *
and V_order = r * 1 = 23/67 * 1 = 0.343283582089552 * 1 = 0.343283582089552
For a common average speed equal to 20 Hz, the speed of the output shaft is equal to: V_Hz = 23/67 * 20 [Hz] = 6.865671641791044 [Hz]
The order of any component is speed-independent, so it does not change. Clearly, in both cases, the perfect matching of a single spectral component with the output shaft is practically impossible, as it would require infinite signal length (or infinite number of revolutions Nrot). Practical considerations about spectral resolution and the spectral bandwidth for frequency and order domains are illustrated in Table 5.4.2 Considering a typical 1-s signal, sampled with 25 kHz frequency, where the input shaft speed is 20 Hz, the full-scale spectral representation is as follows:
2
It is recommended to investigate Table 5.4 simultaneously with Table 4.5.
5.5 Evaluation of Scalar Health Indicators
219
Table 5.4 Spectral parameters for frequency and order domain
fs T dt t N V
= = = = = =
25e3; 1; 1/fs; dt:dt:T; length(t); 23/67*20;
x
= sin(2*pi*V*t) + rand(1,N)-.5;
Y = abs(fft(x)); Y = Y(1:N/2+1)/(N/2); df = 1/T; f = 0:df:fs/2; plot(f,Y); hold on; grid on;
% % % % % %
USER sampling frequency USER signal total time time resolution time axis number of point in the signal speed of the output shaft 6.865671...
% USER signal % % % %
spectrum calculation - step 1 spectrum calculation - step 2 spectral resolution frequency axis
xlim([3 11]); set(gca,'fontsize',8); xlabel('Frequency [Hz]'); BW f_start f_stop
= 0.1; % so-called "10 percent" bandwidth = V - BW/2 * V; % starting frequency, left edge 6.659701492537313 = V + BW/2 * V; % stopping frequency, right edge 7.071641791044775
m = max(Y)*1.2; % visible plot limit ylim([0 m]); % USER limit plot([V,V],[0 m],'r:'); % USER limit plot([f_start,f_start],[0 m],'k--'); legend('data','true frequency','selected bandwidth'); % Plot remaining part after legend display plot(f,Y,'rx','markersize',10); plot(f,Y,'r.','markersize',10); plot([f_stop, f_stop ],[0 m],'k--');
220
5 Vibration-Based Condition Assessment Methods
data
1
true frequency selected bandwidth data1
0.8
data2 data3
0.6
0.4
0.2
0
3
4
5
6
7
8
9
10
11
Frequency [Hz]
Fig. 5.14 Typical problem for percent-wise bandwidth definition at relatively low frequencies
Figure 5.14 clearly illustrates that for percent-wise bandwidth definition, which is probably the most popular used within definition of narrowband HI-s in CMS [1], it is relatively easy to obtain ambiguous results. For the considered data, the frequency resolution (1 Hz due to 1 s length) does not match the output shaft speed (ca. 6.8 Hz), which is illustrated by the fact that the dotted line is clearly separated from the data points. Next, the 6%-bandwidth definition caused, visible as dashed line clearly covers only a single data point. Moreover, for T = 0.5 [s] or T = 0.92 [s], the bandwidth does not cover any data point at all. Still, the 6%-bandwidth is twice as much as commonly used. Direction of location of nearest neighboring indexes One of methods to solve this problem is to require that both edges of the bandwidth select their nearest spectral component, and add this point to the selected data. Although this could be “left” or “right” direction, only the opposite direction for both edges guarantees that they will not select the very same point. Additional care has to be taken for bandwidth, where left edge is smaller or equal the first df or do value (beginning of the spectrum axis) and where the right edge is equal or greater the fs/2-df or Nsamp/2-do values. In practice, the latter case is hardly ever met. Minimum required No. of spectral indexes In addition to selection of nearest neighbors, one simple method to increase the meaningfulness of the selection of spectral band is to force minimum number of selected spectral points, for instance, according to the abovementioned rule for selection of nearest neighbors applied to consecutive indexes. For instance, in the given example, in the minimum required number of points is equal to 5, the final selection corresponds to spectral components of frequencies [5, 6, 7, 8, and 9], which is reasonable, as this bandwidth covers almost all the energy generated by the component of interest.
5.5 Evaluation of Scalar Health Indicators
221
The above statements (illustrated on the example of frequency domain data) are applied in the order domain prac cally in the same way, with signal parameters replaced according to Table 5.4.
On the other hand, definition of a band consisting of a single point for tracking of the development of amplitude of a single theoretical components, illustrated in Fig. 5.13 (right) is justified when the data acquisition and data processing system together assure a high-level of synchronous, i.e. phase-locked data and reliable angular (i.e. order) domain data representation. Such data is for instance obtained using high resolution encoders. Typically, analysis of single-point bandwidths is used for tracking of shaft harmonics. In this case, the band definition could be treated similar to a previous case, with additional condition: index_start = index_stop; A common solution for determination of spectral ranges for narrowband indicators implemented in CMS is the 3% bandwidth, which means that for every defined frequency or order, the band covers a range from −1.5 to +1.5% of the frequency value. Considering a typical 10 s signal, depending on the value of the (center) frequency, the bandwidth and resulting number of frequency components varies, as illustrated in Table 5.5. Note that in this example, the sampling frequency is greater than 20 kHz, but it is irrelative for selection of indexes. As illustrated in the Table 5.5, in case of low frequencies, which is typical for phase-locked components, the decision concerning the number of components, which is to be taken into account for calculations, might require some arbitrary decisions on extensions to neighboring indexes. Consequently, any analysis, which is calculated as a scalar value from such signal is called a “narrowband analysis”. In the “most narrow case”, where the band corresponds to a single point, the notion of a narrowband signal is typically change to a “harmonic” or a “tone”. Table 5.5 Selection of spectral indexes for 3% bandwidth
222
5 Vibration-Based Condition Assessment Methods
5.6
Extended Role of Scalar Indicators in Diagnostic System
Scalar indicators recorded by the “monitoring” part of a CMS might be used in its “diagnostic” part as well. Any stored scalar indicators could serve as an auxiliary information for advanced analysis, for instance for selection of a raw signal of interest from a relatively large data set. In this case, selection of the trend points is based on their values, but the selection of the raw signal is done on the basis of their timestamp, which has to be somehow available as metadata. Sometimes, scalar indicators could be also used by data loggers, as an alternative to large data sets of raw data.
5.7 5.7.1
Diagnostic Figures Classification and Selection
In the “diagnostic” part of a condition monitoring system, the assessment of condition of a machinery (or its selected element) is typically done by visual analysis of data displayed in figures, which (in contrast to trend plots) represent continuous vibration signals. Sometimes, such plots are called “high-frequency” data plots. From a CMS user point-of-view, these plots, or figures, could either refer to: • • • • •
A raw current waveform, A processed current waveform, A single, historical waveform, An array of historical processed waveforms, Or to an array of historical processed waveforms and processed current waveform.
However, for a MATLAB® user, it might be assumed that “current” signals do not exist, because all analyzed data is imported from a stored data source. Such analysis is generally classified as “offline” historical data analysis, in contrast to philosophy if so-called “troubleshooting”, which refers mainly to assessment of technical condition on the basis of diagnostic analysis of current data only. Figure 5.15 illustrates a graphical representation of some basic figures in a commercial CMS, which might refer to both, either current or historical data. In a typical condition assessment path, diagnostic figures are not the first choice of selection, because they are harder to interpret than trend plots. However, in many cases, the trend plots fail to detect a fault or they do not provide sufficient information about the fault mode or its details, like precise identification of the source or fault severity. This is the reason why frequently the “diagnostic capabilities” of a commercial CMS are used only when needed, as an advanced condition assessment tool; yet, they are always desired as a backup support.
5.7 Diagnostic Figures
223
Fig. 5.15 Examples of icons of figures available in a commercial CMS [Courtesy of AMC Vibro®]
From data structure point-of-view, CMS diagnostic figures could be divided into three major classes: • CLASS 1: 2-dimensional figures generated from a single, continuous signal, • CLASS 2: 3-dimensional figures generated from a single, continuous signal, • CLASS 3: 3-dimensional figures generated from a discontinuous array of continuous signals. Form data-processing point of view, selected instances of these classes might refer either to acceleration signals or velocity signals. Furthermore, within each group, either full-resolution figures or averaged figures are considered. This general, multi-level classification of commonly used CMS figures in illustrated in Fig. 5.16. Classical 2-dimensional figures of full-resolution data include time waveform plot, amplitude spectrum, envelope waveform plot, spectrum of envelope signal (so-called “Envelope Spectrum”), resampled waveform plot, amplitude spectrum of the resampled signal (so-called “Order Spectrum”), plot of the envelope of resampled waveform, and amplitude spectrum of the envelope of resampled signal
Fig. 5.16 General classification of figures used in typical CMS
224
5 Vibration-Based Condition Assessment Methods
(so-called “Envelope Order Spectrum”). Classical 2-dimensional figures of averaged data include averaged amplitude spectra of full-length waveforms, their envelopes, and resampled counterparts of both. Other 2-dimensional figures include for instance cepstrum [12] or Protrugram [13] plots. Within 3-dimensional figures, a clear differentiation could be made between figures, which represent a single, continuous signal or figures, which represent multiple, discontinuous signals, which represent much longer period of time relatively to a duration of a single signal. For a single signal, figures could be further classified as time–frequency representations (e.g. a spectrogram, wavelet analysis, Fast Kurtogram [14]), so-called alpha-frequency representations, e.g. Modulation Intensity Distribution (MID) [15], Integrated Modulation Intensity Distribution (IMID), Spectral Correlation Density (SCD), Spectral Coherence Density (SCohD) [16] or angular maps, e.g. Instantaneous Circular Pitch Cyclic Map (ICPCM) [17], Angular-Temporal Spectrum (ATS) [18] or Local Meshing Plane (LMP) [19]. For representation of multiple, discontinuous signals, typical figures include waterfall and cascade plots. Although particular conventions might differ, here it is accepted that a “waterfall plot” is a full-resolution, time–frequency representation of a relatively dense data (like machine run-up), while a “cascade plot” is an averaged, spectral representation of relatively sparse data (e.g. multiple historical data from continuous monitoring).3 A detailed classification of figures used in typical CMS, generated form acceleration and velocity signals are illustrated in Fig. 5.17 and in Fig. 5.18, respectively. Note that historically, the “angle” notation in time domain is generally replaced by the “order” notation, when referred to spectral analysis. From Fig. 5.17 it is concluded that any signal processing methods involving enveloping or residual signals are typically restricted to acceleration signals, which are suitable for representation of structural vibrations of most rotary machinery. Any other figure might practically be represented in both physical values, i.e. acceleration or velocity. By comparison of Figs. 5.17 and 5.18 with Fig. 5.3 illustrating generation of typical scalar health indicators, it is concluded that diagnostic systems offer some figures, from which scalar indicators have not yet been commonly implemented in CMS. These figures, including averaged spectra, some dedicated 2-D figures, and 3-D figures, are highlighted with grey background color. Finally, comparing Figs. 5.17 and 5.18 with Sect. 5.5.4, it needs to be stated that typically, narrowband health indicators are calculated using spectral ranges from full-resolution spectra. The averaged spectra, like PSD are not used, because they
The author has encountered some engineers who understand “waterfall” and “cascade” plots completely opposite, so the names are not claimed constant.
3
5.7 Diagnostic Figures
225
Fig. 5.17 Classification and calculation scheme of typical figures used in CMS generated form acceleration signal
226
5 Vibration-Based Condition Assessment Methods
Fig. 5.18 Classification and calculation scheme of typical figures used in CMS generated form velocity signal
are generally not suitable for tracking of relatively narrow-spaced spectral components. Subsequent Sections illustrate MATLAB® codes for generation of selected figures. The codes are in three separate Sections according to the proposed classification based on the dimensionality, type of input signal(s), domain, and data resolution.
5.7.2
2-D Figures Generated from a Single Continuous Signal
5.7.2.1
General Concept
In this Section, a brief description of individual figures is given along with selected, practical remarks. All figures presented in following Sections could be organized in following groups: GROUP #1: waveforms (time-domain, envelope, angle-domain, etc.), GROUP #2: full-resolution spectra (frequency, envelope, order, etc.), GROUP #3: averaged spectra (frequency, envelope, order, etc.).
5.7 Diagnostic Figures
227
Within each GROUP, certain operations are the same, and plots differ just by labeling so just a single figure is demonstrated for each group. However, complete MATLAB® codes for generation of all listed figures are to be found in Chap. 9. Note that for averaged figures, GROUP #3, the averaging could be defined in different ways. As an initial choice, number of averages could be used, and this technique is shown in the current Chapter; however, generally it is recommended to use the user-defined frequency resolution instead, which is demonstrated in Chap. 9 .
5.7.2.2
Time-Domain Waveform (TD)
Time waveform is the most simple figure, which illustrates high-frequency data. The diagnostic value of original time waveform is frequently underestimated. In many cases of machine faults, its interpretation enables detection of cycles leading to fault detection and identification, without spectral analysis. As in case of the trend plots, time waveform is displayed in MATLAB® using the plot command with two arguments, time and amplitude data. From MATLAB® point-of-view, the only difference between the trend plot and the time waveform plot, is that the first one is typically plotted with respect to an asynchronous time abscissa given in a separate data, whereas in case of time waveform, the values are plotted with respect to synchronous abscissa, which is generated from the sampling frequency and the total number of points. Following code shows a typical generation of a single time waveform plot: x fs N dt T t
= = = = = =
rand(1,250)-.5; 25e2; length(x); 1/fs; N * dt; dt:dt:T;
% % % % % %
250 random numbers 2.5 kHz sampling frequency number of points (samples) in the signal constant time resolution total signal time in [s] time vector
figure('Position',[300 300 550 200]); % all figures of the same size plot(t,x,'b'); % generates figure set(gca,'fontsize',8); % set the size of the font xlabel('Time [s]'); % labeling abscissa ylabel('Value [m/s^2]'); % labeling ordinate grid on; % sets additional grid axis tight; % fills the graph with data
The resultant plot is shown in Fig. 5.19. In commercial CMS, time waveforms typically have convenient cursor options, like harmonic cursors, as illustrated in Fig. 5.20. The cursor corresponds to the dominant, low-frequency, 50 Hz component present in the signal.
228
5 Vibration-Based Condition Assessment Methods 0.4
Value [m/s 2 ]
0.2 0 -0.2 -0.4 0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
Time [s]
Fig. 5.19 A typical time waveform
Fig. 5.20 A typical time waveform with a harmonic cursor [Courtesy of AM Vibro™]
One of major drawbacks of time waveform is that its diagnostic value strongly depends on the current zoom (or the screen resolution), and capabilities of cursors arrangements. NOTE: Details of Envelope waveform (E) genera on are given in Sec on 4.3.1. Details of AngleDomain waveform (AD) genera on are given in Sec on 4.3.1.8.
5.7.2.3
Spectrum (S)
A full-resolution spectrum, often called (imprecisely, yet intuitively) the “FFT-spectrum”, is one of most commonly used tool in the machine diagnostics, because it enables identification of signal frequency components. Following code shows how to generate a one-sided, scaled full resolution spectrum from a signal containing deterministic stationary and deterministic non-stationary components:
5.7 Diagnostic Figures
229
% SIGNAL PARAMETERS T = 0.5; % total signal time fs = 240; % sampling frequency 240 Hz % SIGNAL COMPONENTS % deterministic components A1 = 10; f1 = 20; A2 = 13; f2 = 37; A3 = 12; f3 = 46; % non-stationary component A_chirp = 17; f_start = 60; f_stop = 80; % GENERATE SIGNAL dt = 1/fs; t = dt:dt:T; N = length(t); s1 = A1*sin(2*pi*f1*t); s2 = A2*sin(2*pi*f2*t); s3 = A3*sin(2*pi*f3*t); s4 = A_chirp*chirp(t,f_start,t(end),f_stop); x = s1 + s2 + s3 + s4; % CALCULATE SPECTRAL AMPLITUDES Y = fft(x); % Fast Fourier Transform (complex output) Y = abs(Y); % spectral amplitudes - absolute value of complex numbers Y = Y(1:N/2+1); % one-sided spectrum, including DC and fs/2 components Y = Y/(N/2); % scaling with respect to the number of samples df = 1/T; % spectral resolution, also: fs/N f = 0:df:fs/2; % frequency vector % PLOT FULL-RESOLUTION SPECTRUM figure('Position',[300 300 550 200]); % all figures of the same size plot(f,Y); ylim([0 15]) set(gca,'fontsize',8); title('Full resolution spectrum'); xlabel('Frequency [Hz]'); ylabel('Value [m/s^2]'); grid on;
Figure 5.21 illustrates the resultant plot. Comparing the declared amplitudes of consecutive components (10, 13, 12, and 17 for chirp), Fig. 5.21 clearly shows that for components, for which the frequency vector has “proper candidates”, the spectral components are generally accurately represented (first and third deterministic components), but in case, where the spectrum does not have a “proper candidate” (frequency 37 Hz for the second deterministic component and the chirp component), the components are not represented accurately. This difference are a direct consequence of so-called “full cycles” of a particular component in the signal. These complete “cycles” are accessed by dividing the signal length by the cycle length of individual components, i.e.:
230
5 Vibration-Based Condition Assessment Methods Full resolution spectrum
15
X 20 Y 9.988 Value [m/s 2 ]
10
X 46
X 74
Y 11.82
Y 6.645
X 36 Y 8.355
5
0
0
20
40
60
80
100
120
Frequency [Hz]
Fig. 5.21 Scaled amplitudes of a full-resolution, one-sided frequency spectrum
T/(1/f1) = T*f1 = 10; % accurate representation T/(1/f2) = T*f2 = 18.5; % inaccurate representation T/(1/f2) = T*f3 = 23; % accurate representation
Clearly, the second component with frequency equal to 37 Hz has exactly 18 and a half periods, that is why the declared peak amplitude is significantly larger than the maximum spectral value of this component observed in Fig. 5.21. However, the total power (i.e. the sum of square values) of all points, which “contribute” to the representation of this component is still equal to the power of the declared component: sum(s2.^2)/N = 84.5
From diagnostic-point of view, full-resolution spectrum has some disadvantages, mainly: • For relatively large number of points, spectra are plotted using line-connected points, which implies a linear function between each pair of points, which is not true, because Fourier Transform is based on a set of orthogonal, i.e. independent functions [20]. Worth mentioning, historically, spectra were plotted using equivalent MATLAB® stem function. • Because a spectrum is generated from independent functions, it must not show any dependencies between individual spectral component. In practice, this means that identification of any relations, like in the case of harmonics and sidebands, is always done as a separate analysis. • Spectrum averages every time-variant components, which means that it is not capable to illustrate accurately any components, which are not stationary, like
5.7 Diagnostic Figures
231
cyclostationary pulse responses generated by REB faults. This limitation is solved by so-called “Envelope Spectrum” (ES). • Spectrum of a digital signal is always characterized by a fixed spectral resolution equal to the reciprocal of the signal length (or the number of revolutions for order domain); therefore, in practice, there is always a relatively large chance that a particular deterministic component (like GMF) is represented differently in each realization of the process, i.e. in each spectrum of subsequent signal from the very same machine operating in the very same operational conditions. As a consequence, for consecutive spectra, neighboring spectral candidates might accept significantly different values (e.g. 30%), so the ratio of the amplitude (or power) of particular components changes as well. This is especially detrimental for full-resolution analysis of sideband-to-carrier ratio in the frequency domain. Referring to Fig. 5.17, this drawback is reduced by either spectral averaging, signal resampling, or both. Finally, from theoretical point-of-view, full-resolution spectrum is not designed for analysis of real vibration signals, because such signals are not perfectly deterministic and noise-free [20]. NOTE: Details of Envelope Spectrum (ES) and Envelope Order Spectrum (EOS) genera on are given in Sec on 4.3.1. Details of Order Spectrum (OS) genera on are given in Sec on 4.2.2.
5.7.2.4
Averaged Spectrum (AS)
Typically, the so-called “averaged spectrum” of a vibration signal is obtained by averaging a number of full-resolution spectra of individual fragments of the signal. Each fragment is of equal length in order to preserve a fixed frequency resolution. As a result, the final spectral resolution of the averaged spectrum is equal to the reciprocal of time of a single fragment. In terms of the number of samples, the length of the frequency scale of the averaged spectrum is equal to half of the number of samples of a single fragment plus one. On the other hand, the frequency range of the final averaged spectrum is the same as the frequency range of each fragment. For a one-sided spectrum, the frequency range spans from 0 to the half of sampling frequency. Following code shows a typical, manual generation of a simplified averaged Spectrum (AS). The results of this function could be compared with spectral averaging functions available in MATLAB®, e.g. pwelch:
232
5 Vibration-Based Condition Assessment Methods
function [AS] = Averaged_spectrum(data,k,overlap,win) % DESCRIPTION % Function calculates scaled values of one-sided averaged spectrum of the % signal "x" using the number of averages specified by "k" and the overlap % specified by "overlap". The "win" parameter enables application of the % hanning window to each fragment. % % % % % % % % %
INPUT data - a single time signal to be processed, size k - integer number of averages overlap - user overlap [%], recommended: (0-90) win - use "hanning" for the hanning window; no window otherwise OUTPUT AS - scaled amplitudes of averaged one-sided spectrum EXAMPLE AS = Averaged_spectrum(x,10); % simple average of 10 fragments
if nargin < 4 % default window is rectangular (no windowing) win = 'rect'; if nargin < 3 overlap = 0; % default overlap is no overlap end end % SIGNAL PRE-PROCESSING N = length(data); % No. of samples in the signal w_len = floor(N/(k-overlap*(k-1)/100)); % No. of samples in a fragment if mod(w_len,2) w_len = w_len - 1; end
% w_len must be an even number
N_overlap = floor(w_len*overlap/100); FFT_array = zeros(k, w_len/2+1);
% No. of overlapping samples % allocate memory
if strcmpi(win,'hanning') w = .5*(1 - cos(2*pi*(1:w_len)'/(w_len+1))); w_coef = 1.4; elseif strcmpi(win,'rect') w = ones(w_len,1); w_coef = 1; end % SIGNAL PROCESSING for i = 1:k
% hanning window % window compensation % rectangular window % window compensation
% for every fragment of the signal
disp(['Processing fragment No.: ',num2str(i),' ...']) index_from = (w_len - N_overlap)*(i-1) + 1; index_till = index_from + w_len - 1; x = data(index_from:index_till); x = x(:).*w; Y = abs(fft(x)); Y = Y(1:w_len/2+1)/(w_len/2); Y = Y.*w_coef; FFT_array(i,:) = Y;
% % % % % %
current fragment windowing, x always a column vector spectral amplitudes extracting one side and scaling approximated windowing compensation current row of the final array
end disp(['Last ',num2str(N-index_till),' samples of the signal truncated.']); AS = mean(FFT_array,1); % average spectrum disp('Processing finished. ')
5.7 Diagnostic Figures
233
Worth mentioning, a literal meaning of the “Averaged Spectrum” is not accurate, because it implies arithmetical averaging of spectral values of a full-resolution spectrum in subsequent “bins”. Although for majority of cases, such averaging yields similar results as the arithmetical averaging of spectral values calculated from individual fragment of the signal, it is not mathematically meaningful, because the spectral values within such bin are independent, while averaging refers to results of some function. Moreover, averaging of spectral amplitudes does not allow any overlapping. In practical vibration-based analysis, Averaged Spectrum (AS) is frequently identified either with “PSD”, “(averaged) periodogram”, or with “pwelch “ spectrum, which cover both, precise signal processing method as well as particular way of data plotting (algorithm + figure). PSD (from Power Spectrum Density) implies that signal power is analyzed, so square of spectral averaged values is plotted. Periodogram is a more general term than PSD, because it is not limited to signal “power”, but it includes the PSD as one of its realization. Pwelch is a the most defined term, because it suggests particular signal segmentation, overlap, and windowing of individual fragments. Because any periodogram realization reduces spectral noise, typically averaged spectra are used for broadband comparison in logarithmic (dB) scale. NOTE: Details of (resolu on-based) Averaged Spectrum (AS) genera on are given in Sec on 9.5.3.5 Details of Averaged Envelope Spectrum (AES) genera on are given in Sec on 9.5.3.5 Details of Averaged Order Spectrum (AOS) genera on are given in Sec on 9.5.3.5 Details of Averaged Envelope Order Spectrum (AEOS) genera on are given in Sec on 9.5.3.5 Details of TSA-based spectra genera on are given in Sec on 4.3.3
Next Section describes generation of selected 3-dimensional figures for a single vibration waveform.
5.7.3
3-D Figures Generated from a Single Signal (Colormaps)
Recalling, a large list of 3-dimensional figures, which are used in vibration-based analysis are illustrated in Fig. 5.17. For some figures, the codes are commercially available, for other they are free, yet for some just the analytical description is given in scientific publications. The current Section lists the codes, which are easily found. Spectrogram is one of the most popular time–frequency analysis used for analysis of non-stationary signals. Sometimes, spectrogram helps to identify high-frequency pulses, as well. Finally, spectrogram is especially useful to illustrate multiple frequency modulations of various kind on a single plot. A user-friendly code for spectrogram analysis is available directly by MATLAB® spectrogram function.
234
5 Vibration-Based Condition Assessment Methods
Additionally, MathWorks® File Exchange Community offers numerous implementations of live spectrogram data processing. Fast Kurtogram Fast Kurtogram is, of course, a “computationally fast” version of the Kurtogram diagram. Fast Kurtogram enables simultaneous identification of repetition rate of pulses and structural frequency range, which is induced. Complete codes for Fast Kurtogram generation along with a demo file are present at MathWorks® File Exchange Community: https://www.mathworks.com/matlabcentral/profile/authors/1517873-jeromeantoni Note that in 2017, MATLAB® introduced a separate kurtogram function, as well. Alpha-Frequency Maps A number of alpha-frequency maps is available at MathWorks® File Exchange Community, and it still grows. As of beginning of 2020, following tools are available at: https://www.mathworks.com/matlabcentral/fileexchange/
[2019] [2016] [2014] [2014] [2013]
CMSfun—Cyclic
Modulation Spectrum (and Cyclic Modulation Coherence) Spectral Correlation (or Spectral Coherence) CPS_W —Cyclic Power Spectrum SCoh_W —Cyclic Spectral Coherence MID_JU_gui1—Modulation Intensity Distribution. Fast_SC —Fast
Next Section continues description of 3-dimensional figures, this time from an array of vibration signals.
5.7.4
3-D Figures Generated from Array of Discontinuous Signals
Considering a single physical vibration channel, typically, CMS stores raw data with a constant configuration from the same location (and mounting technique). This configuration includes sampling frequency and input signal range, signal length, sensor’s sensitivity and gain, and signal processing parameters (filters, integration, etc.) as well as data storage logic. The latter one could be time-based (synchronous) or operational condition-based (asynchronous). In both cases, if the content of the vibration signal mainly depends on the technical condition of the machine generating vibrations, it is possible to generate valuable 3-dimensional plots from a large number of such signals. Formally, such processing could be
5.7 Diagnostic Figures
235
understood as processing of a discontinuous, 3-dimensional array of multiple, continuous signals. Figures 9.29–9.34 in Chap. 9 illustrate examples of 3-D plots from an array of simulated data. Figure 12.6 shows example of a 3-D plot from an array of real, test-rig data. Finally, Fig. 12.7 presents example of a 3-D plot from an array of real, industrial data. Referring to general scheme presented in Fig. 5.16, 3-dimensional graphs could be generated from both, Acceleration and Velocity signals. However, as implied by Figs. 5.17 and 5.18, the list of possible Velocity-based graphs is shorter, because it does not cover Envelope signals. Note that Sect. 4.3.2 illustrates two techniques for calculation of Velocity signals, namely via Integration and via so-called “Omega Arithmetics”. However, in Sect. 9.5.3, which demonstrates the codes for generation of 3-dimensional graphs are given, only the “Omega Arithmetics” option is used. This is because such data processing flow enables quick re-calculation of new plots without tie-consuming re-processing of all operations. A detailed description of 3-dimensional visualization of large vibration data set along with MATLAB® codes, diagnostic procedures and multiple examples is given in Chap. 9.
5.8 5.8.1
A Note on Selected Time–Frequency Representations General Relations
For fluent signal processing within diagnostic analysis, it is important to understand relations among some diagnostic figures. These relation are illustrated in Fig. 5.22. Figure 5.22 shows relations between full-resolution spectrum, spectrogram, averaged spectrum (like PSD), full-resolution spectral 3-D plots (called “waterfall” plots in this book, and finally averaged spectral 3-D plots (called “cascade” plots in this book. As shown in the picture, the mechanism of generation of spectrogram from a single signal and 3-D plot from a set of discontinuous signals is essentially the same, because it uses a number of blocks constructed by FFT. The main difference lies in the relative length n of individual fragments, from which FFT is calculated. This relation is summarized in following points: (1) For n equal N, the „Numeric array” becomes a full resolution spectrum, and 3-D plot becomes a waterfall of P full-resolution spectra, (2) For spectrogram analysis of a single signal, fragment length n is relatively small, which turns into small M and relatively large K, (3) For 3-D visualization of P long, discontinuous signals, n and overlap are relatively large, so the spectral resolution (M spectral lines) is relatively large, (4) For all considered figures (spectrogram, PSD, and 3-D array, the spectral range is the same (fs/2 or Nsamp/2 for resampled signal), and the spectral resolution is the same, too. The spectral resolution is equal to the reciprocal of time of
Fig. 5.22 Relations between spectrogram, PSD, and 3-D plots
236 5 Vibration-Based Condition Assessment Methods
5.8 A Note on Selected Time–Frequency Representations
237
fragment x (or 1/No_rotations in x_res for resampled signal), and is represented by M spectral lines. Note, the number of signals P does not change these parameters, (5) For common spectral averaging with pwelch, K = 8, and overlap = 50%. Moreover, Fig. 5.22 shows how to construct averaged spectra from resampled Velocity signal, i.e. a cascade of Averaged Velocity Order Spectra. The angular resampling is noted as „Res”, and calcualtion of the Velocity signal is noted as „Vel”. The „Hann” operation refers to multiplication of a single fragment xi by a Hanning window. Finally, „scale” refers to spectral scaling, namely selection of (n_res/2 + 1) points followed by division by n_res/2. In this case, the original „Time” spectrogram axis is converted into „Angle” (also could be noted as „Rotations”). For clarity the time/angle axis is generally noted as „Fragments”.
5.8.2
Streaming Data Relations
5.8.2.1
Time-Domain Relations
Figure 5.23 illustrates three segments of time-domain, raw vibration signals. The top segment represents a continuous stream of vibration data, which is delivered in consecutive windows of length w_len. As indicated, individual window could be used to calculate subsequent vector (or “frame” or a “row”) of a spectrogram colormap or an averaged, 3-d visualization. Comparing to the top segment, the center segment represents a larger signal in the future, composed of k shorter fragments of length w_len. The bottom time segment represents such last instance. As indicated by Fig. 5.23, when signals are organized to a series of signals of equal length N (or equal number of rotations and constant number of samples per rotation for angle-domain representation), it is possible to generate an array of full-resolution spectra (“WATERFALL” in Figs. 5.17and 5.18). Alternatively, when each signal is then divided into smaller fragments, it is possible to generate an array of averaged spectra (“CASCADE OF AS” in Figs. 5.17and 5.18). Note that in this sense, the Spectrogram plot differs from the Waterfall plot only by the typical value of the window length (small w_len for Spectrogram, large N for Waterfall), some secondary-importance signal processing details (like fragments’ overlap) and presentation technique (colormap vs. 3-d linear plot).
5.8.2.2
Frequency-Domain Relations
Frequency-domain relations of basic considered time–frequency representations cover spectral range and spectral resolution. As indicated by Fig. 5.23, spectral range for Spectrogram, Waterfall, and Averaged Cascade are the same, and are
238
5 Vibration-Based Condition Assessment Methods
Fig. 5.23 Time-domain relations between basic time–frequency representations
equal to half of the sampling frequency fs/2 (or half of the number of samples per rotation Nsamp/2 for angle-domain calculations). As stated already, frequency resolution is equal to the reciprocal of signal “time” (calculated either as 1/T or fs/N). Analogously, order resolution is equal to reciprocal of number of rotations (calculated either as 1/Nrot or Nsamp/Nres4). As indicated by Fig. 5.23, the spectral resolution of Waterfall is typically relatively “small” (i.e. accurate), while in case of a Spectrogram and Averaged Cascade is relatively “large” (i.e. not precise). Note that in the presented scenario, despite of evident visual differences, Spectrogram and Waterfall are classified as full-resolution plots, because in neither case the data is averaged.
4
See Sect. 4.2.2 for details.
5.8 A Note on Selected Time–Frequency Representations
5.8.3
239
Diagnostic Relations
Time–frequency representations are various figures designed to visualize changes of spectral distribution in signals or in signals over time. These changes might refer to components of different kinds, mainly: • Deterministic components with varying frequency and constant-amplitude, • Deterministic components with varying amplitude and constant-frequency, • Cyclostationary random components with periodically varying amplitude and constant-frequency, • Deterministic components with varying amplitude and varying frequency. For typical rotating machinery, components with varying frequency and constant amplitude refer to phase-locked deterministic components (i.e. components related to operational speed) and relatively small changes in operational speed resulting in relatively small changes in frequency. These variations refer to relatively short time period, practically not exceeding a few minutes for a single analysis, i.e. for a single, continuous signal. For small changes of speed, which exclude run-ups and run-downs, it might be assumed that the amplitude change of these components is negligible. The analysis of such signals is most commonly done via a so-called “spectrogram”. Deterministic components with varying amplitude and constant frequency generated by typical rotating machinery might be of two kinds. The first kind are deterministic components, which are always present in the signal, but their power changes over time. Typically, an average monotonic increase of the power of a component is a sign of fault development. Because condition monitoring is designed to detect relatively slow deterioration of technical condition, the changes of such components are plotted with respect to relatively long period of time. Such changes could be plotted in two general ways. When the fault-related component is extracted form a signal (like a narrowband power), it is plotted against time generating a so-called “trend series”. If such trend point is generated from some spectral amplitudes from signals, which are stored in the system, it is possible to plot complete spectra amplitudes against both, time and frequency, which generates a so-called 3-dimensional “cascade plot”. Cyclostationary random components with periodically varying amplitude and constant-frequency refer to periodically induced structural components. For real machinery, these frequency bands are typically numerous narrow-band constant frequency regions. In spectrogram, these components appear as periodically decaying components, while in cascade plot they appear as increasing averaged power of high-frequency regions, without periodically decaying characteristics, because they are averaged out by the fact that the length of each signal is typically significantly greater than the length of the pulse response.
240
5 Vibration-Based Condition Assessment Methods
The last components, i.e. deterministic components with varying amplitude and varying frequency are of special interests during machine run-ups and run-downs, because their precise visualization enables identification of machine resonant frequencies, called in CMS glossary a machine “critical speed”. Typically, these components are analyzed via so-called “waterfall” plots, which typically are full-resolution plots either display with respect to time or speed. For other considered plots (trend plot, spectrogram and cascade plot) simultaneous change of frequency and amplitude of deterministic is generally detrimental during practical assessment of technical condition of rotating machinery.
References 1. Randall RB (2011) Vibration-based condition monitoring: industrial, aerospace and automotive applications. Wiley 2. Bruel and Kjaer (1983) Primer: vibration testing. Denmark. Available https://www.bksv.com/ media/doc/br0094.pdf 3. Yoon J et al (2014) Planetary gearbox fault diagnosis using a single piezoelectric strain sensor. In: Proceedings of the annual conference on the prognostics and health management society 2014, pp 118–127 4. Sharma V, Parey A (2016) A review of gear fault diagnosis using various condition indicators. Procedia Eng 144:253–263 5. Vecer P, Kreidl M, Smid R (2005) Condition indicators for gearbox condition monitoring systems, Czech Technical University in Prague. Acta Polytechn 45(6) 6. Zhu J et al (2014) Survey of condition indicators for condition monitoring systems. In: Proceedings of the annual conference on the prognostics and health management society 2014 7. Yongzhi Qu et al (2014) Gearbox tooth cut fault diagnostics using acoustic emission and vibration sensors—a comparative study. Sensors 14:1372–1393 8. Maczak J, Jasinski M (2017) Model-based detection of local defects in gears. Arch Appl Mech 9. Dynamic Energy Index (DEI), GE Energy Fact Sheet Template, Bently Nevada Asset Condition Monitoring, 2011 10. Zapalla D et al (2013) Sideband algorithm for automatic wind turbine gearbox fault detection and diagnosis (Preprint). European Wind Energy Association 2013 Annual Event, Vienna, Austria. Available at https://www.nrel.gov/docs/fy13osti/57395.pdf 11. Hanna J et al (2011) Detection of wind turbine gear tooth defects using sideband energy Ratio™. China Wind Power 19–21 (Beijing, China) 12. Randall RB (2016) A history of Cepstrum analysis and its application to mechanical problems. Mech Syst Signal Process 97 13. Barszcz T, Jablonski A (2011) A novel method for the optimal band selection for vibration signal demodulation and comparison with the Kurtogram. Mech Syst Signal Process 25 (1):431–451 14. Antoni J (2007) Fast computation of the kurtogram for the detection of transient faults. Mech Syst Signal Process 21(1):108–124 15. Urbanek J et al (2012) Detection of signal component modulations using modulation intensity distribution. Mech Syst Signal Process 28:399–413 16. Antoni J (2009) Cyclostationarity by examples. Mech Syst Signal Process 23(4):987–1036 17. Dziedziech K, Dworakowski Z, Jablonski A (2019) Epicyclic gearbox fault detection by instantaneous circular pitch cycle map. Mech Syst Signal Process 121(12):600–614
References
241
18. Urbanek J et al (2016) Application of angular-temporal spectrum to exploratory analysis of generalized angular-temporal deterministic signals. Appl Acoust 109:27–36 19. Maczak J (2013) Local meshing plane analysis as a source of information about the gear quality. Mech Syst Signal Process 38(1):154–164 20. Zielinski T (2013) Digital signal processing. From theory to applications. (Original tile in Polish: Cyfrowe przetwarzanie sygnalow. Od teorii do zastosowań). WKL
Chapter 6
Synthetic Signals Generation Methods
Abstract This Chapter starts the subject of synthetic data generation. It covers generation of sinusoidal components typical for shafts, blades, and gearboxes, and decaying pulses characteristic for rolling-element bearings (REBs). Each component undergoes multiple monotonic and non-monotonic modulations. Additionally, the Chapter shows how to model jitter characteristic for REBs working under significant load.
6.1
Overview
This Chapter presents simulation of typical components generated by rotary machinery. These components are divided into two major groups, namely sinusoidal components, which represent shafts, blades, and gearboxes, as well as exponentially decaying pulses, which represent signals generated by rolling element bearing (REBs) or other machine elements (e.g. IC engines and certain gearbox faults). Typical scenarios of amplitude and frequency modulation characteristics for both classes of signals are covered. Sections are divided into basic, individual operations and examples of combination of these operations. The Chapter introduces five major auxiliary functions: •
generate_CS_win—generates a critical speed (SC) window for modification of instantaneous amplitude • generate_smooth_profile—generates a vector of smoothly fluctuating data (simulating slow instantaneous speed fluctuations modeled as instantaneous FM) • generate_PFRF_profile —generates a profile for modification of instantaneous amplitude as a function of instantaneous speed, which simulates (just) amplitude-frequency characteristics of a simplified, pseudo-FRF (PFRF) • calculate_inst_amplitude—generates an instantaneous AM profile on the basis of instantaneous FM profile (instantaneous speed) as function of PFRF profile
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_6
243
244
•
6 Synthetic Signals Generation Methods generate_NB_noise—generates
smooth narrowband random noise used for simulation of individual REB pulses.
These functions are used in the current Chapter and in the two following Chapters. Additionally, the Section referring to REB-generated decaying pulses shows modeling of the REB jitter phenomenon. The next Chapter illustrates how to use the presented individual techniques in order to build an advanced signal, which represents vibrations generated simultaneously by many typical machine elements. Finally, Chap. 8 illustrates how to generate an array of signals, which simulates a long-term development of a pre-defined machine fault.
6.2 6.2.1
Sinusoidal Components Sinusoidal Template
From machine condition-monitoring, a noise-free sinusoidal component with a constant amplitude and frequency is a theoretical concept, because all signals generated by a rotary machinery and recorded with a real-world equipment are inevitably noisy and largely random. However, sinusoidal components are successfully used to approximate signals generated by machinery, and they are fundamental in both, vibration signals analysis and modeling. A single stationary sinusoidal component could be used to model shaft fundamental component (Shaft 1) and its harmonics, gear meshing frequency (GMF) and its harmonics, blade pass frequency (BPF) and its harmonics, and finally sidebands (SB, and their harmonics) of GMF (and its harmonics) and of BPF (and their harmonics), resulting for instance in practical analysis of “SB harmonics of GMF harmonics”. Generation of a simple sine wave with a defined amplitude, frequency, and phase with a user sampling frequency in a simple manner is one of MATLAB® core advantages. Figure 6.1 illustrates the resultant time waveform.
Fig. 6.1 Graphical illustration of a simple sinusoidal signal generated in MATLAB®
6.2 Sinusoidal Components
245
It is important to note that in the convention accepted in this book, every time signal starts at time equal to dt and ends at time equal to T. This hasn’t to be always followed, like when the signal is to be defined at [0:dt:T-dt] or [0:dt:T] abscissa Values. However, if the signal is defined at [0:dt:T], the total number of samples would not be equal to T/dt, but to T/dt + 1, which might be an unnecessary complication in a code. Following code shows the procedure step-by-step: fs T dt t x
= = = = =
5000; .04; 1/fs; dt:dt:T; 7*sin(2*pi*250*t+0);
figure('Position',[100 300 500 200]); plot(t,x); hold on; grid on; plot(t,x,'.'); title('Time waveform'); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8);
% % % % % % % % % % %
sampling frequency 5000 [Hz] signal total Time 0.04 [s] time resolution time axis a sinusoidal signal with: amplitude: 7 frequency: 250 Hz phase: 0 rad user-defined location and size plot time waveform as lines place additional dots
% name the frequency axis % name the amplitude axis % set user font size
Finally, note the value of the last point, which is not precisely zero.
6.2.2
Basic Operations on a Single Sinusoidal Component
6.2.2.1
Amplitude Modulation (AM)
6.2.2.1.1 Overview Following Sections consider selected types of amplitude modulations, namely periodic AM, non-periodic monotonic AM, non-periodic, quasi-monotonic AM, and finally non-periodic, generalized AM. Note the major difference between amplitude modulation generated by multiplication of the sinusoidal component A sinð2 p f Þ by ð1 þ profileÞ, which requires additional modulation depth coefficient typically noted as AM m, and just by profile, which represents simple dot product of two signals (or signal scaling).
246
6 Synthetic Signals Generation Methods
6.2.2.1.2 Periodic Amplitude Modulation (P-AM) Referring to Chap. 3, amplitude modulation of deterministic components by other deterministic components is characteristic for gearboxes and shafts with blades. Figures 6.2, 6.3, 6.4 and Fig. 6.5 illustrate generation of AM sinusoidal signal, its spectral representation and a relative numerical error when different generation methods are used.
Fig. 6.2 Example of a periodic AM
Fig. 6.3 Relative error between “folded” and “unfolded” equation
6.2 Sinusoidal Components
247
Fig. 6.4 Relative error between “folded” equation and prosthaphaeresis identity-based equation
Fig. 6.5 Full-resolution frequency spectrum of a synthetic AM signal
Clearly, although theoretically equivalent, different form of equation used, gives different error characteristics, either periodic or monotonic. Figure 6.2, 6.3, 6.4 and Figure 6.5 are generated with following code:
248
6 Synthetic Signals Generation Methods
clear;close all;clc my_position = [100 300 560 200]; fs T dt t N df f
= = = = = = =
Ac AM_m fc fm
25e3; 10; 1/fs; dt:dt:T; length(t); 1/T; 0:df:fs/2; = = = =
10; .2; 5; .5;
% % % %
% % % % % % %
% USER figure size
sampling frequency [Hz] total signal time [s] time resolution time axis total number of samples frequency resolution frequency axis
carrier amplitude 20% amplitude modulation, i.e.: Ac is in the range [8:12] carrier frequency frequency of modulating component (modulation frequency)
% WAY 1: from most commonly found AM equation x1 = (1 + AM_m*cos(2*pi*fm*t)) * Ac.*sin(2*pi*fc*t); % WAY 2: from unfolded version of the common equation x2 = Ac.*sin(2*pi*fc*t) + AM_m*cos(2*pi*fm*t) * Ac.*sin(2*pi*fc*t); % WAY 3: LSB carrier RSB
from prosthaphaeresis identities of trigonometric functions = 1/2*Ac*AM_m .* sin(2*pi* (fc-fm) *t); % Left Side Band = Ac .* sin(2*pi* (fc) *t); = 1/2*Ac*AM_m .* sin(2*pi* (fc+fm) *t); % Right Side Band
x3
= LSB + carrier + RSB;
% Calculating one-sided spectral, scaled amplitudes X = abs(fft(x1)); % selected "WAY 1" X = X(1:N/2+1)/(N/2); % spectral amplitudes figure('position', my_position); plot(t,x1); hold on; grid on; xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); % Add envelope signal to this first plot envelope = Ac*(1 + AM_m*cos(2*pi*fm*t)); plot(t, envelope,'r'); plot(t, -envelope,'r'); figure('position', my_position); plot(t,x1-x2); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); figure('position', my_position); plot(t,x1-x3); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); figure('position', my_position); plot(f,X); grid on; xlim([0 10]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
6.2 Sinusoidal Components
249
Fig. 6.6 Time waveform and two spectrogram representations of a synthetic periodically AM signal
Figure 6.6 shows how periodically AM signals are visualized using spectrogram. For additional visual clarity, signal parameters are changed, i.e. the carrier frequency and modulation frequency are doubled. Note that the window size of the first spectrogram is shorter than the modulation period: 16384*1/fs = 0.6554 [s] versus 1 [s], thus, AM period is clearly visible, while in the second case, it is larger: 131072*1/fs = 5.2429 versus 1[s].
250
6 Synthetic Signals Generation Methods
As a result, for the second window length, AM modulation is not clearly observable. Figure 6.6 is generated using following code: clear;close all;clc fs T dt t N df
= = = = = =
25e3; 10; 1/fs; dt:dt:T; length(t); 1/T;
Ac = AM_m = fc = fm = x = (1
% % % % % %
sampling frequency total signal Time time resolution time axis total number of points spectral resolution
10; % carrier amplitude .2; % 20% amplitude modulation, i.e.: Ac is in the range [8:12] 10; % carrier frequency 1; % frequency of modulating component (modulation frequency) + AM_m*cos(2*pi*fm*t)) * Ac.*sin(2*pi*fc*t); %periodically AM signal
subplot(3,1,1); plot(t,x); set(gca,'fontsize',8); title(['Time signal: ',num2str(length(x)),' samples']) ylabel('Amplitude'); % First spectrogram overlap = .9; % for smooth results w_len = 2^14; % window shorter than AM period, which is 1 [s] [~,f,t,p] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); subplot(3,1,2); surf(t,f,p,'edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']) ylabel('Frequency [Hz]'); set(gca,'fontsize',8); view(0,90); % view from the top xlim([0 10]); % user ZOOM ylim([0 20]) % user ZOOM w_len = 2^17; % window longer than AM period, which is 1 [s] [~,f,t,p] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); subplot(3,1,3); surf(t,f,10*log(p),'edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']) ylabel('Frequency [Hz]'); xlabel('Time [s]'); set(gca,'fontsize',8); view(0,90); % view from the top xlim([0 10]); % user ZOOM ylim([0 20]); % user ZOOM
Next Section illustrates a non-periodic amplitude modulation.
6.2 Sinusoidal Components
251
Fig. 6.7 Example of a non-periodic, monotonic AM signal
6.2.2.1.3 Non-Periodic Monotonic Amplitude Modulation (NPM-AM) Current Section presents a simple, non-periodic, monotonic amplitude modulation of a sinusoidal signal. Such modulation is illustrated in Fig. 6.7. Clearly, the amplitude of the signal increases linearly, while the frequency remains constant. Figure 6.7 is generated using following code:
252
6 Synthetic Signals Generation Methods
clear;close all;clc my_position = [100 300 560 200]; fs T dt t N df
= = = = = =
25e3; 10; 1/fs; dt:dt:T; length(t); 1/T;
Ac = 4; fc = 10; r = 2.5;
% % % % % %
% USER figure size
sampling frequency total signal Time time resolution time axis total number of points spectral resolution
% carrier amplitude % carrier frequency % total amplitude increase ratio
x = Ac*sin(2*pi*fc*t); NP_AM = linspace(1, r, N); y = x.*NP_AM;
% sinusoidal carrier signal % amplitude scaling vector % signal with increasing amplitude
subplot(2,1,1); plot(t,x); grid on; title('Pure sinusoidal waveform'); ylabel('Amplitude'); set(gca,'fontsize',8); ylim([-Ac*r,Ac*r]); % USER zoom subplot(2,1,2); plot(t,y); grid on; hold on; envelope = Ac*NP_AM; plot(t, envelope,'r'); plot(t, -envelope,'r'); title('Non-periodic AM signal'); ylabel('Amplitude'); xlabel('Time [s]'); set(gca,'fontsize',8);
Next Section illustrates a simplified critical speed scenario.
6.2.2.1.4 Non-Periodic, Quasi-Monotonic Amplitude Modulation (NPQM-AM) Figure 6.8 illustrates a theoretical case, where the amplitude of a deterministic component changes over time, while its frequency remains constant. Note that in the first considered case, the amplitude changes temporarily. In the second case, the signal experiences additional monotonic change; thus, the resultant signal is characterized as “non-periodic, quasi-monotonic”. Both signals are illustrated in Fig. 6.8. Figure 6.8 is generated using following code. The function generate_CS_win used in the current code is given below.
6.2 Sinusoidal Components
253
Fig. 6.8 Simplified non-periodic, non-monotonic (NPNM) AM signal and a non-periodic, quasi-monotonic (NPQM) AM signal
254
6 Synthetic Signals Generation Methods
clear;close all;clc my_position = [100 300 560 200];
% USER figure size
fs T dt t N
= = = = =
25e3; 10; 1/fs; dt:dt:T; length(t);
% % % % %
sampling frequency total signal Time time resolution time axis number of points in the signal
Ac fc Ak CSs r
= = = = =
4; 10; 5; .7; 4;
% % % % % % %
carrier amplitude carrier frequency window amplitude ratio (must be >= 1) window center time (CS stands for Critical Speed) amplitude ratio: end vs. time r > 1: run-up r < 1: run-down
x = Ac*sin(2*pi*fc*t); win = generate_CS_win(N,Ak,CSs); x = x.*win;
% sinusoidal component % instantaneous amplitude window % non-periodic, non-monotonic AM signal
NPM_AM = linspace(1, r, N); y = x.*NPM_AM;
% monotonic vector % non-periodic, quasi-monotonic AM signal
% SIGNAL 1: non-periodic, non-monotonic AM signal subplot(211); plot(t,x); grid on; hold on; envelope = Ac*win; plot(t, envelope,'r'); plot(t, -envelope,'r'); val = 1.1*max(max(x),max(y)); % USER zoom variable ylim([-val,val]); % USER zoom title('Non-periodic, non-monotonic (NPNM) AM signal'); ylabel('Amplitude');set(gca,'fontsize',8); % SIGNAL 2: non-periodic, quasi-monotonic AM signal subplot(212); plot(t,y); grid on; hold on; envelope = Ac*win.*NPM_AM; plot(t, envelope,'r'); plot(t, -envelope,'r'); ylim([-val,val]); title('Non-periodic, quasi-monotonic (NPQM) AM signal'); ylabel('Amplitude');set(gca,'fontsize',8); xlabel('Time [s]'); function [win] = generate_CS_win(N,Ak,CSs,b) % DESCRIPTION % Function generates a critical speed (SC) window for modification of % instantaneous amplitude % % % % %
INPUT N Ak CSc b -
number of points in the output vector amplitude coefficient relative time of the critical speed [0 1] Kaiser window coefficient
% OUTPUT % win - window vector if nargin < 4, b = 100; end if nargin < 3, CSs = 0.5; end
6.2 Sinusoidal Components if nargin < 2, Ak
= 10;
255 end
if Ak < 1 msgbox('Ak must be greater or equal to 1.', 'modal'); return; end win = (Ak-1)*kaiser(N,b)'+1; shift = abs(N/2 - floor(CSs*N));
% critical speed in the center of T % move the time of the critical speed
if CSs .5 win = horzcat(ones(1,shift),win(1:N-shift)); end
Next Section illustrates further AM extension, i.e. a non-periodic “generalized” amplitude modulation. 6.2.2.1.5 Non-Periodic Generalized Amplitude Modulation (NPG-AM) Figure 6.9 illustrates a random profile, which is used to scale the amplitude of a sinusoidal component with a constant frequency. Figure 6.10 illustrates a resultant
Fig. 6.9 Smooth random profile
Fig. 6.10 Example of a non-periodic, generalized amplitude modulation (NPG-AM) signal
256
6 Synthetic Signals Generation Methods
signal characterized by a non-periodic, generalized amplitude modulation (NPG-AM). The signal is generated by a following code. The function generate_smooth_profile used by this code is given below. clear;close all;clc my_position = [100 300 560 200]; fs = 25e3; T = 10; dt = 1/fs; t = dt:dt:T; N = length(t); No_components = 8;
% % % % %
% USER figure size
sampling frequency total signal Time time resolution time axis number of points in the signal
rng(0); % for repeatable results profile = generate_smooth_profile(fs,T,No_components,'symmetric'); figure('position', my_position); plot(t,profile,'r'); ylim([-1.1 1.1]); title('Normalized smooth random profile'); xlabel('Time [s]'); ylabel('Value'); set(gca,'fontsize',8); grid on; Ac fc AM_m x
= = = =
10; % carrier amplitude 4; % carrier frequency .25; % 25% amplitude modulation (1 + AM_m*profile) * Ac.*sin(2*pi*fc*t); % NPG-AM signal
envelope = Ac*(1 + AM_m*profile); figure('position', my_position); plot(t,x); grid on; hold on; plot(t, envelope,'r'); plot(t, -envelope,'r'); title('Non-Periodic Generalized AM signal (fc = const.)'); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8);
function [profile] = generate_smooth_profile(fs,T,No_components,opt) % DESCRIPTION % Function generates a vector of smoothly fluctuating data % % % % % %
INPUT fs T No_components opt
% OUTPUT % profile
-
sampling frequency [Hz] total time [s] No. of sinusoidal components used to generate profile 'symmetric': max value 1, min value -1 'non-symmetric': max value 1, min value from 0 to -1
- variable containing values of the generated profile
if nargin < 4, opt = 'non-symmetric'; end % default setting if nargin < 3, No_components = 4; end % default number of components dt = 1/fs; t = dt:dt:T; profile = zeros(1,length(t));
% local variable
for i = 1:No_components Ai = 1/i; % decreasing amplitude of consecutive sin terms fi = i/T; % increasing frequency of consecutive sin terms p_i = rand(1)*pi; % random phase in full range (0-pi radians) profile = profile + Ai*sin(2*pi*fi*t + p_i); end
6.2 Sinusoidal Components
257
profile = profile/max(abs(profile)); % "almost" symmetric profile range if strcmpi(opt,'symmetric') % final profile range -1:1 if max(profile) == 1 ind = find(profile < 0); profile(ind) = profile(ind)*abs(1/min(profile)); elseif min(profile) == -1 ind = find(profile > 0); profile(ind) = profile(ind)*abs(1/max(profile)); end end
Next Section describes the second popular type of modulation, which is a frequency modulation (FM).
6.2.2.2
Frequency Modulation (FM)
6.2.2.2.1 Overview Frequency modulation changes the frequency of the carrier wave according to the instantaneous amplitude of another function. As in the case of AM, typical FM are periodic FM, non-periodic monotonic FM, and finally, non-periodic, generalized FM. Before certain scenarios are described, it is necessary to recall some basic facts. Although typically MATLAB® users consider sinus function in the form A*sin(2*π * f * t + phase), it is worth to remember the following: • the entire sin argument, namely the entire 2*π * f * t + phase refers to an ANGLE, despite of the fact that it contains the time variable; note that the period of sin function is 2π, so when f > 1, the number of full cycles in 2π is increased, • when rotary motion is considered, the rate of change of the angle is the angular velocity (i.e. when the angle changes quicker it means that the rotary motion is faster). Reversely, the integral of the angular velocity is the angle, i.e. the entire sin argument. d ðangleÞ ¼ anglular velocity ) dt
Z angular velocity ¼ angle
Taking the above into account, it might be concluded that considering the angular velocity as a starting point (as it is typically referred to the “frequency” of some component), the 2*pi constant refers to a full period, while the remaining part of the argument tells how many of them they are: Z sinðangleÞ ¼ sin
angular velocity
258
6 Synthetic Signals Generation Methods
thus: Z sinð
ð2 p No:of cyclesÞdtÞ
¼ sinð2 p ðNo:of cyclesÞ t þ phaseÞ Note that the No. of cycles is a constant value and is referred to as the frequency f and that dt changes to time t. Consequently, when FM signals are generated, the actual variability refers to instantaneous change of the No. of cycles in the above equations. Since this variability might be periodic, monotonic or non-periodic and non-monotonic, the final equation might accept different forms.
6.2.2.2.2 Periodic Frequency Modulation (P-FM) Periodic frequency modulation is considered as first. Recalling to above equations, consider a sinusoidal signal, frequency of which changes periodically over time. NOTE: when periodic AM signals are considered, modula on is characterized by frequency of modula on and modula on depth, which is typically expressed as percentage change of peak carrier amplitude. In case of periodically FM signals, the frequency of modula on id defined in the same way, but the modula on depth, which describes the change of frequency, is typically expressed directly in frequency units [Hz].
For clarity, some arbitrary signal parameters are accepted for following example: • • • •
Carrier amplitude = 1 Carrier nominal frequency = 300 Hz Carrier peak deviation from nominal frequency (modulation depth) = ±50 Hz Modulation frequency (how often periodic deviation takes place) = 3 Hz
Referring to previous Section, within a single full period (2*π), the carrier frequency, i.e. its No. of cycles, is represented by equation 300 + 50*sin(2* π *3*t). Thus, the signal becomes: Z sinð2 p ðNo:ofcyclesÞdtÞ Z ¼ sinð2 p ð300 þ 50 sinð2 p 3 tÞdtÞ Z Z ¼ sinð2 p 300 dt þ 2 p 50 sinð2 p 3 tÞdt 1 cosð2 p 3 tÞ þ h2 ¼ sinð2 p 300 t þ h1 þ 2 p 50 2p3 50 ¼ sinð2 p 300 t cosð2 p 3 tÞ þ h12 3
6.2 Sinusoidal Components
259
Above equation consists of five forms. Comparing to AM signals presented in Sect. 6.2.2.1, the second form is referred to as the “folded” form, while the third for is called the “unfolded” form. The last one (the fifth one) is called the “direct” form. Figure 6.11 and following code shows implementation of all these three forms as well as generation of FM signal using MATLAB® modulate function. The carrier frequency is equal 100 Hz, the modulation depth is 1 Hz, and the modulation frequency is 2 Hz (first case) and 2.001 Hz (second case). Within this consideration, only the spectrum in dB scale is presented, as noticeably different. Clearly, when the FM period is an integer divider of the carrier period, any syntax performs very well. However, as Fig. 6.11 implies, in other cases, MATLAB® modulate function performs noticeably different. Integration is realized using the MATLAB® cumsum function. Figure 6.11 is generated using following code:
Fig. 6.11 Frequency Modulation (FM) using different syntax, x1: “folded” form, x2: “unfolded” form, x3: “direct” form, x4: MATLAB “modulate” function
260
6 Synthetic Signals Generation Methods
clear;close all;clc; fs T dt df t f N
= = = = = = =
fc fm(1) fm(2) FM_m
25e3; 10; 1/fs; 1/T; dt:dt:T; 0:df:fs/2; length(t);
= = = =
100; 2; 2.001; 1;
% % % % % % %
sampling frequency total signal Time time resolution frequency resolution time axis frequency axis number of points in the signal
% % % %
carrier frequency modulation frequency - signal No.1 (top graph)[Hz] modulation frequency - signal No.2 (bottom graph)[Hz] frequency modulation depth [Hz]
for i = 1:length(fm) % % % %
x1 x2 x3 x4
-
"folded" form "unfolded" form "direct" form MATLAB "modulate" function; NOTE: generates cosine function
x1 = sin(2*pi* cumsum(fc + FM_m*sin(2*pi*fm(i)*t))*dt); x2 = sin(2*pi*fc*t + 2*pi *cumsum( FM_m*sin(2*pi*fm(i)*t))*dt); % To match the phase for x3, calculate phase of the first point in x1 % and x3, and subtract this relative difference to calculate "phase". % NOTE: t(1) == dt. ini_ph_x1 = 2*pi*cumsum(fc + FM_m*sin(2*pi*fm(i)*t(1)))*dt; ini_ph_x3 = 2*pi*fc*t(1)-FM_m/fm(i) *cos(2*pi*fm(i)*t(1)); phase = ini_ph_x3 - ini_ph_x1; x3 = sin(2*pi*fc*t - FM_m/fm(i)*cos(2*pi*fm(i)*t) - phase); x4 = modulate(FM_m*cos(2*pi*fm(i)*t),fc,fs,'fm',2*pi*dt); % Plot subplot(2,1,i); hold on; grid on; % X X X X
For each syntax, calculate spectral amplitudes and plot in dB = abs(fft(x1)); X = X(1:N/2+1)/(N/2); plot(f,20*log10(X)); = abs(fft(x2)); X = X(1:N/2+1)/(N/2); plot(f,20*log10(X),'--'); = abs(fft(x3)); X = X(1:N/2+1)/(N/2); plot(f,20*log10(X),':'); = abs(fft(x4)); X = X(1:N/2+1)/(N/2); plot(f,20*log10(X),'--');
xlim([0 200]); % USER common frequency zoom xlabel('Frequency [Hz]'); ylabel('Amplitude [dB]'); legend('x1','x2','x3','x4'); set(gca,'fontsize',8); zoom on; end
6.2 Sinusoidal Components
261
Next example considers construction of a periodically FM sinusoidal component step-by-step. Firstly, a carrier signal with following parameters is generated: fs T Ac fc
= = = =
25e3; 1; 10; 100;
% % % %
sampling frequency total signal Time carrier signal amplitude carrier frequency [Hz].
Secondly, consider a modulating signal with following parameters: fm = 6; FM_m = 60;
% modulation frequency % modulation depth (maximum deviation from fc)
These signals are represented in Fig. 6.12: figure; plot(t,Ac*sin(2*pi*fc*t)); hold on; plot(t,FM_m*sin(2*pi*fm*t)); grid on; xlim([0 1]); xlabel('Time'); ylabel('Amplitude'); legend('Carrier component','Modulating signal'); set(gca,'fontsize',8);
Fig. 6.12 Carrier component and modulation signal
262
6 Synthetic Signals Generation Methods
Figure 6.13 shows individual construction elements, resultant time waveform, and spectrogram of this periodically frequency-modulated (P-FM) signal.
Fig. 6.13 Construction of a Periodically FM signal
6.2 Sinusoidal Components
Figure 6.13 is generated using following code: clear; clc; fs = 25e3; T = 1; dt = 1/fs; t = dt:dt:T; N = length(t); Ac fc fm FM_m
= = = =
10; 100; 6; 60;
% % % % %
sampling frequency total signal Time time resolution time axis number of points in the signal % % % %
carrier amplitude carrier frequency modulation frequency modulation depth (maximum deviation from fc)
% Select formula x = Ac * sin(2*pi*fc*t - FM_m/fm*cos(2*pi*fm*t)); %#ok direct form x = Ac * sin(2*pi*cumsum(fc + FM_m*sin(2*pi*fm*t))*dt); % no phase shift str{1} str{2} str{3} str{4}
= = = =
'fc: const. carrier frequency'; 'fm: const. modulating frequency (6 Hz)'; 'modulating function amplitude'; 'resulting instantaneous frequency';
% SUBPLOT #1 figure; subplot(3,1,1); legend('show'); yyaxis yyaxis yyaxis yyaxis
left; left; right; left;
plot(t,fc*ones(1,N),'--','DisplayName',str{1}); hold on; plot(t,fm*ones(1,N),':', 'DisplayName',str{2}); plot(t,FM_m*sin(2*pi*fm*t),'r', 'DisplayName',str{3}); plot(t,fc + FM_m*sin(2*pi*fm*t),'-','DisplayName',str{4});
yyaxis left; ylim([-100 250]); yyaxis right; ylim([-100 250]); xlabel('Time [s]'); title('Signal modulation components'); yyaxis left; ylabel('Frequency [Hz]'); set(gca,'fontsize',8); yyaxis right; ylabel('Amplitude'); set(gca,'fontsize',8); % SUBPLOT #2 subplot(3,1,2); plot(t,x); title('Periodically frequency-modulated (P-FM) signal'); ylabel('Amplitude'); set(gca,'fontsize',8); ylim([-1.1*Ac, 1.1*Ac]); % SUBPLOT overlap w_len [~,f,t,p]
#3 = .99; % spectrogram parameter = 2^10; % spectrogram parameter = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs);
subplot(3,1,3); surf(t,f,p,'edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']); xlabel('Time [s]'); ylabel('Frequency [Hz]'); set(gca,'fontsize',8); view(0,90); xlim([0 1]); ylim([0 220]);
263
264
6 Synthetic Signals Generation Methods
Fig. 6.14 Various representations of a P-FM signal
Next example illustrates two spectrogram representations of the previously generated P-FM signal. Figure 6.14 illustrates these comparison along with a full-resolution frequency spectrum. Note that in contrast to Fig. 6.13, this time, the frequency axis of each spectrogram is placed horizontally.
6.2 Sinusoidal Components
265
As concluded from Fig. 6.14, information displayed in the spectrogram depends on the selected window length. Most importantly, for P-FM signals, if the window length is longer than the modulation period, the frequency value is averaged; therefore, it appears constant. Figure 6.14 is generated by continuing with following code the previously generated signal: my_xlim = [0 500];
% USER zoom
% SPECTROGRAM #1 overlap = .99; w_len = 2^10; [~,f,t,p] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); figure; subplot(311); surf(f,t,p','edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']); ylabel('Time [s]'); set(gca,'fontsize',8); view(0,90); xlim(my_xlim); ylim([0 1]); % SPECTROGRAM #2 w_len = 2^14; [~,f,t,p] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); subplot(312); surf(f,t,p','edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']); ylabel('Time [s]'); set(gca,'fontsize',8); view(0,90); xlim(my_xlim); ylim([0 1]); % SPECTRUM X = abs(fft(x)); X = X(1:N/2+1)/(N/2); df = 1/T; f = 0:df:fs/2; subplot(313); plot(f,X); grid on; title('Frequency spectrum'); xlabel('Frequency [Hz]');ylabel('Amplitude'); set(gca,'fontsize',8);xlim(my_xlim);
266
6 Synthetic Signals Generation Methods
Fig. 6.15 Periodically frequency modulation (P-FM) of a 20 Hz component with different modulation parameters. Note the combination of signal parameters 1–2-2–1 versus 1–1-2–2 in the code below for convinient interpretation
Next example illustrates how modulation frequency and modulation depth affect the resultant P-FM signal waveform and its full-resolution spectrum. The concept is illustrated in Fig. 6.15.
6.2 Sinusoidal Components
267
Figure 6.15 is generated using following code: clear; fs = 25e3; T = 1; dt = 1/fs; df = 1/T; t = dt:dt:T; f = 0:df:fs/2; N = length(t);
% % % % % % %
sampling frequency total signal time time resolution frequency resolution time axis frequency axis number of points
Ac fc fm FM_m
% % % %
carrier signal amplitude carrier frequency modulation frequency set modulation depth set
= = = =
1; 20; [4 8]; [2 6];
my_y = [fc-max(FM_m)-1, fc+max(FM_m)+1]; % USER y limit my_x = [0,2*fc]; % Select formula % x = Ac * sin(2*pi*fc*t - FM_m/fm*cos(2*pi*fm*t)); %#ok direct form % x = Ac * sin(2*pi*cumsum(fc + FM_m*sin(2*pi*fm*t))*dt); % no phase shift x1 x2 x3 x4
= = = =
Ac Ac Ac Ac
* * * *
sin(2*pi*cumsum(fc sin(2*pi*cumsum(fc sin(2*pi*cumsum(fc sin(2*pi*cumsum(fc
X X X X
= = = =
abs(fft(x1)); abs(fft(x2)); abs(fft(x3)); abs(fft(x4));
X1 X2 X3 X4
= = = =
+ + + +
FM_m(1)*sin(2*pi*fm(1)*t))*dt); FM_m(2)*sin(2*pi*fm(1)*t))*dt); FM_m(2)*sin(2*pi*fm(2)*t))*dt); FM_m(1)*sin(2*pi*fm(2)*t))*dt);
X(1:N/2+1)/(N/2); X(1:N/2+1)/(N/2); X(1:N/2+1)/(N/2); X(1:N/2+1)/(N/2);
% % % %
spectral spectral spectral spectral
amplitudes amplitudes amplitudes amplitudes
% TIME WAVEFORM figure; subplot(421); yyaxis left; plot(t,x1); ylabel('Amplitude'); title('Time waveform'); yyaxis right; plot(t,fc + FM_m(1)*sin(2*pi*fm(1)*t)); ylim(my_y); ylabel('Inst. freq. [Hz]'); set(gca,'fontsize',8); set(gca,'TickDir','out'); subplot(423); yyaxis left; plot(t,x3); ylabel('Amplitude'); yyaxis right; plot(t,fc + FM_m(2)*sin(2*pi*fm(1)*t)); ylim(my_y); ylabel('Inst. freq. [Hz]'); set(gca,'fontsize',8); set(gca,'TickDir','out'); subplot(425); yyaxis left; plot(t,x3); ylabel('Amplitude'); yyaxis right; plot(t,fc + FM_m(2)*sin(2*pi*fm(2)*t)); ylim(my_y); ylabel('Inst. freq. [Hz]'); set(gca,'fontsize',8); set(gca,'TickDir','out'); subplot(427); yyaxis left; plot(t,x4); ylabel('Amplitude'); xlabel('Time [s]'); yyaxis right; plot(t,fc + FM_m(1)*sin(2*pi*fm(2)*t)); ylim(my_y); ylabel('Inst. freq. [Hz]'); set(gca,'fontsize',8); set(gca,'TickDir','out');
of of of of
x1 x2 x3 x4
268
6 Synthetic Signals Generation Methods
% SPECTRUM subplot(422);plot(f,X1);grid on; xlim(my_x);ylim([0,Ac]);ylabel('Amplitude'); title('Frequency spectrum'); subplot(424);plot(f,X2);grid on; xlim(my_x);ylim([0,Ac]);ylabel('Amplitude'); subplot(426);plot(f,X3);grid on; xlim(my_x);ylim([0,Ac]);ylabel('Amplitude'); subplot(428);plot(f,X4);grid on; xlim(my_x);ylim([0,Ac]);ylabel('Amplitude'); xlabel('Frequency [Hz]'); set(gca,'fontsize',8);
Clearly, periodic frequency modulations (P-FM) typically generate multiple sidebands. The spacing of the sidebands is related to the modulation frequency (here noted as variable fm), while the relative height (and associated visible number) of which is related to the common concept of the modulation index. Next Section extends this concept to Non-Periodic frequency modulations (NP-FM). 6.2.2.2.3 Non-Periodic Monotonic Frequency Modulation (NPM-FM) A simple example of a non-periodic, monotonic frequency modulation (NPM-FM) is generated using MATLAB® chirp function, as illustrated in Fig. 6.16.
Fig. 6.16 Time, time–frequency, and frequency representation of a chirp signal
6.2 Sinusoidal Components
269
Figure 6.16 is generated using following code: clear; close all; clc; fs = 25e3; % sampling frequency dt = 1/fs; % time resolution T = 10; % total signal time [s] t = dt:dt:T; % time base N = length(t); % total signal length Ac = 10; f0 = 0; f1 = 33.3;
% carrier signal amplitude % initial carrier frequency % final carrier frequency
x = Ac * chirp(t,f0,T,f1);
% NPM-FM signal
% TIME WAVEFORM subplot(311); yyaxis left; plot(t,x); xlabel('Time [s]'); ylabel('Amplitude'); yyaxis right; plot(t,linspace(f0,f1,N)); ylim([0 60]); ylabel('Instantaneous frequency [Hz]'); title('Time waveform'); set(gca,'fontsize',8); % SPECTROGRAM subplot(312); w_len = 2^15; % pre-selected window length overlap = 0.9; % USER overlap [~,f,t,p] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); surf(f,t,p','edgecolor','none'); title(['Spectrogram, window length: ',num2str(w_len),' samples']); xlabel('Frequency [Hz]'); ylabel('Time [s]'); set(gca,'fontsize',8); view(0,90); xlim([0 60]); % SPECTRUM subplot(313); X = abs(fft(x)); X = X(1:N/2+1)/(N/2); df = 1/T; f = 0:df:fs/2; plot(f,X); xlim([0 60]); grid on; ylabel('Amplitude'); xlabel('Frequency [Hz]');title('Frequency spectrum');set(gca,'fontsize',8);
Next Section illustrates generation of a non-periodic, frequency-modulated signal, noted as NPG-FM signal.
generalized
270
6 Synthetic Signals Generation Methods
6.2.2.2.4 Non-Periodic Generalized Frequency Modulation (NPG-FM) Figure 6.17 illustrates a signal, frequency of which changes in a practically arbitrary (yet smooth) manner. Such signal is classified as a NPG-FM signal.
Fig. 6.17 Time, time–frequency, and frequency representation of a NPG-FM signal
6.2 Sinusoidal Components
271
Figure 6.17 is generated using fallowing code: % NOTE: script requires function "generate_smooth_profile" introduced in % Section 6.2.2.1.5 clear;close all;clc fs = 25e3; % sampling frequency T = 10; % total signal time dt = 1/fs; % time resolution t = dt:dt:T; % time base N = length(t); % number of points in the signal df = 1/T; % SPECTRUM: frequency resolution f = 0:df:fs/2; % SPECTRUM: frequency axis Ac = 10; fc = 20; FM_m = 15;
% carrier signal amplitude % carrier frequency % modulation depth (maximum deviation from fc)
w_len = 2^14; % SPECTROGRAM: window length overlap = 0.9; % SPECTROGRAM: 90 percent of the window length No_components = 8; % USER selection profile = generate_smooth_profile(fs,T,No_components,'symmetric'); % Generate NPG-FM signal inst_freq = fc + FM_m*profile; x = Ac * sin(2*pi*fc*t + 2*pi*FM_m*(cumsum(profile)*dt)); % Calculate spectrogram amplitudes [~,Sf,St,Sp] = spectrogram(x,w_len,floor(w_len*overlap),w_len,fs); % Calculate spectral amplitudes X = abs(fft(x)); X = X(1:N/2+1)/(N/2); % PLOT graphs subplot(2,2,[1,2]); yyaxis left; plot(t,x); yyaxis right; plot(t,inst_freq,'r'); subplot(2,2,3); surf(Sf,St,Sp','edgecolor','none'); subplot(2,2,4); plot(f,X); my_xlim = 2*(fc+FM_m);
% USER: zoomed axis
subplot(2,2,[1,2]); title('Non-periodic FM signal (Ac = const.)'); yyaxis left; xlabel('Time [s]'); yyaxis right; ylabel('Instantaneous frequency [Hz]'); set(gca,'fontsize',8); subplot(2,2,3);
view(0,90); xlim([0 my_xlim]); set(gca,'fontsize',8); title(['Window length: ',num2str(w_len),' samples']); xlabel('Frequency [Hz]'); ylabel('Time [s]');
subplot(2,2,4);
xlabel('Frequency [Hz]'); xlim([0 my_xlim]); title('Full resolution spectrum'); set(gca,'fontsize',8);
Recalling, Sect. 6.2.2.1 presents generation of various AM signals, while Sect. 6.2.2.2 illustrates their FM counterparts. Following Section illustrates generation of signals generated by some combination of these both topics.
272
6 Synthetic Signals Generation Methods
6.2.3
Combinations of Basic Operations
6.2.3.1
Oscillatory Signal (P-AM with P-FM)
Oscillatory signals simulate components generated by a machine, speed of which varies in a sinusoidal way, i.e. when the machine accelerates and decelerates periodically. Similar to a run-up case, any change of the speed of the shaft is understood as a change of instantaneous angular velocity modeled as a frequency modulation of this component. However, this time the change of the speed in modeled by turning the constant value of the frequency f of a sinusoidal signal A sinð2 p f tÞ into a time-varying function. Figure 6.18 illustrates a synthetic signal, which experienced simultaneous periodic amplitude and periodic frequency modulations. Such signal is noted P-AM P-FM signal. Figure 6.18 is generated using following code: clear; close all; fs = 25e3; % dt = 1/fs; % T = 10; % t = dt:dt:T; % N = length(t); %
clc; sampling frequency time resolution total signal time time base total number of points in the signal
Ac = 10; fc = 5; fm = .5;
% carrier signal amplitude % carrier frequency % modulation frequency
AM_m = .5; FM_m = .5*fc;
% AM depth (relative value of Ac) % FM depth (maximum deviation from fc)
envelope
= Ac*(1 + AM_m*sin(2*pi*fm*t));
x_P_AM = (1 + AM_m*sin(2*pi*fm*t)) * Ac.*sin(2*pi*fc*t); x_P_FM = Ac*sin(2*pi*cumsum(fc + FM_m*sin(2*pi*fm*t))*dt); x_P_AM_FM = (1 + AM_m*sin(2*pi*fm*t)) .* x_P_FM; subplot(311); plot(t,x_P_AM); hold on; subplot(312); plot(t,x_P_FM); hold on; subplot(313); plot(t,x_P_AM_FM); hold on; str{1} = 'Periodically AM signal'; str{2} = 'Periodically FM signal'; str{3} = 'Periodically AM-FM signal'; subplot(311); plot(t, envelope,'r'); plot(t, -envelope,'r'); set(gca,'fontsize',8); ylabel('Amplitude'); title(str{1}); subplot(312); ylabel('Amplitude'); yyaxis right; plot(t, fc + FM_m*sin(2*pi*fm*t)); set(gca,'fontSize',8); ylabel('Inst. frequency [Hz]'); title(str{2}); subplot(313); plot(t, envelope,'r'); plot(t, -envelope,'r'); set(gca,'fontSize',8); ylabel('Amplitude'); xlabel('Time [s]'); title(str{3});
6.2 Sinusoidal Components
273
Fig. 6.18 Example of a P-AM and P-FM signal
Next Section illustrates extended model of a non-periodic, quasi-monotonic amplitude-modulated signal.
6.2.3.2
Run-Up with Critical Speed (NPM-AM + CS Window with NPM-FM)
Run-up signals simulate selected machine vibration components with monotonically increasing speed. Typically, speed increase is modeled either as a linear function or logarithmic profile from initial speed to final speed. In practice, speed variation during run-up is a more complicated function due to technological constraints and dynamic response of current excitation functions, i.e. current speed of driving shaft and corresponding phase-locked components. In a common scenario, where vibration components are modeled as sinusoidal signals, any change of the speed of a shaft is understood as a change of instantaneous angular velocity modeled as a frequency modulation of this component. Both, linear or logarithmic increase is easily generated with the use of MATLAB® chirp function, which is illustrated in Fig. 6.19.
274
6 Synthetic Signals Generation Methods
Fig. 6.19 Example of machine run-up components
Figure 6.19 is generated using following code: my_position = [100 300 500 200]; % USER figure size left_color = [0 .447 .741]; right_color = [0 0 0]; figure('position', my_position); set(gcf,'defaultAxesColorOrder',[left_color; right_color]); fs dt T t N
= = = = =
25e3; 1/fs; 10; dt:dt:T; length(t);
Ac = 10; f0 = 1; f1 = 20; Ak CSs win
% % % % %
sampling frequency time resolution total signal time time base number of points in the signal
% carrier signal amplitude % carrier initial frequency [Hz] % carrier final frequency [Hz]
= 5; % Critical-Speed window parameter = .7; % Critical-Speed window parameter = generate_CS_win(N,Ak,CSs);
r NPM_AM envelope insf_freq
= = = =
4; % total amplitude increase ratio linspace(1, r, N); Ac .* win .* NPM_AM; (f1-f0)/(f1-f0)^2*(t.^2);
x = Ac * chirp(t,f0,T,f1); x = x .* win; x = x .* NPM_AM; yyaxis left;
% STEP 1 % STEP 2 % STEP 3
plot(t,x); hold on; ylabel('Amplitude'); grid on; title('Run-up with critical speed'); plot(t, envelope,'r-'); plot(t, -envelope,'r-');
yyaxis right; plot(t,insf_freq); ylabel('Instantaneous frequency [Hz]'); xlabel('Time [s]'); set(gca,'fontsize',8);
6.2 Sinusoidal Components
275
So far, the change of amplitude and the change of frequency was generated independently. Fallowing Sections show how to integrate one modulation with the other, which simulates real behavior.
6.2.3.3
Generation of Pseudo-FRF (PFRF) Profile
Referring to Sect. 1.1, Frequency Response Function (FRF) is frequently used to determine resonant frequencies within modal analysis of various objects, from large structures to tiny electronic elements. In amplitude-based machine diagnostics, FRF is typically considered in two ways. Firstly, as a general speed-independent property. Secondly, as a non-periodic, non-monotonic amplitude modulation function of a vibration signal generated by a machine operating at varying speed, which is illustrated in Fig. 6.20.
Fig. 6.20 Example of amplitude-frequency characteristics of a pseudo-FRF profile
276
6 Synthetic Signals Generation Methods
Following examples are restricted to a simple case of a time-invariant FRF. The amplitude values of the pseudo-FRF profile are generated using following code:
my_position = [100 300 500 200];
% USER figure size
fs = 25e3; T = 10;
% USER sampling frequency % USER total signal time
dt = 1/fs; df = 1/T; f = 0:df:fs/2;
% time resolution % frequency resolution % frequency axis
No_PFRF peak_RES peak_ARES ADR my_ylim
= = = = =
20; 2; .75; .5; [0 1.3*peak_RES];
% % % % %
USER USER USER USER USER
number of sinusoids maximum PFRF value minimum PFRF value amplitude decrease ratio zoom
rng(0); % for repeatable results profile = generate_PFRF_profile(fs,T,No_PFRF,peak_RES,peak_ARES,ADR); figure('position', my_position); plot(f,profile); grid on; xlim([0 fs/2]); ylim(my_ylim); title('Simulated amplitudes of a pseudo-FRF profile'); xlabel('Frequency [Hz]'); ylabel('Value'); % Signal's amplitude is multiplied by this "Value" set(gca,'fontsize',8);
NOTE: The profile variable, which is used for modifica on of instantaneous amplitude (AM) as a func on of instantaneous speed, simulates (just) the amplitude-frequency characteris cs of a simplified, me-invariant FRF. It is not designed to simulate any complete FRF. For these reasons, it is called a “pseudo-FRF profile ” (PFRF profile).
6.2 Sinusoidal Components
277
The PFRF profile is generated using following code: function [profile] = generate_PFRF_profile(fs,T,No_PFRF,peak_RES, peak_ARES,ADR) % DESCRIPTION % Function generates a profile, which simulates random amplitude % characteristics as a function of instantaneous speed, which simulates % (just) the amplitude-frequency characteristics of a simplified FRF. This % method enables simple generation of random coefficients for development % of magnitude-based condition monitoring algorithms. % % % % % % %
INPUT fs T No_PFRF peak_RES peak_ARES ADR
% OUTPUT % profile if nargin if nargin if nargin if nargin % % % % % %
< < <
max(inst_freq),1,'first'); % Determine all used values of frequency vector "f" covered_indexes = ind_L:ind_R; % Interpolate. NOTE: generally, x and y - the referential data is small, % while "inst_freq" is always the size of final data, therefore large. The % length of the result equals to "inst_freq" length. x = f(covered_indexes); y = profile_PFRF(covered_indexes); profile_AM = interp1(x,y,inst_freq); figure;plot(t,profile_AM,'color',my_color); xlabel('Time [s]'); ylabel('Value'); grid on; title ('Resultant instantaneous amplitude ratio'); set(gca,'fontsize',8);
In order to visually assess Fig. 6.24, the two curves in Fig. 6.23 need to be analyzed at the same time. % STEP 8: Generate generalized AM-FM signal x = profile_AM * Ac.*sin(2*pi*fc*t+2*pi*FM_m*(cumsum(profile_FM)*dt)); % STEP 9: Plot the signal figure('position', my_position); yyaxis left;
plot(t,x); hold on; grid on; plot(t, profile_AM*Ac,'-','color',my_color); plot(t, -profile_AM*Ac,'-','color',my_color); title('Generalized AM-FM signal'); xlabel('Time [s]'); ylabel('1amplitude');
yyaxis right; plot(t,inst_freq); ylabel('Instantaneous frequency [Hz]'); set(gca,'fontsize',8);
For reference, the generation of the instantaneous AM profile on the basis of instantaneous FM profile as function of simulated PFRF amplitude-frequency characteristics is wrapped into a following code:
6.2 Sinusoidal Components
283
function [profile_AM] = calculate_inst_amplitude(fs,profile_PFRF,inst_freq) % DESCRIPTION % Function calculates instantaneous AM profile on the basis of % instantaneous FM profile as function of PFRF amplitude-frequency % characteristics % % % %
INPUT fs - sampling frequency profile_PFRF - random amplitude-frequency characteristics inst_freq - instantaneous frequency vector
% OUTPUT % profile_AM
- instantaneous AM profile
% (Re)generate frequency axis N = length(inst_freq); df = fs/N; f = 0:df:fs/2; % Determine frequency range according to resolution of frequency vector "f" ind_L = find(f < min(inst_freq),1,'last'); ind_R = find(f > max(inst_freq),1,'first'); % Determine all used values of frequency vector "f" covered_indexes = ind_L:ind_R; % Interpolate. NOTE: generally, x and y - the referential data is small, % while "inst_freq" is always the size of final data, therefore large. The % length of the result equals to "inst_freq" length. x = f(covered_indexes); y = profile_PFRF(covered_indexes); profile_AM = interp1(x,y,inst_freq); % EOF % % % % % % % % % % % % % % %
NOTE: the point-by-point version (inefficient) of this interpolation is as follows: for i = 1:N xi = inst_freq(i);
% for this frequency instantaneous % value of PFRF is to be found
ind_L = find(f < xi,1,'last'); ind_R = find(f > xi,1,'first'); x = [f(ind_L), f(ind_R)]; y = [profile_PFRF(ind_L), profile_PFRF(ind_R)]; profile_AM(i) = interp1(x,y,xi);
% linear interpolation
end
Next Section illustrates generation of synthetic signals simulating various rolling-element bearing (REB) defects.
284
6.3
6 Synthetic Signals Generation Methods
Decaying Pulses
6.3.1
Basic Operations
6.3.1.1
Determination of Time of Pulses
Decaying pulses, frequently called just “pulses” are common signal components, which simulate various rotary machine faults, like rolling-element bearing (REB) faults and certain gearbox faults as well as reciprocating machinery (like internal combustion—IC—engines) characteristic signals. Typically, these faults are modeled as single local faults [2], multiple local faults [3] or distributed faults. Figure 6.26 illustrates a basic concept of decaying pulses, characterized by pulse period, peak amplitude, and deterministic carrier signal frequency. Determination of time of individual pulses on the basis of nominal pulse period is considered firstly. In following Section, numerous techniques for determination of exact timestamp of individual pulses are illustrated. Each technique is intended to match the natural, simplest way of concentrating of pulses. The used techniques are summarized in Table 6.1. In case of periodically oscillating repetition rate and generalized frequency-modulation rate, time base could of individual pulses could be determined either on the basis of pre-determined pulse timestamps (typically using for loop) or by recovering a full-resolution instantaneous phase (typically using while loop. The more suitable solution needs to be selected case-based.
Fig. 6.26 Basic decaying pulses
6.3 Decaying Pulses
285
Table 6.1 Summary of architecture of generation of decaying pulses
Pulse characteristics Simpliϐied signal with deterministic carrier
FM type None
Narrowband random carrier signal
None
Pulse generation architecture Calculate No. of pulses Generate common pulse me base Generate one pulse Use repmat to clone pulses Trim the signal Generate common pulse me base while [desired signal length]
Generate NB noise Generate current pulse Concentrate data end
Periodically oscillating repetition rate
Sinusoidal
Trim the signal Calculate mestamp of individual pulses Extrapolate extra point (if necessary) for [No. of pulses]
Generate current pulse me base Generate current pulse Concentrate data end
Monotonically increasing repetition rate
Chirp (geometric sum)
Repeat the last pulse (if necessary) Trim the signal Calculate No. of pulses Calculate dura on of individual pulses for [No. of pulses]
Generate current pulse me base Generate current pulse Concentrate data end
Generalized frequencymodulated repetition rate
Random
Trim the signal Calculate instantaneous frequency while [desired signal length]
Calculate dura on of current pulse Generate current pulse me base Generate current pulse Concentrate data end
Trim the signal
286
6.3.1.2
6 Synthetic Signals Generation Methods
Simplified Signal with Deterministic Carrier
Figures 6.27 and 6.28 illustrate time-domain and frequency-domain representation of simple pulses with a constant repetition rate and deterministic carrier.
Fig. 6.27 Time-domain representation of deterministic pulses
Fig. 6.28 Frequency-domain representation of deterministic pulses
6.3 Decaying Pulses
287
Figures 6.27 and 6.28 are generated using following code: my_position = [100 300 500 200]; fs T Ac fc fp
= = = = =
1e2; 10; 5; 5; .5;
dr
= -.5*fc;
dt = 1/fs; N = T*fs; Tp = 1/fp; t tp n x
= = = =
% % % % %
USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses
% USER pulse decaying rate % time resolution % total number of samples in the signal % total time of a single pulse
dt:dt:T; % time vector of the entire signal dt:dt:Tp; % time vector of a single pulse length(tp); % length of one pulse (in No. of points) exp(dr*tp)*Ac.*sin(2*pi*fc*tp); % single pulse
No_pulses = ceil(N/n)+1; data = repmat(x,1,No_pulses); data = data(1:N);
% extra pulse for boundary conditions % replicate and tile pulses % trim part of last pulse if necessary
y envelope envelope
% envelope of a single pulse % replicate and tile pulses % trim envelope if necessary
= exp(dr*tp)*Ac; = repmat(y,1,No_pulses); = envelope(1:N);
figure('position', my_position); plot(t,data); hold on; grid on; plot(t, envelope,'r:'); plot(t, -envelope,'r:'); xlabel('Time [s]'); ylabel('Amplitude'); legend('Signal','Envelope'); set(gca,'fontsize',8); figure('position', my_position); my_xlim = [0 4*fc];
% USER zoom
X = abs(fft(data)); X = X(1:N/2+1)/(N/2);
% SPECTRUM: scaled, one-sided values
df = 1/T; f = 0:df:fs/2; plot(f,X); xlim(my_xlim); grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
For additional reference on REB signal time base, the reader is referred to Section “Vibration Analysis of Rolling Element Bearing Faults” of MATLAB® online documentation [4]. 6.3.1.3
Pulses with Narrowband Random Carrier Signal
In vibration signals generated by real rotary machinery, the carrier wave is not a deterministic signal, but a composition of multiple narrowband noise signals, as illustrated in Figs. 6.29 and 6.30.
288
6 Synthetic Signals Generation Methods
Fig. 6.29 Time representation of pulses with random carrier
Fig. 6.30 Frequency representation of pulses with random carrier
Note that for such signals, the spacing between individual, visual spectral peaks is equal to the frequency of pulses. Figures 6.29 and 6.30 are generated using following code:
6.3 Decaying Pulses
289
clear;close all; my_position = [100 300 500 200]; fs T Ac f1 f2 fp dr
= = = = = = =
1e2; 10; 5; 20; 40; .5; -.05*(f1+f2);
dt = 1/fs; N = T*fs; Tp = 1/fp; t = dt:dt:T; tp = dt:dt:Tp; n = length(tp);
% % % % % % %
USER USER USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency range start carrier frequency range stop frequency of pulses pulse decaying rate
% time resolution % total number of samples in the signal % total time of a single pulse % time vector of the entire signal % time vector of a single pulse % length of one pulse (in No. of points)
data = []; x_AM = exp(dr*tp); rng(1); % repeatable results while length(data) < N noise_i = generate_NB_noise(fs,Tp,f1,f2); x_i = x_AM*Ac.*noise_i; data = horzcat(data,x_i); end data = data(1:N);
% trim to get desired length
% TIME WAVEFORM figure('position', my_position); plot(t,data); axis tight; grid on; xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); title('Pulses with random narrowband carrier'); % SPECTRUM figure('position', my_position); f = 0:fs/N:fs/2; % frequency base X = abs(fft(data)); X = X(1:N/2+1)/(N/2); % spectral amplitudes plot(f,X); axis tight; grid on; xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8); title('Full-resolution frequency spectrum');
The random, narrowband noise, which is similar in frequency range, but unique in amplitude for individual REB-induced pulses, is generated using following code:
290
6 Synthetic Signals Generation Methods
function [out] = generate_NB_noise(fs,T,f1,f2) % DESCRIPTION % Function generates smooth random noise % % % % %
INPUT fs - sampling frequency T - total time f1 - lower limit of the noise frequency range f2 - upper limit of the noise frequency range
% OUTPUT % out - random narrowband noise N = floor(fs * T); x = rand(1,N)-.5; [b,a] = butter(2,[f1/(fs/2),f2/(fs/2)]);
% 4th order bandpass filter
% NOTE: Generally, the calculation of [b,a] coefficient should be outside % the loop. However, due to negligible execution time, it is left here for % code clarity out out end
= filter(b,a,x); = out/max(out);
% filter the current noise % normalize amplitude
Note that when a signal free from any low-frequency components is considered, like the current signal, the envelope signal is constructed using just the low-pass filter of the absolute value of the signal. The high-pass filter is meaningless. The resultant envelope signal is illustrated in Fig. 6.31. Additionally, Fig. 6.31 shows how LP cutoff frequency influences the resultant envelope signal and its spectrum.
Fig. 6.31 Envelope signal and envelope spectrum
6.3 Decaying Pulses
291
Clearly, the lower LP cutoff frequency, the more smooth the envelope signal; however, the more time-shifted. Figure 6.31 is generated using following, additional code: % ENVELOPE SIGNAL y = 2.5; cutoff = [y, y*10, y*19];
% USER initial cutoff frequency for testing % USER cutoff frequencies for testing
[b1,a1] = butter(4,cutoff(1)/(fs/2),'low'); % LP filter coefficients #1 [b2,a2] = butter(4,cutoff(2)/(fs/2),'low'); % LP filter coefficients #2 [b3,a3] = butter(4,cutoff(3)/(fs/2),'low'); % LP filter coefficients #3 x_env_1 = filter(b1,a1,abs(data)); x_env_2 = filter(b2,a2,abs(data)); x_env_3 = filter(b3,a3,abs(data));
% LP filtering, cutoff freq. #1 % LP filtering, cutoff freq. #2 % LP filtering, cutoff freq. #3
% TIME WAVEFORM figure('position', my_position); plot(t,x_env_3,'color',[.929 .694 .125]); hold on; grid on; plot(t,x_env_2,'color',[.850 .325 .098]); plot(t,x_env_1,'color',[.000 .447 .741]); axis tight; xlabel('Time [s]'); ylabel('Amplitude'); title('Pulses envelope signal, fs = 100 Hz'); str1 = ['LP cutoff: ',num2str(cutoff(3)),' Hz']; str2 = ['LP cutoff: ',num2str(cutoff(2)),' Hz']; str3 = ['LP cutoff: ',num2str(cutoff(1)),' Hz']; legend(str1,str2,str3); set(gca,'fontsize',8);
Figure 6.32 illustrates corresponding envelope spectra. Clearly, the smooth envelope signal with 2.5 Hz LP cutoff frequency shows most desired spectrum in its entire range. Nevertheless, for first few harmonics, the resultant envelope spectra are similar. Figure 6.32 is generated using following code:
Fig. 6.32 Envelope spectrum (USER zoom)
292
6 Synthetic Signals Generation Methods
% ENVELOPE SPECTRUM figure('position', my_position); X = abs(fft(x_env_1-mean(x_env_1))); X1 = X(1:N/2+1)/(N/2); X = abs(fft(x_env_2-mean(x_env_2))); X2 = X(1:N/2+1)/(N/2); X = abs(fft(x_env_3-mean(x_env_3))); X3 = X(1:N/2+1)/(N/2); plot(f,X3,'-','color',[.929 .694 .125]); hold on; grid on; plot(f,X2,'.','color',[.850 .325 .098]); plot(f,X1,'--','color',[.000 .447 .741]); xlim([0 30]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution envelope frequency spectrum'); legend(str1,str2,str3); set(gca,'fontsize',8);
As concluded from this Section, frequency of occurrence of pulses, clearly visible in envelope spectrum, could be detected already in the frequency spectrum; however, this is this example it is constant, i.e. time base for all pulses is exactly the same. Next Section extends this concept. 6.3.1.4
Pulses with Periodically Oscillating Repetition Rate
Current example illustrates generation of pulses with periodically varying repetition rate, as illustrated in Fig. 6.33.
Fig. 6.33 Pulses with periodically varying repetition rate
Fig. 6.34 Full-resolution frequency spectrum of pulses with periodically varying repetition rate
6.3 Decaying Pulses
293
As shown in Fig. 6.34, this time the repetition rate could not be identified in spectrum representation. Figures 6.33 and 6.34 are generated using following code: % NOTE: script uses function "Get_phase_markers" from Section 4.4.4.2.2 clear; close all; clc my_position = [100 300 500 200]; % USER figure size fs = 1e4; % USER sampling frequency T = 10; % USER signal total time Ac = 5; % USER carrier amplitude fc = 50; % USER carrier frequency fp = 5; % USER frequency of pulses (NOMINAL) dr = -.5*fc; % USER pulse decaying rate fm = .33; FM_m = 1.5;
% USER FM: modulation frequency % USER FM: modulation depth (absolute)
dt t N
% time resolution % time vector of the entire signal % total number of samples in the signal
= 1/fs; = dt:dt:T; = T*fs;
% Get timestamp of individual pulses using their nominal frequency "fp" x = sin( 2*pi*fp*t - FM_m/fm.*cos(2*pi*fm*t) ); PM = Get_phase_markers(x); Tp = diff(find(PM))*dt;
% vector of PM, length N % vector of periodically varying lengths % (in seconds) PM of individual pulses
% Extrapolate one point, which was lost by "diff" n = length(Tp); my_x = n-2:1:n; % abscissa three last point my_v = Tp(end-2:end); % abscissa three last point xq = length(Tp) + 1; vq1 = interp1(my_x,my_v,xq,'pchip'); Tp = horzcat(Tp,vq1); % Add extrapolated point % --------- or replace lines 21-31 with: -----------% inst_freq = 1./diff(unwrap(angle(hilbert(x))) * fs/(2*pi)); % Tp = inst_freq(find(PM)); % --------------------- END ------------------------data = []; for i = 1:length(Tp) tp x_AM x data
= = = =
dt:dt:Tp(i); exp(dr*tp); x_AM * Ac .* sin(2*pi*fc*tp); horzcat(data,x);
% % % %
time vector for indiv. pulses AM function for indiv. pulses current pulse add current pulse
end % Just in case, repeat the last pulse, because for some boundary % conditions, the signal might be a few points short if length(data) < N data = horzcat(data,x_i); end
294
6 Synthetic Signals Generation Methods
data = data(1:N);
% trim to get desired length
figure('position', my_position); yyaxis left; plot(t, data); axis tight;
xlabel('Time [s]'); ylabel('Amplitude'); title('Periodically oscillating pulses'); set(gca,'fontsize',8); yyaxis right; plot(t(PM == 1), 1./Tp); axis tight; ylabel('Inst. frequency of pulses [Hz]'); X X df f
= = = =
abs(fft(data)); X(1:N/2+1)/(N/2); 1/T; 0:df:fs/2;
% SPECTRUM: scaled, one-sided values
figure('position', my_position); my_xlim = [0 2.5*fc]; plot(f,X); xlim(my_xlim); grid on; title('Full resolution spectrum'); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
Next Section extends the concept of varying pulse repetition rate to non-periodic, monotonic change.
6.3.1.5
Pulses with Monotonically Increasing Repetition Rate
Next scenario represents monotonically increasing speed of shaft, which refers to a simplified model of a machine run-up. The time waveform is illustrated in Fig. 6.35. Figure 6.36 illustrates corresponding full-resolution spectrum.
Fig. 6.35 Time-domain representation of pulses with monotonically increasing repetition rate
6.3 Decaying Pulses
295
Figures 6.35 and 6.36 are generated using following code: clear; close all; clc; my_position = [100 300 500 200]; fs T Ac fc fp1 fp2 dr
= = = = = = =
dt t N
1e4; 10; 5; 50; 2; 20; -.5*fc;
= 1/fs; = dt:dt:T; = T*fs;
% % % % % % %
USER USER USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency starting frequency of pulses ending frequency of pulses pulse decaying rate
% time resolution % time vector of the entire signal % total number of samples in the signal
Tp1 = 1/fp1; Tp2 = 1/fp2;
% time of the first pulse % time of the last pulse
No_pulses = ceil(2*T/(Tp1+Tp2)); Tp = linspace(Tp1,Tp2,No_pulses); data = [];
% see "sum of geometric series" % time duration of each pulse
for i = 1:No_pulses tp x_AM x data
= = = =
dt:dt:Tp(i); exp(dr*tp); x_AM * Ac .* sin(2*pi*fc*tp); horzcat(data,x);
% % % %
time vector of current pulse current decaying function current (decaying) pulse add current pulse
end data = data(1:N);
% trim to get desired length
figure('position', my_position); yyaxis left;
plot(t, data); axis tight; xlabel('Time [s]'); ylabel('Amplitude'); title('Pulses with increasing repetition rate'); set(gca,'fontsize',8);
yyaxis right; plot(linspace(t(1),t(end),No_pulses), 1./Tp); axis tight; ylabel('Inst. frequency of pulses [Hz]'); X X df f
= = = =
abs(fft(data)); X(1:N/2+1)/(N/2); 1/T; 0:df:fs/2;
% SPECTRUM: scaled, one-sided values
figure('position', my_position); my_xlim = [0 2.5*fc]; plot(f,X); grid on; title('Full resolution spectrum'); xlim(my_xlim); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8);
Following Section extends this model to non-monotonic, general repetition rate profile.
296
6 Synthetic Signals Generation Methods
Fig. 6.36 Frequency-domain representation of pulses with monotonically increasing repetition rate
6.3.1.6
Pulses with Generalized Frequency-Modulated Repetition Rate
Generalized variation of repetition rate of pulses is characteristic for any rotary machinery working in its nominal operating point. Such signal is illustrated in Fig. 6.37—time domain and Fig. 6.38—frequency domain.
Fig. 6.37 Time-domain representation of pulses with generalized repetition rate
6.3 Decaying Pulses
297
Figures 6.37 and 6.38 are generated with following code: % NOTE: script uses "generate_smooth_profile" function - see 6.2.2.1.5 clear; close all; clc my_position = [100 300 500 200]; % USER figure size fs T Ac fc fp dr
= = = = = =
25e3; 10; 5; 50; 6; -.5*fc;
% % % % % %
FM_m = 3; No_components = 8;
USER USER USER USER USER USER
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses (NOMINAL) pulse decaying rate
% modulation depth (maximum deviation from p) % how many components are used to generate FM profile
dt = 1/fs; % time resolution t = dt:dt:T; % time vector of the entire signal N = T*fs; % total number of samples in the signal rng(0); % for repeatable results profile = generate_smooth_profile(fs,T,No_components,'symmetric'); inst_freq = fp + FM_m*profile; data = []; while length(data) < N Tp tp x_AM x data
= = = = =
1/inst_freq(length(data) + 1); dt:dt:Tp; exp(dr*tp); x_AM * Ac .* sin(2*pi*fc*tp); horzcat(data,x);
% % % %
time vector of current pulse current decaying function current (decaying) pulse add current pulse
end data = data(1:N);
% trim to get desired length
% TIME WAVEFORMM figure('position', my_position); yyaxis left; plot(t, data); axis tight; title('Pulses with generalized FM repetition rate'); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8); yyaxis right; plot(t, inst_freq); axis tight; ylabel('Inst. frequency of pulses [Hz]'); % SPECTRUM X = abs(fft(data)); X = X(1:N/2+1)/(N/2); df = 1/T; f = 0:df:fs/2;
% scaled, one-sided values
my_xlim = [0 2.5*fc]; figure('position', my_position); plot(f,X); grid on; axis tight; title('Full-resolution frequency spectrum'); xlabel('Frequency [Hz]'); ylabel('Amplitude'); set(gca,'fontsize',8); xlim(my_xlim);
298
6 Synthetic Signals Generation Methods
Fig. 6.38 Frequency-domain representation of pulses with monotonically increasing repetition rate
Next Section introduces additional amplitude modulation to the simulated pulse signal. 6.3.1.7
Additional Phase-Locked AM
Every individual (decaying) pulse represents a carrier function (either deterministic or random) modulated by a decaying function, which is modeled as monotonically decreasing function. The current Section shows how to model such modulation for considered cases of repetition rate of pulses, i.e. for constant, periodical oscillatory, monotonically changing, and generalized on the basis of some generated amplitude characteristic of a simulated pseudo-FRF function. Figure 6.39 illustrates such signal along with its envelope. Figure 6.39 is generated using following code:
Fig. 6.39 Amplitude-modulated (AM) periodic pulses
6.3 Decaying Pulses
299
clear;close all;clc; my_position = [100 300 500 200]; fs T Ac fc fp dr
= = = = = =
AM_m fm
25e3; 10; 5; 30; 3; -.5*fc;
% % % % % %
= .25; = 1/3;
% AM depth (ratio) of periodic AM % AM frequency [Hz]
dt = 1/fs; N = T*fs; Tp = 1/fp; t = dt:dt:T; tp = dt:dt:Tp; n = length(tp); x
USER USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses pulse decaying rate
% time resolution % total number of samples in the signal % total time of a single pulse % time vector of the entire signal % time vector of a single pulse % length of one pulse (in No. of points)
= exp(dr*tp)*Ac.*sin(2*pi*fc*tp); % single pulse
No_pulses = ceil(N/n)+1; data = repmat(x,1,No_pulses); data = data(1:N);
% extra pulse for boundary conditions % replicate and tile pulses % trim part of last pulse if necessary
data = (1 + AM_m*cos(2*pi*fm*t)) .* data; % Additional periodic AM envelope = (Ac + cos(2*pi*fm*t)); envelope_top = envelope * max(data)/max(envelope); envelope_bottom = - envelope * min(data)/min(-envelope); figure('position', my_position); plot(t,data); hold on; grid on; plot(t, envelope_top,'r--'); plot(t, envelope_bottom,'r--'); legend('Signal','Envelope'); xlabel('Time [s]'); ylabel('Amplitude'); set(gca,'fontsize',8);
Next Section presents selected combination of described simulating techniques.
300
6 Synthetic Signals Generation Methods
6.3.2
Combinations of Operations
6.3.2.1
Oscillatory Pulses
First example illustrates how a periodically amplitude-and-frequency-modulated signal is constructed by combination of AM and FM signals. This concept is illustrated in Fig. 6.40.
Fig. 6.40 Illustration of periodically AM-FM pulsees
6.3 Decaying Pulses
301
Figure 6.40 is generated using following code: clear; close all; clc my_position = [100 300 500 200]; my_color = [0 .447 .741]; fs T Ac fc fp dr
= = = = = =
% USER figure size % USER color
1e4; 10; 5; 50; 5; -.5*fc;
% % % % % %
USER USER USER USER USER USER
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses (NOMINAL) pulse decaying rate
fm = .33; AM_m = 0.25; FM_m = 1.5; dt = 1/fs; t = dt:dt:T; N = T*fs;
% % % % % %
USER periodic modulation frequency (AM & FM) USER AM: modulation depth (ratio) USER FM: modulation depth (absolute) time resolution time vector of the entire signal total number of samples in the signal
% ---- Periodic AM: start ------------------------------------------------Tp = 1/fp; tp = dt:dt:Tp; % time vector of a single pulse n = length(tp); % length of one pulse (No. of points) x
= exp(dr*tp)*Ac.*sin(2*pi*fc*tp); % single pulse
No_pulses = ceil(N/n)+1; % extra pulse for boundary conditions data = repmat(x,1,No_pulses); % replicate and tile pulses data = data(1:N); % trim part of last pulse if necessary x_P_AM = (1 + AM_m*sin(2*pi*fm*t)) .* data; clear x data; % ---- Periodic AM: end --------------------------------------------------% ---- Periodic FM: start ------------------------------------------------% Get timestamp of individual pulses using their nominal frequency "fp" x = sin( 2*pi*fp*t - FM_m/fm.*cos(2*pi*fm*t) ); PM = Get_phase_markers(x); Tp = diff(find(PM))*dt;
% vector of PM, see Section 4.4.4.2.2 % vector of periodically varying lengths % (in seconds)PM of individual pulses
% Extrapolate one point, which was lost by "diff" n = length(Tp); my_x = n-2:1:n; % abscissa three last point my_v = Tp(end-2:end); % abscissa three last point xq = length(Tp) + 1; vq1 = interp1(my_x,my_v,xq,'pchip'); Tp = horzcat(Tp,vq1); % Add extrapolated point data = []; for i = 1:length(Tp) tp x_AM x data
= = = =
dt:dt:Tp(i); exp(dr*tp); x_AM * Ac .* sin(2*pi*fc*tp); horzcat(data,x);
% % % %
time vector for indiv. pulses AM function for indiv. pulses current pulse add current pulse
302
6 Synthetic Signals Generation Methods
end % Just in case, repeat the last pulse, because for some boundary % conditions, the signal might be a few points short if length(data) < N data = horzcat(data,x_i); end x_P_FM = data(1:N); % trim to get desired length % ---- Periodic FM: end --------------------------------------------------x_P_AM_FM = (1 + AM_m*sin(2*pi*fm*t)) .* x_P_FM; % PERIODIC AM-FM envelope = (Ac + sin(2*pi*fm*t)); envelope_top = envelope * max(x_P_AM)/max(envelope); envelope_bottom = - envelope * min(x_P_AM)/min(-envelope); subplot(311); plot(t,x_P_AM); hold on; set(gca,'fontsize',8); set(gca,'YColor',my_color); plot(t, envelope_top,'r--'); plot(t, envelope_bottom,'r--'); title('Periodically AM pulses'); ylabel('Amplitude'); subplot(312); yyaxis left; plot(t,x_P_FM); set(gca,'fontsize',8); ylabel('Amplitude'); yyaxis right; plot(t(PM == 1), 1./Tp); set(gca,'fontsize',8); ylabel('Inst. frequency of pulses [Hz]'); title('Periodically FM pulses'); subplot(313); plot(t,x_P_AM_FM); hold on; plot(t, envelope_top,'r--'); ylabel('Amplitude'); plot(t, envelope_bottom,'r--'); xlabel('Time [s]'); title('Periodically AM-FM pulses'); set(gca,'YColor',my_color); set(gca,'fontsize',8);
Next example combines a monotonic increase of frequency with quasi-monotonic increase of amplitude, which is used to model passing through critical speed.
6.3.2.2
Run-Up with Critical Speed
For decaying pulses, rising frequency is obtained be shortening of time base of consecutive pulses. At the same time, the amplitude of pulses increases due to increasing speed. Moreover, at some point, the amplitude experiences temporary rise due to machine critical speed. Such concept is illustrated in Fig. 6.41.
6.3 Decaying Pulses
303
Figure 6.41 is generated using following code: clear; close all; clc; my_position = [100 300 500 200]; fs T Ac fc fp1 fp2 dr
= = = = = = =
1e4; 10; 5; 50; 2; 20; -.5*fc;
% % % % % % %
USER USER USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency starting frequency of pulses ending frequency of pulses pulse decaying rate
Ak = 5; CSs = .7; r = 4; dt = 1/fs; t = dt:dt:T; N = T*fs;
% time resolution % time vector of the entire signal % total number of samples in the signal
NPM_AM = linspace(1, r, N); win = generate_CS_win(N,Ak,CSs); envelope = Ac .* win .* NPM_AM; Tp1 = 1/fp1; Tp2 = 1/fp2;
% time of the first pulse % time of the last pulse
No_pulses = ceil(2*T/(Tp1+Tp2)); Tp = linspace(Tp1,Tp2,No_pulses);
% see "sum of geometric series" % time duration of each pulse
data = []; for i = 1:No_pulses tp x_AM x data
= = = =
dt:dt:Tp(i); exp(dr*tp); x_AM * Ac .* sin(2*pi*fc*tp); horzcat(data,x);
% % % %
time vector of current pulse current decaying function current (decaying) pulse add current pulse
end data = data(1:N); data = data .* win; data = data .* NPM_AM;
% trim to get desired length
envelope_top = envelope * max(data)/max(envelope); envelope_bottom = - envelope * min(data)/min(-envelope); figure('position', my_position); yyaxis left;
plot(t, data); hold on; grid on; xlabel('Time [s]'); plot(t, envelope_top,'r:'); ylabel('Amplitude'); plot(t, envelope_bottom,'r:'); axis tight; title('Run-up with critical speed'); set(gca,'fontsize',8);
yyaxis right; plot(linspace(t(1),t(end),No_pulses), 1./Tp); axis tight; ylabel('Inst. frequency of pulses [Hz]'); ylim([0 fp2]);
Following Section is the extension of periodical AM-FM oscillations to a general case.
304
6 Synthetic Signals Generation Methods
Fig. 6.41 Simulated pulses for machine run-up with critical speed
6.3.2.3
Additional Phase-Locked Non-Periodic AM
This Section illustrates REB pulses, amplitude of which is modulated non-periodically, yet phase-locked, with shaft rotations. Moreover, Sect. 7.5.3 extends this concept to non-periodic FM modulations. The current Section shows how to generate a REB signal, where frequency of REB-induced pulses changes, and leads to phase-locked NON-PERIODIC amplitude modulations. Such modeling could be used to simulate machine with variable speed. This concept is illustrated in Figure 6.42
Fig. 6.42 Top: Monotonically frequency-modulated REB pulses (for reference); bottom: additional AM modulation
6.3 Decaying Pulses
305
Figure 6.42 is illustrated using following code: fs T Ac fc fp1 fp2 dr dt t N
= = = = = = =
1e5; 4; 1; 50; 8; 50; -.6*fc;
= 1/fs; = dt:dt:T; = T*fs;
Tp1 = 1/fp1; Tp2 = 1/fp2;
% % % % % % %
USER USER USER USER USER USER USER
sampling frequency signal total time carrier amplitude carrier frequency starting frequency of pulses ending frequency of pulses pulse decaying rate
% time resolution % time vector of the entire signal % total number of samples in the signal % time of the first pulse % time of the last pulse
No_pulses = ceil(2*T/(Tp1+Tp2)); Tp = linspace(Tp1,Tp2,No_pulses); data = [];
% see "sum of geometric series" % time duration of each pulse
for i = 1:No_pulses tp = dt:dt:Tp(i); x_AM = exp(dr*tp); x = x_AM * Ac .* sin(2*pi*fc*tp); data = horzcat(data,x); end
% % % %
data = data(1:N);
% trim to get desired length
time vector of current pulse current decaying function current (decaying) pulse add current pulse
subplot(211); plot(t,data); ylim([-.8 1]); ylabel('Amplitude'); title('Monotonically FM pulses'); set(gca,'fontsize',8); % Generate AM_m profile_FM data
monotonically FM NP-AM signal = .2; % AM relative modulation depth = chirp(t,.5,T,3); % FM modulation profile = (1 + AM_m*profile_FM) .* data; % Additional non-periodic AM
subplot(212); plot(t,data); hold on; ylim([-1.1 1.1]); title('Monotonically FM Non-periodic AM pulses'); xlabel('Time [s]');set(gca,'fontsize',8);ylabel('Amplitude'); envelope = Ac + profile_FM*AM_m; envelope_top = envelope * max(data)/max(envelope); envelope_bottom = - envelope * min(data)/min(-envelope); plot(t,envelope_top, '--','color',[.85,.325,.098]); plot(t,envelope_bottom,'--','color',[.85,.325,.098]);
Note that for more advanced simulations, the shaft speed accepts random profile, which is illustrated in next Section.
306
6.3.2.4
6 Synthetic Signals Generation Methods
Generalized AM and FM Modulation
Analogously to Sect. 6.2.3.4, the current Section illustrates how to generate decaying pulses with non-periodic, non-monotonic - thus generalized modulation of amplitude and frequency. Figure 6.43 illustrates this idea. This concept is presented in details in [5]. Note the two instantaneous speed profiles generated in the code. The first profile refers to the repetition rate of REB-induced pulses. The second profile refers to the Shaft on which the REB is mounted. This is because in this example the amplitude of REB pulses deliberately depends on the amplitude profile of the Slow Shaft as a function of its instantaneous speed and the PFRF profile. NOTE: This concept has a negligible real effect and is presented just for direct comparison of the genera on of Generalized AM-FM cyclosta onary signals (current Sec on) and determinis c signals (see Sec on 6.2.3.4). Typically, for REB-induced pulses, the higher the machine speed, the larger the amplitude (due to centrifugal force) - which is illustrated in Sec on7.5.3.
Fig. 6.43 Generalized AM-FM pulses
6.3 Decaying Pulses
307
Figure 6.43 is generated using following code: % NOTE: script uses function "calculate_inst_amplitude" introduced in % Section 6.2.3.4 clear;close all;clc my_position = [100 300 500 200]; my_color = [.466 .674 .188];
% USER figure size % typically MATLAB default #3
% STEP 1: Define measurement parameters fs = 250; % USER sampling frequency (here: relatively low) T = 10; % USER total signal time % STEP 2: Calculate dt = 1/fs; df = 1/T; t = dt:dt:T; f = 0:df:fs/2; N = length(t);
fixed signal parameters and variables % time resolution % frequency resolution % time axis % frequency axis % total number of point in the signal
% STEP 3: Define signal nominal parameters Ac = 10; % USER carrier signal nominal amplitude fc = 50; % USER carrier signal frequency fp = 5; % USER frequency of pulses (NOMINAL) dr = -.5*fc; % USER pulse decaying rate FM_m = 2.5; % USER peak FM depth (absolute value) Shaft = 50*23/67; % nominal speed of Shaft where REB is mounted [Hz] % NOTE: nominal Fast Shaft is 50Hz, z1=27, z2=67, REB % is on the Slow Shaft (see Section 3.3 for details) % STEP 4: No_PFRF No_FM peak_RES peak_ARES ADR
Define PFRF profile parameters = 20; % USER number of components for PFRF profile = 4; % USER number of components for FM profile = 5; % USER maximum PFRF value = .5; % USER minimum PFRF value = .5; % USER amplitude decrease ratio
% STEP 5: Generate random PFRF profile rng(0); % USER: repeatable random results profile_PFRF = generate_PFRF_profile(fs,T,No_PFRF,peak_RES,peak_ARES,ADR); % STEP 6: Generate FM profiles (see Section 6.2.2.1.5) rng(0); % USER: repeatable random results profile_FM = generate_smooth_profile(fs,T,No_FM,'symmetric'); inst_freq_REB = fp + FM_m*profile_FM; % inst. frequency of PULSES inst_freq_Shaft = Shaft + FM_m*profile_FM; % inst. frequency of SHAFT % STEP 7: Generate instantaneous AM profile on the basis of instantaneous % FM profile as function of PFRF profile - Interpolate PFRF values profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq_Shaft); % STEP 8: Generate generalized AM-FM signal % 8.1. Generate generalized FM pulses data = []; while length(data) < N Tp tp x_AM x data end
= = = = =
1/inst_freq_REB(length(data) + 1); dt:dt:Tp; % time vector of current pulse exp(dr*tp); % current decaying function x_AM * Ac .* sin(2*pi*fc*tp); % current (decaying) pulse horzcat(data,x); % add current pulse
308
6 Synthetic Signals Generation Methods
data = data(1:N);
% trim to get desired length
% 8.2. Generate generalized AM-FM pulses data = profile_AM .* data; envelope = profile_AM*Ac;
% for envelope visualization
% STEP 9: Plot the signal envelope_top = envelope * max(data)/max(envelope); envelope_bottom = - envelope * min(data)/min(-envelope); figure('position', my_position); yyaxis left;
plot(t, data); hold on; plot(t, envelope_top, '--','color',my_color); plot(t, envelope_bottom, '--','color',my_color); title('Generalized AM-FM pulses'); xlabel('Time [s]'); ylabel('Frequency [Hz]'); set(gca,'fontsize',8);
yyaxis right; plot(t,inst_freq_Shaft); grid on; ylabel('Instant. Slow Shaft freq. [Hz]');
Figure 6.44 additionally illustrates the corresponding fragment of the PFRF profile, which is used to calculate the instantaneous amplitude of REB pulses on the basis of instantaneous speed of the Shaft (Slow Shaft) and the pseudo-FRF frequency-amplitude characteristics. A more advanced example, which involves additional Shaft modulations and random carrier signal is illustrated in Sect. 7.5.3, which considers simulation of real operational conditions.
Fig. 6.44 Corresponding fragment of the PFRF profile. The horizontal axis refers to the Slow Shaft speed
6.3 Decaying Pulses
6.3.3
Jitter
6.3.3.1
Overview
309
Jitter is considered as a slight random shift of the theoretical exact times of individual pulses. Jitter simulates random slip, which occurs in rolling element bearings. In the literature, it is accepted that jitter typically reaches 2% [6]. Nevertheless, it seems reasonable to assume that jitter is also a function of variable load. Jitter could be simulated either as a cumulative variable or as shift from pre-calculated, exact time of individual pulses calculated from instantaneous frequency of pulses. In all cases, jitter requires calculation of duration of individual pulses. Following Subsections illustrate simulation of jitter for constant, periodically modulated, and generalized FM repetition rates for both cases of jitter variable, i.e. cumulative as well as independent.
6.3.3.2
Jitter as a Cumulative Variable
Figure 6.45 illustrates first, simplified jitter modeling, where time of individual pulse is calculated by a random shift of the time duration of the previous pulse.
Fig. 6.45 Cumulative pulse jitter
310
6 Synthetic Signals Generation Methods
Figure 6.45 is generated using following code: clear; close all; clc; my_position = [100 300 500 200]; fs T Ac fc fp dr dt N Tp t
= = = = = = = = = =
% USER figure size
25e3; 10; 5; 50; 3; -.5*fc;
% % % % % %
USER USER USER USER USER USER
1/fs; T*fs; 1/fp; dt:dt:T;
% % % %
time resolution total number of samples in the signal total time of a single pulse (NOMINAL) total signal time base
jitter = 0.02; data = []; i = 0;
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses pulse decaying rate
% jitter equal to 2% of the total time of the pulse
rng(0); while length(data) < N i = i + 1; shift = jitter * 2*(rand(1)-.5) * Tp; % somewhere from Tp-2% to Tp+2% Ti.ind(i) = length(data)+1; Ti.val(i) = Tp + shift; % slightly modified Ti ti = dt:dt:Ti.val(i); % current pulse time base x_AMi = exp(dr*ti); % current pulse AM x
= x_AMi * Ac .* sin(2*pi*fc*ti); % for deterministic carrier
data = horzcat(data,x); end data = data(1:N); figure('position', my_position); my_ylim = [0.95*Tp, 1.05*Tp]; yyaxis left;
plot(t,data); xlabel('Time [s]'); ylabel('Amplitude'); title('Pulses with random jitter'); grid on;
yyaxis right; plot(t(Ti.ind),Ti.val); ylim(my_ylim); set(gca,'FontSize',8); ylabel('Pulse duration [s]');
Next Section presents alternative jitter modeling.
6.3.3.3
Jitter as Independent Variable
Figure 6.46 illustrates jitter, where timestamp of individual pulse is calculated by a random shift from a pre-calculated, constant time base.
6.3 Decaying Pulses
311
Figure 6.46 is generated using following code: clear; close all; clc; my_position = [100 300 500 200]; fs T Ac fc fp
= = = = =
dr
= -.5*fc;
dt N Tp t
= = = =
25e3; 10; 5; 50; 3;
% % % % %
USER USER USER USER USER
% USER figure size
sampling frequency signal total time carrier amplitude carrier frequency frequency of pulses
% USER pulse decaying rate
1/fs; T*fs; 1/fp; dt:dt:T;
% % % %
time resolution total number of samples in the signal total time of a single pulse (NOMINAL) total signal time base
jitter = 0.02; % jitter equal to 2% of the total time of the pulse data = []; i = 0; rng(0); while length(data) < N i = i + 1; shift = jitter*2*(rand(1)-.5) * Tp; % somewhere from Tp-2% to Tp+2% Ti.ind(i) = length(data)+1; Ti.val(i) = Tp*i + shift - length(data)*dt; % slightly modified Ti ti x_AMi x data
= = = =
dt:dt:Ti.val(i); exp(dr*ti); x_AMi * Ac .* sin(2*pi*fc*ti); horzcat(data,x);
% current pulse time base % current pulse AM % for deterministic carrier
end data = data(1:N); figure('position', my_position); my_ylim = [0.95*Tp, 1.05*Tp]; yyaxis left;
plot(t,data); xlabel('Time [s]'); ylabel('Amplitude'); title('Pulses with random jitter'); grid on;
yyaxis right; plot(t(Ti.ind),Ti.val); ylim(my_ylim); set(gca,'FontSize',8); ylabel('Pulse duration [s]');
6.3.3.4
Combination of Operations
In comparison with simulation of deterministic components (shafts and healthy gearboxes), simulation of decaying pulses (faulty REBs) typically requires more operations. Apart from generalized AM and FM modulations, pulses are generally characterized by jitter and some additional phase-locked AM. Finally, the carrier wave could be modeled as noise, spectral characteristic of which is based on the simulated amplitude-frequency profile of the object’s pseudo-FRF profile. The abovementioned scenario for REB-generated components is given in the following Chapter.
312
6 Synthetic Signals Generation Methods
Fig. 6.46 Independent pulse jitter
References 1. Urbanek J et al (2017) Normalization of vibration signals generated under highly varying speed and load with application to signal separation. Mech Syst Signal Process 82(1):13–31 2. Jablonski A, Barszcz T (2011) A novel method for the optimal band selection for vibration signal demodulation and comparison with the Kurtogram. Mech Syst Signal Process 25 (1):431–451 3. Urbanek J, Barszcz T, Antoni J (2014) Detection of signal component modulations using modulation intensity distribution. Mech Systs Signal Process 46(1):16–27 4. https://www.mathworks.com/help/signal/examples/vibration-analysis-of-rotating-machinery. html 5. Urbanek J et al (2016) Application of angular–temporal spectrum to exploratory analysis of generalized angular–temporal deterministic signals. Appl Acoust 109:27–36 6. Randall RB (2011) Vibration-based condition monitoring: industrial, aerospace and automotive applications. Wiley
Chapter 7
Simulating Operational Signals
Abstract This Chapter continues the subject of synthetic data generation. It illustrates how to use signal components described in the previous Chapter and turn them into a single synthetic vibration time waveform. The model presented in this Chapter uses separate synthetic speed profile data, selected aspects of frequency response function, and synthetic structural noise. As a result, in this model, each pulse response of modeled REB (for each ball passing under the sensor) is slightly different.
7.1
Concept Description
Chapter 6 illustrates various techniques for generation of simulated data. On the basis of these techniques, the current Chapter illustrates generation of a single vibration signal, which simulates components generated by a real object working under real, slightly variable operational conditions with respect to the nominal speed. The signal is composed of multiple harmonics of two shafts, namely Fast Shaft (Referential Shaft) and Slow Shaft, multiple harmonics of gear-meshing frequency (GMF) gearbox components with numerous sidebands (SB) and a set of pulses generated by a faulty inner ring of a rolling-element-bearing (REB). Thus, the signal simulates a machine, which experiences: • relatively high Slow Shaft Imbalance, • relatively large Gearbox failure, • relatively large REB local defect. All of these components experience instantaneous frequency modulation (FM) and have random initial phase. All components experience also instantaneous amplitude modulation (AM) according to the variable, instantaneous speed profile. For DETERMINISTIC components, instantaneous amplitude is based on the amplitude-frequency characteristics of a simulated pseudo-FRF profile of the object, while for CYCLOSTATIONARY (REB) components, instantaneous amplitude is proportional to rotational speed and additionally phase-locked modulated by the Slow Shaft speed. Finally, the simulated data includes structural noise (SN) and a random noise (RN). The signal generation scheme presented in this © The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_7
313
314
7
Simulating Operational Signals
Chapter is a foundation for simulating of a long-term fault development, which is presented in Chap. 8.
7.2 7.2.1
Simulated Object Description Mechanical Parameters
The simulated object represents a simple drivetrain, which includes a Fast (Referential) Shaft associated with referential speed, a 1-stage parallel gearbox, a Slow Shaft, and a rolling element bearing (REB). The gearbox is a speed reductor with 23 teeth on the gear on the Fast Shaft and 67 teeth on the gear on the Slow Shaft, giving the total ratio of 23/67 = 0.34328. The bearing is a popular spherical, double row roller 22202 EK bearing. The kinetostatic configuration of the drive train matches the drive train data of the commercial Vibstand™ test rig, picture of which is given in Sect. 3.3. The data simulates a Slow Shaft Imbalance, relatively large GMF second harmonic (GMFx2) with sidebands, which simulate a small Gearbox failure, and a local fault on the (rotating) inner race of a rolling-element bearing (BPFI). The general scheme of the object tis illustrated in Fig. 7.1. The kinetostatic scheme illustrates the Driving Motor, the Fast Shaft (Referential Shaft), a Gearbox, the Slow Shaft, and a single bearing. For clarity, other bearings are removed from the scheme. The simulated object operates at a nominal speed of 50 Hz, and it experiences a typical minor speed fluctuation (here 0.2 Hz peak value). Some preliminary information regarding this object and corresponding, general diagnostic analysis rules, is given in Chap. 3.
7.2.2
Characteristic Orders and Frequencies
As clearly seen, even such simple drivetrain possibly generates numerous orders/ frequencies associated with individual mechanical elements. Following Tables included in this Section are divided into three groups, namely: Shaft-related characteristic frequencies • Table 7.1, • Gearbox-related characteristic frequencies—Table 7.2, • REB-related characteristic and structural frequencies—Table 7.3. For each component, a set of characteristic orders1 is given. Note that for gearbox, Tables consider first three2 GMF harmonics and their first four sidebands (for each shaft). 1
See Sect. 3.5.3.1 for reference on characteristic orders. Practically, the significant number of GMF harmonics, as well as the number of significant sidebands in never known a priori, and it is selected either blindly or on the basis of some individual information (experience).
2
7.2 Simulated Object Description
315
Fig. 7.1 Object kinetostatic scheme [Courtesy of AMC Vibro®] Table 7.1 Shaft-related characteristic frequencies Element Fast ShaŌ x1 (ReferenƟal shaŌ) Fast ShaŌ x2 Fast ShaŌ x3 Slow ShaŌ x1 Slow ShaŌ x2 Slow ShaŌ x3
Order 1 2 3 23/67 * 1 = 0.3433 23/67 * 2 = 0.6866 23/67 * 3 = 1.0299
Frequency [Hz] @ 50 Hz speed 50 Hz (USER machine speed) 2 * 50 =100 Hz 3 * 50 = 150 Hz 23/67 * 1 * 50 = 17.1642 Hz 23/67 * 2 * 50 = 34.3284 Hz 23/67 * 3 * 50 = 51.4925 Hz
Tables 7.1–7.3 listed characteristic frequencies and orders are typically used for definition of narrowband estimators3 within monitoring process, as well as for spectral analysis during diagnostic analysis.4 Particularly in this Chapter, they are used to generate simulated data. Table 7.2 Gearbox-related characteristic frequencies Element GMF x1 GMF x2 GMF x3
Order 23 * 1 = 23 23 * 2 = 46 23 * 3 = 69
Frequency [Hz] @ 50 Hz speed 23*50 = 1150 Hz 46*50 = 2300 Hz 69*50 = 3450 Hz
(Continued)
3
See Sect. 5.5. See Sect. 9.4.
4
316
7
Simulating Operational Signals
Table 7.2 (Continued) Fast ShaŌ sidebands
GMF x1 LSB x1 GMF x1 LSB x2 GMF x1 LSB x3 GMF x1 LSB x4 GMF x1 RSB x1 GMF x1 RSB x2 GMF x1 RSB x3 GMF x1 RSB x4 GMF x2 LSB x1 GMF x2 LSB x2 GMF x2 LSB x3 GMF x2 LSB x4 GMF x2 RSB x1 GMF x2 RSB x2 GMF x2 RSB x3 GMF x2 RSB x4 GMF x3 LSB x1 GMF x3 LSB x2 GMF x3 LSB x3 GMF x3 LSB x4 GMF x3 RSB x1 GMF x3 RSB x2 GMF x3 RSB x3 GMF x3 RSB x4
(Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft) (Fast Shaft)
23 * 1 - 1 23 * 1 - 2 23 * 1 - 3 23 * 1 - 4 23 * 1 + 1 23 * 1 + 2 23 * 1 + 3 23 * 1 + 4 23 * 2 - 1 23 * 2 - 2 23 * 2 - 3 23 * 2 - 4 23 * 2 + 1 23 * 2 + 2 23 * 2 + 3 23 * 2 + 4 23 * 3 - 1 23 * 3 - 2 23 * 3 - 3 23 * 3 - 4 23 * 3 + 1 23 * 3 +2 23 * 3 + 3 23 * 3 + 4
= 22 = 21 = 20 = 19 = 24 = 25 = 26 = 27 = 45 = 44 = 43 = 42 = 47 = 48 = 49 = 50 = 68 = 67 = 66 = 65 = 70 = 71 = 72 = 73
22*50 = 1100 Hz 21*50 = 1050 Hz 20*50 = 1000 Hz 19*50 = 950 Hz 24*50 = 1200 Hz 25*50 = 1250 Hz 26*50 = 1300 Hz 27*50 = 1350 Hz 45*50 = 2250 Hz 44*50 = 2200 Hz 43*50 = 2150 Hz 42*50 = 2100 Hz 47*50 = 2350 Hz 48*50 = 2400 Hz 49*50 = 2450 Hz 50*50 = 2500 Hz 68*50 = 3400 Hz 67*50 = 3350 Hz 66*50 = 3300 Hz 65*50 = 3250 Hz 70*50 = 3500 Hz 71*50 = 3550 Hz 72*50 = 3600 Hz 73*50 = 3650 Hz
Slow ShaŌ sidebands
GMF x1 LSB x1 GMF x1 LSB x2 GMF x1 LSB x3 GMF x1 LSB x4 GMF x1 RSB x1 GMF x1 RSB x2 GMF x1 RSB x3 GMF x1 RSB x4 GMF x2 LSB x1 GMF x2 LSB x2 GMF x2 LSB x3 GMF x2 LSB x4 GMF x2 RSB x1 GMF x2 RSB x2 GMF x2 RSB x3 GMF x2 RSB x4 GMF x3 LSB x1 GMF x3 LSB x2 GMF x3 LSB x3 GMF x3 LSB x4 GMF x3 RSB x1 GMF x3 RSB x2 GMF x3 RSB x3 GMF x3 RSB x4
(Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft) (Slow Shaft)
23 * 1 - 1 * 0.3433 = 22.6567 23 * 1 - 2 * 0.3433 = 22.3134 23 * 1 - 3 * 0.3433 = 21.9701 23 * 1 - 4 * 0.3433 = 21.6268 23 * 1 + 1 * 0.3433 = 23.3433 23 * 1 + 2 * 0.3433 = 23.6866 23 * 1 + 3 * 0.3433 = 24.0299 23 * 1 + 4 * 0.3433 = 24.3732 23 * 2 - 1 * 0.3433 = 45.6567 23 * 2 - 2 * 0.3433 = 45.3134 23 * 2 - 3 * 0.3433 = 44.9701 23 * 2 - 4 * 0.3433 = 44.6268 23 * 2 + 1 * 0.3433 = 46.3433 23 * 2 + 2 * 0.3433 = 46.6866 23 * 2 + 3 * 0.3433 = 47.0299 23 * 2 + 4 * 0.3433 = 47.3732 23 * 3 - 1 * 0.3433 = 68.6567 23 * 3 - 2 * 0.3433 = 68.3134 23 * 3 - 3 * 0.3433 = 67.9701 23 * 3 - 4 * 0.3433 = 67.6268 23 * 3 + 1 * 0.3433 = 69.3433 23 * 3 + 2 * 0.3433 = 69.6866 23 * 3 + 3 * 0.3433 = 70.0299 23 * 3 + 4 * 0.3433 = 70.3732
22.6567 * 50 = 1132.835 Hz 22.3134 * 50 = 1115.67 Hz 21.9701 * 50 = 1098.505 Hz 21.6268 * 50 = 1081.34 Hz 23.3433 * 50 = 1167.165 Hz 23.6866 * 50 = 1184.33 Hz 24.0299 * 50 = 1201.495 Hz 24.3732 * 50 = 1218.66 Hz 45.6567 * 50 = 2282.835 Hz 45.3134 * 50 = 2265.67 Hz 44.9701 * 50 = 2248.505 Hz 44.6268 * 50 = 2231.34 Hz 46.3433 * 50 = 2317.165 Hz 46.6866 * 50 = 2334.33 Hz 47.0299 * 50 = 2351.495 Hz 47.3732 * 50 = 2368.66 Hz 68.6567 * 50 = 3432.835 Hz 68.3134 * 50 = 3415.67 Hz 67.9701 * 50 = 3398.505 Hz 67.6268 * 50 = 3381.34 Hz 69.3433 * 50 = 3467.165 Hz 69.6866 * 50 = 3484.33 Hz 70.0299 * 50 = 3501.495 Hz 70.3732 * 50 = 3518.66 Hz
7.3 Signal Generation Graphical Framework
317
Table 7.3 REB-related characteristic and structural frequencies Element Relative BPFI (22202 EK) Absolute BPFI (22202 EK) Slow Shaft AM REB carrier
7.3 7.3.1
Order BPFI = 8,82 Slow Shaft x1* BPFI = = 23/67 * 8,82 = 3.02776 Slow Shaft x1 = 23/67 = 0,3434 N/A
Frequency [Hz] @ 50 Hz speed N/A (see below) 3.02776* 50 = 151.388 Hz 23/67 * 50 = 6.8657 Hz USER-defined frequency ranges
Signal Generation Graphical Framework Slow Shaft Imbalance
Following Sections illustrate graphically construction of vibration signal components. Current Section illustrates construction of Slow Shaft (1) component, which represents a larger group of DETERMINISTIC, phase-locked components. In particular, such component might be used to simulate Shaft imbalance. For clarity, some variables are named, some signal parameters are given, while some signal processing operations (like some random components) are skipped, because they are not crucial to the general concept. The graphical scheme is illustrated in Fig. 7.2.
Fig. 7.2 Graphical illustration of construction of Slow Shaft (x1)—the Imbalance component
318
7
Simulating Operational Signals
Individual blocks present in the scheme are described below (in order of data flow): BLOCK: 50 Hz This block specifies USER nominal machine speed (here 50 Hz). BLOCK: z1/z2 This block specifies relative order of the components. Since Slow Shaft is connected to the referential Fast Shaft via gearbox (reductor), its relative order equals to corresponding number of teeth (z1/z2). BLOCK: “ref_FM_m” This block specifies USER maximum value of variation of machine speed (accepted as 0.02 Hz, resulting in 0.02/50 * 100 = 0.04% maximum speed fluctuation). BLOCK: fc This block represents nominal (carrier) frequency of the current components. It is calculated using nominal machine speed and the relative order. BLOCK: “FM_m” This block specifies the speed variation (in Hz) of the current component. NOTE: For Shaft and GMF components, this is a linear operation, but for gearbox sidebands, it is a combination of two separate operations.
BLOCK: “profile_FM” This block represents a time series, which describes individual, random machine speed profile for each complete vibration signal. This variable is an external USER variable. This profile is normalized. BLOCK: “FM_signal” This block scales the normalized random machine speed profile according to the component of interest (here Imbalance). Anotherwords, for higher harmonics, the fluctuation is larger. BLOCK: “Instantaneous Frequency” This block represents instantaneous frequency of the component of interest (here Imbalance). It is constructed by scaling the machine speed variation profile by Imbalance speed variation coefficient FM_m and adding it to the Imbalance frequency value fc.
7.3 Signal Generation Graphical Framework
319
BLOCK: “profile_PFRF” This block represents externally generated USER variable representing amplitude-frequency characteristics of the machine (see Sect. 6.2.3.3). BLOCK: Interpolate This block represent an individual operation, which is carried on multiple data source, namely instantaneous Slow Shaft frequency, external USER pseudo-FRF profile, and sampling frequency (not marked here). This operation is used, because for nominally stationary speed, the speed variations are relatively small, which transforms into relatively dense data representing instantaneous frequency comparing to typical FRF data over the same frequency range—the precise amplitudes values are interpolated (see Sect. 6.2.3.4). The result of this operation is the profile_AM block. BLOCK: “profile_AM” This block represents precise values of instantaneous amplitude of the Imbalance component. BLOCK: Ac This block represents nominal Imbalance component amplitude. BLOCK: “Instantaneous amplitude” This block represents instantaneous Imbalance component amplitude. BLOCK: “AM&FM vibration signal” This block represents the resultant, generalized amplitude-and-frequency modulated Slow Shaft (1)—Imbalance component, which is generated using the scaled, normalized random machine speed profile and Slow Shaft instantaneous amplitude. Additionally, the signal is multiplied by a global ratio, which is designed to be used in the next Chapter, where it is used to model advanced signal.
7.3.2
REB Local Inner Race Fault
Figure 7.2 given in previous Section illustrates generation of a DETERMINISTIC component on the example of Slow Shaft (1). The current Section, on the other hand, presents analogous graph for RANDOM CYCLO-NON STATIONARY components [1–3], on the example of REB inner race fault with a characteristic BPFI frequency. Again, for clarity, some variables are named, some signal parameters are given, while some signal processing operations (like some random variables) are skipped, because they are not crucial to the general concept. The graphical scheme is illustrated in Fig. 7.3. Comparing with DETERMINISTIC Slow Shaft component, REB signal uses the PFRF profile in a different way. For each pulse, the duration is calculated individually, and on the basis of this duration the simulated amplitude-frequency
320
7
Simulating Operational Signals
Fig. 7.3 Graphical illustration of construction of faulty REB component
structural characteristics (stored in the PFRF profile) are re-calculated (using interpolation), because the time variation changes spectral resolution. Each PFRF profile is windowed to simulate typical industrial conditions, where dominant REB housing structural frequencies are in the range form 2–10 kHz. Having this particular version of the PFRF, the REB-induced noise is reconstructed in a loop. First, the stationary noise is generated. Then, amplitude characteristics of REB damping is simulated using decaying function. As shown, the amplitude of each pulse is scaled by the factor 1/pulse_length^2, which simulates the action of centrifugal force (shorter pulses correspond to higher machine speed). Finally, the entire REB signal is amplitude-modulated by the Slow Shaft using the Shaft data and scaled by a global ratio. These operations are described in details in Sect. 7.5.3.
7.3 Signal Generation Graphical Framework
321
Note that when multiple signals are generated, representing long-term machine fault development, amplitude of each signal component is additionally scaled by individual value of the Fault Development Function (FDF), which is clearly marked in Figs. 8.2 and 8.3.
7.4
Code Description
7.4.1
Data Acquisition Parameters
Data acquisition parameters (or “measurement” parameters) have to be accepted as first data, because in case of simulated signals, they affect not only the vibration data, but also resolution of pseudo-FRF amplitude-frequency characteristics as well as operational speed profile. % STEP 1: Data acquisition parameters fs = 25e3; % USER sampling frequency T = 10; % USER signal total time
Accepted parameters represent a typical industrial set-up.
7.4.2
Generation of User Profiles
7.4.2.1
Overview
Next, three USER profiles are generated. These profiles are independent of the vibration data itself, and they are presented in Table 7.4. The order of generation of these profiles is arbitrary. For each USER profile, the Table gives the name of the variable, which stores the data, short description, the name of the calling function, as well as the number of the Section, where the function is introduced and described in details. These profiles are further described below. Table 7.4 Summary of USER data-independent profiles No. 1 2 3
Variable
Description
normalized speed profile_FM fluctuation profile pseudo-FRF, amplitudeprofile_PFRF frequency characteristics SN
structural noise
Calling function generate_smooth_profile generate_PFRF_profile generate_SN
Reference Section 6.2.2.1.5 Section 6.2.3.3 Section 7.4.2.4
322
7.4.2.2
7
Simulating Operational Signals
Profile #1: Operational Speed Profile
First USER profile is the normalized speed variation profile profile_FM, which is used to calculate the instantaneous frequency profile of the referential Fast Shaft. The profile is calculated using the generate_smooth_profile function introduced in Sect. 6.2.2.1.5 on the basis of user No_FM parameter. The nominal speed of the referential Fast Shaft is accepted to be equal to 50 Hz, and maximum variation of machine speed equal to 0.02 Hz. % STEP 2: Generate USER data-independent profiles % 2.1 Generate operational speed profile rng(0); % repeatable results No_FM = 4; % USER No. of sin. components for random FM profile profile_FM = generate_smooth_profile(fs,T,No_FM,'symmetric'); ref_shaft = 50; % USER nominal machine speed [Hz] ref_FM_m = 0.02; % USER maximum variation of machine speed [Hz] % Plot auxiliary figure inst_freq = ref_shaft + ref_FM_m*profile_FM; % machine instantaneous speed dt = 1/fs; % time resolution t = dt:dt:T; % time axis figure; plot(t,inst_freq,'color',[.85,.325,.098]); grid on; set(gca,'fontsize',8); xlabel('Time [s]'); ylabel('Frequency [Hz]'); title('Instantaneous frequency of Fast Shaft (Referential Shaft)');
Example of a referential Shaft instantaneous sped profile is illustrated in Fig. 7.4. The normalized profile profile_FM is used in the code in two ways for all components of the final signal. Firstly, it is used to calculate the corresponding instantaneous frequency of individual components on the basis of their speed with respect to the referential Fast shaft. Summary of these relations is given in Table 7.5. Note that the variable inst_freq used in the Table represents the instantaneous speed of the referential Fast Shaft.
Fig. 7.4 Example of machine speed fluctuation
7.4 Code Description
323
Table 7.5 Summary of speed relations Signal component
Component type
Simulated FM relation
Referential Shaft (Fast Shaft)
Single sinusoid
Equal to inst_freq
Shafts (Fast shaft and Slow shaft)
Sinusoidal harmonics
Linearly proportional to inst_freq
GMF
Sinusoidal harmonics
Linearly proportional to inst_freq
GMF sidebands
Sinusoidal harmonics of corresponding Shafts
GMF; location determined by offset: GMF ± shaft harmonics
REB carrier
Narrowband noise
N/A
Phase-locked decaying pulses
Linearly proportional to inst_freq
REB (inner race fault)
Phase-locked AM
Linearly proportional to inst_freq
Shape linearly proportional to corresponding
Secondly, it is used to calculate instantaneous amplitude of DETERMINISTIC components on the basis of the determined instantaneous frequency and the second USER profile, the profile_PFRF.
7.4.2.3
Profile #2: Pseudo-FRF Profile
Second USER profile is the pseudo-FRF amplitude-frequency characteristics of the machine profile_PFRF, which is used to calculate the third profile, the structural noise SN, and to calculate instantaneous amplitude of DETRMINISTIC signal components as a function of instantaneous speed. % 2.2 Generate rng(0); No_PFRF = peak_RES = peak_ARES = ADR = profile_PFRF =
pseudo FRF-profile (PFRF) % repeatable results 20; % USER number of components for PFRF profile 5; % USER maximum PFRF value .75; % USER minimum PFRF value .25; % USER noise relative Amplitude Change Ratio generate_PFRF_profile(fs,T,No_PFRF,peak_RES,peak_ARES,ADR);
% Plot auxiliary figure figure; df = 1/T; % frequency resolution f = 0:df:fs/2; % frequency axis (one-sided spectrum) plot(f, profile_PFRF); grid on; ylabel('Value'); xlim([-50 8900]); title('Simulated pseudo FRF profile - USER zoom'); xlabel('Frequency [Hz]'); set(gca,'fontsize',8);
Example of a pseudo-FRF profile is illustrated in Fig. 7.5.
324
7
Simulating Operational Signals
Simulated pseudo FRF profile - USER zoom 4 Shaft harmonics
Value
3
Gearbox Dominant
2
bearing carrier
1
0
0
1000
2000
3000
4000
5000
6000
7000
8000
Frequency [Hz]
Fig. 7.5 Pseudo-FRF profile
The highlighted parts of the simulated pseudo-FRF profile cover the frequency range of shaft harmonics, gearbox components, i.e. gear meshing frequencies (GMFs) with double sidebands (DSB), and a speed-independent resonant frequency range induced by faulty rolling element bearing (REB).
7.4.2.4
Profile #3: Structural Noise Profile
Third USER profile, the structural noise SN, is modeled as being induced constantly (with random amplitude and phase) with spectral distribution specified by the pseudo-FRF profile profile_PFRF during entire signal duration; thus, being completely stationary. Once the variable is calculated for the same INPUT parameters, it is recommended to reuse it. The pseudo-structural noise is generated by an autonomous function given in following code:
7.4 Code Description
325
function [SN] = generate_SN(fs,T,profile_PFRF,offset) % DESCRIPTION % Function generates the basic, pseudo-structural noise as a sum of % sinusoidal components with "very" random amplitude and random phase over % defined frequency vector, one-by-one for each frequency. % % % % %
INPUT fs T profile_PFRF offset
% OUTPUT % SN % SN.mat
-
sampling frequency total signal time the pseudo amplitude-frequency object characteristics how the spectral distribution is "moved up in amplitude"
- structural noise, size - mat file with variable "SN" representing structural noise
% NOTE: Note that variable "SN" is calculated using the "profile_PFRF" % variable as INPUT argument, so these variables must be used as a pair. if nargin == 3 offset = 0.4; end
% USER default value, might be adjusted
my_dir = dir; for i = 1:length(my_dir) if strcmp(my_dir(i).name,'SN.mat') load 'SN.mat'; %#ok disp('Variable "SN" found and loaded. Re-calculation skipped.') break; end end % Generate if variable does not exist if ~exist('SN','var') disp('Variable "SN" not found. Re-calculation started. Please wait...') df dt f t
= = = =
1/T; 1/fs; df:df:fs; dt:dt:T;
N = fs*T; SN = zeros(1,N);
% % % %
frequency resolution time resolution frequency scale time scale
% No. of points in SN % allocate memory
str = 'Generating pseudo-structural noise (SN)'; my_waitbar = waitbar(0,'In progress...','Name',str); for i = 1:N/2 r1 = rand(1)*rand(1); r2 = rand(1)*rand(1); A wt ph
% increase complexity % increase complexity
= profile_PFRF(i)*(r1+r2 + offset); % current amplitude = 2*pi*f(i)*t; % current "frequency" = rand(1)*2*pi; % current phase
SN = SN + A*sin(wt + ph);
% add individual signals
waitbar(i/(N/2),my_waitbar);
% display progress
326
7
Simulating Operational Signals
end SN = SN/max(SN); close(my_waitbar);
% normalized amplitude
% Save this variable to a file (to save time in the future - load if % needed, instead of recalculating). save('SN.mat','SN'); disp('Variable "SN" re-calculated and saved.') end
The generate_SN function is used to generate the structural noise, which is going to be added to the final signal in the following way: % 2.3 Generate and store structural noise profile rng(0); % repeatable results SN = generate_SN(fs,T,profile_PFRF);
Example of a synthetic structural noise SN is illustrated in Fig. 7.6. Figure 7.6 is generated using following code: figure; N = length(t); % total number of points in the signal Y_SN = abs(fft(SN)); % calculate spectral values step 1 of 2 Y_SN = Y_SN(1:N/2+1)/(N/2); % calculate spectral values step 1 of 2 plot(f, Y_SN,'color',[.466,.674,.188]); grid on; axis tight; ylabel('Amplitude'); xlabel('Frequency [Hz]'); title('Frequency spectrum'); legend('Structural noise SN'); set(gca,'fontsize',8);
Structural noise SN is the last profile used in simulation. Next, signal parameters are defined and signal components are generated.
Frequency spectrum
10-3
3.5
Structural noise SN
Amplitude
3 2.5 2 1.5 1 0.5 0
2000
4000
6000
Frequency [Hz]
Fig. 7.6 Structural noise
8000
10000
12000
7.4 Code Description
7.4.3
327
Definition of Principal Static Data
Following code presents definition of kinetostatic data of the simulated machine, and defines amplitude and phase values of deterministic components. For each Shaft, three harmonic components are defined. For the Gearbox, here consecutive harmonics are defined along with four pairs of consecutive double-sidebands each. % STEP 3: Define test rig data % 3.1 Kinetostatic data z1 = 23; % USER No. of teeth on gear on the Fast (referential) Shaft z2 = 67; % USER No. of teeth on gear on the Slow Shaft BPFI = 8.82; % USER inner race fault nominal order (Bearing type 22205EK) % 3.2 Fast Shaft data % NOTE: Nominal amplitudes of shafts and gearbox components are multiplied % by a factor (1+10% random value) No_FS_harmonics = 3; % USER No. of FS harmonics Ac_FS = [.1 .075 .05]; % USER harmonic amplitudes % 3.3 Slow Shaft data No_SS_harmonics = 3; Ac_SS = [.03 .025 .02];
% USER No. of SS harmonics % USER harmonic amplitudes
% 3.4 Gearbox GMF and sidebands data No_GMF_harmonics = 3; No_SB_harmonics = 8; Ac_GMF
= [.1, .3, .1];
% USER GMF harmonics amplitudes
% Sideband amplitudes Ac_SB_FS{1} = [.8 .7 .6 .3 .0 .0 .0 .0]; Ac_SB_FS{2} = [.8 .6 .4 .5 .2 .3 .2 .1]; Ac_SB_FS{3} = [.8 .6 .1 .5 .0 .0 .0 .0];
% USER GMFx1-relative FS SBs % USER GMFx2-relative FS SBs % USER GMFx3-relative FS SBs
Ac_SB_SS{1} = [.7 .6 .4 .1 .0 .0 .0 .0]; Ac_SB_SS{2} = [.7 .5 .6 .4 .3 .2 .1 .1]; Ac_SB_SS{3} = [.8 .4 .6 .2 .0 .0 .0 .0];
% USER GMFx1-relative SS SBs % USER GMFx2-relative SS SBs % USER GMFx3-relative SS SBs
% 3.5 Phase settings ph_FS = 0.1; % USER phase offset from initial random phase for Fast Shaft ph_SS = 0.3; % USER phase offset from initial random phase for Slow Shaft ph_GMF = 0.7; % USER phase offset from initial random phase for GMF
Clearly, presented definition enables supervised generation of desired relative amplitude ratios between individual deterministic components.
328
7
7.5
Simulating Operational Signals
Signal Components
7.5.1
Fast Shaft and Slow Shaft
Components generated by Shafts are deterministic harmonic components, frequency of which is calculated as integer multiplies of the fundamental shaft frequency. Any change of frequency of the fundamental shaft frequency results in a proportional change of frequency of harmonic components. In case of amplitude modulation, modification scheme depends on the AM definition. For simple time-based functions, like periodic AM or run-up amplitude ratio, one might multiply all harmonics simultaneously. However, when addition amplitude scaling function of frequency is considered (like based on PFRF), instantaneous amplitude modulation function for each component needs to be generated individually. Vibration components related to the Fast Shaft (referential Shaft) and the Slow Shaft are modeled as fault-free using following code: % STEP 4: Generate signal components % --------------- SUBSET No. 1: Fast Shaft -------------------------------Fast_Shaft = zeros(1,N); for i = 1:No_FS_harmonics fc = i * ref_shaft; FM_m = ref_FM_m * fc/ref_shaft;
% relative order * speed[Hz] % fluctuation proportional
inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_FS(i)*r; % instantaneous amplitude 2*pi*fc*t + 2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t ph_FS * i; % every FS harmonic has % unique phase x = A.*sin(wt + ph); % individual FS harmonics Fast_Shaft = Fast_Shaft + x; % add to final FS signal end
Note that since REB is located on the Slow Shaft, some data is stored for additional Slow Shaft amplitude modulation of the REB signal.
7.5 Signal Components
329
% -------------- SUBSET No. 2: Slow Shaft --------------------------------Slow_Shaft = zeros(1,N);
for i = 1:No_SS_harmonics fc = z1/z2 * i * ref_shaft; FM_m = ref_FM_m * fc/ref_shaft;
% relative order * speed[Hz] % fluctuation proportional
inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_SS(i)*r; % instantaneous amplitude 2*pi*fc*t + 2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t ph_SS*i; % every FS harmonic has % unique phase x = A.*sin(wt + ph); % individual SS harmonics Slow_Shaft = Slow_Shaft + x; % add to final SS signal % Store to generate additional amplitude modulation of REB signal % (see SUBSET No. 4: REB) if i == 1 SlowShaft_x1 = x; end end
Figure 7.7 illustrates a fragment of the Fast_Shaft component and Slow_Shaft waveforms and a fragment of its full-resolution frequency spectra. Time waveform - USER zoom 0.4 Fast Shaft Slow Shaft
Amplitude
0.2 0 -0.2 -0.4
0
0.05
0.1
0.15
0.2
0.25
0.3
Time [s]
Frequency spectrum - USER zoom 0.2 Fast Shaft Slow Shaft
Amplitude
0.15 0.1 0.05 0
0
20
40
60
80
100
120
Frequency [Hz]
Fig. 7.7 Fast Shaft (referential Shaft) and Slow Shaft component
140
160
180
200
330
7
Simulating Operational Signals
Note that these are initial values before final scaling (for instance representing machine in a healthy state). The code generating Fig. 7.7 is common in this book; therefore, it is skipped. Next, Gearbox-related data is modeled.
7.5.2
Gearbox
Gearbox-generated data is modeled as GMF harmonics with multiple double sidebands (DSB). Since each sideband is located at a different frequency, it is modified by individual set of values of the FRF profile. Therefore, sidebands are calculated with the use of prosthaphaeresis identity. Note that for any sidebands with amplitude ratio above half, the corresponding GMF component becomes overmodulated, and so-called “clipping” occurs. Since amplitude of individual sideband is calculated as: [SB_ratio] * [GMF_amplitude],
the dimensionless modulation index is equal to twice the [SB_ratio]. Because the SB amplitude is defined as a ratio of a spectral component, this scaling is omitted in the code, e.g. consider: AM_m = 1.2; A_GMF = 10;
In this case, we have: SB_amplitude = 1/2 * A_GMF * AM_m = 1/2 * 10 * 1.2 = .6*10 = [USER]*10;
Vibration components related to the Gearbox are modeled as fault-free using following code:
7.5 Signal Components
331
SUBSET No. 3: Gearbox % Gearbox = zeros(1,N); for i = 1:No_GMF_harmonics
% repeat for all GMF harmonics
fc = z1 * i * ref_shaft; % relative order * speed[Hz] FM_m = ref_FM_m * fc/ref_shaft; % modulation index of current GMF inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_GMF(i)*r; % amplitude 2*pi*fc*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t ph_GMF*i; % every GMF harmonic has unique phase
GMF = A.*sin(wt + ph); Gearbox = Gearbox + GMF;
% current GMF harmonic
for j = 1:No_SB_harmonics % FAST SHAFT sidebands fk = j * ref_shaft; Ac = Ac_SB_FS{i}(j); ph = ph_GMF*i + ph_FS*j;
common variables % current sideband spacing % current sideband amplitude % phase for GMF harmonic FS sidebands
% Fast Shaft left sideband inst_freq = (fc-fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt LSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instantaneous amplitude 2*pi*(fc-fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t Ak.*sin(wt + ph); % phase common for current FS LSB&RSB
% Fast Shaft right sideband inst_freq = (fc+fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt RSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instantaneous amplitude 2*pi*(fc+fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t Ak.*sin(wt + ph); % phase common for current FS LSB&RSB
Gearbox = Gearbox + LSB + RSB;
% add current FS sidebands
% SLOW SHAFT sidebands - common variables fk = j * ref_shaft * z1/z2; % current sideband spacing Ac = Ac_SB_SS{i}(j); % current sideband amplitude ph = ph_GMF*i + ph_SS*j; % phase for GMF harmonic SS sidebands % Slow Shaft left sideband inst_freq = (fc-fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt
= 1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation = profile_AM * Ac * Ac_GMF(i) * r; % instantaneous amplitude = 2*pi*(fc-fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t
332
7 LSB = Ak.*sin(wt + ph);
Simulating Operational Signals
% phase common for current SS LSB&RSB
% Slow Shaft right sideband inst_freq = (fc+fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt RSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instantaneous amplitude 2*pi*(fc+fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t Ak.*sin(wt + ph); % phase common for current SS LSB&RSB
Gearbox = Gearbox + LSB + RSB;
% add current SS sidebands
end end
Figure 7.8 illustrates a fragment of the Gearbox component waveform and a fragment of its full-resolution frequency spectrum. Note that these are initial values before final scaling (for instance representing machine in a healthy state). The code generating Fig. 7.8 is common in this book; therefore, it is skipped. Next, REBrelated data is modeled.
Time waveform - USER zoom
10
Gearbox
Amplitude
5 0 -5
-10
0
1
0.5
2
1.5
Time [s]
Frequency spectrum - USER zoom
0.25
Gearbox
Amplitude
0.2 0.15 0.1 0.05 0
0
500
1000
1500
2000
2500
3000
Frequency [Hz]
Fig. 7.8 Gearbox-related components
3500
4000
4500
5000
7.5 Signal Components
7.5.3
333
Rolling Element Bearing
Section 6.3 in the previous Chapter illustrates some examples of partial REB signals modeling. In this Section, this modeling is extended in following way: • the model combines jitter with generalized modulations • the model extends phase-locked non-periodic AM to generalized profile • the model introduces additional AM proportional to the square of machine rotational speed. REB component is generated using following code: % SUBSET No. 4: Rolling Element Bearing (REB) % Define signal parameters jitter = 0.02; % USER jitter (2%) % Calculate nominal repetition rate of pulses fp = BPFI * z1/z2 * ref_shaft; % REB is on the Slow Shaft Tp = 1/fp; % nominal time duration of one pulse dr = Tp * -.5e5; % USER pulse decaying rate % Calculate nominal instantaneous frequency of pulses FM_m = ref_FM_m * fp/ref_shaft; inst_freq = fp + FM_m * profile_FM; % Generate pulses i = 0; REB = [];
% pulse index variable % here REB signal is stored
while length(REB) < N i shift Tpi Ti ti
= = = = =
i + 1; jitter*2*(rand(1)-.5) * Tp; 1/inst_freq(length(REB)+1); Tpi + shift; dt:dt:Ti;
% % % % %
pulse index random shift cumulative approach duration of current pulse time base of current pulse
if mod(length(ti),2) ti = ti(1:end-1); end
% pulse has even No. of points
AMi n
% current decaying function % length of current pulse
= exp(dr*ti); = length(ti);
% For each pulse calculate individual representation of PFRF profile % by resampling original PFRF profile according to length of current % pulse dfi = 1/Ti; % frequency resolution of current pulse profile_PFRF_i = interp1(f,profile_PFRF,0:dfi:fs/2); % Multiply by Tukey (tapered cosine) window to smooth profile "ends" profile_PFRF_i = profile_PFRF_i .* tukeywin(n/2+1)'; % Next, for each pulse, calculate its time waveform and apply the % decaying function with USER parameters fi = 0; sig = zeros(1,n); for k = 1:n/2 fi = fi + dfi; ph_k = (rand(1)-.5)*(2*pi); % from -pi to pi sig = sig + profile_PFRF_i(k) * sin(2*pi*fi*ti + ph_k); end
334
7 r = 1 + (rand(1)-.5).*(rand(1)-.5)/2; x = AMi .* sig * r;
Simulating Operational Signals
% USER random variation % current pulse
% NOTE: amplitude of each pulse is scaled by the square of the number % of "sig" components. This is for two reasons: % 1. To simulate that for higher speed the amplitude of pulses is % typically higher due to centrifugal force (~speed^2) % 2. For smaller instantaneous speed, "x" has larger amplitude % due to larger number of "sig" components (numerical defect) x = x/n^2; % scale each pulse amplitude REB = horzcat(REB,x);
%#ok add current pulse
end
Figure 7.9 illustrates selected, consecutive steps within generation of REB-induced pulses. First series shows the common, full-resolution pseudo-FRF profile (PFRF). In the next step, the frequency-domain profile is resampled (downsampled) according to the relatively short length of a pulse (the first pulse is considered). The third series shows how the data is multiplied by a Tukey window in the frequency domain. Next, referring to the code (see the for loop), a time-domain signal is constructed by summing up subsequent sinusoidal component, amplitude of which is taken from the windowed, downsampled PFRF profile. Note that the for loop also generates random phase for each sinusoidal component; otherwise, it will not work correctly. Thus, the fourth plot shows the spectral distribution of a short stationary noise stored in the first instance of complete sig variable. Finally, the noise is multiplied by a USER decaying function Ami and additionally randomized in amplitude to obtain a single, unique pulse. The spectral distribution of the first REB pulse instance is illustrated by the last series, before it is scaled by 1/n^2. In this way, all pulses refer to the same, common amplitude-frequency characteristics of the machine (stored in the profile_PFRF); yet, they slightly vary randomly in amplitude and frequency. To illustrate this idea, Fig. 7.10 shows windowed PFRF profiles used for generation of individual pulses (here 1524 plots of individual profile_PFRF_i variable), while Fig. 7.11 illustrates full-resolution spectra of these pulses (here 1524 plots of scaled, full-resolution spectra of individual pulses—variable”x”). Note that the idea behind such simulation is to generate a signal, where each time a rolling element enters the local defect, the structural amplitude characteristics of the object are modeled with some random component.
7.5 Signal Components
335
Original PFRF profile Amplitude
4
Full-resolution
2
00
2000
4000
6000
8000
10000
12000
Modification #1 Amplitude
4
Interpolated
2
0
0
2000
4000
6000
8000
10000
12000
Modification #2 Amplitude
4
Windowed
2
0
0
2000
4000
6000
8000
10000
12000
Modification #3 Amplitude
4
Reconstructed (1st pulse)
2
0
0
2000
4000
6000
8000
10000
12000
Modification #4 Amplitude
4
Randomized (1st pulse)
2
0
0
2000
4000
6000
8000
10000
Frequency [Hz]
Fig. 7.9 Consecutive steps of construction of spectral characteristics of REB pulses
12000
336
7
Simulating Operational Signals
Fig. 7.10 A set of PFRF profiles used for individual REB-induced pulses (corresponds to MODIFICATION #2 in Fig. 7.9).
Figure 7.10 is generated using multiple plots: figure(h1); plot(0:dfi:fs/2,profile_PFRF_i);
while Fig. 7.11 is generated using multiple plots: figure(h2); X = abs(fft(x)); X = X(1:length(x)/2+1)/(length(x)/2); plot(0:dfi:fs/2,X);
Next, the signal is trimmed, modulated by Slow Shaft and finally normalized. REB = REB(1:N);
% trim the signal
% Additional Slow Shaft (SS) amplitude modulation. Note that the amplitude % modulation is based on non-periodic, generalized Slow Shaft data SS_AM_depth = 0.5; % USER SS AM depth profile = SlowShaft_x1 / max(SlowShaft_x1); % normalize REB = (1 + SS_AM_depth * profile).*REB; % SS AM signal % Finally, normalize REB data. Note that REB data is not scaled by the PFRF % profile like previous DETERMINISTIC components. REB = REB/max(REB);
Figure 7.12 illustrates a USER zoom of the resultant REB component. As clearly seen in Fig. 7.12, the signal shows both, the BPFO repetition rate, as well as the Slow Shaft amplitude modulation. The code generating Fig. 7.12 is common in this book; therefore, it is skipped.
7.5 Signal Components
Fig.
7.11 Frequency
337
spectrum
of
individual
REB-induced
pulses
(corresponds
to
MODIFICATION #4 in Fig. 7.9 after scaling by 1/n^2)
Time waveform - USER zoom REB
0.6
Amplitude
0.4 0.2 0 -0.2 -0.4 -0.6 -0.8
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
Time [s]
Fig. 7.12 A fragment of the REB signal
7.5.4
Random Noise
The last signal component is the non-uniformly distributed random noise, which is present in any real vibration signal. The random noise RN is calculated using following code:
338
7
Simulating Operational Signals
Frequency spectrum - USER zoom
10-3
3.5
Random noise RN
Amplitude
3 2.5 2 1.5 1 0.5 0
2000
4000
6000
8000
10000
12000
Frequency [Hz]
Fig. 7.13 Modified random noise
RN = rand(1,N)-.5; % simple uniform random noise [-1:1] Rcof = .7; % USER relative cut-off frequency [B,A] = butter(1,Rcof,'low'); % Any low-order low pass filter, which % simulates frequency response of a typical % sensor. NOTE: calculate coefficients % [B,A] outside the loop for time savings RN = filter(B,A,RN); % Filter the current noise
Example of a random noise RN is illustrated in Fig. 7.13. The code generating Fig. 7.13 is common in this book; therefore, it is skipped. Note that the uniform distribution is modified by the filter, which simulates practical frequency characteristics5 of a typical industrial accelerometer (typically piezoelectric).
7.6
Finalization
For simulation purposes, it is convenient to introduce extra scaling variable for individual signal components, which enables easy adjustment of relative amplitudes. This could be dome using following code:
In practice, every measurement unit implements a low-pass anti-aliasing filter. As a consequence, such filter not only prevents from aliasing, but it also “filters” the sensor’s frequency characteristics.
5
7.6 Finalization
339
% STEP 6: Define USER global ratio of components % NOTE: adjust these parameters carefully r1 = 0.25; % USER scale for Fast Shaft r2 = 3.0; % USER scale for Slow Shaft r3 = 0.6; % USER scale for Gearbox r4 = 14; % USER scale for REB (normalized) components r5 = 5.0; % USER scale for structural (normalized) noise r6 = 1.5; % USER scale for low-pass filtered (normalized) noise % STEP 7: Add components data = Fast_Shaft*r1 + Slow_Shaft*r2 + Gearbox*r3 + REB*r4 + SN*r5 + RN*r6;
As shown in the code, components are finally added together. Lastly, when signal is to be analyzed in order domain, it is recommended to generate the phase marker signal PM in the following way: % EXTRA: Generate PM vector fc = ref_shaft; FM_m = ref_FM_m; x = sin(2*pi*fc*t+2*pi*FM_m*(cumsum(profile_FM)*dt)); % skip amplitude PM = Get_phase_markers(x); % see Section 4.4.4.2.2
Next Section illustrates resultant vibration signal.
7.7 7.7.1
Resultant Signal Two-Dimensional Plots
Resultant signal is a single, 10-s vibration signal, sampled with 25 kHz sampling rate, containing harmonics of the referential Fast Shaft, Slow Shaft, Gearbox GMF harmonics with multiple sidebands, REB-induced pulses, structural noise SN, and a random noise RN. Current Sections illustrates the time waveform, full-resolution frequency spectrum, envelope signal, envelope spectrum, and a fragment of a spectrogram. Signal complete waveform along with instantaneous speed in illustrated in Fig. 7.14. Figure 7.15 gives further insight to the signal. The top graph shows a time waveform USER zoom, the center graph illustrates a full-resolution frequency spectrum. The bottom graph presents envelope time signal. Full-resolution envelope spectrum is given in Fig. 7.16. Clearly, time waveform illustrated in Fig. 7.14 shows some signal complexity. Zoomed time waveform, presented in Fig. 7.15 illustrates REB-induced pulses modified by Slow Shaft AM. Frequency spectrum displays harmonics of Shafts, Gearbox components and complex structural and random noise. The Envelope signal finally enhances amplitude modulation of REB pulses. From the Envelope Spectrum, illustrated in Fig. 7.16, BPFO and AM components are easily identified.
7
Simulating Operational Signals
Time waveform
15
50.03
10
50.02
Amplitude
5
50.01
0 50 -5 49.99
-10 -15
0
1
2
3
4
5
6
7
8
9
Fast Shaft speed [Hz]
340
49.98 10
Time [s]
Fig. 7.14 Resultant signal in time domain along with speed profile
Figs. 7.14 , 7.15 and 7.16 are generated using following code: % PLOT RESULTS figure; yyaxis left; plot(t,data); xlabel('Time [s]'); ylabel('Amplitude'); grid on; title('Time waveform'); set(gca,'fontsize',8); yyaxis right; plot(t,ref_shaft + ref_FM_m*profile_FM); ylabel('Fast Shaft speed [Hz]'); X = abs(fft(data)); X = X(1:N/2+1)/(N/2); figure; plot(f,X); xlim([0 fs/2]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); grid on; title('Full-resolution frequency spectrum'); set(gca,'fontsize',8); env = Generate_envelope(data,'td',4000,500,fs); % see Section 4.3.1.5 figure; plot(t,env); xlabel('Time [s]'); ylabel('Amplitude'); grid on; title('Envelope signal'); set(gca,'fontsize',8); X = abs(fft(env-mean(env))); X = X(1:N/2+1)/(N/2); figure; plot(f,X); xlim([0 600]); xlabel('Frequency [Hz]'); ylabel('Amplitude'); grid on; title('Full-resolution Envelope spectrum'); set(gca,'fontsize',8)
7.7 Resultant Signal
341
Time waveform - USER zoom
50.03 50.02
Amplitude
5 50.01 0
50
-5
49.99
-10 0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
Fast Shaft speed [Hz]
10
49.98
Time [s]
Full-resolution frequency spectrum
Amplitude
0.15
0.1
0.05
0
0
2000
6000
4000
8000
10000
12000
Frequency [Hz]
Envelope signal - USER zoom
4
Amplitude
3
2
1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Time [s]
Fig. 7.15 Top Resultant signal in time domain—USER zoom, Center: Resultant signal in frequency domain, Bottom: Envelope of Resultant signal—USER zoom
342
7
Simulating Operational Signals
Full-resolution Envelope spectrum
0.25
Amplitude
0.2 0.15 0.1 0.05 0
0
100
200
300
400
500
600
Frequency [Hz]
Fig. 7.16 Envelope spectrum of resultant signal (significant part)
7.7.2
Selected Spectrogram Visualization
Example of visualization of the constructed signal using time–frequency tools is illustrated in Fig. 7.17, where the surroundings of the 2nd harmonic of the GMF frequency is presented using spectrogram. Figure 7.17 is generated using following code: w_len = 2^15; % USER window overlap = 0.99; % maximum overlap for accuracy [~,Sf,St,Sp] = spectrogram(data,w_len,floor(overlap*w_len),w_len,fs); figure; surf(Sf,St,Sp','edgecolor','none');
% plot figure
delta = 95;
% USER range parameter
xlim([50*23*2-delta 50*23*2+delta]); % USER zoom xlabel('Frequency [Hz]'); ylabel('Time [s]'); zlabel('Amplitude'); title('Spectrogram - USER zoom'); set(gca,'fontsize',8); view([14 71]); % USER view angle
Note how the instantaneous amplitude of the presented surroundings of GMFx2 changes over time, which simulates real data complexity (to some extent).
References
343
Fig. 7.17 Spectrogram visualization around 2nd GMF harmonic
References 1. Bonnardot F et al (2017) Don’t ignore nonstationarity: use it to advantage. In: ISMA2006 international conference on noise and vibration engineering 2. Antoni J (2013) Separation of combustion noise in IC engines under cyclo-non-stationary regime. Mechan Syst Signal Process 38(1):223–236 3. Abboud D et al (2016) The spectral analysis of cyclo-non-stationary signals. Mechan Syst Signal Process 17(15):280–300
Chapter 8
Simulating Long-Term Machine Fault Development
Abstract This Chapter uses previously generated signal to build an array of signals, which model slow machine fault development. The fault is defined by a Failure Development Function (FDF). This Chapter shows how to generate data corresponding to eight different modes (i.e. clearly separated technical condition state) of a rotary machinery. Introduced faults include shaft imbalance, gearbox degradation, and rolling-element bearing failure.
8.1
Overview
In this Section, the code illustrates simulation of a relatively long-term evolution of some typical machine faults. As a base signal, the code uses the signal introduced in Chap. 7—major changes in the code are highlighted. Introduction of any other, customized failure mode requires re-modification of the code. First, the concept of a so-called “Failure Mode” and “Failure Development Function” is presented. Next, a general scheme for simulation of a long-term fault development is described. Finally, synthetic generated data is presented. Deliberately, the data illustrated at the end of this Chapter is visually similar to the final data presented in the previous Chapter, i.e. the previously simulated single signal corresponds to final fault development stage. Note that the pseudo-FRF profile (PFRF), as well as structural noise SN, is the same, yet random speed fluctuation profile—and therefore instantaneous amplitude values as well as REB carrier noise, random noise RN, and initial (random) phase IRP for deterministic components are different. Moreover, in previous Chapter, amplitudes of deterministic components are USER-defined, while in the current Chapter, they are randomly modified. In this way, the book presents generation of data for both scenarios, i.e. when a single, continuous waveform containing fault is desired, or when a relatively large data simulating fault DEVELOPMET is needed. Next Chapter illustrates four kinds of analysis of such data.
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_8
345
346
8.2
8 Simulating Long-Term Machine Fault Development
Failure Mode and Failure Development Function (FDF)
A “Failure Mode” is a more descriptive name of a machine “Fault Signature” present in a single considered vibration signal. While fault signature refers to some signal components (component type, amplitude, and time–frequency characteristics), failure mode typically refers to individual machine element or some precise part of this element. For instance, failure mode called “imbalance” refers to a shaft, failure mode called “tooth crack” refers to a gear, failure mode called “BPFO” refers to a bearing, failure mode called “looseness” refers to bolts and foundation, etc. This relation is possible because typically individual “failure modes” have particular “fault signature”. Likewise, development of a Failure Mode is reflected in the development of its corresponding Fault Signature. The current simulation covers 8 machine Failure Modes, which represent different degradation scenarios of particular machine elements. The degradation signature includes: • General increase of the amplitude of the Slow Shaft harmonics, • General increase of the amplitude of the GMF second harmonic (GMF x2), • General increase of the number of visible sidebands generated by the Slow Shaft (at GMF x2), • General increase of the amplitude of sidebands generated by the Slow Shaft at (GMF x2), • Appearance and/or general increase of amplitude of REB-induced pulses. Each degradation scheme is therefore simulated by corresponding degradation function. Generally, this function could be linear, quadratic or logarithmic. Nevertheless, in each case, the function is distorted by some random fluctuations. The considered 8 Failure Modes are represented as a graph of so-called “Failure Development Function”, presented in Fig. 8.1. Note that a Failure Mode is simulated by a large number of consecutive, virtually separated signals; therefore, FDF is plotted against indexes of these signals, not their virtual timestamps’ time. • • • • •
MODE 1—represents healthy machine MODE 2—represents logarithmic development of slow shaft imbalance MODE 3—represents logarithmic development of general gearbox fault MODE 4—represents logarithmic development of REB inner race fault (BPFI) MODE 5—represents simultaneous development of imbalance and gearbox fault • MODE 6—represents simultaneous development of all considered fault • MODE 7—represents development of all faults with various development functions • MODE 8—represents MODE 7 with significantly increased noise factor.
8.2 Failure Mode and Failure Development Function (FDF)
Fig. 8.1 Visualization of fault development functions
347
348
8 Simulating Long-Term Machine Fault Development
Figure 8.1 is generated by calling: [FDF,str] = GENERATE_FDF(250,1);
% Generate and plot FDF for 250 signals
which runs following function GENERATE_FDF: function [FDF,str] = GENERATE_FDF(No_sig,opt) % DESCRIPTION % Function generates a set of eight Fault Development Functions (FDF) for % Imbalance, Gearbox, and REB. The function is a prerequisite for the % GENERATE_LONG_TERM function. A set of individual FDFs (here 3) % constructs a particular fault development scenario called "Failure Mode" % % % % %
Each function is constructed from following variables: DETERMINISTIC VARIABLES: ratio_ - the overall increase of the fault-related component FDS_ - the overall, normalized Fault Development Function fluct_ - scalar level of data fluctuation
% RANDOM VARIABLES: % n_ - scattered noise additionally multiplied by data fluct. level % NDS_ - Noise Development Function (many works show that % the noise fluctuation level increases as the fault increases) % Therefore, Fault Development Function is constructed in following way: % FDF = FDS.*(ratio-offset) + offset + noise.*NDS; % INPUT % No_sig - number of signals to be generated for each mode % opt - 1: Plot the Failure Modes, 0: Don't plot % OUTPUT % FDF - a structure of Fault Development Functions % str - a cell array containing names of Failure Modes % EXAMPLE: % [FDF,str] = GENERATE_FDF(250,1); % Generates and plots FDF % ----------- DEFINE LONG-TERM ratio_IMB = 8; % Slow Shaft ratio_GE = 5; % Gearbox ratio_REB = 2; % REB
FAULT fault fault fault
DEVELOPMENT development development development
USER PARAMETERS --------ratio: 1-8 (1 for healthy) ratio: 1-8 (1 for healthy) ratio: 0-2 (0 for healthy)
fluct_IMB = 1.5; % Fluctuation of FDF for Imbalance: 0-stable, 4-extreme fluct_GE = 1.0; % Fluctuation of FDF for Gearbox : 0-stable, 4-extreme fluct_REB = 1.3; % Fluctuation of FDF for REB : 0-stable, 4-extreme % -----------------------------------------------------------------------% Fault FDS_IMB FDS_GE FDS_REB
Development Shape (FDS) = logspace(0,4,No_sig); FDS_IMB = FDS_IMB/max(FDS_IMB); % Imbalance = logspace(0,5,No_sig); FDS_GE = FDS_GE /max(FDS_GE); % Gearbox = logspace(0,3,No_sig); FDS_REB = FDS_REB/max(FDS_REB); % REB
% Noise NDS_IMB NDS_GE NDS_REB
Development Shape (NDS) = logspace(0,log10(ratio_IMB),No_sig); = logspace(0,log10(ratio_GE), No_sig); = logspace(0,log10(ratio_REB),No_sig);
% Imbalance % Gearbox % REB
8.2 Failure Mode and Failure Development Function (FDF)
349
% Separate noise data for each component % NOTE: multiplying two random variables makes the data more scattered % NOTE: the "Fluctuation" factor works if an only if it modifies noise rng(0); n_IMB = (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_IMB; % Imbalance n_GE = (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_GE; % Gearbox n_REB = (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_REB; % REB % ----------- 'MODE 1 - No fault' ----------------------------------------FDF(1).IMB = abs(n_IMB - mean(n_IMB) + 1); % Some component for healthy FDF(1).GE = abs(n_GE - mean(n_GE) + 1); % Some component for healthy FDF(1).REB = abs(n_REB - mean(n_REB) + 0); % No component for healthy % ----------- 'MODE 2 - Imbalance' ---------------------------------------FDF(2).IMB = abs(FDS_IMB.*(ratio_IMB-1) + 1 + n_IMB.*NDS_IMB); % USER FDF(2).GE = FDF(1).GE; FDF(2).REB = FDF(1).REB; % ----------- 'MODE 3 - Gearbox' -----------------------------------------FDF(3).IMB = FDF(1).IMB; FDF(3).GE = abs(FDS_GE.*(ratio_GE -1) + 1 + n_GE .*NDS_GE); % USER FDF(3).REB = FDF(1).REB; % ----------- 'MODE 4 - REB' ---------------------------------------------FDF(4).IMB = FDF(1).IMB; FDF(4).GE = FDF(1).GE; FDF(4).REB = abs(FDS_REB.*(ratio_REB-0) + 0 + n_REB.*NDS_REB); % USER % ----------- 'MODE 5 - Imbalance and Gearbox' ---------------------------FDF(5).IMB = FDF(2).IMB; FDF(5).GE = FDF(3).GE; FDF(5).REB = FDF(1).REB; % ----------- 'MODE 6 - Simultaneous (log)' ------------------------------FDF(6).IMB = FDF(2).IMB; FDF(6).GE = FDF(3).GE; FDF(6).REB = FDF(4).REB; % ----------- 'MODE 7 - Miscellaneous' -----------------------------------% Imbalance - new QUADRATIC Fault Development Function % Gearbox - old LOGARITHMIC Fault Development Function (MODE 3) % REB - new LINEAR Fault Development Function FDF(7).IMB = abs((ratio_IMB-1)/No_sig^2*(1:No_sig).^2 + 1 +n_IMB.*NDS_IMB); FDF(7).GE = FDF(3).GE; FDF(7).REB = abs( ratio_REB /No_sig *(1:No_sig) + 0 +n_REB.*NDS_REB); % ----------- 'MODE 8 - Miscellaneous (high var)' ------------------------HF_factor = 2; % USER relative high fluctuation factor fluct_IMB = fluct_IMB * HF_factor; fluct_GE = fluct_GE * HF_factor; fluct_REB = fluct_REB * HF_factor;
% New fluctuation of FDF for Imbalance % New fluctuation of FDF for Gearbox % New fluctuation of FDF for REB
% Update noise data for each component rng(0); % So MODE 8 and MODE 7 differ by % variance only n_IMB = (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_IMB; % noise n_GE = (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_GE; % noise
350
8 Simulating Long-Term Machine Fault Development
n_REB
= (rand(1,No_sig)-.5) .*(rand(1,No_sig)-.5) * fluct_REB;
% noise
% Imbalance - updated QUADRATIC Fault Development Function (MODE 7) % Gearbox - updated LOGARITHMIC Fault Development Function (MODE 3) % REB - updated LINEAR Fault Development Function (MODE 7) FDF(8).IMB = abs((ratio_IMB-1)/No_sig^2*(1:No_sig).^2 +1+ n_IMB.*NDS_IMB); FDF(8).GE = abs(FDS_GE.*(ratio_GE-1) +1+ n_GE .*NDS_GE ); FDF(8).REB = abs(ratio_REB /No_sig *(1:No_sig) +0+ n_REB.*NDS_REB); % ----------- Plot str{1} = 'MODE 1 str{2} = 'MODE 2 str{3} = 'MODE 3 str{4} = 'MODE 4 str{5} = 'MODE 5 str{6} = 'MODE 6 str{7} = 'MODE 7 str{8} = 'MODE 8 -
FDF for each MODE ------------------------------------No fault'; Imbalance'; Gearbox'; REB'; Imbalance and Gearbox'; Simultaneous (log)'; Miscellaneous'; Miscellaneous (high var)';
if nargin > 1 if opt == 1 % Plot FDF figure figure; for i = 1:8 subplot(4,2,i); hold on; grid on; plot(FDF(i).IMB); plot(FDF(i).GE); plot(FDF(i).REB); legend('Imbalance','Gearbox','REB','Location','northwest',... 'fontsize',6); title(str{i}); set(gca,'fontsize',8); ylim([0 1.2*max([ratio_IMB,ratio_GE,ratio_REB])]); end subplot(4,2,1); subplot(4,2,3); subplot(4,2,5); subplot(4,2,7); subplot(4,2,8);
ylabel('Ratio'); ylabel('Ratio'); ylabel('Ratio'); ylabel('Ratio'); xlabel('Signal number'); xlabel('Signal number');
end end
The considered function represents changes, which are to be introduced to consecutive signals. The structure FDF contains data, which precisely defines these changes for individual Failure Modes. These changes are stored as values, which create the presented Failure Development Function. As a continuation, following Section presents a general scheme of long-term fault development data generation, while successive section gives a complete code for generation of the data within a single Failure Mode.
8.3 General Scheme of Long-Term Data Generation
8.3
351
General Scheme of Long-Term Data Generation
The scheme of generation of lon-term fault development is a combination of a base vibvration signal (see Chap. 7), as well as Failure Mode and FDF introduced in the previous Section. For this reason, Figs. 8.2 and 8.3 clearly illustrate extension single signal generation frameworks presented in Figs. 7.2 and 7.3. Note that comparing with original Fig. 7.2, Shaft amplitudes are scaled according to individual values of the Fault Development Funtion for individual MODES (note: the size of the FDF is equal to the number of signals in each MODE). Analogously, comparing with original Fig. 7.3, REB-induced components are scaled according to individual values of the Fault Development Funtion for individual MODES (note: the size of the FDF is equal to the number of signals in each MODE). Note that for programming purposes, it is convienient to keep deterministic, phase-locked components in original amplitude ratio, while it is recommended to normalize random, REB-induced components. Generation of such dataset is a nested operation, with many functions. Following script, referred to as MAIN.m script illustrates a complete code, which defines typical user parameters and options, generates a set of Failure Development Functions, and finally generates data for each Failure Mode in a loop. The function GENERATE_FDF is given in the previous Section. For functions generate_PFRF_profile and generate_SN, the user is referred to Sect. 6.2.3.3 and Sect. 7.4.2.4, respectively. Function GENERATE_FAILURE_MODE is introduced in Sect. 8.5.5.2. Remaining required functions, which are called inside the GENERATE_FAILURE_MODE function, are listed in comments.
352
8 Simulating Long-Term Machine Fault Development
Fig. 8.2 Graphical illustration of construction of Slow ShaŌ (x1)—the Imbalance component within long-term fault development
8.3 General Scheme of Long-Term Data Generation
353
clear; close all; clc % STAGE No.1: GENERATE FAILURE MODE FUNCTIONS N_sig = 250; % define number of signals for each Failure Mode opt = 1; % plot generated FDFs [FDF,str_Modes] = GENERATE_FDF(N_sig,opt); % STAGE No.2: DEFINE DATA ACQUISITION PARAMETERS fs = 25e3; % define sampling frequency T = 10; % define length of each signal % STAGE No.3: GENERATE COMMON PSEUDO-FRF PROFILE (PFRF) rng(0); % the same pseudo-FRF profile is used for all MODES No_PFRF = 20; % USER number of components for PFRF profile peak_RES = 5; % USER maximum PFRF value peak_ARES = .75; % USER minimum PFRF value ADR = .25; % USER noise relative Amplitude Change Ratio profile_PFRF = generate_PFRF_profile(fs,T,No_PFRF,peak_RES,peak_ARES,ADR); % STAGE No.4: GENERATE (AND STORE) COMMON STRUCTURAL NOISE BASE rng(0); % repeatable structural noise SN = generate_SN(fs,T,profile_PFRF); % STAGE No.5: GENERATE AND SAVE SIGNALS mat = 1; % "1" saves ".mat" files, "0" skips txt = 1; % "1" saves ".txt" files, "0" skips % Following functions are required: % 1)calculate_inst_amplitude.m - see Section 6.2.3.4 % 2)generate_smooth_profile.m - see Section 6.2.2.1.5 % 3)Get_phase_markers.m – see Section 4.4.4.2.2 for i = 1:length(FDF) disp(['Generating data for FAILURE MODE No.: ',num2str(i)]); GENERATE_FAILURE_MODE(FDF,profile_PFRF,SN,i,N_sig,str_Modes,fs,T,mat,txt); end disp('Generating Finished.');
Note that the loop could be replaced easily by: i = 4; % user-selected FAILURE MODE GENERATE_FAILURE_MODE(FDF,profile_PFRF,SN,i,N_sig,str_Modes,fs,T,mat,txt);
which generates data limited to a single, user-selected Failure Mode (in this case the 4th one).
354
8 Simulating Long-Term Machine Fault Development
Fig. 8.3 Graphical illustration of construction of faulty REB component within long-term fault development
8.4 Relations Between Profiles
355
Table 8.1 Relations between profiles No.
Variable name
Scope
Dependencies
1
FDF.(u)
individual, predefined
N/A
2
profile_PFRF
common
N/A
3
SN
common, stored in a file
profile_PFRF
4
profile_FM
individual, unique
N/A
5
profile_AM
individual, calculated
profile_PFRF, profile_FM
8.4
Relations Between Profiles
Table 8.1 illustrates a summary of profiles used within generation of data simulating machine long-term fault development. For simple tracking, profiles are in order as they appear in the code. First profile, the Fault Development Function (FDF) is a USER-predefined data, which holds a static coefficient corresponding to each signal component for all signals in all Failure Modes. The second and third profiles, i.e. pseudo-FRF data profile_PFRF and structural noise SN, are calculated once, and are common for all signals in all Failure Modes. Last two profiles, operational speed profile profile_AM, and instantaneous amplitude profile profile_AM are generated individually for each signal. The profile_FM is used to simulate random speed fluctuation of the machine (i.e. of the Referential Shaft). Finally, on the basis of the static profile_PFRF and random profile_FM, a random instantaneous amplitude profile profile_AM is calculated for each signal DETERMINISTIC component— individually for each signal in each Failure Mode.
8.5 8.5.1
Code Description STAGE No. 1: Generate Failure Mode Functions
In this preliminary STEGE, user first defines the total number of signal to be generated in each Failure Mode. Next, for each Failure Mode, individual Failure Mode Function (FDF) is defined. The GENERATE_FDF function as well as its detailed description is given in Sect. 8.5.5.2.
356
8.5.2
8 Simulating Long-Term Machine Fault Development
STAGE No. 2: Define Data Acquisition Parameters
This short STAGE emphasizes two critical USER vibration signal acquisition parameters, which are sampling frequency fs and the length (in seconds) of individual signal T. Typically, vibration signals used for condition monitoring of rotary machinery are sampled with 10–25 kHz (or some nearest power of 2) sampling rate and have length in range 1–10 s. For relatively low-speed machinery, 20–60 s signals are recorded. To the authors knowledge, the longest signal to be configured by a commercial monitoring system, from which analyses are automatically calculated, is offered by the AVM 4000™ system (300 s).
8.5.3
STAGE No. 3: Generate Common-Pseudo PFRF
In this STAGE, the pseudo-FRF profile is generated. This STAGE uses generate_PFRF_profile function, which is introduced and described in details in Sect. 6.2.3.3. Recalling, this profile presents just some arbitrary amplitude-frequency characteristics of the machine and it is to generate values of the instantaneous amplitude of individual signal components, as a function of instantaneous speed of the machine. Note that random, instantaneous speed is re-generated for each signal, while the amplitude-frequency characteristics of the object (simulating its structural amplitude characteristics), stored in the profile_PFRF variable, is constant for all signals.
8.5.4
STAGE No. 4: Generate (and Store) Common Structural Noise Base
In this STAGE, the structural noise (stored in the SN variable) is calculated. This STAGE uses generate_SN function, which is introduced and described in details in Sect. 7.4.2.4. Recalling, this data is used to randomize the pseudo-FRF profile characteristics provided by the profile_PFRF. Since calculation of this variable takes relatively long time, this data is stored in a file after first calculation, and it is used for all signals in all FAILURE MODES. Note that for each signal, REB-generated random components are different, as well as final, random noise
8.5 Code Description
357
RN. As a consequence, the broadband noise for all signals has a similar overall spectral profile (i.e. it simulates the same machine); yet, the it is represented by randomly different data.
8.5.5
STAGE No. 5: Generate and Save Signals
8.5.5.1
General Information
This STAGE calls a function GENERATE_FAILURE_MODE, which generates a series of files (mat, txt or both), which simulate a long-term development of mechanical fault, according to the shape defined by the GENERATE_FDF function. The GENERATE_FAILURE_MODE function is called according to the scheme presented in Sect. 8.3. As illustrated, this function could be used to generate data for a single Failure Mode or for all defined Failure Modes (here 8 MODES). The GENERATE_FAILURE_MODE function is based on the code illustrated throughout the previous Chapter and it refers to the mechanical object described in Sect. 7.2. The modifications of the code, which use the data from the FDF structure created a priori by the GENERATE_FDF function, are exposed by additional dashed lines. For clear description, the code is divided into sections, which need to be copied into a single m-file code before running.
8.5.5.2
Function Description
Following code presents function DESCRIPTION, followed by INPUT parameters and resultant generated OUTPUT data, next followed by EXAMPLE of use. Referring to Sect. 8.3, this function requires a priori call of the GENERATE_FDF function, generate_PFRF_profile function, and generate_SN function.
358
8 Simulating Long-Term Machine Fault Development
function GENERATE_FAILURE_MODE(FDF,profile_PFRF,SN,No_Mode,N_sig,... str_Modes,fs,T,mat,txt) % DESCRIPTION % Function generates and stores signals for the specified Failure Mode % % % % % % % % % % %
INPUT FDF profile_PFRF SN No_Mode N_sig str_Modes fs T mat txt
% % % %
OUTPUT Auto-generated folders with number of files equal to N_sig. For each MODE, two subfolders might be generated: "Data mat" - folder with mat files
-
a structure with Failure Development Functions amplitude-frequency characteristics base for structural noise selected Failure Mode (here from 1st to 8th) number of signals to be generated (for each MODE) a cell array containing names of Failure Modes sampling frequency, recommended fs >= 10 000 [Hz] time of each signal [s] store data in "mat" format, 1: YES, 0: NO store data in "txt" format, 1: YES, 0: NO
% "Data txt" - folder with mat files % % % % %
EXAMPLE [FDF,str_Modes] profile_PFRF SN
= GENERATE_FDF(250,opt); = generate_PFRF_profile(fs,T,No_PFRF,peak_RES,... peak_ARES,ADR); = generate_SN(fs,T,profile_PFRF);
% GENERATE_FAILURE_MODE(FDF,profile_PFRF,SN,No_Mode,N_sig,str_Modes,fs,... % T,mat,txt); if nargin < 10 txt = 1; if nargin < 9 mat = 1; end end
% default: save data in txt format % default: save data in mat format, too
8.5 Code Description
8.5.5.3
359
Making Data Folders
In the first step, the code prepares folders, where the generated data will be stored. Two types of data are possible, namely files with mat or txt extension. %% STEP 1: MAKE FOLDERS dir_data = str_Modes{No_Mode}; mkdir(dir_data);
% make folder for each MODE
dir_mat dir_txt
% subfolder with "mat" files % subfolder with "txt" files
= 'Data mat'; = 'Data txt';
if mat, path_mat = fullfile(cd,dir_data,dir_mat); if txt, path_txt = fullfile(cd,dir_data,dir_txt);
8.5.5.4
mkdir(path_mat); end mkdir(path_txt); end
Creating General Variables
In the second step, a set of common scalar and vector variables is generated. These variables include timestamp metadata, kinetostatic data, and auxiliary processing data, as well as data related to instantaneous amplitude and speed simulation. %% STEP 2: CREATE GENERAL VARIABLES % 2.1 Metadata T_start = now;
% USER time used to store timestamps
% 2.2 Test-rig data % 2.2.1 Kinetostatic data z1 = 23; % USER No. of teeth on gear on the Fast (referential) Shaft z2 = 67; % USER No. of teeth on gear on the Slow Shaft BPFI = 8.82; % USER inner race fault nominal order (Bearing type 22205EK) % 2.2.2 Fast Shaft data % NOTE: Nominal amplitudes of shafts and gearbox components are multiplied % by a factor (1+10% random value) No_FS_harmonics = 3; % USER No. of FS harmonics Ac_FS = [.1 .075 .05]; % USER harmonic amplitudes % 2.2.3 Slow Shaft data No_SS_harmonics = 3; Ac_SS = [.03 .025 .02]; % 2.2.4 Gearbox GMF and sidebands data
% USER No. of SS harmonics % USER harmonic amplitudes
360
8 Simulating Long-Term Machine Fault Development
No_GMF_harmonics = 3; No_SB_harmonics = 8; Ac_GMF
= [.1, .06, .1];
% USER GMF harmonics amplitudes % (compare with Chapter 7)
% Sideband amplitudes Ac_SB_FS{1} = [.8 .7 .6 .3 .0 .0 .0 .0]; Ac_SB_FS{2} = [.8 .6 .4 .5 .2 .3 .2 .1]; Ac_SB_FS{3} = [.8 .6 .1 .5 .0 .0 .0 .0];
% USER GMFx1-relative FS SBs % USER GMFx2-relative FS SBs % USER GMFx3-relative FS SBs
Ac_SB_SS{1} = [.7 .6 .4 .1 .0 .0 .0 .0]; Ac_SB_SS{2} = [.7 .5 .6 .4 .3 .2 .1 .1]; Ac_SB_SS{3} = [.8 .4 .6 .2 .0 .0 .0 .0];
% USER GMFx1-relative SS SBs % USER GMFx2-relative SS SBs % USER GMFx3-relative SS SBs
% 2.2.5 Phase ph_FS = 0.0; ph_SS = 0.3; ph_GMF = 0.7;
settings (compare with Chapter 7) % USER phase offset from initial random phase for Fast Shaft % USER phase offset from initial random phase for Slow Shaft % USER phase offset from initial random phase for GMF
% % % % % %
NOTE: in this way, the complete data set is repeatable and the mechanically-justified phase relation among individual deterministic components is constant for all signals in all Modes; yet, the initial phase (to be introduced inside the main loop) is different for individual Mode, so data could be compared between Modes, as well. Also, phase of sidebands is calculated using phase of harmonics of GMF and Shafts.
% % % % % %
As stated, the initial phase is randomized for consecutive signals inside the main loop. Specifically, this random phase is used to model: - unique speed fluctuations profile for consecutive signals in each Mode - unique initial phase of deterministic components (Shafts and Gearbox) - unique individual REB pulses - unique random noise added to each signal in each Mode at the very end
% 2.3 Data processing common variables dt = 1/fs; % time resolution df = 1/T; % frequency resolution t = dt:dt:T; % time axis of the entire signal N = length(t); % total number of points in the signal f = 0:df:fs/2; % full-resolution frequency axis (for REB components) % 2.4 Operational speed ref_shaft = 50; % USER ref_FM_m = 0.02;% USER No_FM = 4; % USER
profile nominal machine speed [Hz] maximum variation of machine speed [Hz] number of sinusoidal components for rand FM profile
Considering the code optimization, all of this static data could be defined in the MAIN.m script level; however, the total computation loss is negligible, yet placing these definitions here is convenient for generation of a single MODE data.
8.5 Code Description
8.5.5.5
361
Main Loop
Main loop is the place where vibration signals are generated. Main loop consists of following consecutive actions: • Generate unique initial phase for the current MODE • Generate unique speed fluctuation profile for each signal • Generate signal components – – – – –
Fast Shaft Slow Shaft—modified by FDF Gearbox—modified by FDF REB—modified by FDF Random noise
• Define USER global ratio of components • Add all components • Save data – – – – –
Define file name Generate PM vector Save data in mat format Convert data to int32 Save data in txt format.
NOTE: in the previous Chapter, where a single vibra on signal is considered, the speed fluctua on profile (i.e. the profile_FM variable generated by the generate_smooth_profile func on is introduced as one of three external USER profiles. In this Chapter, however, it is moved inside the MAIN LOOP (along with the No_FM parameter), because it is re-calculated (thus different) for each signal.
362
8 Simulating Long-Term Machine Fault Development
The full code for data generation is presented below: %% STEP 3: MAIN LOOP disp('Please wait...'); str = 'Generating and saving simulated data'; my_waitbar = waitbar(0,'In progress...','Name',str); rng(No_Mode); % % % % % %
Set different (yet repeatable) random numbers generator for each Mode. This results in: 1. unique phase of deterministic component (yet, relation between the components is preserved) for all MODES, 2. unique REB jitter for all signals in calculated MODES, 3. unique random noise RN added to each signal
% Main Loop starts here for u = 1:N_sig waitbar((u-1)/N_sig,my_waitbar);
% show progress
% STEP 3.1 Generate unique initial phase for the current MODE IRP = (rand(1)-.5)*(2*pi); % Initial Random Phase (IRP) -pi:+pi [rad] % NOTE: phase of each deterministic % component is related to this IRP % STEP 3.2: Generate unique speed fluctuation profile for each signal profile_FM = generate_smooth_profile(fs,T,No_FM,'symmetric'); % STEP 3.3: Generate signal components % -------------- SUBSET No. 1: Fast Shaft ----------------------------Fast_Shaft = zeros(1,N); for i = 1:No_FS_harmonics
fc = i * ref_shaft; FM_m = ref_FM_m * fc/ref_shaft;
% relative order * speed[Hz] % fluctuation proportional
inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_FS(i)*r; % instantaneous amplitude 2*pi*fc*t + 2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t IRP*i + ph_FS; % every FS harmonic has % unique phase
x = A.*sin(wt + ph); Fast_Shaft = Fast_Shaft + x; end
% individual FS harmonics % add to final FS signal
8.5 Code Description
363
% -------------- SUBSET No. 2: Slow Shaft ----------------------------Slow_Shaft = zeros(1,N); for i = 1:No_SS_harmonics fc = z1/z2 * i * ref_shaft; FM_m = ref_FM_m * fc/ref_shaft;
% relative order * speed[Hz] % fluctuation proportional
inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_SS(i)*r; % instantaneous amplitude 2*pi*fc*t + 2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t IRP*i + ph_SS; % every FS harmonic has % unique phase
x
= A.*sin(wt + ph);
% individual SS harmonics
% ********** LONG-TERM FAULT DEVELOPMENT: Slow Shaft x1 *********** if i == 1 x = x * FDF(No_Mode).IMB(u); % current FDF value end % ***************************************************************** Slow_Shaft = Slow_Shaft + x;
% add to final SS signal
% Store to generate additional amplitude modulation of REB signal % (see SUBSET No. 4: REB) if i == 1 SlowShaft_x1 = x; end end % -------------- SUBSET No. 3: Gearbox -------------------------------Gearbox = zeros(1,N); for i = 1:No_GMF_harmonics
% repeat for all GMF harmonics
fc = z1 * i * ref_shaft; % relative order * speed[Hz] FM_m = ref_FM_m * fc/ref_shaft; % modulation index of current GMF inst_freq = fc + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r A wt ph
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM*Ac_GMF(i)*r; % amplitude 2*pi*fc*t+2*pi*FM_m*(cumsum(profile_FM)*dt); % omega*t IRP*i + ph_GMF; % GMF harmonics have unique phase
GMF = A.*sin(wt + ph);
% current GMF harmonic
% ************* LONG-TERM FAULT DEVELOPMENT: GMF x2 *************** if i == 2 % GMF x2 GMF = GMF * FDF(No_Mode).GE(u); % current FDF value end % *****************************************************************
364
8 Simulating Long-Term Machine Fault Development
Gearbox = Gearbox + GMF; for j = 1:No_SB_harmonics % FAST SHAFT sidebands - common variables fk = j * ref_shaft; % current sideband spacing Ac = Ac_SB_FS{i}(j); % current sideband amplitude ph = IRP*i + ph_FS*j; % phase for GMF harmonic FS sidebands % Fast Shaft left sideband inst_freq = (fc-fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt LSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instant. amplitude 2*pi*(fc-fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt);%omega*t Ak.*sin(wt + ph); % phase common for current FS LSB&RSB
% Fast Shaft right sideband inst_freq = (fc+fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt RSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instant. amplitude 2*pi*(fc+fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt);%omega*t Ak.*sin(wt + ph); % phase common for current FS LSB&RSB
Gearbox = Gearbox + LSB + RSB;
% add current FS sidebands
% SLOW SHAFT sidebands - common variables fk = j * ref_shaft * z1/z2; % current sideband spacing Ac = Ac_SB_SS{i}(j); % current sideband amplitude ph = IRP*i + ph_SS*j; % phase for GMF harmonic SS sidebands % ************************************************************* % LONG-TERM FAULT DEVELOPMENT: GMFx2 Slow Shaft sidebands if i == 2 Ac = Ac * FDF(No_Mode).GE(u); % for GMFx2 modify ratio: end % Sidebands-to-GMF % *************************************************************
% Slow Shaft left sideband inst_freq = (fc-fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt LSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instant. amplitude 2*pi*(fc-fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt);%omega*t Ak.*sin(wt + ph); % phase common for current SS LSB&RSB
8.5 Code Description
365
% Slow Shaft right sideband inst_freq = (fc+fk) + FM_m*profile_FM; profile_AM = calculate_inst_amplitude(fs,profile_PFRF,inst_freq); r Ak wt RSB
= = = =
1 + (rand(1)-.5).*(rand(1)-.5)/2; % USER random variation profile_AM * Ac * Ac_GMF(i) * r; % instant. amplitude 2*pi*(fc+fk)*t+2*pi*FM_m*(cumsum(profile_FM)*dt);%omega*t Ak.*sin(wt + ph); % phase common for current SS LSB&RSB
Gearbox = Gearbox + LSB + RSB;
% add current SS sidebands
end end % -------------- SUBSET No. 4: Rolling Element Bearing (REB) ---------% Define signal parameters jitter = 0.02; % USER 2% jitter % Calculate nominal repetition rate of pulses fp = BPFI * z1/z2 * ref_shaft; % REB is on the Slow Shaft Tp = 1/fp; % nominal time duration of one pulse dr = Tp * -.5e5; % USER pulse decaying rate % Calculate nominal instantaneous frequency of pulses FM_m = ref_FM_m * fp/ref_shaft; inst_freq = fp + FM_m*profile_FM; % Generate pulses i = 0; REB = [];
% pulse index variable % here REB signal is stored
while length(REB) < N i shift Tpi Ti ti
= = = = =
i + 1; jitter*2*(rand(1)-.5) * Tp; 1/inst_freq(length(REB)+1); Tpi + shift; dt:dt:Ti;
% % % % %
pulse index random shift cumulative approach duration of current pulse time base of current pulse
if mod(length(ti),2) ti = ti(1:end-1); end
% pulse has even # of points
AMi n
% current decaying function % length of current pulse
= exp(dr*ti); = length(ti);
% For each pulse calculate individual representation of PFRF % profile by resampling original PFRF profile according to length % of current pulse dfi = 1/Ti; % frequency resolution of current pulse profile_PFRF_i = interp1(f,profile_PFRF,0:dfi:fs/2); % Multiply by Tukey (tapered cosine) win to smooth profile "ends" profile_PFRF_i = profile_PFRF_i .* tukeywin(n/2+1)';
366
8 Simulating Long-Term Machine Fault Development % Next, for each pulse, calculate its time waveform and apply the % decaying function with USER parameters fi = 0; sig = zeros(1,n); for k = 1:n/2 fi = fi + dfi; ph_k = (rand(1)-.5)*(2*pi); % from -pi to pi sig = sig + profile_PFRF_i(k) * sin(2*pi*fi*ti + ph_k); end r x
= 1 + (rand(1)-.5).*(rand(1)-.5)/2; = AMi .* sig * r;
% USER random variation % current pulse
% NOTE: amplitude of each pulse is scaled by the square of the number % of "sig" components. This is for two reasons: % 1. To simulate that for higher speed the amplitude of pulses is % typically higher due to centrifugal force (~speed^2) % 2. For smaller instantaneous speed, "x" has larger amplitude % due to larger number of "sig" components (numerical defect) x = x/n^2; % scale each pulse amplitude REB = horzcat(REB,x);
%#ok add current pulse
end REB = REB(1:N);
% trim the over-generated signal
% Additional Slow Shaft (SS) amplitude modulation. Note that the % modulation is based on non-periodic, generalized Slow Shaft data SS_AM_depth = 0.5; % USER SS AM depth profile = SlowShaft_x1 / max(SlowShaft_x1); % normalize REB = (1 + SS_AM_depth * profile).*REB; % SS AM signal % Finally, normalize REB. Note that REB data is not scaled by the PFRF % profile like previous DETERMINISTIC components. REB = REB/max(REB); % ********* LONG-TERM FAULT DEVELOPMENT: pulses' amplitude ************ REB = REB * FDF(No_Mode).REB(u); % ********************************************************************* % STEP 3.4: Generate profiled RN = rand(1,N)-.5; Rcof = .7; [B,A] = butter(1,Rcof,'low');
RN = filter(B,A,RN);
random noise % simple uniform random noise [-1:1] % USER relative cut-off frequency % Any low-order low pass filter, which % simulates frequency response of typical % sensor. NOTE: calculate coefficients % [B,A] outside the loop for time savings % Filter the current noise
% STEP 3.5: Define USER global ratio of components
8.5 Code Description % NOTE: adjust r1 = 0.25; % r2 = 0.35; % r3 = 0.4; % r4 = 7; % r5 = 5.0; % r6 = 1.5; %
these parameters carefully (compare with Chapter 7) USER scale for Fast Shaft USER scale for Slow Shaft USER scale for Gearbox USER scale for REB (normalized) components USER scale for structural (normalized) noise USER scale for low-pass filtered (normalized) noise
% STEP 3.6: Add components data = Fast_Shaft*r1 +Slow_Shaft*r2 +Gearbox*r3 +REB*r4 +SN*r5 +RN*r6; % % % %
STEP 3.7: Save to a file The given code handles up to 9999 files. Presented names construction is necessary to load files properly in default order. Files are stored in 'mat' and/or 'txt' format, as USER selected.
% Define filename prefixes if u < 10 fileName = ['signal 000',num2str(u)]; % common for mat & txt elseif u > 9 && u < 100 fileName = ['signal 00',num2str(u)]; % common for mat & txt elseif u > 99 && u < 1000 fileName = ['signal 0',num2str(u)]; % common for mat & txt end timestamp = T_start + u; timestamp_str = datestr(timestamp, 'yyyy-mmm-dd HH:MM:SS'); % Generate PM vector fc = ref_shaft; FM_m = ref_FM_m; x = sin(2*pi*fc*t+2*pi*FM_m*(cumsum(profile_FM)*dt)); % skip amp. PM = Get_phase_markers(x); % FILE TYPE 1: Store data in MATLAB format if mat matFile = [fullfile(path_mat,fileName),'.mat']; save(matFile, 'data','PM','fs','timestamp_str'); end % FILE TYPE 2: Store data in universal txt format, which enables data % processing outside MATLAB. if txt % NOTE: most of these entries are static, so they are repeated in % loop, but they are placed here for code conciseness. Name = 'Vibro 1'; PhaseMarker = 'PM1'; Type = 'vibro input'; Unit = 'g'; Driver = 'Simulated'; SlotID = '0'; ChannelID = '0'; Resolution = 24; % No. of bits of ADC converter SamplingRate = fs; Gain = 10; Range = 5000; Sensitivity = 100; TimestampUTC = timestamp_str; Kinematic = 'Simulated';
367
368
8 Simulating Long-Term Machine Fault Development coeff_double = Range/( Gain*Sensitivity*2^(Resolution-1) ); txtFile = [fullfile(path_txt,fileName),'.txt']; fid = fopen( txtFile ,'w'); fprintf(fid,'Name\t%s\n', Name); fprintf(fid,'PhaseMarker\t%s\n', PhaseMarker); fprintf(fid,'Type\t%s\n', Type); fprintf(fid,'Unit\t%s\n', Unit); fprintf(fid,'Driver\t%s\n', Driver); fprintf(fid,'SlotID\t%s\n', SlotID); fprintf(fid,'ChannelID\t%s\n', ChannelID); fprintf(fid,'Resolution\t%s\n', num2str(Resolution)); fprintf(fid,'SamplingRate\t%s\n',num2str(SamplingRate)); fprintf(fid,'Gain\t%s\n', num2str(Gain)); fprintf(fid,'Range\t%s\n', num2str(Range)); fprintf(fid,'Sensitivity\t%s\n', num2str(Sensitivity)); fprintf(fid,'TimestampUTC\t%s\n',TimestampUTC); fprintf(fid,'Kinematic\t%s\n', Kinematic); fprintf(fid,'Columns\n'); fprintf(fid,'value\n'); fprintf(fid,'DATA\n'); x x x x
= = = =
data / coeff_double; int32(x); 2 .* floor(x/2); x + int32(PM);
fprintf(fid,'%d\n',x); fclose(fid);
% % % %
real values rescaled to "large" numbers convert double to int32 format set youngest bit to 0 (force even) place PM values on the LSB
% save modified data to a txt file
end end % Main Loop ends here
8.5.5.6
Finalization
Although quite obvious, after all calculations, it is recommended to display some finalization statement: %% STEP 4: Finalization of data generation for current Failure Mode close(my_waitbar); disp('Done.')
8.5 Code Description
369
Following text shows a complete workspace output upon successful data generation: Workspace output: Variable "SN" not found. Re-calculation started. Please wait... Variable "SN" re-calculated and saved. Generating data for FAILURE MODE No.: 1 Please wait... Done. Generating data for FAILURE MODE No.: 2 Please wait... Done. Generating data for FAILURE MODE No.: 3 Please wait... Done.
Generating data for FAILURE Please wait... Done. Generating data for FAILURE Please wait... Done. Generating data for FAILURE Please wait... Done. Generating data for FAILURE Please wait... Done. Generating data for FAILURE Please wait... Done. Generating Finished.
MODE No.: 4 MODE No.: 5 MODE No.: 6 MODE No.: 7 MODE No.: 8
Next Section shows some generated data.
8.6
Generated Data
Figure 8.4 illustrates a time waveform and a corresponding, full-resolution spectrum of the last signal (here No. 250) from FAILUR MODE No. 8, which simulates final state of Slow Shaft Imbalance, Gearbox fault and REB fault. Clearly, Fig. 8.4 shows some data complexity, as well as some faulty REB-related components. Figure 8.4 is generated using following code:
370
8 Simulating Long-Term Machine Fault Development
Fig. 8.4 Data time waveform and full-resolution spectrum
load('signal 0250.mat'); % Generated in Chapter 8 N = length(data); dt = 1/fs; T = N*dt; t = dt:dt:T; df f Y Y
= = = =
1/T; 0:df:fs/2; abs(fft(data)); Y(1:N/2+1)/(N/2);
subplot(211);
plot(t,data); grid on; axis tight xlabel('Time [s]'); ylabel('Amplitude'); title('Time waveform'); set(gca,'fontsize',8);
subplot(212);
plot(f,Y); grid on; axis tight xlabel('Frequency [Hz]'); ylabel('Amplitude'); title('Full-resolution spectrum'); set(gca,'fontsize',8);
8.6 Generated Data
371
Easily noticeable, Fig. 8.4 enable partial analysis of just 1 signal (from a total number of exactly one thousand generated), which calls for some more suitable analysis methods. Following Chapter illustrates how such data simulating long-term fault development could be analyzed.
8.7
A Note on the Role of Random Numbers
The proposed architecture takes advantage of the MATLAB® random number generator. Note that each time the MATLAB® program is opened, the generator is reset. However, in order to get identical, repeatable results, it is recommended to use the rng function (e.g. rng(0)), which sets the random number generator to some specific “starting point”. Thus, this function needs to be called whenever repeatable results are desired. This concept is illustrated in following way: % CASE 1: Phase is REPEATABLE rng(0); % reset the clock for k = 1:N generate_random_phase(); end % CASE 2: Phase DEPENDS on the NUMBER of signals rng(0); % reset the clock N = 250; % number of signals for k = 1:N generate_random_amplitude(); generate_random_phase(); end % CASE 3: Phase is THE SAME for all signals N = 250; % number of signals for k = 1:N rng(0); generate_random_phase(); end
The considered code for generation of synthetic signals controls the random number generator in following way: •
rng(0)
is used twice in the GENERATE_FDF function in order to generate repeatable results and to make sure that MODE 7 and MODE 8 differ only by data variance • rng(0) is used twice in the main script to provide a common, repeatable random amplitudes of a pseudo-FRF profile and to provide repeatable structural noise • rng(No_Mode) is used once in the GENERATE_FAILURE_MODE function to provide:
372
8 Simulating Long-Term Machine Fault Development
• unique phase of deterministic components for all MODES, • unique REB jitter for all signals in calculated MODES, • unique random noise RN added to each signal. In this way, data from individual MODES could be compared against each other for scientific research, as well.
Chapter 9
Analysis of Long-Term Fault Development
Abstract This Chapter shows how long-term raw vibration data could be analyzed. For this purpose, synthetic data generated in previous Chapter is used. Analysis methods include statistical techniques, narrowband spectral analysis, spectral comparison, and 3-dimensional data visualization. Each analysis is used to detect shaft imbalance, gearbox degradation, and REB inner race failure.
9.1
How Large Industrial Data Sets Are Analyzed?
Definition of a general concept of analysis of a relatively large data set of vibration signals is simple: to draw conclusions about technical condition of the machine— under the assumption that a change (typically a rise of vibration) reflects machine fault development. These conclusions might be of different kind and of different level, as they directly refer to previously defined main tasks of CMS (detection, identification, severity assessment). Depending on numerous aspects, like particular industrial setup, especially availability of auxiliary process data, graphical diagnostics tools, and defined kinetostatic data, conclusions might refer to simple binary information, vector-based information or machine-element-related information. Therefore, the scope of possible monitoring and diagnostic “messages” is practically unlimited. In the current Section, the analysis is performed according to Fig. 9.1. First analysis includes calculation and plotting of commonly used statistical estimators, listed in Fig. 9.1. Second analysis replaces these estimators with narrowband spectral estimators, calculation of which requires knowledge on machine kinetostatics. When a phase marker signal is available, this analysis could be conducted in order domain, as well. Third way of data analysis compares selected spectra (or other signal representations), between which we expect some differences. For the final analysis path, selected 3-dimensional figures are generated and plotted (with USER zoom, when suitable). All of the presented paths require interpretation of generated graphs. According to Sect. 5.1, first two paths are classified as monitoring tools, while the third and © The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2_9
373
374
9 Analysis of Long-Term Fault Development
Fig. 9.1 Analysis path of a large data set of vibration data
fourth paths are diagnostic tools. In practical CM implementation, each time series generated by first and second path is typically compared against permissible threshold, producing so-called “Warnings” or “Alarm” events. From this point-of-view, PATH 1 and PATH 2 could also represent automatic notification within unsupervised condition monitoring. Note that the graph does not cover any Data Science (Machine Learning or Deep Learning) methods, because these methods do not present any formalized framework for visualization of the results of analysis, so far; therefore, they cannot be classified here. Simulated data set, which is investigated, consists of 8 independent subsets, each of which corresponds to individual Failure Mode, according to the Failure Development Function, introduced in Sect. 8.2. For simplicity, each Failure Mode is characterized by a single vibration source, which represents a single physical, vibration channel. Recalling, each Failure Mode contains 250 separated vibration signals, with sampling frequency 25 kHz and 10 s length. In practical CMS realization, the “Large data” could either represent an offline, historical data source or a local, constantly updated data source. In each case, the data flow architecture is further tailored.
9.2 Statistical Data Analysis
9.2
375
Statistical Data Analysis
In a common statistical approach, a set of predefined estimators is calculated from each signal, and a resultant new trend series is plotted with respect to the same timestamps as original vibration data. A general framework for such analysis, commonly referred as “trend analysis” is described in details in Sect. 5.4. Selected estimators are listed in Fig. 9.1. Note, all but the “velocity RMS” (VRMS) are so-called broadband estimators. The VRMS is typically calculated from 10– 1000 Hz frequency band (see Sect. 5.3.3 for details). Typically, statistical data analysis operates only in time-domain. Figures 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8 and 9.9 illustrate results of the statistical analysis for each Failure Mode 1–8. Referring to Fig. 9.2 (with USER large vertical zoom), for “healthy” case, all statistical estimators show a steady random value. As shown, peak-based estimators are typically characterized by larger variance than other estimators. Referring to Fig. 9.3 (with USER large vertical zoom), the IMBALANCE fault manifesting in a single sinusoidal component (which is frequently the case in practice) is detected by VRMS estimator (i.e. RMS of velocity signal). Some increase at the end of RMS series is practically negligible. This is because the change in a single deterministic component related to Imbalance typically does not change significantly acceleration signal energy, power or peak value. Referring to Fig. 9.4, GEARBOX fault, manifesting in the increase of GMFx2 and its harmonics is not clearly observable in any statistical estimators, which is common in practical cases. The slight RMS change does not exceed 2.5%. Referring to Fig. 9.5, REB inner race fault manifests clearly in all but VRMS indicator, which is typical. Note that envelope-based indicators show larger dynamics than overall RMS value, which means that they generally enable quicker fault detection. Typically, if the kurtosis is calculated from a high-pass filtered signal, its dynamics is larger, as well.
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.9 0.8 0.7 0.6 0.5
0
50
100
150
Time (signal index)
Fig. 9.2 Statistical analysis of Failure Mode 1 (No fault)
200
250
376
9 Analysis of Long-Term Fault Development
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.9 0.8 0.7 0.6 0.5
0
50
100
150
200
250
200
250
200
250
Time (signal index)
Value (normalized)
Fig. 9.3 Statistical analysis of Failure Mode 2 (Imbalance)
PP RMS kurt Vrms envPP envRMS
1
0.9
0.8
0.7
0
50
100
150
Time (signal index)
Fig. 9.4 Statistical analysis of Failure Mode 3 (Gearbox)
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.8 0.6 0.4 0.2 0
50
100
150
Time (signal index)
Fig. 9.5 Statistical analysis of Failure Mode 4 (REB)
9.2 Statistical Data Analysis
Value (normalized)
1
377
PP RMS kurt Vrms envPP envRMS
0.9 0.8 0.7 0.6 0
50
100
150
200
250
200
250
200
250
Time (signal index)
Fig. 9.6 Statistical analysis of Failure Mode 5 (Imbalance and Gearbox)
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.8 0.6 0.4 0.2 0
50
100
150
Time (signal index)
Fig. 9.7 Statistical analysis of Failure Mode 6 (Simultaneous)
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.8 0.6 0.4 0.2 0
50
100
150
Time (signal index)
Fig. 9.8 Statistical analysis of Failure Mode 7
378
9 Analysis of Long-Term Fault Development
Value (normalized)
1
PP RMS kurt Vrms envPP envRMS
0.8 0.6 0.4 0.2 0
50
100
150
200
250
Time (signal index)
Fig. 9.9 Statistical analysis of Failure Mode 8
Referring to Fig. 9.6, combined IMBALANCE and GEARBOX fault is described similar to IMBALANCE fault with a VRMS increase, as expected. Comparing to separate IMBALANCE or GEARBOX fault, the RMS estimator shows slightly larger dynamics. Figure 9.7 illustrates a simple scenario, when IMBALANCE, GEARBOX, and REB faults develop simultaneously. In this case, all estimators show some increase. Power-based estimators (RMS and VRMS) as well as kurtosis show relatively minor increase and relatively small variance, while other estimators show relatively large increase with relatively large variance. Referring to Fig. 9.8, where individual faults are developing with different model, all statistical indicators show some increase over total time. However, RMS and VRMS are characterized by relatively small increase and a relatively small variance, while envelope-based estimator behave the other way around. Finally, referring to Fig. 9.9, the conclusion is similar to MODE 7 (lower data variance). Moreover, it could be noticed that variance increase is more detrimental to peak-based analyses than signal power-oriented analysis. This MODE simulates a real data, which typically is characterized by a large variance. Practical conclusions: • Generally, it is difficult to define a statistical estimator, which is susceptible to different machine faults; therefore, a lot of them is typically calculated in a CMS. • Frequently, gearbox faults are a consequence of shaft faults, like IMBALANCE or MISALIGNMENT, which cause increase in statistical estimators (like VRMS). As shown in this Section, it is relatively easy the overlook additional, relatively small increase of these estimators generated by GEARBOX-induced components (GMF and sidebands). • Detection of a true increase within analysis of a time series with a relatively large variance frequently requires a relatively long historical time period.
9.2 Statistical Data Analysis
379
Statistical data analysis is performed using following code: % % % %
NOTE: this code uses data connected to 8 FAILURE MODES. In order to generate this data, run the MAIN.m script from Chapter 8 NOTE: this code requires "Basic_statistics" function (given below), which requires "Generate_envelope" function (Section 4.3.1.5).
No_avg = 1;
% % % %
env_HP = 4000; env_LP = 500; Vrms_HP = 10; folder_name outer_dir outer_dir No_modes
= = = =
USER fragmentation parameter Every signal is going to be divided into "No_avg" parts. From each part, a set of estimators is calculated and averaged % Envelope HP filter cutoff frequency % Envelope LP filter cutoff frequency % Velocity HP filter cutoff frequency [Hz]
uigetdir; % Select folder with all MODES dir(folder_name); outer_dir(3:10); length(outer_dir);
% Generate path for each MODE for i = 1:No_modes mode_path{i} = fullfile(folder_name,outer_dir(i).name,'Data mat'); end % Allocate memory N_BS = 6; N_sig = 250; array = zeros(N_BS,N_sig); BS = cell(1,No_modes);
% % % %
USER No. of statistical HIs USER No. of signals auxiliary variable stores result of statistical data analysis
% Outer loop - change MODE for i = 1:No_modes file_list = dir(mode_path{i}); file_list = file_list(3:end); No_files = length(file_list); disp(['Total files: ',num2str(No_files)]); disp(blanks(1)); pause(.25); % Inner loop - load all files from the current MODE for j = 1:No_files disp(['Processing MODE ',num2str(i),', signal No.: ',num2str(j)]); load(fullfile(mode_path{i},file_list(j).name)); % Calculate and store statistical parameters of the current signal array(:,j) = Basic_statistics(data,fs,No_avg,Vrms_HP,env_HP,env_LP); end BS{i} = array; % move current values to a new cell (new MODE) end % Calculate normalized values for i = 1:No_modes for j = 1:N_BS x = BS{i}(j,:); BS_norm{i}(j,:) = x/max(x); end end
% normalize for plotting
380
9 Analysis of Long-Term Fault Development
% SAVE RESULTS fileName = ['basic statistics avg ',num2str(No_avg),'.mat']; save(fileName,'BS','BS_norm','No_avg','No_modes','Vrms_HP',... 'env_HP','env_LP'); % PLOT RESULTS y_zoom{1} = [.5 ,1.05]; y_zoom{2} = [.5 ,1.05]; y_zoom{3} = [.7 ,1.05]; y_zoom{4} = [.17,1.05]; y_zoom{5} = [.55,1.05]; y_zoom{6} = [.1 ,1.05]; y_zoom{7} = [.1 ,1.05]; y_zoom{8} = [.1 ,1.05];
% % % % % % % %
for for for for for for for for
Failure Failure Failure Failure Failure Failure Failure Failure
Mode Mode Mode Mode Mode Mode Mode Mode
1 2 3 4 5 6 7 8
for i = 1:No_modes figure('position',[400 300 600 200]); plot(BS_norm{i}'); ylim(y_zoom{i}); grid on; legend('PP','RMS','kurt','Vrms','envPP','envRMS','Location','NorthWest'); % CONSIDER UNCOMMENTING FOR TESTING % str1 = ['Statistical indicators: ','Mode ',num2str(i)]; % str2 = [' (No. of averages = ',num2str(No_avg),')']; % title([str1,str2]); xlabel('Time (signal index)'); ylabel('Value (normalized)'); set(gca,'fontsize',8); end
9.2 Statistical Data Analysis
381
The above code uses USER function Basic_statistics.m, given below: function [out] = Basic_statistics(data,fs,No_avg,Vrms_HP,env_HP,env_LP) % DESCRIPTION % Function calculates selected basic statistical signal estimators: PP, % RMS, kurtosis, VRMS, envelope_PP, and envelope_RMS % % % % % % %
INPUT data fs No_avg Vrms_HP env_HP env_LP
% OUTPUT % out
-
vibration signal sampling frequency number of averages (signal HP filter cutoff frequency HP filter cutoff frequency LP filter cutoff frequency
fragments) used for Vrms used for envelope calculation used for envelope calculation
- vector of statistical values
N = floor(length(data)/No_avg); % number of samples in a single signal T = N/fs; % time of a single fragment [s] out = zeros(6,No_avg); for i = 1:No_avg x = data( (i-1)*N+1 : i*N ); % extracted current fragment x = x - mean(x); % remove DC component out(1,i) = max(x)-min(x); % pp out(2,i) = sqrt(1/N*sum(x.^2)); % rms out(3,i) = (sum((x-mean(x)).^4)./N) ./ (var(x,1).^2); % kurtosis % CALCULATE ISO VELOCITY SPECTRUM VALUES X = fft(x); X = abs(X(1:N/2+1))/(N/2); % one-sided scaled spectral amplitudes df = 1/T; % frequency resolution f = 0:df:fs/2; % frequency scale V = X./(2*pi*f); % integrate ("omega arithmetics" V = V * 9.81*1000; % scale - 1:g-->m/s^2, 2:m/s-->mm/s V = V(floor(Vrms_HP/df):floor(1000/df)); % select indexes out(4,i) = sqrt(1/2*sum(V.^2));
% Vrms
% CALCULATE ENVELOPE x_env = Generate_envelope(x,'TD',env_HP,env_LP,fs); x_env = x_env - mean(x_env);
% Section 4.3.1.5
out(5,i) = max(x_env)-min(x_env); out(6,i) = sqrt(1/N*sum(x_env.^2));
% envelope PP % envelope rms
end % *********************** AVERAGING *************************************** % NOTE: Generally, averaging decreases the variance and increases the % total dynamics of "peak"-oriented estimators (like PP or envelope_PP), % but for the considered typical industrial settings, e.g. 10s signals % sampled with 25kHz, it has a negative influence on the variance and % dynamics of the ISO Velocity RMS estimator. % ************************************************************************* out = mean(out,2); % final averaging, active for "No_avg" > 1
Next Section illustrates a so-called “narrowband spectral” analysis, which is based on additional knowledge of machine kinetostatics.
382
9.3 9.3.1
9 Analysis of Long-Term Fault Development
Narrowband Spectral Analysis General Information
General frameworks for narrowband data analysis in frequency domain and in order domain are described in Sect. 5.5. Selected narrowband estimators are listed in. Tables 7.1, 7.2, and 7.3. Recalling, configuration of a typical CMS enables at least 24 calculation scenarios for individual narrowband estimator value type, namely: • Signal type: Physical value: Value type: Physical value: Value type:
Acceleration/Acceleration Envelope peak, sum, power, RMS Velocity peak, sum, power, RMS
• Signal type: Physical value: Value type: Physical value: Value type:
Acceleration/Acceleration Envelope peak, sum, power, RMS Velocity peak, sum, power, RMS
TIME-DOMAIN SIGNAL
ANGLE-DOMAIN (resampled) SIGNAL
Note that generally, individual estimators calculated from the same data are characterized by different dynamics and different variance. In case of Envelope-based estimators and estimators calculated from Velocity signal, signal processing parameters and techniques introduce changes in these values, as well. For text conciseness, considered analyses uses the peak value type. Physical values and signal types are selected from typically used; yet, to cover large scope of possibilities. MODE 1 is skipped, because for a healthy case, narrowband estimators show nothing more but noisy data. Following estimators are selected for remaining MODES: —Velocity in Frequency and Order domain GEARBOX —Acceleration in Frequency and Order domain REB —Acceleration Envelope in Frequency and Order domain IMBALANCE and GEARBOX —Acceleration in Order domain SIMULTANEOUS (log) —Acceleration and Acceleration Envelope in Order domain
MODE 2: IMBALANCE MODE 3: MODE 4: MODE 5: MODE 6:
9.3 Narrowband Spectral Analysis
383
MODE 7: SIMULTANEOUS (misc) MODE 8: SIMULTANEOUS (var)
—Acceleration and Acceleration Envelope in Order domain —Acceleration and Acceleration Envelope in Order domain
Following Sections illustrate results of selected estimators.
9.3.2
Selected Results
Figure 9.10 illustrates a trend of IMBALANCE development, which is represented by the peak value around the fundamental SlowShaftx1 component from Velocity spectrum. For reference, trends are plotted in frequency and in order domain. Referring to Fig. 8.1, IMBALANCE is modeled as increase of SlowShaft x1 amplitude by a factor of 8. As shown in Fig. 9.10, this factor is fairly recovered by peak value of Velocity component calculated in both, frequency and order domain. Figure 9.11 illustrates a trend of GEARBOX fault development, which is represented by the peak value around the sum of GMFx1, GMFx2, and GMFx3 components from Acceleration spectrum. Trends are plotted in frequency and in order domain. Referring to Fig. 8.1, GEARBOX fault development is modeled as increase of GMFx2 and its Sidebands amplitude by a factor of 6. As shown in Fig. 9.11, for frequency-domain calculations, this factor is slightly below 2, while it is slightly over 2 for order-domain calculations. The original increase factor is not recovered, because GMFx1 and GMFx3 parts of the GMFsum component do not change, which lower its dynamics. Figure 9.12 illustrates a trend of REB inner race fault development, which is represented by the peak value around BPFIx1 component from Acceleration Envelope spectrum. Trends are plotted in frequency and in order domain.
15
Velocity [mm/s]
IMBALANCE Vel IMBALANCE Vel ord
10
5
0
0
50
100
150
200
Time (signal index)
Fig. 9.10 MODE 2: IMBALANCE development via SlowShaŌ x1 peak component
250
384
9 Analysis of Long-Term Fault Development 0.35 GMF sum GMF sum ord
Acceleration
0.3 0.25 0.2 0.15 0.1 0.05
0
50
100
150
200
250
Time (signal index)
Fig. 9.11 MODE 3: GEARBOX fault development via GMFsum peak component
0.3 REB REB ord
Acc-Envelope
0.25 0.2 0.15 0.1 0.05 0
0
50
100
150
200
250
Time (signal index)
Fig. 9.12 MODE 4: REB fault development via BPFIx1 peak component
Referring to Fig. 8.1, REB fault development is modeled as increase of nominal amplitude of pulsed by from 0 to a nominal factor of 2. As shown in Fig. 9.12 frequency-domain calculations give similar results as order-domain calculations, which is typical for small speed variations (here max. 2%). Also note that the shape of the trend of BPFIx1 is similar to RMS and peak values of the Envelope signal, presented in Fig. 9.5. Nevertheless, in such case, definition of BFFI component allows additional fault identification. Figure 9.13 illustrates a trend of IMBALANCE and GEARBOX fault development, which is represented by the peak value around the SlowShaft x1 component, and the GMFsum components from Acceleration Order spectrum. Referring to Fig. 8.1, GEARBOX fault development is modeled as increase of GMFx2 and its Sidebands amplitude by a factor of 6. As shown in Fig. 9.13, considering GMFsum estimator, for frequency-domain calculations, this factor is slightly below 2, while it is slightly over 2 for order-domain calculations. The original increase factor is not recovered, because GMFx1 and GMFx3 parts of the GMFsum component do not change, which lower its dynamics.
9.3 Narrowband Spectral Analysis
385
Acceleration
0.4 IMBALANCE Acc ord GMF sum ord
0.3 0.2 0.1 0
0
50
100
150
200
250
Time (signal index)
Fig. 9.13 MODE 5: IMBALANCE and GEARBOX fault development via SlowShaft x1 and GMFsum peak components
Figure 9.14 illustrates a trend of IMBALANCE, GEARBOX fault, and REB fault development, which is represented by the peak value around the SlowShaft x1 component and GMFsum component from Acceleration Order spectrum, as well as around the BPFIx1 component from Acceleration Envelope Order spectrum. Naturally, trend series illustrated in Fig. 9.14 are similar to trend series from Figs. 9.10, 9.11, and 9.12, where individual faults are plotted separately. However, Fig. 9.14 clearly demonstrates that generally trend series generated from random signals, like pulses are characterized by a larger variance than trend series generated from deterministic, phase-locked components, like components generated by shafts and gearboxes. Figures 9.15 and 9.16 illustrate further a trend of IMBALANCE, GEARBOX fault, and REB fault development, this time modeled by functions of different kind with different variance level.
0.4 IMBALANCE Acc ord GMF sum ord REB ord
Acceleration
0.3 0.2 0.1 0
0
50
100
150
200
250
Time (signal index)
Fig. 9.14 MODE 6: SIMULTANEOUS (log) development of, IMBALANCE, GEARBOX fault, and REB fault via, SlowShaft x1, GMFsum, and BPFIx1 peak components
386
9 Analysis of Long-Term Fault Development
Acceleration
0.4 IMBALANCE Acc ord GMF sum ord REB ord
0.3 0.2 0.1 0
0
50
100
150
200
250
Time (signal index)
Fig. 9.15 MODE 7: SIMULTANEOUS (misc) development of, IMBALANCE, GEARBOX fault, and REB fault via, SlowShaft x1, GMFsum, and BPFIx1 peak components
Acceleration
0.4 IMBALANCE Acc ord GMF sum ord REB ord
0.3 0.2 0.1 0
0
50
100
150
200
250
Time (signal index)
Fig. 9.16 MODE 8: SIMULTANEOUS (var) development of, IMBALANCE, GEARBOX fault, and REB fault via, SlowShaft x1, GMFsum, and BPFIx1 peak components
Referring to FAULT DEVELOPMENT FUNCTIONS illustrated in Fig. 8.1., the shape of selected trend series is clearly similar to their corresponding FDF; however, when values of trend series of narrowband estimators are plotted in numerical Acceleration values, their relative increase ratio changes significantly. Namely, GEARBOX components get extra amplitude offset, because these components have initial large values comparing to IMBALANCE and REB components. Finally, selected REB trend series looks visually normalized because of relatively large amplitude of the acceleration envelope signal (corresponding to a relatively large final level of simulated REB fault).
9.3 Narrowband Spectral Analysis
387
Figures 9.10, 9.11, 9.12, 9.13, 9.14, 9.15 and 9.16 are generated using following code: % Kinetostatic data z1 = 23; % No. of teeth on the small gear z2 = 67; % No. of teeth on the large gear % Initial fs SlowShaft GMF BPFI V_nominal
delta vel_HP env_HP env_LP
calculations and definitions = 25e3; % sampling frequency = z1/z2; % Relative order: Slow Shaft = z1; % Relative order: Gearbox GMF x1 = 8.82; % Relative order: Bearing inner ring fault = 50; % nominal speed (for frequency-domain calculations) % NOTE: for instance in 4.2.2.7 it is calculated = 3; % USER total bandwidth [%] = 10; % USER standard velocity HP filter cutoff frequency = 4000; % USER envelope High Pass cutoff frequency = 500; % USER envelope Low Pass cutoff frequency
% Define data folder_name = outer_dir = outer_dir = No_modes =
source uigetdir; dir(folder_name); outer_dir(3:10); length(outer_dir);
% Select folder with all MODES
% Generate path for each MODE for i = 1:No_modes mode_path{i} = fullfile(folder_name,outer_dir(i).name,'Data mat'); end % Allocate memory N_sig = 250; Narrowband = cell(1,No_modes);
% USER No. of signals % stores result of narrowband data analysis
% Outer loop - change MODE for i = 1:No_modes file_list = dir(mode_path{i}); file_list = file_list(3:end); No_files = length(file_list); % Inner loop - load all files from the current MODE for j = 1:No_files disp(['Processing MODE ',num2str(i),', signal No.: ',num2str(j)]); load(fullfile(mode_path{i},file_list(j).name)); % % N S S
------------------ 1.ACCELERATION ------------------------------1.1 Full-resolution Acceleration FREQUENCY Spectrum = length(data); = abs(fft(data)); = S(1:N/2+1)/(N/2); % acceleration spectrum amplitudes
% IMBALANCE: SlowShaft x1 from = floor( V_nominal*SlowShaft*(1 - delta/100/2)*(N/fs) ) + 1; till = floor( V_nominal*SlowShaft*(1 + delta/100/2)*(N/fs) ) + 1; array(1).val(j) = max(S(from:till)); array(1).name = 'IMBALANCE Acc'; % not plotted % GEARBOX: GMFx1 + GMFx2 + GMFx3 from = floor( V_nominal*z1*1*(1 - delta/100/2)*(N/fs) ) + 1; till = floor( V_nominal*z1*1*(1 + delta/100/2)*(N/fs) ) + 1; GMF_x1 = max(S(from:till));
388
9 Analysis of Long-Term Fault Development
from = floor( V_nominal*z1*2*(1 - delta/100/2)*(N/fs) ) + 1; till = floor( V_nominal*z1*2*(1 + delta/100/2)*(N/fs) ) + 1; GMF_x2 = max(S(from:till)); from = floor( V_nominal*z1*3*(1 - delta/100/2)*(N/fs) ) + 1; till = floor( V_nominal*z1*3*(1 + delta/100/2)*(N/fs) ) + 1; GMF_x3 = max(S(from:till)); array(2).val(j) array(2).name
= GMF_x1 + GMF_x2 + GMF_x3; = 'GMF sum';
% 1.2 Full-resolution Acceleration ORDER Spectrum [Xres,Nrot] = Resample_signal_simplified(data,PM,fs); % see 4.2.2.4 N_res = length(Xres); Nsamp = N_res/Nrot; S = abs(fft(Xres)); S = S(1:N_res/2+1)/(N_res/2);% Acc ORDER spectrum amplitudes % IMBALANCE: SlowShaft x1 from = floor( SlowShaft*(1 - delta/100/2)*(N_res/Nsamp) ) + 1; till = floor( SlowShaft*(1 + delta/100/2)*(N_res/Nsamp) ) + 1; array(3).val(j) = max(S(from:till)); array(3).name = 'IMBALANCE Acc ord'; % GEARBOX: GMFx1 + GMFx2 + GMFx3 from = floor( z1*1*(1 - delta/100/2)*(N_res/Nsamp) ) + 1; till = floor( z1*1*(1 + delta/100/2)*(N_res/Nsamp) ) + 1; GMF_x1 = max(S(from:till)); from = floor( z1*2*(1 - delta/100/2)*(N_res/Nsamp) ) + 1; till = floor( z1*2*(1 + delta/100/2)*(N_res/Nsamp) ) + 1; GMF_x2 = max(S(from:till)); from = floor( z1*3*(1 - delta/100/2)*(N_res/Nsamp) ) + 1; till = floor( z1*3*(1 + delta/100/2)*(N_res/Nsamp) ) + 1; GMF_x3 = max(S(from:till)); array(4).val(j) array(4).name
= GMF_x1 + GMF_x2 + GMF_x3; = 'GMF sum ord';
% --------------- 2.ACCELERATION ENVELOPE ------------------------% 2.1 Full-resolution Acceleration ENVELOPE FREQUENCY Spectrum % REB: Inner Ring Xenv = Generate_envelope(data,'TD',env_HP,env_LP,fs); S = abs(fft(Xenv-mean(Xenv))); S = S(1:N/2+1)/(N/2); % acceleration ENVELOPE spectrum amplitudes from = floor(V_nominal*SlowShaft*BPFI*(1 - delta/100/2)*(N/fs))+1; till = floor(V_nominal*SlowShaft*BPFI*(1 + delta/100/2)*(N/fs))+1; array(5).val(j) = max(S(from:till)); array(5).name = 'REB'; % 2.2 Full-resolution Acceleration ENVELOPE ORDER spectrum % REB: Inner Ring HP = env_HP/V_nominal; LP = env_LP/V_nominal; Xres_env = Generate_envelope(Xres,'TD',HP,LP,Nsamp);
9.3 Narrowband Spectral Analysis
389
S = abs(fft(Xres_env-mean(Xres_env))); S = S(1:N_res/2+1)/(N_res/2);% Acc ENV ORDER spectrum amplitudes from = floor(SlowShaft*BPFI*(1 - delta/100/2)*(N_res/Nsamp)) + 1; till = floor(SlowShaft*BPFI*(1 + delta/100/2)*(N_res/Nsamp)) + 1; array(6).val(j) = max(S(from:till)); array(6).name = 'REB ord'; % --------------------- 3.VELOCITY -------------------------------% 3.1 Full-resolution Velocity FREQUENCY Spectrum [b,a] = butter(4,vel_HP/(fs/2),'high'); % HP filter coefficients data_HP = filter(b,a,data); % Filter signal data_int = Calculate_Integrated(data_HP,fs); % integrate data_vel = 9.81*1000*data_int; % scale S = abs(fft(data_vel)); S = S(1:N/2+1)/(N/2);
% velocity spectrum amplitudes
from = floor(V_nominal*SlowShaft*(1-delta/100/2)*(N/fs))+1; till = floor(V_nominal*SlowShaft*(1+delta/100/2)*(N/fs))+1; array(7).val(j) = max(S(from:till)); array(7).name = 'IMBALANCE Vel'; % 3.2 Full-resolution Velocity ORDER Spectrum [Xvel_res,Nrot] = Resample_signal_simplified(data_vel,PM,fs); N_res = length(Xvel_res); Nsamp = N_res/Nrot; S = abs(fft(Xvel_res)); S = S(1:N_res/2+1)/(N_res/2);
% velocity ORDER spectrum amplitudes
from = floor( SlowShaft*(1 - delta/100/2)*(N_res/Nsamp) ) + 1; till = floor( SlowShaft*(1 + delta/100/2)*(N_res/Nsamp) ) + 1; array(8).val(j) = max(S(from:till)); array(8).name = 'IMBALANCE Vel ord'; end Narrowband{i} = array; % move to a new cell (new MODE) end % SAVE RESULTS fileName = 'Narrowband analysis.mat'; save(fileName,'Narrowband'); % Select corresponding data for plotting % MODE 1 - skip % MODE 2: Imbalance figure('position',[400 200 600 200]); plot(Narrowband{2}(7).val); hold on; grid on plot(Narrowband{2}(8).val); legend(Narrowband{1}(7).name, Narrowband{1}(8).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Velocity [mm/s]') set(gca,'fontsize',8);
390
9 Analysis of Long-Term Fault Development
% MODE 3: Gearbox figure('position',[400 200 600 200]); plot(Narrowband{3}(2).val); hold on; grid on plot(Narrowband{3}(4).val); legend(Narrowband{3}(2).name, Narrowband{3}(4).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acceleration') set(gca,'fontsize',8); % MODE 4: REB figure('position',[400 200 600 200]); plot(Narrowband{4}(5).val); hold on; grid on plot(Narrowband{4}(6).val); legend(Narrowband{4}(5).name, Narrowband{3}(6).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acc-Envelope') set(gca,'fontsize',8); % MODE 5: Imbalance and Gearbox figure('position',[400 200 600 200]); plot(Narrowband{5}(3).val); hold on; grid on plot(Narrowband{5}(4).val); legend(Narrowband{5}(3).name, Narrowband{5}(4).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acceleration') set(gca,'fontsize',8); % MODE 6: Simultaneous (log) Imbalance, Gearbox, and REB figure('position',[400 200 600 200]); plot(Narrowband{6}(3).val); hold on; grid on plot(Narrowband{6}(4).val); plot(Narrowband{6}(6).val); legend(Narrowband{6}(3).name,Narrowband{6}(4).name,Narrowband{6}(6).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acceleration') set(gca,'fontsize',8); % MODE 7: Miscellaneous Imbalance, Gearbox, and REB figure('position',[400 200 600 200]); plot(Narrowband{7}(3).val); hold on; grid on plot(Narrowband{7}(4).val); plot(Narrowband{7}(6).val); legend(Narrowband{7}(3).name,Narrowband{7}(4).name,Narrowband{7}(6).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acceleration') set(gca,'fontsize',8); % MODE 8: Miscellaneous (high var) Imbalance, Gearbox, and REB figure('position',[400 200 600 200]); plot(Narrowband{8}(3).val); hold on; grid on plot(Narrowband{8}(4).val); plot(Narrowband{8}(6).val); legend(Narrowband{8}(3).name,Narrowband{8}(4).name,Narrowband{8}(6).name... ,'Location','NorthWest'); xlabel('Time (signal index)'); ylabel('Acceleration') set(gca,'fontsize',8);
Next Section illustrates analysis based on visual, referential interpretation of selected spectra.
9.4 Two-Dimensional (Spectral) Comparison
391
Fig. 9.17 The concept of visual comparative spectral data analysis
9.4 9.4.1
Two-Dimensional (Spectral) Comparison General Information
The concept of comparative vibration data analysis is illustrated schematically in Fig. 9.17. Although other comparisons are possible, most commonly, spectral data representation is used for this analysis. First, a referential spectrum is calculated from a Referential data set. This referential spectrum could be generated from a single signal or as an average from many signals. Next, from each current signal, a “current spectrum” is calculated. Each spectrum could be compared against the referential spectrum. Note that typically, degradation of technical condition introduces additional energy to the system; therefore, the referential spectrum is usually plotted on the top of the current spectrum. Referring to Sect. 5.7.2, spectra could be of various types, which influences their fault detection ability. Because simulated data includes a phase marker signal PM, order spectra are used where applicable. For details on amplitude scale, see the code. The analysis is shown using the first and the last signals from each MODE. For a total No. of 250 files used in this Chapter, the structure of folders and files used for analysis is illustrated in Fig. 9.18. For the local function Calculate_Integrated.m refer to Sect. 4.2.3. For function Generate_envelope.m refer to Sect. 4.3.1.5. The content of the main.m function is given in Sect. 9.4.2.5. Finally, for Resample_signal_simplified.m refer to Sect. 4.2.2.4. Finally, in some figures, for general clarity, the “Display data cursor position in a data tip” Callback function is modified to reduce the number as well as accuracy of displayed values.
392
9 Analysis of Long-Term Fault Development
Fig. 9.18 Folders and files structure used for 2-D spectral comparison
9.4.2
Selected Results
9.4.2.1
No Fault Case
Figure 9.19 illustrates a comparison of a pwelch spectrum from the last (No. 0250) and the first (No. 0001) signal in the MODE 1 data set in a full frequency range. Referring to Fig. 9.19, no clear differences could be detected by the comparison, as expected. Note that using pwelch instead of the full-resolution spectrum reduces the variance of the data to be compared, which is generally desired.
9.4.2.2
Imbalance Detection and Identification
Figure 9.20 illustrates a fragment of a full-resolution Velocity Order spectrum of the last signal (No. 0250) and the first signal (No. 0001) in MODE 2. The fragment illustrates a clear increase in the SlowShaft x1 component between these two signals. Recalling, Slow Shaft order is equal to 23/67 = 0.3433 (see Sect. 7.2 for details). Note that referring to Fig. 9.3, frequently, this increase
9.4 Two-Dimensional (Spectral) Comparison
393
Fig. 9.19 MODE 1: No fault in pwelch spectrum
Comparison via Velocity Order spectrum
Velocity [mm/s]
15
X 0.3427 Y 11.09
signal 0250.mat signal 0001.mat
10
5
0 0
X 0.3427 Y 1.563 0.5
1
1.5
2
2.5
3
Order
Fig. 9.20 MODE 2: IMBALANCE detection via comparison of SlowShaft x1 peak component in Velocity Order spectrum (user ZOOM)
does not influence significantly typical statistical estimators other than VRMS. For reference, a corresponding Acceleration Order spectrum is presented in Fig. 9.21. Comparing these two plots, note the Velocity Order spectrum introduces 1/(2*pi*f) amplitude scaling factor, which favors lower frequencies typically at the cost of spectrum distortion below HP filter cutoff frequency.
9.4.2.3
Gearbox Fault Detection and Identification
Figure 9.22 illustrates a fragment of a full-resolution Acceleration Order spectrum of the last signal (No. 0250) and the first signal (No. 0001) in MODE 3. The fragment illustrates a clear increase in the GMFx2 component with its Slow Shaft sidebands between these two signals. Recalling, GMFx2 order is equal to
394
9 Analysis of Long-Term Fault Development Comparison via full-resolution Order spectrum 0.15
Acceleration [g]
signal 0250.mat signal 0001.mat
X 0.3427 Y 0.1225
0.1
0.05
0
0
1
0.5
2
1.5
2.5
3
Order
Fig. 9.21 MODE 2: IMBALANCE detection via comparison of SlowShaft x1 peak component in Acceleration Order spectrum (user ZOOM)
Comparison via full-resolution Order spectrum
Acceleration [g]
0.2
signal 0250.mat signal 0001.mat
X 46 Y 0.1845
0.15 0.1 0.05 0
20
10
0
30
40
50
60
70
90
80
100
Order Comparison via full-resolution Order spectrum X 46
Acceleration [g]
0.2
signal 0001.mat
0.15 0.1
signal 0250.mat
X 45.66
X 46.34
X 44.63
X 47.37
0.05 0
44
44.5
45
45.5
46
46.5
47
47.5
48
Order
Fig. 9.22 MODE 3: GEARBOX fault detection via comparison of GMFx2 peak component along with its Fast Shaft and Slow Shaft sidebands, top: user wide ZOOM, bottom: user narrow ZOOM of Acceleration Order spectrum
9.4 Two-Dimensional (Spectral) Comparison
395
23*2 = 46 (see Sect. 7.2 for details). Note that referring to Fig. 9.4, frequently this increase does not influence significantly any typical statistical estimators.
9.4.2.4
REB Fault Detection and Identification
Figure 9.23 illustrates a comparison of a pwelch spectrum from the last (No. 0250) and the first (No. 0001) signal in the MODE 4 data set in a full frequency range. Referring to Fig. 9.23, the comparison shows a clear power increase in structural frequency ranges. Significant increase is observed in ranges 2–4.5, 6–8, and 9– 11 kHz. In practice, these range (or ranges) suggest demodulation frequency range for envelope analysis, which enables fault identification. Full-resolution envelope ORDER spectrum (significant part) is illustrated in Fig. 9.24. Figure 9.24 clearly shows the BPFI component and its harmonics with Slow Shaft sidebands generated by Slow Shaft additional amplitude modulation. Recalling, BPFI order is equal to 8.82*23/67 = 3.0278 (see Sect. 7.2 for details), and the marked Slow Shaft sideband is 3.0481–2.7034 = 0.3447, which corresponds to the Slow Shaft order. Note that the spectrum also shows a single component with Slow Shaft frequency. This component represents Slow Shaft modulation of GMFx2 and GMFx3, which are above the envelope HP filter cutoff frequency. For further reference, Fig. 9.25 illustrates comparison in Envelope Frequency spectrum.
Comparison via pwelch
10-3
4
signal 0250.mat signal 0001.mat
Power
3 2 1
0
2000
4000
6000
Frequency [Hz]
Fig. 9.23 MODE 4: REB fault detection via pwelch
8000
10000
12000
396
9 Analysis of Long-Term Fault Development Comparison via Envelope Order spectrum
Envelope Acceleration [g]
0.3
X 3.048
signal 0250.mat
Y 0.2048
signal 0001.mat
0.2
X 6.094
X 2.703
Y 0.08972
Y 0.0776
0.1
X 9.14 Y 0.02479
0
0
4
2
6
8
10
12
Order
Fig. 9.24 MODE 4: REB fault identification in Envelope Order spectrum
Envelope Acceleration [g]
Comparison via full-resolution Envelope spectrum 0.3
signal 0250.mat
X 152.4 Y 0.201
signal 0001.mat
0.2
X 135.2 Y 0.09048
0.1
0
0
100
X 304.9 Y 0.07416
200
X 456.9 Y 0.02811 300
400
500
600
Frequency [Hz]
Fig. 9.25 MODE 4: REB fault identification in Envelope Frequency spectrum
As observed, generally the Envelope Order spectrum shows slightly better results. However, in practical implementation, it is recommended to apply signal processing in order domain for small speed variations only. For steady-speed as well as for large speed variations, resampling typically introduces noticeable errors.
9.4.2.5
Combined Faults
Spectral comparative analysis of MODE 5 is skipped, because it is a simple combination of results from MODE 3 and MODE 4. Next, MODES No. 6, 7, and 8 present simultaneous development of shaft Imbalance, Gearbox fault, and REB fault. These MODES differ in Fault Development Function assigned to each fault as well its variance. Therefore, the beginning state (described by signal No. 0001) and the final state (described by
9.4 Two-Dimensional (Spectral) Comparison
397
Comparison via full-resolution Order spectrum signal 0250.mat
Acceleration [g]
0.15
signal 0001.mat
0.1
0.05
0
0
50
100
150
200
250
300
350
400
450
500
Order Comparison via full-resolution Order spectrum
Amplitude [dB]
-20
signal 0250.mat signal 0001.mat
-30 -40 -50 -60 -70 0
50
100
150
200
250
300
350
400
450
Order
Fig. 9.26 MODE 8: Multi-fault detection via comparison of full-range Acceleration Order spectrum, top: linear scale, bottom: dB amplitude scale
signal No. 0250) are very similar. For this reason, data from MODE 6 and MODE 7 are skipped, and only data from MODE 8 is considered. Figure 9.26 illustrates a full-resolution Acceleration Order spectrum of the last signal (No. 0250) and the first signal (No. 0001) in MODE 8 plotted in different scales and ranges. Figure 9.26—bottom illustrates a comparison using spectra in dB scale. Such scale is popular as a starting point of a diagnostic signal analysis. As shown in Fig. 9.26—top, linear scale typically shows less information of induced structural resonant ranges. Figure 9.27 illustrates these spectra in order range selected by user ZOOM.
398
9 Analysis of Long-Term Fault Development Comparison via full-resolution Order spectrum
Acceleration [g]
0.15
0.1
signal 0250.mat
X 46
X 0.3427
signal 0001.mat
X 23
X 69
0.05
0
0
10
20
30
40
50
60
70
Order Comparison via full-resolution Order spectrum
Amplitude [dB]
-15
signal 0250.mat signal 0001.mat
-20 -25 -30 -35 -40 0
10
20
30
40
50
60
70
Order
Fig. 9.27 MODE 8: Multi-fault detection via comparison of user ZOOM of a full-range Acceleration Order spectrum, top: linear scale, bottom: dB amplitude scale
As concluded by Fig. 9.27, logarithmic scale enables a quick assessment of a relatively large changes in amplitudes of deterministic components, while linear amplitude scale enables a quick assessment of a relatively small changes in amplitudes of deterministic components. Plots in Sect. 9.4.2 are generated using following code main.m (see Fig. 9.18 for corresponding structure of folders and files):
9.4 Two-Dimensional (Spectral) Comparison
399
% NOTE: subfolders with selected data files are located in the same folders % as this script clear; close all; clc; fs position vel_HP env_HP env_LP N_filt
= = = = = =
25e3; [100 100 560 200]; 10; 2000; 500; 4;
% % % % % %
sampling frequency USER figure position and size USER velocity HP filter cutoff frequency USER envelope HP filter cutoff frequency USER envelope LP filter cutoff frequency USER filter order (velocity)
% MODE 1: Pwelch my_dir = 'MODE 1 - No fault'; figure('Position',position); hold on; grid on; title('Comparison via pwelch');
load(fullfile(my_dir,'signal 0250.mat')); [Pxx,f] = pwelch(data,[],[],[],25e3); plot(f,Pxx); load(fullfile(my_dir,'signal 0001.mat')); [Pxx,f] = pwelch(data,[],[],[],25e3); plot(f,Pxx,'--'); xlabel('Frequency [Hz]'); ylabel('Power'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; % MODE 2: Full-resolution Velocity Order spectrum my_dir = 'MODE 2 - Imbalance'; [b,a] = butter(N_filt,vel_HP/(fs/2),'high'); % HP filter coefficients figure('Position',position); hold on; grid on; title('Comparison via Velocity Order spectrum'); load(fullfile(my_dir,'signal 0250.mat')); data_HP = filter(b,a,data); % Filter signal data_int = Calculate_Integrated(data_HP,fs); % integrate data_vel = 9.81*1000*data_int; % scale [Xvel_res,Nrot] = Resample_signal_simplified(data_vel,PM,fs); % see 4.2.2.4 N_res = length(Xvel_res); Nsamp = N_res/Nrot; S = abs(fft(Xvel_res)); S = S(1:N_res/2+1)/(N_res/2); % velocity ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % velocity ORDER spectrum axis plot(ord,S); % plot spectrum load(fullfile(my_dir,'signal 0001.mat')); data_HP = filter(b,a,data); % Filter signal data_int = Calculate_Integrated(data_HP,fs); % integrate data_vel = 9.81*1000*data_int; % scale [Xvel_res,Nrot] = Resample_signal_simplified(data_vel,PM,fs); N_res = length(Xvel_res); Nsamp = N_res/Nrot; S = abs(fft(Xvel_res)); S = S(1:N_res/2+1)/(N_res/2); % velocity ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % velocity ORDER spectrum axis plot(ord,S); % plot spectrum xlabel('Order'); ylabel('Velocity [mm/s]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; xlim([0 3.1]); ylim([0 16]);
400
9 Analysis of Long-Term Fault Development
% MODE 2: Full-resolution Acceleration Order spectrum figure('Position',position); hold on; grid on; title('Comparison via full-resolution Order spectrum'); load(fullfile(my_dir,'signal 0250.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis plot(ord,S); % plot spectrum
load(fullfile(my_dir,'signal 0001.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis plot(ord,S); % plot spectrum xlabel('Order'); ylabel('Acceleration [g]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; xlim([0 3.1]); ylim([0 .15]) % MODE 3: Full-resolution Acceleration Order spectrum my_dir = 'MODE 3 - Gearbox'; figure('Position',position); hold on; grid on; title('Comparison via full-resolution Order spectrum'); load(fullfile(my_dir,'signal 0250.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis plot(ord,S); % plot spectrum load(fullfile(my_dir,'signal 0001.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis plot(ord,S); % plot spectrum xlabel('Order'); ylabel('Acceleration [g]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; xlim([0 100]); ylim([0 .23]); % Additional figure - USER zoom % MODE 4: Pwelch my_dir = 'MODE 4 - REB'; figure('Position',position); hold on; grid on; title('Comparison via pwelch');
9.4 Two-Dimensional (Spectral) Comparison
401
load(fullfile(my_dir,'signal 0250.mat')); [Pxx,f] = pwelch(data,[],[],[],25e3); plot(f,Pxx); load(fullfile(my_dir,'signal 0001.mat')); [Pxx,f] = pwelch(data,[],[],[],25e3); plot(f,Pxx,'--'); xlabel('Frequency [Hz]'); ylabel('Power'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; % MODE 4: Full-resolution Envelope ORDER spectrum figure('Position',position); hold on; grid on; title('Comparison via Envelope Order spectrum'); load(fullfile(my_dir,'signal 0250.mat')); [Xres,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(Xres); Nsamp = N_res/Nrot; V_avg = mean(fs./(diff(find(PM)))); % average speed [Hz] HP = env_HP/V_avg; % Estimated (average) HP cutoff order LP = env_LP/V_avg; % Estimated (average) LP cutoff order Xres_env = Generate_envelope(Xres,'TD',HP,LP,Nsamp); S = abs(fft(Xres_env-mean(Xres_env))); S = S(1:N_res/2+1)/(N_res/2); % Acc ENVELOPE ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ENVELOPE ORDER spectrum axis plot(ord,S); % plot spectrum load(fullfile(my_dir,'signal 0001.mat')); [Xres,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(Xres); Nsamp = N_res/Nrot; V_avg = mean(fs./(diff(find(PM)))); % average speed [Hz] HP = env_HP/V_avg; % Estimated (average) HP cutoff order LP = env_LP/V_avg; % Estimated (average) LP cutoff order Xres_env = Generate_envelope(Xres,'TD',HP,LP,Nsamp); S = abs(fft(Xres_env-mean(Xres_env))); S = S(1:N_res/2+1)/(N_res/2); % Acc ENVELOPE ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ENVELOPE ORDER spectrum axis plot(ord,S); % plot spectrum xlabel('Order'); ylabel('Envelope Acceleration [g]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; xlim([0 13]); ylim([0 .32]); % MODE 4: Full-resolution Envelope (Frequency) spectrum figure('Position',position); hold on; grid on; title('Comparison via full-resolution Envelope spectrum'); load(fullfile(my_dir,'signal 0250.mat')); N = length(data); X_env = Generate_envelope(data,'TD',env_HP,env_LP,fs); % envelope signal S = abs(fft(X_env-mean(X_env))); S = S(1:N/2+1)/(N/2); % envelope spectrum amplitudes f = 0:fs/N:fs/2; % full-resolution spectrum axis plot(f,S); % plot spectrum
402
9 Analysis of Long-Term Fault Development
load(fullfile(my_dir,'signal 0001.mat')); N = length(data); X_env = Generate_envelope(data,'TD',env_HP,env_LP,fs); % envelope signal S = abs(fft(X_env-mean(X_env))); S = S(1:N/2+1)/(N/2); % envelope spectrum amplitudes f = 0:fs/N:fs/2; % full-resolution spectrum axis plot(f,S); % plot spectrum xlabel('Frequency [Hz]'); ylabel('Envelope Acceleration [g]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; xlim([0 13*V_avg]); ylim([0 .32]); % MODE 8: Full-resolution Acceleration Order spectrum my_dir = 'MODE 8 - Miscellaneous (high var)'; fig_lin = figure('Position',position); hold on; grid on; title('Comparison via full-resolution Order spectrum'); fig_log = figure('Position',position); hold on; grid on; title('Comparison via full-resolution Order spectrum'); load(fullfile(my_dir,'signal 0250.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis figure(fig_lin.Number); plot(ord,S); % plot spectrum figure(fig_log.Number); plot(ord,20*log10(S)); % plot spectrum in dB load(fullfile(my_dir,'signal 0001.mat')); [X_res,Nrot] = Resample_signal_simplified(data,PM,fs); N_res = length(X_res); Nsamp = N_res/Nrot; S = abs(fft(X_res)); S = S(1:N_res/2+1)/(N_res/2); % ORDER spectrum amplitudes ord = 0:1/Nrot:Nsamp/2; % ORDER spectrum axis figure(fig_lin.Number); plot(ord,S); % plot spectrum figure(fig_log.Number); plot(ord,20*log10(S)); % plot spectrum in dB figure(fig_lin.Number); xlabel('Order'); ylabel('Acceleration [g]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); ylim([0 .18]); figure(fig_log.Number); xlabel('Order'); ylabel('Amplitude [dB]'); legend('signal 0250.mat','signal 0001.mat'); set(gca,'fontsize',8); axis tight; ylim([-78 -12]);
Following Section illustrates generation of selected 3-dimensional diagnostic graphs.
9.5 Three-Dimensional Visualization
9.5 9.5.1
403
Three-Dimensional Visualization General Information
Referring to Fig. 9.1, large sets of raw data could be also analyzed analysis of 3-dimensional figures. Recalling from Sect. 5.7.1, in engineering terminology, such plots are also called “cascade” or “waterfall” plots, interchangeably. Comparing to Fig. 9.17, the concept of 3-D vibration data analysis is illustrated schematically in Fig. 9.28. Three-dimensional figures could be of various types, what influences their fault detection ability. Referring to Sect. 5.7.1, typical figures process multiple, separated Acceleration and Velocity signals. Formally, such set could be called “a discontinuous set of continuous signals”, because each signal is continuous, yet there is a time gap (of any length) between them. For testing measurements, this gap is typically very short, but for industrial data, it is typically a day. According to Sect. 5.7.4, these figures are typically: • averaged spectrum (either USER-averaged or pwelch, Acceleration or zoomed Velocity), • full-resolution ORDER spectrum (Acceleration or zoomed Velocity), • averaged ORDER spectrum (Acceleration or zoomed Velocity), • full-resolution envelope spectrum, • averaged envelope spectrum, • full-resolution envelope ORDER spectrum, • averaged ORDER spectrum.
Fig. 9.28 The concept of visual 3-D spectral data analysis
404
9 Analysis of Long-Term Fault Development
Following Sections illustrates 3-figures selected for detection and identification of machine faults under consideration. The code framework, functions overview, as well as a complete code is given in subsequent Sections. A complete list of arguments, which are used in each function call, is listed in individual Figure annotation.
9.5.2
Selected Results
9.5.2.1
Imbalance Detection and Identification
Figure 9.29 illustrates a fragment of a full-resolution ORDER spectrum, zoomed up to 5th order. Recalling to Sect. 7.2, the Slow Shaft order, which is associated with Imbalance is equal to 23/67 = 0,343 [ord]. Figure 9.29 clearly illustrates rise of this component. Signal processing USER settings: • Data Source: MODE 2 • Select spectrum type: 4 • Select window—[1] rectangular(none), [2]hann: 1
Fig. 9.29 Slow Shaft Imbalance Acceleration ORDER spectrum
detection
and
identification
using
full-resolution
9.5 Three-Dimensional Visualization
405
• Select Nsamp—[1] user (nominal), [2]auto: 1 • Nsamp (EVEN) = 1024 Post-processing USER settings: • • • • • •
Spectrum type—[1] regular, [2]power: 1 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 1 Select spectral range—[1] all, [2]zoom: 2 Select start [ord]: 0 Select stop [ord]: 5
For reference, Fig. 9.30 illustrates the same data plotted as a power of the Velocity signal. Signal processing USER settings: • • • • •
Data Source: MODE 2 Select spectrum type: 4 Select window—[1] rectangular(none), [2]hann: 1 Select Nsamp—[1] user (nominal), [2]auto: 1 Nsamp (EVEN) = 1024
Fig. 9.30 Slow ShaŌ Imbalance detection and identification using full-resolution Velocity ORDER power spectrum
406
9 Analysis of Long-Term Fault Development
Post-processing USER settings: • • • • • •
Spectrum type—[1] regular, [2]power: 2 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 2 Select spectral range—[1] all, [2]zoom: 2 Select start [ord]: 0 Select stop [ord]: 5
Clearly, Velocity physical value increases the dynamics of the signal. For this reason, Velocity narrowband estimators of shaft harmonic components are commonly used for rotary machine monitoring. For details on Velocity-based analysis, refer to Sect. 4.3.2. Next section considers gearbox fault development.
9.5.2.2
Gearbox Fault Detection and Identification
Figure 9.31 illustrates a fragment of a full-resolution ORDER spectrum, zoomed between 42nd and 50th orders. Recalling to Sect. 7.2.2, the order of the second harmonic of the gear mesh frequency, i.e. the GMFx2, which models gearbox fault development is equal to 23*2 = 46 [ord]. Figure 9.31 clearly illustrates rise of this component along with is Slow Shaft sidebands.
Fig. 9.31 Gearbox fault development detection and identification using full-resolution Acceleration ORDER spectrum
9.5 Three-Dimensional Visualization
407
Signal processing USER settings: • • • •
Data Source: MODE 3 Select spectrum type: 4 Select window—[1] rectangular(none), [2]hann: 1 Select Nsamp—[1] user (nominal), [2]auto: 2
Post-processing USER settings: • • • • • •
Spectrum type—[1] regular, [2]power: 1 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 1 Select spectral range—[1] all, [2]zoom: 2 Select start [ord]: 41.5 Select stop [ord]: 50.5
Comparing to shaft-related components (Imbalance detection), gearbox-related components (Gearbox fault development) are typically plotted as Acceleration.
9.5.2.3
REB Fault Detection and Identification
REB fault development is analyzed using two plots. First one, Fig. 9.32, illustrates a fragment of an averaged FREQUENCY spectrum, zoomed between 2 kHz and 12.5 kHz. Such wideband comparison allows to detect frequency regions, which start to be additionally induced, as the REB fault develops. Signal processing USER settings: • • • • •
Data Source: MODE 4 Select spectrum type: 2 Select window—[1] rectangular(none), [2]hann: 1 Select nominal resolution [Hz]: 10 Select overlap [%]: 0
Post-processing USER settings: • • • • • •
Spectrum type—[1] regular, [2]power: 1 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 1 Select spectral range—[1] all, [2]zoom: 2 Select start [Hz]: 2000 Select stop [Hz]: 12500
Clearly, Fig. 9.32 shows how REB fault induces structural resonances from 2 kHz to 4 kHz, from 6 kHz to 8 kHz, and from 9 kHz to 11 kHz. Note that in practical analysis, direct spectral comparison typically gives better results (see Sect. 9.4.2.4). The second plot illustrates Envelope Order Spectrum. Recalling to Sect. 7.2, the order of the REB inner race fault, i.e. the BPFI, is equal to 8.82*23/
408
9 Analysis of Long-Term Fault Development
Fig. 9.32 REB fault development detection using averaged spectrum. Note The maximum CLim parameter value is changed manually to 0.15 in the Figure Properties window)
67 = 3.0278 [ord]. Figure 9.33 clearly illustrates rise of first three harmonics of this component along with is Slow Shaft sidebands. Figure 9.33 is zoomed in significant range (between 1.1 and 10.1 orders). Signal processing USER settings: • • • • • •
Data Source: MODE 4 Select spectrum type: 10 Select domain—[1] Time(Butter), [2]Frequency(Hilbert): 2 Bandwidth start [ord]: 4000/50 Bandwidth stop [ord]: 12500/50 Select Nsamp—[1] user, [2]auto: 2
Post-processing USER settings: • • • • • •
Spectrum type—[1] regular, [2]power: 1 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 1 Select spectral range—[1] all, [2]zoom: 2 Select start [ord]: 1.1 Select stop [ord]: 10.1
9.5 Three-Dimensional Visualization
409
Fig. 9.33 REB fault development detection using averaged Envelope ORDER spectrum
Note that for small speed variations in the entire analyzed data set, corresponding FREQUENCY-domain analysis gives similar results.
9.5.2.4
Multi-fault Detection
Finally, Fig. 9.34 illustrates simultaneous development of Slow Shaft Imbalance, Gearbox fault development, and REB fault development. Signal processing USER settings: • • • • •
Data Source: MODE 8 Select spectrum type: 2 Select window—[1] rectangular(none), [2]hann: 1 Select nominal resolution [Hz]: 2 Select overlap [%]: 0
Post-processing USER settings: • • • •
Spectrum type—[1] regular, [2]power: 1 Amplitude scale—[1] lin, [2]log: 1 Physical value—[1] Acc, [2]Vel: 1 Select spectral range—[1] all, [2]zoom: 1
410
9 Analysis of Long-Term Fault Development
Fig. 9.34 Simultaneous multi-fault detection using averaged spectrum in the entire frequency band (NOTE: consider changing the maximum CLim parameter value to 0.09 in the Figure Properties window for highlighting largest changes)
Following Section presents a complete set of codes for generation of 3-d figures from a large data sets in MATLAB®.
9.5.3
MATLAB® Code for 3-D Analysis of Multiple Discontinuous Signals
9.5.3.1
Code Framework
For clarity, analyzed data, which represents a single long-term fault development, is stored as a set of chronological mat files in a single folder, corresponding to individual failure MODES. In such scenario, data variable corresponds to a single physical vibration channel. The 3-D visualization is programmed as a series of scripts wrapped into a single script called from MATLAB® workspace (F5).
9.5 Three-Dimensional Visualization
411
NOTE: for the condider data set, select "Data mat" folder from selected MODE. % % % %
Script name: LONG_TERM_VISUALIZATION The script loads signals from a specified folder, generates an array of user-defined spectra, and plots them as a 3D figure. User has to specify sampling frequency and nominal signal time.
clear; clc; close all; fs = 25e3; % common sampling frequency T = 10; % nominal signal time (not used for resampled data) STEP_1_SELECT_DATA_FOLDER; STEP_2_SELECT_SPECTRUM_TYPE_AND_PARAMETERS; STEP_3_CONSTRUCT_ARRAY; STEP_4_GENERATE_ABSCISSA; while 1 STEP_5_SELECT_DISPLAY_OPTIONS; STEP_6_PLOT; reply = input('Do you want to quit? [y]yes: ','s'); if strcmpi(reply,'y') break; end end
As observed in the code, the sampling frequency fs and signal time T are predefined, which assumes that they are common for all signals in the folder. Next, in STEPS 1–2, user selects the data source folder and signal processing parameters. These parameters change dynamically upon current selection. In STEPS 3–4, data is processed. Afterward, the program starts a loop, and performs STEPS 5–6, which allows plotting new spectral representations with selected parameters changed, i.e. such parameters, change of which does not require original data re-processing. The data is stored in mat files, each of which contains data illustrated in Fig. 9.35. The code additionally requires following functions •
Resample_signal_simplified.m
(see Sect. 4.2.2.4)
•
Generate_envelope
(see Sect. 4.3.1.5)
Fig. 9.35 Data template for long-term analysis
412
9 Analysis of Long-Term Fault Development
Calling this code results in following text in the MATLAB® workspace: Selected data folder: C:\< USER folder with data> Analyzing folder… Total files found in the selected folder: 250
[1]
SPECTRUM
[2]
USER-AVERAGED SPECTRUM
[3]
PSD (pwelch)
[4]
ORDER SPECTRUM
[5]
USER-AVERAGED ORDER SPECTRUM
[6]
PSD (pwelch) in order domain
[7]
ENVELOPE SPECTRUM
[8]
USER-AVERAGED ENVELOPE SPECTRUM
[9]
PSD (pwelch) of envelope signal
[10] ENVELOPE ORDER SPECTRUM [11] USER-AVERAGED ENVELOPE ORDER SPECTRUM [12] PSD (pwelch) of envelope signal in order domain Select spectrum type:
Following Sections present code details.
9.5.3.2
Step_1_Select_Data_Folder
Following MATLAB® code presents selection of data source. % Script name: STEP_1_SELECT_DATA_FOLDER % Script selects data source folder and counts data files. folder_name = uigetdir; disp('Selected data folder:'); disp(folder_name); disp('Analyzing folder...'); my_dir = dir(folder_name); my_dir = my_dir(3:end); No_signals = length(my_dir); disp(['Total files found in the selected folder: ',num2str(No_signals)]); disp(blanks(1)); pause(.25);
9.5 Three-Dimensional Visualization
9.5.3.3
413
Step_2_Select_Spectrum_Type_and_Parameters
Following MATLAB® code presents selection of spectrum type and its parameters. % Script name: STEP_2_SELECT_SPECTRUM_TYPE_AND_PARAMETERS % These twelve spectra types represent following classification: % 1) Full-resolution vs. averaged spectra, % 2) Frequency domain vs. order domain spectra (resampled signals), % 3) Spectra of original vs. envelope signal. % Additionally, the MATLAB "pwelch" spectrum is handled separately, % because it can be called without definition of USER parameters. S_type_list{1} S_type_list{2} S_type_list{3} S_type_list{4} S_type_list{5} S_type_list{6} S_type_list{7} S_type_list{8} S_type_list{9} S_type_list{10} S_type_list{11} S_type_list{12}
= = = = = = = = = = = =
'[1] '[2] '[3] '[4] '[5] '[6] '[7] '[8] '[9] '[10] '[11] '[12]
SPECTRUM'; USER-AVERAGED SPECTRUM'; PSD (pwelch)'; ORDER SPECTRUM'; USER-AVERAGED ORDER SPECTRUM'; PSD (pwelch) in order domain'; ENVELOPE SPECTRUM'; USER-AVERAGED ENVELOPE SPECTRUM'; PSD (pwelch) of envelope signal'; ENVELOPE ORDER SPECTRUM'; USER-AVERAGED ENVELOPE ORDER SPECTRUM'; PSD (pwelch) of envelope signal in order domain';
for i = 1:length(S_type_list) disp(S_type_list{i}); end s_type = input('Select spectrum type: '); switch s_type case 1 % SPECTRUM reply = input('Select window - [1]rectangular(none), [2]hann: '); if reply == 1 win = 'none'; elseif reply == 2 win = 'hann'; end case 2 % USER-AVERAGED SPECTRUM reply = input('Select window - [1]rectangular(none), [2]hann: '); if reply == 1 win = 'none'; elseif reply == 2 win = 'hann'; end resolution = input('Select nominal resolution [Hz]: '); overlap = input('Select overlap [%]: '); case 3 % PSD (pwelch) % Does not need any user parameters case 4 % ORDER SPECTRUM reply = input('Select window - [1]rectangular(none), [2]hann: '); if reply == 1 win = 'none'; elseif reply == 2 win = 'hann'; end
414
9 Analysis of Long-Term Fault Development reply = input('Select Nsamp - [1]user (nominal), [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end
case 5 % USER-AVERAGED ORDER SPECTRUM reply = input('Select window - [1]rectangular(none), [2]hann: '); if reply == 1 win = 'none'; elseif reply == 2 win = 'hann'; end reply = input('Select Nsamp - [1]user, [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end resolution = input('Select nominal resolution [ord]: '); overlap = input('Select overlap [%]: '); case 6 % PSD (pwelch) in order domain reply = input('Select Nsamp - [1]user, [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end case 7 % ENVELOPE SPECTRUM str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [Hz]: '); f2 = input('Low Pass filter cutoff frequency [Hz]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [Hz]: '); f2 = input('Bandwidth stop [Hz]: '); end case 8 % USER-AVERAGED ENVELOPE SPECTRUM str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [Hz]: '); f2 = input('Low Pass filter cutoff frequency [Hz]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [Hz]: '); f2 = input('Bandwidth stop [Hz]: '); end
9.5 Three-Dimensional Visualization resolution = input('Select nominal resolution [Hz]:'); overlap = input('Select overlap [%]:'); case 9 % PSD (pwelch) of envelope signal str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [Hz]: '); f2 = input('Low Pass filter cutoff frequency [Hz]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [Hz]: '); f2 = input('Bandwidth stop [Hz]: '); end case 10 % ENVELOPE ORDER SPECTRUM str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [ord]: '); f2 = input('Low Pass filter cutoff frequency [ord]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [ord]: '); f2 = input('Bandwidth stop [ord]: '); end reply = input('Select Nsamp - [1]user, [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end case 11 % USER-AVERAGED ENVELOPE ORDER SPECTRUM str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [ord]: '); f2 = input('Low Pass filter cutoff frequency [ord]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [ord]: '); f2 = input('Bandwidth stop [ord]: '); end reply = input('Select Nsamp - [1]user, [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end resolution = input('Select nominal resolution [ord]: '); overlap = input('Select overlap [%]: ');
415
416
9 Analysis of Long-Term Fault Development case 12 % PSD (pwelch) of envelope signal in order domain str =('Select domain - [1]Time(Butter), [2]Frequency(Hilbert): '); reply = input(str); if reply == 1 domain = 'TD'; f1 = input('High Pass filter cutoff frequency [ord]: '); f2 = input('Low Pass filter cutoff frequency [ord]: '); elseif reply == 2 domain = 'FD'; f1 = input('Bandwidth start [ord]: '); f2 = input('Bandwidth stop [ord]: '); end reply = input('Select Nsamp - [1]user, [2]auto: '); if reply == 1 Nsamp = input('Nsamp (EVEN) = '); elseif reply == 2 Nsamp = 'auto'; end
end disp(blanks(1));
9.5.3.4
STEP_3_CONSTRUCT_ARRAY—Algorithm
Current Section presents a referential text-list of consecutive operations for each possible selected spectrum case, followed by complete code for processing mat files stored in a single folder. Each path could be considered separately. The actual MATLAB® code used for data processing is given in following Section.
9.5 Three-Dimensional Visualization
417
case [1] SPECTRUM LEVEL 1: calculate signal length (EVEN due to N/2 index) LEVEL 2: calculate window coefficients (optional) LEVEL 3: allocate memory LEVEL 4: construct single loop LEVEL 5: trim signal to common EVEN length LEVEL 6: calculate individual spectra and store in array case [2] USER-AVERAGED SPECTRUM LEVEL 1: calculate window length (EVEN No. of samples) LEVEL 2: calculate window coefficients (optional) LEVEL 3: calculate number of fragments (take into account overlap) LEVEL 4: allocate memory LEVEL 5: construct outer loop LEVEL 6: construct inner loop LEVEL 7: extract current fragment from signal (inner loop) LEVEL 8: calculate individual spectra and store in array (inner loop) LEVEL 9: for each signal calculate average spectrum (outer loop) case [3] PSD (pwelch) LEVEL 1: allocate memory LEVEL 2: construct single loop LEVEL 3: for each signal calculate MATLAB default pwelch case [4] ORDER SPECTRUM LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common EVEN number of samples per rotation LEVEL 3: calculate new common total number of points in resampled signal LEVEL 4: calculate window coefficients (optional) LEVEL 5: allocate memory LEVEL 6: construct single loop LEVEL 7: calculate individual resampled signals LEVEL 8: trim to a common length (common Nrot and Nsamp) LEVEL 9: calculate individual spectra and store in array case [5] USER-AVERAGED ORDER SPECTRUM LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common number of samples per rotation (Nsamp) LEVEL 3: calculate window length (EVEN No. of samples) LEVEL 4: calculate window coefficients (optional) LEVEL 5: calculate number of fragments (take into account overlap) LEVEL 6: allocate memory LEVEL 7: construct outer loop LEVEL 8: calculate individual resampled signals LEVEL 9: trim to a common length (common Nrot and Nsamp) LEVEL 10: construct inner loop LEVEL 11: extract current fragment from resampled signal (inner loop) LEVEL 12: calculate individual spectra and store in array (inner loop) LEVEL 13: for each signal calculate average OPRDER spectrum (outer loop) case [6] PSD (pwelch) in order domain LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common number of samples per rotation (Nsamp) LEVEL 3: calculate new common total number of points LEVEL 4: allocate memory LEVEL 5: construct single loop LEVEL 6: calculate individual resampled signals LEVEL 7: trim to a common length (common Nrot and Nsamp) LEVEL 8: for each signal calculate MATLAB default pwelch
418
9 Analysis of Long-Term Fault Development
------------------------------------------------------------------------------------------ ENVELOPE SIGNALS ------------------------------------------------------------------------------------------------------------case [7] ENVELOPE SPECTRUM LEVEL 1: calculate envelope signal length (EVEN) LEVEL 2: allocate memory LEVEL 3: construct single loop LEVEL 4: generate envelope signal from each source signal LEVEL 5: calculate individual spectra and store in array LEVEL 6: update sampling frequency if necessary case [8] USER-AVERAGED ENVELOPE SPECTRUM (case 2 + case 7) LEVEL 1: calculate window length (EVEN No. of samples) LEVEL 2: update user nominal resolution if necessary LEVEL 3: calculate number of fragments (take into account overlap) LEVEL 4: calculate window length (envelope signal) LEVEL 5: allocate memory LEVEL 6: construct outer loop LEVEL 7: construct inner loop LEVEL 8: extract current fragment from signal (inner loop) LEVEL 9: generate envelope signal from current fragment LEVEL 10: calculate individual spectra and store in array LEVEL 11: for each signal calculate average envelope spectrum LEVEL 12: update sampling frequency if necessary case [9] PSD (pwelch) of envelope signal LEVEL 1: calculate envelope signal length and sampling frequency LEVEL 2: allocate memory LEVEL 3: construct single loop LEVEL 4: generate envelope signal from each source signal LEVEL 5: for each signal calculate MATLAB default pwelch LEVEL 6: update sampling frequency if necessary case [10] ENVELOPE ORDER SPECTRUM (case 4 + case 7) LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common EVEN number of samples per rotation (Nsamp) LEVEL 3: calculate new common total number of points (after resampling) LEVEL 4: calculate envelope signal length (EVEN) LEVEL 5: allocate memory LEVEL 6: construct single loop LEVEL 7: calculate individual resampled signals LEVEL 8: trim to a common length (common Nrot and Nsamp) LEVEL 9: generate envelope signal from each source signal LEVEL 10: calculate individual spectra and store in array LEVEL 11: update number of samples per rotation if necessary case [11] USER-AVERAGED ENVELOPE ORDER SPECTRUM LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common number of samples per rotation (Nsamp) LEVEL 3: calculate window length (EVEN No. of samples) LEVEL 4: calculate number of fragments (take into account overlap) LEVEL 5: calculate window length (envelope signal) LEVEL 6: allocate memory LEVEL 7: construct outer loop LEVEL 8: calculate individual resampled signals LEVEL 9: trim to a common length (common Nrot and Nsamp) LEVEL 10: construct inner loop LEVEL 11: extract current fragment from resampled signal
9.5 Three-Dimensional Visualization LEVEL LEVEL LEVEL LEVEL
12: 13: 14: 15:
419
generate envelope signal from current (resampled) fragment calculate individual spectra and store in array for each signal calculate average envelope order spectrum update number of samples per rotation if necessary
case [12] PSD (pwelch) of envelope signal in order domain LEVEL 1: find least common number of rotations (LCNOR) LEVEL 2: determine common number of samples per rotation (Nsamp) LEVEL 3: calculate new common total number of points (after resampling) LEVEL 4: calculate envelope signal length LEVEL 5: allocate memory LEVEL 6: construct single loop LEVEL 7: calculate individual resampled signals LEVEL 8: trim to a common length (common Nrot and Nsamp) LEVEL 9: generate envelope signal from each source signal LEVEL 10: for each signal calculate MATLAB default pwelch LEVEL 11: update number of samples per rotation if necessary
9.5.3.5
STEP_3_CONSTRUCT_ARRAY—Code
Following MATLAB® code shows how data from individual signals is processed according to selected user parameters, and how it is concentrated into a single data array. The script selects proper part of the code inside the switch condition on the basis of USER selected spectrum type, which is stored in the s_type variable. As noted, twelve possible spectrum types are defined.
420
9 Analysis of Long-Term Fault Development
% Script name: STEP_3_CONSTRUCT_ARRAY % Script generates a variable "array", which is an array of spectral % amplitudes of consecutive signals loaded from selected data source disp('Generating spectrum array...'); switch s_type case 1 % SPECTRUM % LEVEL 1: calculate signal length (EVEN due to N/2 index) N = fs*T; if mod(N,2) N = N-1; end % LEVEL 2: calculate window coefficients (optional) if strcmpi(win,'hann') w = hann(N); w_coef = 1.4; % window compensation coefficient end % LEVEL 3: allocate memory array = zeros(No_signals,N/2+1); % LEVEL 4: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 5:trim signal to common even length data = data(1:N); data = data - mean(data); % remove DC component % LEVEL 6: calculate individual spectra and store in array if strcmpi(win,'hann') data = data(:); data = data.*w; % windowing (optional) end Y = abs(fft(data)); Y = Y(1:N/2+1)/(N/2);
% spectral amplitudes % scaling
if strcmpi(win,'hann') Y = Y.*w_coef; end
% approximated window compensation
array(i,:) = Y;
% current row of the final array
end case 2 % USER-AVERAGED SPECTRUM % LEVEL 1: calculate window length (EVEN No. of samples) T_frag = 1/resolution; % NOTE:this nominal resolution might be % slightly changed to meet an integer % number of points in a window (w_len) w_len = round(T_frag*fs);
9.5 Three-Dimensional Visualization
421
if mod(w_len,2) w_len = w_len-1; end % LEVEL 2: calculate window coefficients (optional) if strcmpi(win,'hann') w = hann(w_len); w_coef = 1.4; % window compensation coefficient end % LEVEL 3: calculate number of fragments (take into account % overlap) N = fs*T; N_overlap = floor(w_len * overlap/100); No_frag = floor((N-N_overlap)/(w_len-N_overlap)); % LEVEL 4: allocate memory array = zeros(No_signals,w_len/2+1); % LEVEL 5: construct outer loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); inner_array = zeros(No_frag,w_len/2+1); % LEVEL 6: construct inner loop for j = 1:No_frag % LEVEL 7: extract current fragment from signal index_from = (w_len - N_overlap)*(j-1) + 1; index_till = index_from + w_len - 1; x = data(index_from : index_till); x = x - mean(x); % remove DC component % LEVEL 8: calculate individual spectra and store in array if strcmpi(win,'hann') x = x(:); x = x.*w; % windowing (optional) end Y = abs(fft(x)); Y = Y(1:w_len/2+1)/(w_len/2);
% spectral amplitudes % scaling
if strcmpi(win,'hann') Y = Y.*w_coef; % approximated window compensation end inner_array(j,:) = Y;
% full-resolution spectra
end % LEVEL 9: for each signal calculate average spectrum array(i,:) = mean(inner_array,1); % current row of final array end
422
9 Analysis of Long-Term Fault Development
case 3 % PSD (pwelch) % LEVEL 1: allocate memory array = zeros(No_signals,2^nextpow2(2/9*T*fs)/2+1); % LEVEL 2: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); data = data - mean(data);
% remove DC component
% LEVEL 3: for each signal calculate MATLAB default pwelch array(i,:) = pwelch(data,[],[],[],fs); end case 4 % ORDER SPECTRUM % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common EVEN number of samples per rotation % % % % % % %
NOTE: The number of samples in a resampled signal must be even. This could be always met by forcing either even Nrot or Nsamp. Since generally, modification of Nsamp is negligible, the Nsamp variable is forced to be even. For auto-selected Nsamp, this is achieved by multiplication the average Nsamp by 2. For user-selected Nsamp, it is required during selection of arguments.
if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate new common total number of points in resampled % signal N_res = Nsamp * Nrot; % LEVEL 4: calculate window coefficients (optional) if strcmpi(win,'hann') w = hann(N_res); w_coef = 1.4; % window compensation coefficient end
9.5 Three-Dimensional Visualization
423
% LEVEL 5: allocate memory array = zeros(No_signals,N_res/2+1); % LEVEL 6: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 7: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp); % 4.2.2.4 % LEVEL 8: trim to a common length (common Nrot and Nsamp) Xres = Xres(1:N_res); Xres = Xres - mean(Xres); % remove DC component % LEVEL 9: calculate individual spectra and store in array if strcmpi(win,'hann') Xres = Xres(:); Xres = Xres.*w; % windowing (optional) end Y = abs(fft(Xres)); Y = Y(1:N_res/2+1)/(N_res/2); if strcmpi(win,'hann') Y = Y.*w_coef; end array(i,:) = Y;
% spectral amplitudes % scaling
% approximated window compensation
% current row of the final array
end case 5 % USER-AVERAGED ORDER SPECTRUM % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common number of samples per rotation (Nsamp) % NOTE: Precisely, for this spectrum, the resampled signal length % does not need to be even, because entire signal is not processed % - just the current fragment must be even.
424
9 Analysis of Long-Term Fault Development
if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate window length (EVEN No. of samples) Nrot_frag = 1/resolution; % NOTE:this nominal resolution might be % slightly changed to meet an integer % number of points in a window (w_len) w_len = round(Nrot_frag * Nsamp); if mod(w_len,2) w_len = w_len-1; end % LEVEL 4: calculate window coefficients (optional) if strcmpi(win,'hann') w = hann(w_len); w_coef = 1.4; % window compensation coefficient end % LEVEL 5: calculate number of fragments (take into account % overlap) N_res = Nsamp * Nrot; N_overlap = floor(w_len * overlap/100); No_frag = floor((N_res-N_overlap)/(w_len-N_overlap)); % LEVEL 6: allocate memory array = zeros(No_signals,w_len/2+1); % LEVEL 7: construct outer loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 8: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp); % 4.2.2.4 % LEVEL 9: trim to a common length (common Nrot and Nsamp) Xres = Xres(1:N_res); % NOTE: here the code forces the same % No. of rotations for all signals % - compare for instance with "case 2" inner_array = zeros(No_frag,w_len/2+1); % LEVEL 10: construct inner loop for j = 1:No_frag % LEVEL 11: extract current fragment from resampled signal index_from = (w_len - N_overlap)*(j-1) + 1; index_till = index_from + w_len - 1; x = Xres(index_from : index_till); x = x - mean(x); % remove DC component % LEVEL 12: calculate individual spectra and store in array if strcmpi(win,'hann') x = x(:); x = x.*w; % windowing (optional) end
9.5 Three-Dimensional Visualization
425
Y = abs(fft(x)); Y = Y(1:w_len/2+1)/(w_len/2); if strcmpi(win,'hann') Y = Y.*w_coef; end inner_array(j,:) = Y;
% spectral amplitudes % scaling
% approximated window compensation
% full-resolution spectra
end % LEVEL 13: for each signal calculate average OPRDER spectrum array(i,:) = mean(inner_array,1); % current row of final array end case 6 % PSD (pwelch) in order domain % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common number of samples per rotation (Nsamp) % NOTE: Precisely, for this spectrum, the resampled signal length % does not need to be even if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate new common total number of points N_res = Nsamp * Nrot; % LEVEL 4: allocate memory array = zeros(No_signals,2^nextpow2(2/9*N_res)/2+1); % LEVEL 5: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 6: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp);
426
9 Analysis of Long-Term Fault Development % LEVEL 7: trim to a common length (common Nrot and Nsamp) Xres = Xres(1:N_res); Xres = Xres - mean(Xres); % remove DC component % LEVEL 8: for each signal calculate MATLAB default pwelch array(i,:) = pwelch(Xres,[],[],[],Nsamp); end
% ------------------ ENVELOPE SIGNALS ------------------------------------% NOTE: for every full-resolution spectrum of the envelope signal, the % number of samples might be reduced when Hilbert Transform-based % Frequency Domain filtering is applied. Furthermore, for every averaged % signal, this reduction is transferred to a single window length. % As a consequence, before memory is allocated for the "array", its % dimensions are calculated. % -----------------------------------------------------------------------case 7 % ENVELOPE SPECTRUM % LEVEL 1: calculate envelope signal length (EVEN) if strcmpi(domain,'TD') N = fs*T; % starting length if mod(N,2) N_env = N-1; % for TD-filtering length is unchanged else N_env = N; end else % for HT-based FD filtering resolution = 1/T; % same as fs/N N_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; end % LEVEL 2: allocate memory array = zeros(No_signals,N_env/2+1); % LEVEL 3: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 4: generate envelope signal from each source signal x_env = Generate_envelope(data,domain,f1,f2,fs); x_env = x_env - mean(x_env); % remove DC component % LEVEL 5: calculate individual spectra and store in array Y = abs(fft(x_env)); % spectral amplitudes Y = Y(1:N_env/2+1)/(N_env/2); % scaling array(i,:) = Y; end % LEVEL 6: update sampling frequency if necessary if strcmpi(domain,'FD') fs = N_env/T; % fs changed to "fs_new" end
9.5 Three-Dimensional Visualization case 8 % USER-AVERAGED ENVELOPE SPECTRUM % LEVEL 1: calculate window length (EVEN No. of samples) T_frag = 1/resolution; % NOTE:this nominal resolution might be % slightly changed to meet an integer % number of points in a window (w_len). w_len = round(T_frag*fs); if mod(w_len,2) w_len = w_len-1; end % LEVEL 2: update user nominal resolution if necessary if w_len/fs ~= T_frag % LEVEL-by-LEVEL "resolution" update: T_frag = w_len/fs; % the correction is minimal, if any resolution = 1/T_frag; % same as fs/w_len end
% LEVEL 3: calculate number of fragments (take into account % overlap) N = fs*T; N_overlap = floor(w_len * overlap/100); No_frag = floor((N-N_overlap)/(w_len-N_overlap)); % LEVEL 4: calculate window length (envelope signal) if strcmpi(domain,'TD') w_len_env = w_len; else w_len_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; end % LEVEL 5: allocate memory array = zeros(No_signals,w_len_env/2+1); % LEVEL 6: construct outer loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); inner_array = zeros(No_frag,w_len_env/2+1); % LEVEL 7: construct inner loop for j = 1:No_frag % LEVEL 8: extract current fragment from signal index_from = (w_len - N_overlap)*(j-1) + 1; index_till = index_from + w_len - 1; x = data(index_from : index_till); % LEVEL 9: generate envelope signal from current fragment x_env = Generate_envelope(x,domain,f1,f2,fs); x_env = x_env - mean(x_env); % remove DC component % LEVEL 10: calculate individual spectra and store in array % Other words: generate array of full-resolution spectra
427
428
9 Analysis of Long-Term Fault Development % from envelope signals of fragments of entire signal Y = abs(fft(x_env - mean(x_env))); % spectral amplitudes Y = Y(1:w_len_env/2+1)/(w_len_env/2); % scaling inner_array(j,:) = Y;
% full-resolution spectra
end % LEVEL 11: for each signal calculate average envelope spectrum array(i,:) = mean(inner_array,1); % current row of final array end % LEVEL 12: update sampling frequency if necessary if strcmpi(domain,'FD') fs = fs * w_len_env/w_len; % fs changed to "fs_new" end case 9 % PSD (pwelch) of envelope signal % LEVEL 1: calculate envelope signal length and sampling frequency if strcmpi(domain,'TD') fs_new = fs; % fs unchanged N_env = T*fs; % N unchanged else resolution = 1/T; N_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; fs_new = N_env/T; end % LEVEL 2: allocate memory array = zeros(No_signals,2^nextpow2(2/9*N_env)/2+1); % LEVEL 3: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 4: generate envelope signal from each source signal x_env = Generate_envelope(data,domain,f1,f2,fs); x_env = x_env - mean(x_env); % remove DC component % LEVEL 5: for each signal calculate MATLAB default pwelch array(i,:) = pwelch(x_env,[],[],[],fs_new); end % LEVEL 6: update sampling frequency if necessary if strcmpi(domain,'FD') fs = fs_new; end % % % %
NOTE: the sampling frequency update must be done outside the loop because for each loaded signal, following scheme is used: >> envelope -> original sampling frequency >> pwelch -> updated sampling frequency
case 10 % ENVELOPE ORDER SPECTRUM
9.5 Three-Dimensional Visualization % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common EVEN number of samples per rotation % % % % % % %
NOTE: The number of samples in a resampled signal must be even. This could be always met by forcing either even Nrot or Nsamp. Since generally, modification of Nsamp is negligible, the Nsamp variable is forced to be even. For auto-selected Nsamp, this is achieved by multiplication the average Nsamp by 2. For user-selected Nsamp, it is required during selection of arguments.
if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate new common total number of points (after % resampling) N_res = Nsamp * Nrot; % LEVEL 4: calculate envelope signal length (EVEN) if strcmpi(domain,'TD') N_env = N_res; else resolution = 1/Nrot; N_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; end % LEVEL 5: allocate memory array = zeros(No_signals,N_env/2+1); % LEVEL 6: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 7: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp); % LEVEL 8: trim to a common length (common Nrot and Nsamp) Xres = Xres(1:N_res);
429
430
9 Analysis of Long-Term Fault Development % LEVEL 9: generate envelope signal from each source signal x_env = Generate_envelope(Xres,domain,f1,f2,Nsamp); x_env = x_env - mean(x_env); % remove DC component % LEVEL 10: calculate individual spectra and store in array % Other words, for each signal generate array of % full-resolution spectra from resampled signals Y = abs(fft(x_env)); Y = Y(1:N_env/2+1)/(N_env/2); array(i,:) = Y;
% spectral amplitudes % scaling
% current row of the final array
end % LEVEL 11: update number of samples per rotation if necessary if strcmpi(domain,'FD') Nsamp = N_env/Nrot; % Nsamp changed to "Nsamp_new" end case 11 % USER-AVERAGED ENVELOPE ORDER SPECTRUM % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common number of samples per rotation (Nsamp) % % % %
NOTE: Precisely, for this spectrum, the resampled signal length does not need to be even, because entire signal is not processed - just the current fragment must be even (only when the envelope signal is calculated in TD).
if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate window length (EVEN No. of samples) Nrot_frag = 1/resolution; w_len = round(Nrot_frag * Nsamp); if mod(w_len,2) w_len = w_len-1; end
9.5 Three-Dimensional Visualization if w_len/Nsamp ~= Nrot_frag Nrot_frag = w_len/Nsamp; resolution = 1/Nrot_frag; end
431 % LEVEL-by-LEVEL "resolution" update % the correction is minimal, if any % same as fs/w_len
% LEVEL 4: calculate number of fragments (take into account % overlap) N_res = Nsamp * Nrot; N_overlap = floor(w_len * overlap/100); No_frag = floor((N_res-N_overlap)/(w_len-N_overlap)); % LEVEL 5: calculate window length (envelope signal) if strcmpi(domain,'TD') w_len_env = w_len; else w_len_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; end % LEVEL 6: allocate memory array = zeros(No_signals,w_len_env/2+1); % LEVEL 7: construct outer loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); % LEVEL 8: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp); % LEVEL 9: trim to a common length (common Nrot and Nsamp) Xres = Xres(1:N_res); inner_array = zeros(No_frag,w_len_env/2+1); % LEVEL 10: construct inner loop for j = 1:No_frag % LEVEL 11: extract current fragment from resampled signal index_from = (w_len - N_overlap)*(j-1) + 1; index_till = index_from + w_len - 1; x = Xres(index_from : index_till); % LEVEL 12: generate envelope signal from current % (resampled) fragment x_env = Generate_envelope(x,domain,f1,f2,Nsamp); x_env = x_env - mean(x_env); % remove DC component % % % Y Y
LEVEL 13: calculate individual spectra and store in array NOTE: Other words, generate array of full-resolution spectra from envelope of resampled signal fragments = abs(fft(x_env)); % spectral amplitudes = Y(1:w_len_env/2+1)/(w_len_env/2); % scaling
inner_array(j,:) = Y; end
% full-resolution spectra
432
9 Analysis of Long-Term Fault Development % LEVEL 14: for each signal calculate avg. env. order spectrum array(i,:) = mean(inner_array,1); % current row of final array end % LEVEL 15: update number of samples per rotation if necessary if strcmpi(domain,'FD') Nsamp = Nsamp * w_len_env/w_len; % Nsamp changed to "Nsamp_new" end
case 12 % PSD (pwelch) of envelope signal in order domain % LEVEL 1: find least common number of rotations (LCNOR) Nrot = zeros(1,No_signals); Nsamp_avg = zeros(1,No_signals); for i = 1:No_signals disp(['Pre-processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name)); Nrot(i) = length(diff(find(PM))); Nsamp_avg(i) = round(mean(diff(find(PM)))); end Nrot = min(Nrot); Nsamp_avg = round(mean(Nsamp_avg)); avg_speed = fs/Nsamp_avg; % [Hz] used for display % LEVEL 2: determine common number of samples per rotation (Nsamp) % NOTE: Precisely, for this spectrum, the resampled signal length % does not need to be even if strcmpi(Nsamp,'auto') Nsamp = Nsamp_avg * 2; end % LEVEL 3: calculate new common total number of points (after % resampling) N_res = Nsamp * Nrot; % LEVEL 4: calculate envelope signal length if strcmpi(domain,'TD') N_env = N_res; Nsamp_new = Nsamp; else resolution = 1/Nrot; N_env = ((floor(f2/resolution)-1)-floor(f1/resolution))*2; Nsamp_new = N_env/Nrot; end % LEVEL 5: allocate memory array = zeros(No_signals,2^nextpow2(2/9*N_env)/2+1); % LEVEL 6: construct single loop for i = 1:No_signals disp(['Processing signal No.: ',num2str(i)]); load(fullfile(folder_name,my_dir(i).name));
9.5 Three-Dimensional Visualization % LEVEL 7: calculate individual resampled signals Xres = Resample_signal_simplified(data,PM,fs,Nsamp); % LEVEL 8: trim to a common length (common Nrot and Nsamp)) Xres = Xres(1:N_res); % LEVEL 9: generate envelope signal from each source signal x_env = Generate_envelope(Xres,domain,f1,f2,Nsamp); x_env = x_env - mean(x_env); % remove DC component
end
% LEVEL 10: for each signal calculate MATLAB default pwelch array(i,:) = pwelch(x_env,[],[],[],Nsamp_new);
% LEVEL 11: update number of samples per rotation if necessary if strcmpi(domain,'FD') Nsamp = Nsamp_new; % Nsamp changed to "Nsamp_new" end % % % % % end
NOTE: the sampling frequency update must be done outside the loop because for each loaded signal, following scheme is used: >> resampling -> original sampling frequency >> envelope -> original sampling frequency >> pwelch -> updated sampling frequency
433
434
9 Analysis of Long-Term Fault Development
9.5.3.6
Step_4_Generate_Abscissa
% Script name: STEP_4_GENERATE_ABSCISSA % Script generates abscissa for different spectrum types. switch s_type case 1 % SPECTRUM df = 1/T; abscissa = 0:df:fs/2; case 2 % USER-AVERAGED SPECTRUM df = fs/w_len; abscissa = 0:df:fs/2; case 3 % PSD w_len df abscissa
(pwelch) = (size(array,2)-1)*2; = fs/w_len; = 0:df:fs/2;
case 4 % ORDER SPECTRUM d_ord = 1/Nrot; abscissa = 0:d_ord:Nsamp/2; case 5 % USER-AVERAGED ORDER SPECTRUM d_ord = 1/Nrot_frag; abscissa = 0:d_ord:Nsamp/2; case 6 % PSD w_len d_ord abscissa
(pwelch) in order domain = (size(array,2)-1)*2; = Nsamp/w_len; = 0:d_ord:Nsamp/2;
case 7 % ENVELOPE SPECTRUM df = 1/T; abscissa = 0:df:fs/2; % "fs_new" for Hilbert-FDF case 8 % USER-AVERAGED ENVELOPE SPECTRUM df = fs/w_len_env; % "fs_new" for Hilbert-FDF abscissa = 0:df:fs/2; % "fs_new" for Hilbert-FDF case 9 % PSD w_len df abscissa
(pwelch) of envelope signal = (size(array,2)-1)*2; = fs/w_len; % "fs_new" for Hilbert-FDF = 0:df:fs/2; % "fs_new" for Hilbert-FDF
case 10 % ENVELOPE ORDER SPECTRUM d_ord = 1/Nrot; abscissa = 0:d_ord:Nsamp/2; % "Nsamp_new" for Hilbert-FDF case 11 % USER-AVERAGED ENVELOPE ORDER SPECTRUM d_ord = 1/Nrot_frag; abscissa = 0:d_ord:Nsamp/2; % "Nsamp_new" for Hilbert-FDF case 12 % PSD (pwelch) of envelope signal in order domain w_len = (size(array,2)-1)*2; d_ord = Nsamp/w_len; % "Nsamp_new" for Hilbert-FDF abscissa = 0:d_ord:Nsamp/2; % "Nsamp_new" for Hilbert-FDF end
9.5 Three-Dimensional Visualization
9.5.3.7
Step_5_Select_Display_Options
% Script name: STEP_5_SELECT_DISPLAY_OPTIONS % Script prompts USER for display options. reply = input('Spectrum type - [1]regular, [2]power: '); if reply == 1 display.type = 'regular'; elseif reply == 2 display.type = 'power'; end reply = input('Amplitude scale - [1]lin, [2]log: '); if reply == 1 display.scale = 'lin'; elseif reply == 2 display.scale = 'log'; end reply = input('Physical value - [1]Acc, [2]Vel: '); if reply == 1 display.ph_value = 'Acc'; elseif reply == 2 display.ph_value = 'Vel'; end reply = input('Select spectral range - [1]all, [2]zoom: '); if reply == 1 display.s_range = 'all'; elseif reply == 2 display.s_range = 'zoom'; if intersect(s_type,[1 2 3 7 8 9]) userMIN = input('Select start [Hz]: '); userMAX = input('Select stop [Hz]: '); else userMIN = input('Select start [ord]: '); userMAX = input('Select stop [ord]: '); end end
435
436
9 Analysis of Long-Term Fault Development
9.5.3.8
Step_6_Plot
% Script name: STEP_6_PLOT % Script plots a 3-D visualization of the processed set of files. % The script uses "meshgrid" and "waterfall" functions. % 1) COPY FOR RE-PLOTTING z_values = array; % copy of the array is necessary for re-plotting % 2) OVERALL AMPLITUDE SCALING if strcmpi(display.type,'power') z_values = z_values.^2; end if strcmpi(display.scale,'log') z_values(:,1) = NaN; % DC is removed, so it would go to -Inf z_values = 20*log10(z_values); end % 3) HANDLING "VELOCITY" SELECTION if strcmpi(display.ph_value,'Vel') % Velocity signal is calculated by so-called "omega arithmetics", by % multiplying individual spectral amplitudes by a factor: 1/(2*pi*f). % For frequencies close to zero, this factor is very high, so % the resultant velocity signal is meaningless. For this practical % reason, the bandwidth starts ABOVE 2 Hz (or its counterpart in the % order domain). For certain cases, this number could be, of course, % changed. for i = 1:size(z_values,1) scaling_factor = 9.81*1000; % scale [g] to [mm/s] z_values(i,:) = z_values(i,:)./(2*pi*abscissa)*scaling_factor; end % For each spectrum type, find abscissa indexes '; % from oldest to youngest data System.DateTime(1900,1,1); % practically all data int32(T); % signal min. is T [s] int32(T*fs); % signal max. No. of samples: T*fs
------------------------------------------------------------------------------------------------- DATA PROCESSING ------------------------------------------------------------------------------------------------------NOTE: instead of creating a copy of a large data set in a .mat format, the signals are loaded directly from the CMS replicated data one-by-one..
i = 1; % STEP_3_CONSTRUCT_ARRAY_AVM4000;% STEP_4_GENERATE_ABSCISSA; % No_signals = size(array,1); %
counter of signals for AVM4000 data source modified version of STEP_3_CONSTRUCT_ARRAY see Section 9.5.3.6 unknown a priori for DIRECT ACCESS
% ------------------------------------------------------------------------% ---------------- VISUALIZATION OF RESULTS GOES HERE --------------------% ------------------------------------------------------------------------while 1 STEP_5_SELECT_DISPLAY_OPTIONS; % see Section 9.5.3.7 STEP_6_PLOT; % see Section 9.5.3.8 reply = input('Do you want to quit? [y]yes: ','s'); if strcmpi(reply,'y') break; end end % ------------------------------------------------------------------------% -------------------------------- END -----------------------------------% -------------------------------------------------------------------------
Step 7 Clearly, comparing with Sect. 9.5.3, the STEP_1_SELECT_DATA_FOLDER.m is omitted, and the only script that requires modification is the STEP_3_CONSTRUCT_ARRAY.m, which is adapted to STEP_3_CONSTRUCT_ARRAY_AVM4000.m. The modification containing selected spectral type, namely the USER-averaged frequency spectrum is given below. Remaining updates are done analogously, and are omitted for text conciseness. Major code changes are additionally described.
12.3
GUI-Based Spectral Analysis of Large Data Sets
515
% Script name: STEP_3_CONSTRUCT_ARRAY % Script generates a variable "array", which is an array of spectral % amplitudes of consecutive signals loaded from selected data source global CLIENT % AVM4000 data client global ARRAY % for optional saving disp('Generating spectrum array...'); switch s_type case 1 % SPECTRUM % analogously case 2 % USER-AVERAGED SPECTRUM % LEVEL 1: calculate window length (EVEN No. of samples) T_frag = 1/resolution; % NOTE: nominal resolution might be % slightly changed to meet an integer % number of points in a window (w_len) w_len = round(T_frag*fs); if mod(w_len,2) w_len = w_len-1; end % LEVEL 2: calculate window coefficients (optional) if strcmpi(win,'hann') w = hann(w_len); w_coef = 1.4; % window compensation coefficient end % LEVEL 3: calculate number of fragments (take into account % overlap) N = fs*T; N_overlap = floor(w_len * overlap/100); No_frag = floor((N-N_overlap)/(w_len-N_overlap));
%
% LEVEL 4: allocate memory array = zeros(No_signals,w_len/2+1); UNUSED FOR DIRECT ACCESS % STEP 5: construct outer loop while 1
% change for loop to while loop
obj =CLIENT.GetNextVibroSamples(chID,dir,dtbegin,minL,maxSamp); if isobject(obj) disp(['Processing signal No.: ',num2str(i)]); data = double(obj.Y); % signal values inner_array = zeros(No_frag,w_len/2+1); % allocate memory % LEVEL 6: construct inner loop for j = 1:No_frag % LEVEL 7: extract current fragment from signal index_from = (w_len - N_overlap)*(j-1) + 1; index_till = index_from + w_len - 1;
516
12 - mean(x);
Prototype Tools
% remove DC component
% LEVEL 8: calculate individual spectra and store in % array if strcmpi(win,'hann') % windowing (optional) end % spectral amplitudes % scaling if strcmpi(win,'hann') % approximated window compensation end % full-resolution spectra end % LEVEL 9: for each signal calculate average spectrum % current row of final % array % Update the current time. NOTE: the function % GetNextVibroSamples returns 1st signal AFTER this % time % store 'str',num2str(i)); % visual purposes % % % %
update the signal counter update when additional signal time constraint is applied
else break;
% exit the wile loop when % there are no more signals
end end case 3 % PSD (pwelch) % analogously case 4 % ORDER SPECTRUM % analogously case 5 % USER-AVERAGED ORDER SPECTRUM % analogously case 6 % PSD (pwelch) in order domain % analogously case 7 % ENVELOPE SPECTRUM % analogously case 8 % USER-AVERAGED ENVELOPE SPECTRUM % analogously case 9 % PSD (pwelch) of envelope signal % analogously case 10 % ENVELOPE ORDER SPECTRUM % analogously case 11 % USER-AVERAGED ENVELOPE ORDER SPECTRUM % analogously
12.3
GUI-Based Spectral Analysis of Large Data Sets
517
case 12 % PSD (pwelch) of envelope signal in order domain % analogously end ARRAY = array;
% extra redundant copy for optional saving, same as "array"
Step 8 Program the pushbutton_save user pushbutton using following code: global ARRAY save('array.mat',ARRAY);
% name to be changed manually
Step 9 Run the application (pushbutton_run UI control). Some results of the implementation of the above code for analysis of real data are given next.
12.3.2 Shaft Imbalance Example This example uses exactly the same real, test-rig data as in Sect. 12.2.2, where some advanced scalar health indicators are tested, and uses the code given in the previous Section to illustrate a cascade (3-D plot) of USER-averaged spectra. The plot is illustrated in Fig. 12.6. Signal processing USER settings: • • • • •
Data Source: CMS direct data source Select spectrum type: 2 Select window—[1]rectangular(none), [2]hann: 1 Select nominal resolution [Hz]: 2 Select overlap [%]: 0
Post-processing USER settings: • • • • • •
Spectrum type—[1]regular, [2]power: 1 Amplitude scale—[1]lin, [2]log: 1 Physical value—[1]Acc, [2]Vel: 1 Select spectral range—[1]all, [2]zoom: 2 Select start [Hz]: 0 Select stop [Hz]: 700
Figure 12.6 illustrates a set of USER-averaged vibration data representing a relatively long-term development of Shaft Imbalance, precisely Slow Shaft Imbalance. Referring to Sect. 7.2.2, the Slow Shaft nominal frequency is 50 Hz * 23/67 = 17.2 Hz. The plot clearly shows a rise of this component. Also note
12
Fig. 12.6 Shaft imbalance identification with direct data access (DDA) using MATLAB® GUI
518 Prototype Tools
12.3
GUI-Based Spectral Analysis of Large Data Sets
519
ubiquitous random variations of structural component along with fault development, which shows the source of variation of wideband estimators for this data (i.e. PP, RMS, and VRMS).
12.3.3 Pump Cavitation Like in the previous Section, the task is to generate a 3-D plot of multiple spectra from a relatively large data set in order to tell if there are any general changes in spectral distribution. Figure 12.7 illustrates a typical plot of a commercial data, which illustrates occasional pump cavitation. Figure 12.7 illustrates a result of processing of over half thousand of 10-s vibration signals collected with a standard industrial accelerometer (10 Hz–10 kHz frequency range) sampled with 25 kHz sampling rate. For extra visualization purpose, use: Open Property Inspector and change the ColorScale parameter to “log” (alternatively type: set(gca, 'ColorScale', 'log') after the figure is generated). The code generating Fig. 12.7 is taken from Sect. 12.3.1, and is used with following parameters: Signal processing USER settings: • • • •
Select Select Select Select
spectrum type: 2 window—[1]rectangular(none), [2]hann: 1 nominal resolution [Hz]: 25 overlap [%]: 0
Post-processing USER settings: • • • •
Spectrum type—[1]regular, [2]power: 2 Amplitude scale—[1]lin, [2]log: 1 Physical value—[1]Acc, [2]Vel: 1 Select spectral range—[1]all, [2]zoom: 1
Figure 12.7 clearly shows a significant variability of signal power distribution between 8 and 12 kHz, which in this case indicates occasional cavitation, difficult to identify otherwise.
12.4
Other Concepts
12.4.1 CMS Performance Display With its ease of programming, MATLAB® enables relatively simple visualization of custom features of the performance of the examined CMS. Such performance
12
Fig. 12.7 An example of a 3-D USER-Averaged (acceleration) Spectrum (AS) generated using direct CMS data access
520 Prototype Tools
12.4
Other Concepts
521
might refer either to statistical system analysis, data time range and data density summary, data quality assessment, machine operational state summary, system availability summary, and others. Such analysis is generally possible to be done on an offline data collection, and requires access to complete system data. For instance, one might inherit a relatively large, say 100 GB data set covering multiple channels with corresponding large raw data sets. Naturally, it would be difficult to access the distribution of raw data, namely its density on individual channels, their length, and some statistical parameters of interest. Such System performance display could be helpful to get some idea about the data at-a-glance.
12.4.2 Threshold Configuration A typical stationary condition monitoring systems (CMS) has at least a few vibration channels. For each channel, many types of health indicators are defined. Referring to Sect. 5.4.1, these could be broadband time-domain indicators, narrowband frequency or order-domain indicators based on drive-train characteristics, TSA-based indicators, and other. As a result, the total number of HIs in a distributed CMS quickly exceeds hundreds, which generate corresponding hundreds of trend time-series over time. For a proper operation of the system, each trend has defined a set of threshold values (typically Warning level and Alarm level). Clearly, complete configuration of threshold requires processing of each trend individually. Moreover, this action should be verified periodically. According to the concept of this book, it is possible to design a MATLAB® application which reads data directly from the CMS source, and calculates threshold levels. To achieve this goal, the application has to read the configuration of thresholds, as well. As a result, DDA enables realization of CMS configuration update idea shown in Sect. 11.3. In such scenario, it is recommended to limit the scope of such program to be able to modify only values of configuration, without the possibility of modification of the threshold structure.
12.5
Summary of Prototype Tools
Examples presented in this Chapter show how to process a relatively large data set (ca. 1.5 GB of raw, binary data) and how to preset a selected 3-D spectrum of all of this data. First example illustrates how to test new health indicators. Second example shows that plotting averaged spectral characteristic with suitable resolution enables at-a-glance novelty detection, followed by fault identification and severity assessment, which are of upmost importance for machine maintenance scheduling. In both cases, conversion of data to MATLAB® format was unnecessary, which proves that MATLAB® with direct data access offers attractive support for commercial condition monitoring systems.
Index
A Acceleration, 2, 3, 18, 32, 33, 49, 50, 98, 102, 107, 108, 130, 132, 135–137, 139, 140, 142–144, 146–151, 166, 184, 195, 199, 201, 203–205, 209, 223–225, 235, 375, 382–388, 390, 393, 394, 396–398, 400–404, 406, 407, 520 Amplitude, 2, 3, 6, 31–34, 44–46, 49, 50, 52–54, 64, 67, 76, 77, 79, 81, 83, 85, 95, 97, 99, 101, 103, 105, 108–111, 114–116, 118, 122–125, 127–131, 133–137, 139–142, 145, 146, 149, 151, 153, 157, 158, 160, 162, 165, 167, 173, 182, 197, 200, 201, 206, 209–217, 221, 223, 224, 227, 229–233, 239, 240, 243–246, 248, 250–252, 254–258, 260, 261, 263, 265, 267–269, 271–284, 287, 289–295, 297–308, 310, 311, 313, 319–321, 323–332, 334–342, 345, 346, 351, 353, 355, 356, 358–360, 363–366, 370, 371, 381, 383, 384, 386–389, 391, 393, 395, 397–402, 405–409, 420, 421, 423, 425, 426, 428, 430, 431, 435, 436, 438, 449, 450, 475, 476, 515–517, 519 Angle, 34, 46, 91, 97, 99, 120–122, 126, 127, 129, 151–154, 157, 159, 160, 163, 169, 183, 187, 192, 195, 204, 212, 224, 226, 228, 237, 238, 257, 277, 293, 342, 382 Angle-domain, 121, 126, 127, 129, 152, 154, 160, 169, 226, 228, 237, 238, 382 Averaged Envelope Order Spectrum (AEOS), 233, 409, 412, 413, 415, 418, 430, 434, 437, 516
Averaged Envelope Spectrum (AES), 233, 403, 412–414, 418, 427, 434, 437, 516 Averaged Order Spectrum (AOS), 19, 162, 164, 233, 403, 412–414, 423, 434, 436, 516 Averaged Spectrum (AS), 231–233, 235, 237, 403, 408, 410, 412, 413, 417, 420, 434, 436, 449, 502, 515, 520 Average speed, 38, 121, 190, 218, 401, 494 B Band pass filtering, 83, 85, 86, 119 Band stop filtering, 81, 83 Bandwidth, 21, 120, 122, 209, 213, 215–221, 387, 408, 414–416, 436 C Cavitation, 130, 501, 519 Characteristic frequency, 8, 31, 35–44, 110, 123, 126, 128, 314, 315 Characteristic order, 36–38, 41–43, 123, 129, 314 Classification, 8, 11, 17, 18, 20, 21, 24, 28, 32, 111, 195–197, 203, 204, 222–226, 413, 494, 497 Colormap, 233, 237 Compensation, 49, 51, 53, 55, 232, 420–425, 515, 516 Compilation, 496 Crest factor, 16 Cutoff frequency, 63, 64, 66–69, 72, 73, 79, 81, 86–88, 90, 107–109, 111, 116, 118, 119, 121, 122, 124, 131, 137, 138,
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2021 A. Jablonski, Condition Monitoring Algorithms in MATLAB®, Springer Tracts in Mechanical Engineering, https://doi.org/10.1007/978-3-030-62749-2
523
524 140–142, 144, 201, 202, 212, 290, 291, 379, 381, 387, 393, 395, 399, 414–416 Cycle, see Period D Data acquisition, 1, 6, 24, 49, 221, 321, 353, 356, 497 Data exporting, 455, 474 Data importing, 449, 474, 479, 497 Demodulation, 182–186, 191, 193, 395 Detection, see Fault detection Deterministic signal, 33, 58, 287 Diagnostic indicator, see Health Indicator Diagnostic system, 18, 19, 195, 197, 209, 222, 224 Direct data access , 483, 485, 487, 502, 503, 509, 518, 521 Displacement, 31, 49, 51, 102, 108, 130, 144–151, 205 E Energy, 15, 200, 205, 206, 213–216, 220, 375, 391 Envelope, 19, 33, 34, 44–46, 49, 110–114, 117–129, 203–206, 209, 223, 224, 226, 228, 231, 233, 235, 248, 252, 254, 256, 272, 274, 287, 290–292, 298, 299, 302, 303, 305, 308, 339–342, 375, 378, 379, 381–388, 390, 391, 395, 396, 399, 401–403, 407, 409, 411–416, 418, 419, 426–432, 434, 436, 437, 516, 517 Envelope Order Spectrum (EOS), 19, 34, 120, 121, 126, 127, 129, 224, 231, 233, 385, 388, 395, 396, 401, 403, 407, 409, 412, 413, 415, 418, 419, 428, 430, 434, 437, 516 Envelope Spectrum (ES), 33, 44, 46, 110, 114, 117, 118, 123–129, 223, 231, 233, 290–292 Event, 18, 21, 22, 207, 374, 499 F Failure mode, 13, 19, 42, 43, 209, 345, 346, 348, 350, 351, 353, 355–358, 368, 369, 371, 374–380, 410 Fast Kurtogram, 224, 234, 487 See also Kurtogram Fault detection, 4, 12–15, 17–19, 110, 198, 199, 206, 207, 227, 375, 391, 393–395, 397, 398, 403, 406, 407, 409, 410 Fault Development Function (FDF), 321, 347–350, 355, 358, 386, 396 Fault identification (failure mode), 13
Index Fault identification (mechanical element), 13, 440 Fault severity assessment, 4, 12, 15, 18 Filter, 4, 28, 33, 59–77, 79, 81, 83, 85–90, 103, 107–110, 113, 114, 116, 118, 119, 121, 122, 131, 135, 137, 139–141, 143, 146, 148, 186, 187, 190, 200, 201, 209, 212, 234, 290, 291, 338, 366, 379, 381, 387, 389, 395, 399, 414–416, 440 Force, 1–4, 79, 81, 83, 85–87, 93–95, 99, 103, 127, 157, 220, 306, 320, 334, 366, 368, 475 Frequency, 165, 167, 168, 170, 180, 182–188, 190, 192, 193, 195, 201–207, 209–215, 217–222, 224, 226–231, 233–235, 237–240, 243–245, 247–252, 254–311, 313, 315, 317–319, 321–326, 328–330, 332–335, 337–342, 346, 353, 356, 358, 360, 365, 366, 370, 374, 375, 379, 381–384, 387–389, 392, 393, 395, 396, 399, 401, 402, 406–411, 413–416, 418, 426–428, 433, 438, 449, 450, 459, 460, 470, 474, 475, 488, 494, 497, 504, 507, 508, 514, 517, 519, 521 Frequency domain, 1, 4, 35, 36, 53, 54, 60, 63, 76–87, 91, 92, 97, 99, 102, 121, 122, 124, 125, 129–131, 133, 134, 138–141, 154, 185–187, 195, 201–205, 210–214, 221, 231, 237, 277, 286, 296, 298, 334, 341, 382–384, 387, 409, 413, 426 Frequency Domain Filtering (FDF), 63, 76, 121, 131, 138, 140, 426 Frequency Response Function (FRF), 1–4, 32, 91, 243, 275–278, 313, 319, 330 G Gearbox, 3, 4, 13, 31, 33–35, 37–46, 49, 94, 98, 99, 110, 111, 151, 157, 159–161, 163, 165, 218, 243, 246, 284, 311, 313–315, 318, 324, 327, 330–332, 339, 345, 346, 348–350, 359–361, 363–365, 367, 369, 373, 375–378, 382–388, 390, 393, 394, 396, 400, 406, 407, 409, 439, 499 Gearbox (epicyclic), 42 Gearbox (parallel), 39–41, 98, 314 Generalized Angular Deterministic (GAD) signal, 278 H Harmonic, 15, 19, 31, 38, 40–42, 44–46, 111, 113–116, 119, 123, 165, 204–206, 215, 217, 218, 221, 227, 228, 230, 244, 291,
Index 313, 314, 318, 323, 324, 327–331, 339, 342, 343, 348, 359, 360, 362–364, 375, 395, 406, 408 Harmonic of Harmonic (HOH), 45 Health Indicator (HI), 16, 21, 195, 197–200, 203–206, 208–210, 214–216, 224, 443, 501–503, 505, 508, 517, 521 Health indicator (broadband), 209 Health indicator (narrowband), 203–205, 209, 212, 215–218, 220, 224 Health indicator (wideband), 199, 200, 203, 207, 210 High pass filtering, 79, 81, 113 Hilbert transform, 111, 119, 121, 122, 426 I Identification, see Fault identification Imbalance, 13, 38, 39, 147, 148, 213, 215, 313, 314, 317–319, 345, 346, 348–350, 352, 369, 373, 375–378, 382–390, 392–394, 396, 399, 404, 405, 407, 409, 501, 508, 509, 517 Instantaneous Circular Pitch Cyclic Map (ICPCM), 7, 224, 193, 197, 224, 487 Instantaneous speed, 33, 38, 55, 99–101, 166–168, 170, 172–176, 178–180, 183, 185–191, 193, 243, 276, 277, 306, 308, 313, 322, 323, 334, 339, 356, 366 Instantaneous speed estimation, 188, 189 Instantaneous speed extraction, 178 Instantaneous speed reconstruction, 178, 179, 185 Integration, 4, 7, 24, 49–51, 102–109, 130–132, 139, 142–144, 205, 207, 234, 235, 259, 441, 443, 444, 486 Interpolation, 92, 93, 95, 152, 154, 170–172, 175, 176, 179, 283, 320, 444 ISO (vibration norm), 138 J Jitter, 6, 243, 244, 309–312, 333, 362, 365, 372 K Kurtogram, 7, 112, 193, 224, 234, 487 See also Fast Kurtogram Kurtosis, 197, 205, 206, 209, 375, 378, 381 L Local Meshing Plane, 193, 224 Low pass filtering, 77, 79, 113, 114
525 M Maintenance, 4, 11, 12, 16, 18, 23, 29, 198, 485, 501, 504, 505, 521 Metadata, 197, 222, 359, 449–452, 480, 491, 499 Misalignment, 13, 38, 378 Mode, see Failure mode Modulation (amplitude) AM, 45, 46, 110, 111, 123, 128, 206, 228, 243, 245–247, 249–251, 253, 255–259, 271, 275, 276, 278–280, 298, 282, 298, 300, 304, 306, 311, 313, 323, 328, 333, 336, 339, 355, 395 Modulation Frequency (FM), 46, 95, 110, 136, 180, 206, 243, 257–259, 261, 266, 268, 270–272, 273, 278–280, 282, 284, 285, 300, 309, 304, 311, 313, 319, 323 Modulation Intensity Distribution (MID), 7, 193, 197, 224, 487 Modulation Phase (PM), 44, 46, 91–94, 101, 110, 120, 152, 154, 166–169, 171, 172, 191, 339, 361, 391, 470, 474–476 Modulation (shaft), 308, 395 Monitoring system, 1, 4, 5, 8, 11, 12, 18, 19, 51, 195, 197, 203, 222, 356, 441, 443, 449, 482, 485, 494, 501 Multi fault, 397, 398, 409, 410 N Narrowbandhealth indicator, 205 Noise (narrowband), 33, 111, 287, 289, 323 Noise (random), 33, 76, 106, 244, 313, 337–339, 345, 356, 361, 372 Noise (structural), 110, 313, 321, 323, 324, 326, 339, 345, 355, 356, 371 Non-stationary signal, 21, 34, 233 Numerical precision, 467–470, 474, 477 O Omega arithmetics, 130, 132, 142, 143, 201, 202, 235 Operational signal, 446 Optimum band selection, 64 Order analysis, 13, 35, 55, 168 Overlap, 16, 17, 233, 235, 237, 407, 409, 517, 519 P Parseval’s Theorem, 213
526 Period, 4, 25, 28, 32, 33, 35, 46, 151–153, 170, 208, 224, 230, 239, 249, 257–259, 265, 284, 378 Periodogram, 163, 233, 449 Phase, 3, 6, 32–34, 36, 44, 46, 49, 51, 56, 74, 91–93, 103, 110, 120, 134, 144, 147, 151, 154, 159, 166, 168, 172, 182–187, 191, 193, 204, 244, 284, 313, 324, 327, 334, 339, 345, 361, 372, 373, 391, 469, 474, 475, 477, 488, 494, 495 Phase Marker (PM), 34, 36, 49, 56, 91–93, 120, 151, 154, 159, 166, 168, 172, 191, 204, 339, 373, 391, 469, 474, 475, 477, 494 Phase unwrapping, 183 Power, 7, 13, 15, 19–21, 24, 28, 33, 36, 51, 53, 55–57, 64, 91, 153, 199, 200, 206, 209, 213, 215, 216, 230, 231, 233, 234, 239, 356, 375, 382, 395, 405, 502, 505, 519 Prognostics, 4, 12, 16, 18, 197 Protection system, 18, 19, 195, 197, 199, 203, 207, 208 Protrugram, 7, 193, 224, 487 Pwelch, 163, 231, 237, 392, 393, 395, 403, 412, 517 R Random signal, 206, 385 Relative Resampling Order (RRO), 98 Referential shaft, 37, 38, 91, 94, 154, 166–168, 179, 184, 185, 188, 218, 313, 314, 322, 323, 328, 329, 355 Resampling, 3, 36, 46, 49, 56, 90–92, 94, 97, 98, 121, 131, 132, 139, 152, 154, 155, 160, 161, 168, 170, 188, 191, 205, 231, 237, 396 Reference level, 27 Residual signal, 205, 209, 224 Response, 1, 2, 4, 31, 33, 43, 67, 74, 110, 121, 213, 231, 239, 273, 275, 313 Rolling Element Bearing (REB), 7, 13, 15, 31, 35, 38, 40, 43–46, 107, 110, 111, 113, 123, 126, 128, 130, 151, 155, 203, 204, 213, 231, 243, 244, 283, 284, 287, 304, 306, 308, 309, 313, 314, 317, 319, 320, 323, 324, 328, 333, 334, 335, 337, 339, 345, 346, 354, 369, 372, 373, 375, 376, 378, 382–386, 395, 396, 407–409 Root Cause Analysis (RCA), 4, 13, 16 Root Mean Square (RMS), 13, 21, 27, 33, 51, 55, 58, 132, 199–203, 205, 208, 209, 213, 216, 375, 378, 384, 449, 470, 519
Index S Scaling (spectral), 237 Scaling (units), 37, 49–51, 69, 94, 130, 132, 144, 237, 245, 278, 279, 318, 328, 330, 332, 337, 338, 393, 475, 477, 478 Second Order Section (SOS) filter, 62, 63, 69, 72, 89 Severeity assessment see Fault severity assessment) Sideband, 15, 19, 40–42, 45, 46, 101, 110, 111, 115, 117, 126, 128, 205, 206, 230, 244, 268, 313, 314, 323, 324, 330, 339, 346, 378, 383, 384, 393–395, 406, 408 Simulator, 442–445, 447, 452, 477, 502 Single section filter, 72 Shaft, 3, 13, 15, 31, 33, 35–40, 42, 43, 45, 46, 49, 56, 91, 93, 94, 98–101, 113–116, 123, 130, 152, 154–156, 158, 159, 161–163, 165–168, 173, 174, 179, 184, 185, 188, 204, 205, 213, 215, 217, 218, 220, 221, 243, 244, 246, 272, 273, 294, 304–306, 308, 311, 313–315, 317–324, 327, 328, 330, 336, 339, 345, 346, 351, 355, 361, 369, 373, 378, 385, 392, 393, 395, 396, 404, 406, 408, 409, 501, 508, 509, 517, 518 Sinusoidal component, 44, 76, 95, 103, 134, 136, 142, 144, 145, 183, 210, 211, 214, 243–245, 255, 278, 334, 375 Spectral Coherence Density, 7, 224 Spectral range, 37, 78, 80, 82, 84, 121, 217, 221, 224, 235, 237 Spectral resolution, 13, 38, 46, 58, 92, 120, 130, 131, 133, 161, 163, 217, 218, 231, 235, 237, 238, 320 Spectrogram, 7, 19, 34, 188, 190, 197, 224, 233–240, 249, 262, 264, 265, 339, 342, 343 Spectrum (S), 164, 228 Stationary signal, 118 Statistical data analysis, 375, 379, 440 T Threshold, 13, 14, 16, 21, 23, 25, 27–29, 34, 197, 207, 374, 497, 498, 521 Time-domain, 44, 51, 60, 63, 91, 92, 113, 121, 123, 129, 131, 140, 141, 152, 154, 169, 187, 200–202, 205, 210, 211, 215, 226, 227, 237, 238, 286, 294, 296, 334, 375, 382, 504, 521 Time Synchronous Averaging (TSA), 19, 49, 91, 151–154, 159, 162–164, 168, 205, 209
Index Transfer function, 59, 60, 62 Trend, 7, 8, 18, 19, 21, 195, 197, 203, 206–209, 213, 222, 227, 239, 240, 375, 383–386, 449, 450, 474, 478, 491, 494, 497, 499, 521 Trend analysis, 197, 375 Trimming, 55–58, 152 V Velocity, 13, 27, 49–51, 102, 108, 130–138, 140–142, 144–150, 199–201, 205, 209, 215, 223, 224, 226, 235, 237, 257, 272,
527 273, 375, 382, 383, 392, 393, 403, 405, 406 Velocity root mean square (Vrms), 13 Vibstand, 98, 137, 147, 155, 314, 508 W Window, 7, 51–53, 66, 70, 73, 88, 89, 237, 243, 249, 250, 265, 273, 334, 408, 410, 453, 454, 474, 489, 511 Y yyaxis, 209