IIoT Machine Health Monitoring Models for Education and Training

IoT, IIoT and Industry 4.0 technologies are leading the way for digital transformation in manufacturing, healthcare, transportation, energy, retail, cities, supply chain, agriculture, buildings, and other sectors. Machine health monitoring and predictive maintenance of rotating machines is an innovative IIoT use case in the manufacturing and energy sectors. This chapter covers how machine health monitoring can be implemented using advanced sensor technology as a basis for predictive maintenance in rotating devices. It also covers how sensor data can be collected from the devices at the edge, preprocessed in a microcontroller/edge node, and sent to the cloud or local server for advanced data intelligence. In addition, this chapter describes the design and operation of three innovative models for education and training supporting the accelerated adoption of these technologies in industry sectors.


Introduction
To improve safety and performance, manufacturing companies have been considering the adoption of advanced technologies, as stipulated in Industry 4.0 reports. These technologies include IoT/IIoT, big data and analytics, smart factory, cyber-physical systems (CPS), and interoperability of automation equipment. Over the last few years Artificial Intelligence (AI) has comeback with a vengeance not seen before in any of modern technology implementations. AI and IoT/IIoT are driving forces in Industry 4.0 with applications in manufacturing, oil and gas, utilities, banking, aerospace and defense, healthcare, retail, telecommunications, smart cities, and transportation. Artificial intelligence's impact on manufacturing can be organized into the following main areas: product quality and yield, predictive maintenance, collaborative robots, generative design, supply chain management and safer work environment.
While there are a lot of papers written about predictive maintenance and AI applications [1][2][3][4][5][6][7], but there is a lack of machine health predictive maintenance teaching and training models for university level courses as well as facilities for providing hand-on interactive experiences in the use of IoT/IIoT and Industry 4.0 platforms. To address this need SEPT created a learning factory and a framework for learning these technologies as well as designed and developed machine health monitoring models.
To reinforce hands-on learning two key aspects of machine health monitoring are presented in this chapter: foundational technologies such as sensors for predictive maintenance, IoT and IIoT ecosystem, and CPS monitoring tools; the second aspect covers in detail the design, development, and implementation of machine health learning models along with implementation of AI tools for real-time data generation, preprocessing it and sending to the cloud or local server for data analytics and visualization. These models provide an opportunity for developing and learning multidisciplinary and multi-capability skills in a laboratory setting.

SEPT learning factory
The engineering education is witnessing revolutionary changes in response to the huge demand for engineers with high industry 4.0 competencies. Engineering graduates will need to learn IoT and IIoT as the foundation for implementing Industry 4.0 concepts in industrial operations. The school of Engineering Practice and Technology (SEPT) at McMaster University has recently made huge effort to integrate IoT, IIoT and Industry 4.0 in the undergraduate and graduate curriculum [8].
In the undergraduate Automation Engineering Bachelor of Technology offered by SEPT, a new smart systems specialization is introduced in the fourth year, where the offered courses focus on IoT. The other option is the Industrial Automation specialization. A new introductory IoT course (SMRTTECH 3CC3) was developed and offered for the first time at the 3A level in the fall of 2019. The purpose of this course is to introduce the students to the fascinating world of IoT before choosing their specialization for the fourth year and before going to their mandatory co-op training [9].
Another effort by SEPT is the formation of a Cyber-Physical Systems Learning Centre that focuses on implementing Industry 4.0 concepts for teaching, training, and research at McMaster University [10,11]. The Centre includes a series of specialized learning labs and the SEPT Learning Factory that allow the development of various theoretical and technical skills needed for product production. The Learning Centre complements students' qualifications and abilities by providing new technical skills that emphasize the inherent multidisciplinary nature of smart systems and advanced manufacturing.

Machine health monitoring
Machine health monitoring is a key opportunity to improving and maintaining profit. In manufacturing industries, it is expected that when a machine is started it should perform as designed and used for an application and run for hours, months and years without any breakdown interruptions. Vibration monitoring along with power and sound monitoring are a significant source of machine health information. By adopting the use of new technologies such as IIoT can lead to improved manufacturing productivity with more reliability and even reduce skill requirement needs. However, developing and implementing these applications does require a new breed of engineering technology graduates. IIoT offers an opportunity for ubiquitous detection of machinery faults that can lead to prescriptive maintenance plans.
During operation mechanical faults in machines produce unique vibrations which depend upon the geometry of the machine elements such as shaft, spindle etc., and shaft rotation speed, in addition to the obvious load factor. There is a huge list of mechanical faults that can be detected with vibration data collection and performing an analysis on it. This list includes imbalance; misalignment; bent shaft; rubbing shaft; bearing defects; loose parts; and belt drive faults etc. For example, recently a pump servicing company has identified a few major causes of vibration [12]. Their report lists six main causes of pump vibration problems and anyone of those could take a pump out of service for unplanned and expensive repairs. A pump's poor performance can be due to one of the following vibration problems: pump cavitation; bent pump shaft; pump flow pulsation; pump impeller imbalance; pump bearing issues; and misalignment of the shaft.

IoT and IIoT implementations
Many organizations use manual and off-line inspection tools for their reliability and maintainability programs while IIoT provides an opportunity to perform these tasks on-line in real-time time. IoT alone is projected to deliver between $1.9 and $4.7 trillion of economic value by 2025. The IIoT for asset monitoring is expected to produce $200-$500 billion in economic value by 2025 [13]. These technologies enable machine health monitoring (or also referred as condition monitoring) and predictive maintenance to optimize maintenance processes and improve operating costs. This type of monitoring is expected to help manufacturers to optimize their operating costs by predicting the failure of critical machines and their components to achieve high efficiency and reliability.
According to one market report the global machine health monitoring market size, driven by on-premises deployment, is estimated to reach USD 3.9 billion by 2025 [14]. On-premises application development give organizations control over their data and systems to protect the critical information. Whereas deployment on a remote cloud has its advantages and disadvantages related to hardware, software, deployment, and maintenance costs. Another factor that needs to be considered carefully is storage capacity at the local and remote server sites. Cloud-based deployments do provide organizations with enhanced accessibility and scalability, 24/7 service speed, and IT security measures that cannot be implemented due to lack of resources at the local site. In part the growth of this market is being driven by the availability of secure cloud platforms. An overall IoT/IIoT ecosystem with elements shown in Figure 1 would be required. This type of ecosystem has been established at the SEPT Learning Factory to demonstrate these technologies [15].
Online machine health monitoring systems can be implemented for critical equipment, such as motors, turbines, blowers, pumps, and compressors, that have an immediate impact on the productivity of plants as well as human and machine safety, and the environment. Current monitoring systems include a sequence of sensors permanently mounted on the critical machines for sensing. The sensors are connected to microcontrollers, single board computers, and/or PLCs, and generated data can be sent to a central server of a plant or to an outside cloud platform such as PubNub, Google, Amazon, and ThingsBoard etc. The sensor data is sent to the plant operators through either a wireless network or a cabled network and displayed on monitors. This can be accomplished in two manners as depicted in Figures 2 and 3. UniS is the UniSphere 1 local platform at SEPT hosting MQTT broker, Figure 4, as well DDS server.

Sensors used for predictive maintenance
Vibration, sound pressure, motor current, magnetic field, temperature, and oil quality are some of the more common sensors used for condition-based monitoring for predictive maintenance tasks. Most systems will only employ some of these sensors based on potential critical faults detectable by the selected sensor. Vibration sensors fall in this category.

Accelerometer sensor
This type of sensor is used for general purpose applications for vibration and shock measurements. They are available as digital or analog devices and designed using different principles such as piezoelectric, piezoresistive and capacitive. These components are used to convert the mechanical motion caused in the device into an electrical signal. Accelerometers are the most used vibration sensors for predictive maintenance of turbines, pumps, motors, and gearboxes. The piezo vibration sensors are considered as the gold standard in this category. An important category for acceleration measurements are the MEMS sensors. MEMS accelerometers and microphones are highly suited to battery-powered predictive maintenance systems due to their small size, low power consumption, and high-performance capabilities [16].

Strain gage sensor
Strain gage is a sensor whose resistance changes with an applied force. From resistance change of the strain gauges a voltage change can be obtained with an electrical conditioning circuit such a voltage divider or Wheatstone bridge. This voltage is measured and is related to the vibration components. The amplitude and frequency of the vibration are changing during a machine's operation. These sensors have the advantage over many other types that they can be used for curved surfaces.

Velocity sensor
Velocity sensors are used to measure a frequency range of 1 -1000 Hz. The sensors are suitable for vibration monitoring and balancing applications on rotating machinery. This type of sensor has a lower sensitivity for vibrations with high frequencies than accelerometers and is therefore less susceptible to overload. These sensors are used for high-temperature applications like above 700°F.

Gyro sensor
The main functions of the gyro sensor for various applications are angular velocity sensing, angle sensing, and control mechanisms. Gyroscope sensors are used in the car navigation systems, electronic stability control systems of vehicles, drones and radio-controlled helicopters and robotic systems. There are different types of gyros for different applications and they are: ring laser; fiber-optic; fluid gyro; and vibration gyros. Most used, vibration gyro sensors, use either piezoelectric or silicon transducer element in their construction. Gyro sensos, when used in conjunction with accelerometers, can keep track of the orientation of the system, thus providing a complete picture of the vibrating system.

Non-contact sensors
Most used non-contact vibration sensors types fall in the following categories: microphone or acoustic pressure sensor; laser displacement sensor; and eddy current or capacitive displacement sensor. Non-contact vibration sensors can be deployed on both new and old machines, even when they are hot, wet, in a hard-toreach places or too small for other sensor types.

Predictive maintenance and AI
Predictive maintenance as evolved over the years now is considered as an important IIoT application that can be implemented fairly-easily. It also connects with Industry 4.0 paradigm, big data and analytics, and machine learning. Over the years it has evolved from reactive, preventive, and reliability-based maintenance operations [17]. Many new online sensors are being introduced each year. IIoT enables machine condition control in the following manner: collection of real-time sensor data, perform data analytics, followed by corrective action either by an operator or autonomously by the machine. In this context data analytics is related to converting data into actionable information and can have implications for predicting future events such as predictive maintenance. Now with the revised promise of AI technology the predictive maintenance can evolve to prescriptive maintenance where a smart machine can help avoid the predicted failure. In essence the following steps are required to implement such program: identifying critical assets, creating a database of relevant information, understanding failure modes, developing models for predicting failure modes, test the predictive model (s), and deploy for real-time operations as outlined above.
Even though there are many new sensors available for monitoring and control, there are many areas where manual steps are still required for maintenance activities due to lack of appropriate effective sensors. Thus the means of data acquisition can be multimodal. It can be obtained from samples collected manually and analyzed in the laboratory, monitored in real time with online sensors, acquired using portable data collectors, or examined by operators and engineers. In addition other tests and inspections at the machine site can help complete the picture and establish greater confidence in what's happening now (or not happening).The IIoT and AI technologies cannot make all other forms of condition monitoring obsolete, but they are powerful enablers. Consider an example in a machine shop with CNC routers, lathes, EDM machine, and metal 3D printers etc. Over a period of their operation the following can change: machine age which can lead to changing vibration, heat, acoustic emissions, displacement, alignment, balance etc.;oil and filter age; temperature and humidity; load conditions; looseness of parts; and operator handling. These changes may require further monitoring and adjusting such things as: oil flow rate and temperature control; grease dosage rate and frequency; viscosity correction; additive replenishment; machine operation; maintenance and inspection requisitions. Because of this complexity it is possible to design and develop different software applications that can address the above challenges by integrating more soft and hard automation processes.
AI Machine Learning involves the following steps: identifying the data set and corresponding sensors; collecting the data; preparing the data set for training, validation and testing; choosing a model and algorithm; perform model training calculations; evaluate the model; tune the model; and deploy the model for prediction.

CNC machine condition monitoring system
As mentioned above a major objective for manufacturing industries is to reduce the cost and improve safety and production. During 1980's to 1990's, the cutting tool was replaced based on wear of the cutting tool. But since then, tool condition monitoring systems have evolved and are used quite extensively to achieve the following objectives: early detection of cutting tool wear; maintaining a machining accuracy by providing a corrective action for tool wear; and prevention of cutting tool from breakage [18]. Using modern high precision sensors for sound, temperature and humidity, vibration, strain/force, power, and other appropriate analog or digital sensors, the user can monitor machining conditions using different software analysis options. Most of these common sensors provide a 0 to AE10 VDC analog signal, and 4 -20 mA current signals. The data collected from these sensors can lead to limit analysis, spindle bearing faults, and frequency analysis etc.
In a recent study the authors used a MEMS installed sensor on a CNC machine with Fanuc controller to measure vibrations for maintenance purposes [19]. First, they carried out three case studies: optimal cutting values with a worn-out tool, cutting values with a new tool that breaks and does not break. After the analysis of case studies, a maintenance method was chosen according to TPM and TQM program guidelines. The analysis of the result lead to a proposed maintenance program. But the authors did not use any of the AI tools available to develop a predictive maintenance program.

Vibration detection application use case
In this case study a lathe is used to cut a stock bar into different size pieces. This lathe has an auto-fed bar feeder delivering 12-foot bar stock to the unattended running machine [20]. A significant number of parts were being scrapped due to irregularities in the bar, causing dimensional and finish errors. These irregularities in the bar could lead to a lot of scrap metal and damage the spindle. A commercial solution was used to install vibration sensor and connected it to the CNC control to monitor certain characteristics of the lathe. When excessive bar feeder vibration levels were detected the software would automatically signal the CNC to reduce spindle RPM until the vibration levels are acceptable to make good parts. If RPM must be reduced too much, and parts cannot be cut, an alarm was generated to inform the operator to stop the machine to remove the bar. In this case this process can be further automated, but it would require local technical resources to implement them.

Wireless monitoring
To monitor vibration measurement remotely the following protocol options are available: WirelessHART; ISA100; WiFi; Bluetooth; LoRa; and Proprietary. The following factors needs to be considered in selecting the appropriate protocol: built-in security; reliability; bandwidth; power consumption; supported configurations; interoperability between vendor products; and network maintenance. Another critical factor that needs to be considered is where do you perform the calculations related to the data analytics option for the wireless monitoring system and what information is going to be transmitted wirelessly. That is where and how would you view and store the raw sensor data, see the real-time trend and historical data, and send the alarms to mobile devices and remote computers. How and where would alarm be calculated.
WirelessHART (IEC 62591) is a field proven technology with very wide installed base as it was built on HART protocol. It has been an international standard (IEC 62591-1) since March 2010. This protocol offers the following advantages: it has small defined packet structure for reduced bandwidth and interoperability; built in security; uses mesh networking to ensure reliability; and can be expanded easily. A wide variety of device types are available from many automation equipment suppliers. SEPT Learning Factory provides the following two options for student projects: vibration transmitter (Emerson) as depicted in Figure 5; and a portable machine health analyzer (Emerson). The transmitter monitors/transmits WirlessHART vibration and temperature in hard-to-reach locations. It provides complete vibration information including overall levels, energy bands, high resolution spectra, and wave forms. It provides information for bearing and gear diagnostics. The PC hosts the specialized software provided by Emerson. The WirelessHART access point easily integrates into any host via Modbus TCP with capabilities for detailed diagnostics via a commercial software suite or custom-built Software. The wired option with dashboard shown in Figure 6, and user interface software components, Figure 7, required to build the dashboard for the Haas CNC vibration and other parameters monitoring has been implemented as well.
On the other hand, the portable machinery health analyzer (Emerson) is used by the students working in the Learning Factory for vibration data collection and field analysis. This system can provide route vibration collection; advanced vibration analysis; cross-channel analysis; transient analysis; dynamic balancing; motor monitoring; and ODS modal analysis. It wirelessly uploads route data and corrective maintenance jobs from the field to AMS Machinery Health Manager (Emerson) for analysis and reporting. AMS Machinery Manager integrates data from multiple technologies, including vibration, oil analysis, thermography, and balancing into a single database to deliver the predictive intelligence necessary for increasing availability and reliability in the plant.
Another industrial IoT wireless machine health monitoring system with the following sensors: vibration sensor, thermocouple, AC split core current sensor, and ambient air temperature sensor is also available to the students for experimentation [21]. This low-cost device samples vibration, RMS current and temperature data and sends after a user-defined time interval over the wireless network. The vibration sensor samples 3-axis vibration data for 500 ms and then calculates RMS, Maximum, and Minimum vibration readings then combines these data with temperature values in a data packet and transmits the result to modems and gateways within wireless range. After each transmission it goes back to sleep, thus minimizing power consumption. This system uses DigiMesh® protocol, from Digi.com for wireless transmission of data, which automatically hops data from gateway to gateway until it arrives at the desired destination. The data on the other end is either received by an IoT gateway or an IoT modem, connected to local Learning Factory MQTT broker, and ultimately displayed on the dashboard designed by the students either using Grafana or Node-Red.  It is also important to take note that the overall vibration data is not always a good indicator of machine health due to the following aspects of vibration measurement: fluctuates heavily due to process changes and insensitive to other failure modes such as bearing faults, gear defects, lubrication, and pump cavitation. Since the vibration analysis is based on raw vibration data other values such as RMS, peak value and impacting g's can be obtained as well. There are many approaches in interpreting the information from the raw vibration data. For example, contrary to claims in literature, it has been shown that RMS and peak values are good indicators of the gearbox health if used properly [22]. Another example is the analysis of vibration data from a process pump which showed that the overall vibration indicated good health of the asset while hidden in the raw data was the rising g values that indicated a bearing defect. The impacting analysis g values from the raw data can provide useful information for the following types of faults: bearing faults, gear defects, lubrication, and pump cavitation [23].

ISO vibration standards
20816-1 provides general guidelines;20816-2 covers land-based gas turbines, steam turbines and generators in excess of40 MW, with fluid-film bearings and rated speeds of 1 500 r/min, 1 800 r/min, 3 000 r/min and 3 600 r/min;10816-3 Industrial machines with nominal power above 15 kW and nominal speeds between120 r/min and 15 000 r/min when measured in situ; 7919-3 Mechanical vibration -Evaluation of machine vibration by measurements on rotating shafts-Coupled industrial machines; 20816-4 Gas turbines in excess of 3 MW, with fluidfilm bearings; ISO 20816-5: Machine sets in hydraulic power generating and pumping plants,ISO 10816-6: Reciprocating machines with power ratings above 100 kW,Part 7: Rotodynamic pumps for industrial applications, including measurements on rotating shafts,Part 8: Reciprocating compressors.
ISO 20816-1 provides various evaluation zones: zone A, the vibration of newly commissioned machines normally falls within this zone; zone B, machines with vibration within this zone are normally considered acceptable for unrestricted longterm operation; zone C, machines with vibration within this zone are normally considered unsatisfactory for long-term continuous operation; zone D, vibration values within this zone are normally considered to be of sufficient severity to cause damage to the machine. The Table 1 provides summarizes this information for industrial machine falling with in the ISO 10816-3 standard. ISO 10816-3:2009 is relevant to the common industrial machines and it gives criteria for assessing vibration measurements when made in situ. The criteria specified apply to machine sets having a power above 15 kW and operating speeds between 120 r/min and 15 000 r/min. Two conditions are used to classify the support assembly as shown in Table 1: rigid supports; and flexible supports. An important application of such a table is get a sense of what are the common measurement values used for the selection of sensor measurement range.

Machine health predictive maintenance teaching models
In this section we describe three machine health predictive maintenance teaching and training models developed at SEPT LF. They are: Fan Fault Detection and Diagnosis (FDD); IIoT Vibration Demonstration Station; and Machine Health Monitoring and Prediction Platform.

General overview
The purpose of Fan FDD is to be able to determine faults in a mechanical system, in this case a spinning fan, and diagnose which part of the fan is faulty. It utilizes vibration and current measurements in combination with machine learning. The system uses a small computer called a Raspberry Pi, and a microcontroller (SAMD21G18A). Upon request from the Raspberry Pi, the microcontroller will record the vibration (in FFT) and current data from the fan and return it to the raspberry pi to store. The Raspberry Pi can use the data to train a neural network to make assumptions about the state of the fan.
The system is unique as it can be trained on 3 fault conditions, but it is able to output separate 4th condition which is a combination of two other conditions! The circuit board contains a microcontroller, a SAMD21G18A, I2C for the accelerometer, ADXL345, an op-amp circuit for measuring current, and some display LEDs to give the user some feedback. The microcontroller can communicate with the Raspberry Pi through the Serial Port via USB. The firmware on the microcontroller only responds to commands from the Raspberry Pi serial port.

Python programs
The program that runs on the raspberry pi is written in python. Two main programs were written for Data Collection; and Fault Detection.

Data collection program
The purpose of this program is to collect different datasets to later train the network. The user will run through a series of events displayed on the screen. It will ask the user to turn on the fan, run the fan in normal condition, collect data, run the fan with a weight attached to the impeller (to simulate a broken fan blade), collect data, and finally run the fan with a cover on it (to simulate a blockage) and collect data. Once all of this has run it will automatically create a dataset and train the neural network with the data. The dataset for each fault condition is an FFT (calculated on the microcontroller) + the current measurement. Using the datasets, the data collection will run a program called "trainNN.py" which will output an neural network file type of "nn" which can be later used to determine the fault of the fan.

Fault detection program
The purpose of this program is to use a previously trained neural network that used the data that was collected, and to determine the current state of the fan. The program will continuously run to give the state of the fan as an output on the raspberry pi. Since the training data collected was 3 individual fault conditions (including healthy) those are the states that the network will output. The very interesting part of this system is, even though only three states were trained into the network, it can determine a 4th fault state which is the combination of both imbalanced impeller and a blockage at the same time!

IIoT vibration demonstration station
With this vibration station the main purpose was to communicate the benefits of IIoT also known as "Industrial Internet of Things". At the time of development in 2016 this was a very new concept and so we thought we would showcase how it can be used in practice. Our system had a variety of components, starting with of course the mechanical/electrical but the bigger focus really was on the software front. In terms of software the system could be broken down into 3 major components, a frontend dashboard, a communications service for message passage, a data processing model to predict faults in the system.

Mechanical build
For the mechanical build structure system, the goal was simple. We needed to create a structure to which we could mount the following components: We also needed a method of being able to simulate a "failure event" the way we went about this was by creating an axel to which we could add counter weight to replicate the motion if a bearing had been torn due to overuse. By adding additional weight, we can create the level of counterbalance needed to test the flexibility of our predictive model later. Our result is as follows Figure 8.

Electrical outline
Our electrical system was also very straightforward, we simply needed to be able to provide the various currents required by all the system components. In the end we had the following devices actively connected in our system, in order of communication direction Figure 9.

Software visualization and data flow
Our first objective for our IIoT vibration station was to get the data flowing and network so that we can visualize the raw information coming from the system. Our goal was to get the data front the sensor to a networked user interface that could be accessed anywhere from the world. This means we need a web app, data acquisition tool, and most importantly a messaging system. For our case we used MQTT, a middleware-based messaging system that allows for pub/sub based information transfer. In the end our data flow looked like follow Figures 10 and 11:

Data science
After having accomplished all the other requirements to get data from our system, as well as get that data visualized and networked, our main goal was to create a predictive maintenance model. We used our weighted offset assembly to create 2 main datasets, one where there is no imbalance and second where we add some offset weight and capture the "fault" labeled data. The difference between the FFT output of each can be seen in Figures 12 and 13, and as seen there is not a noticeable difference visually in the two plots.
Our first step was a vanilla neural network approach with no preprocessing, we fed the raw current and vibration data into a multi layered (3) neural network and trained it on both the good and bad data with the appropriate labels.
This approach turned out to be flawed, our main thinking in regards to this is that the neural network did not have enough learning capacity to map the given data into the frequency domain, where the faults are clearly indicated. The neural network would first need some sort of temporal mapping, and then on top of that also learn to differentiate between fault and no fault. To combat this issue, we attempted to preprocess the data through an FFT, this would map the data into the frequency domain and THEN through the neural network differentiate the data into it is given label.
This new approach worked much better, with a very high success rate in terms of predicting faults. The training also took only 5 minutes one a laptop, what this means is that the model can be trained on edge and in real time to continuously update itself as the system slowly degrades. Our simple neural network model is given as follows:

Conclusion
An important takeaway from this project was around the structure of IIoT in a realistic setting as well as a realization of the various benefits IIoT brings, like the ability to visualize and see what is going on in our system in real time, from anywhere. This ability of constant perception into the system combined with a data  processing model creates an approach for predictive maintenance that is very powerful, low-cost, and useful in active learning settings.

Machine health monitoring and prediction platform
An Advanced Predictive Learning Station has been developed, with an embedded vibration sensor and other sensors, that analyses a system for faults and transmits information wirelessly. Students will be able to report errors such as general imbalances, mechanical failure, resonance, electrical faults, and critical speeds. It can be easily extended to further application demonstrations such as bearing faults, AI modeling using multiple sensor inputs and analysis.

Lab setup and design
The station design is based on an open architecture. It is designed to give students access to all potential avenues for learning and experimenting. The lab resource materials (designs, schematics, code) are all provided to the students. Documentation aside, students are also given access to as many elements on the learning station of the system as possible. There are oscilloscope probe points on the station to allow the students to view the trace of various signals as well as given control over many other aspects of the station. They can easily control the motor speed, explore all the signals of the system (even if they are not related to the lab). They can view the output of the encoder and view signal from the vibration sensor.

Station hardware layout
The lab hardware is shown in a block diagram below. A detailed point by point description follows to express the high-level function of the components in the system (Figure 14).

Data access and signal analysis
Because of the signal access points the students can using an oscilloscope to view the FFT plot on the screen. Most modern oscilloscopes have this feature built in. The students should clearly understand how the sampling system of the oscilloscope relates to the standard parameters of an FFT. These should first be demonstrated by feeding a 1khz sine wave or square wave into the oscilloscope.
• Sampling Rate: In the below example the sampling rate is 1Ksps • Number of Bins: The number of frequency bins the oscilloscope has • Number of Samples: The number of samples used in each bin In this example we are using 15000 samples at a sampling rate of 7.5 kbps on a 1 kHz sine wave. We are using 4096 frequency bins. From this experiment students will quickly see the application of an FFT in determining frequency components in complex time domain signals (Figure 15).
Once an understanding of the signal has been achieved, students can then do a lab experiment where they use the microcontroller to sample the incoming signal and do basic amplitude analysis on the signal. This can then be expanded to sampling on all three channels. A simple flow of sampling is demonstrated below. This sampling is done for single shot analysis, this is not a "real-time" sampling system. Realtime FFTs are typically done on FPGAs or systems with much more bandwidth capabilities (Figure 16).
The signal goes through an amplifier and buffer circuit to put it in the range of the ADC. The ADC is an I2C ADC, this is a better alternative to the micro-controller on board ADC because it is higher resolution. The microcontroller then samples the ADC at a known sampling rate (usually 2 kHz) and puts the samples into a buffer. This buffer can then be used for analysis.  If the students have a method of viewing the ADC buffer in a graphic way, it can help them develop the application faster. A good solution for this is using Python to receive serial/UART data from the micro-controller and plot it on a PC.

Wireless communication and data flow
The final section of experimentation is designed to show students that for any data to be useful it must be provided to an end user who cares about it and it must be presented properly. The system of choice for communication is MQTT 5. This allows for the simplest possible method of publishing the resulting data from the microcontroller for external use (Figure 17).
An InfluxDB can be used as the receiving database. It is important to display the data to the user and it is also important to store that data. If the data is stored it can later be used for developing machine learning based decisions. The historical data can also be used for long term vibration analysis which is the most important element in preventative maintenance.
This experiment can be extended to have students send the raw sampling data over Wi-Fi. What students will quickly realize (depending on their lab setup) is that  it is much more "power expensive" to send raw data over Wi-Fi as compared to processing the data and sending the compressed details.

Complete lab setup
The complete lab setup is featured below. The lab is designed to be stackable and easy to store. The main design feature of the system is the vibration isolation between the motor and the frame. If the motor is not correctly isolated, most of the vibration will be absorbed by the frame. This is conducive to real world implementation because motors are usually mounted on some type of vibration isolation barrier (Figure 18).

Concluding remarks
This lab is designed to help students realize IoT and Industry 4.0 applications at an accelerated rate. There are some components of this application that were not explored. Students should be given brief readings to help them understand these additional components of vibration analysis.
• Variable speed drives will provide different vibration results at different RPMs; therefore, motor speed is reported.
• Varying loads on a motor (mixers, pumps, crushers) can provide data that is much more difficult to analyze due to the large volume assorted frequency components.
• Usually motor failures do not occur as one large change in a vibration peak but, rather, the slow increase of a particular peak that represents some wear or imbalance in the motor.
• A monitoring system should also consider system maintenance. If a component in the drive stage is replaced (a blade in a sawmill for example) the results will vary after the blade is change. There is no way to know the blade is changed without some user input or long-term data analysis. If there are students who work through this application at a faster rate, they can be asked to implement current monitoring as well.

Conclusion
The term IoT was coined in 1999 and it led to the evolution of IIoT enabled by other technologies that were being developed independently of each other. These technologies include such as: cyber-physical systems & cybersecurity; edge and cloud computing; mobile technologies; machine-to-machine communication; 3D printing; advanced robotics; big data; RFID technology; and AI. The SEPT Learning Factory is state-of-the art facility at McMaster University for the demonstration of integration of these technologies as well as development of educational/training material and resources, new technologies, and applied research.
Based on AI modeling the Fan Fault Detection and Diagnosis System described is able determine a fault state that was not included in training the AI model. The IIoT Vibration Demonstration Station using the neural networking model can detect the machine fault in real-time and publish the outcome on a dashboard connected via MQTT platform. The Machine Health Monitoring and Prediction Platform on the other hand combines the best features of the last two models for advanced predictive maintenance learning concepts and real-time demonstrations. This station has been developed, with an embedded vibration sensor and other sensors, that analyses a system for faults and transmits information wirelessly. Students will be able to report errors such as general imbalances, mechanical failure, resonance, electrical faults, and critical speeds. It can be easily extended to further application demonstrations such as bearing faults, AI modeling using multiple sensor inputs and analysis.
In this chapter we have described IIoT machine health monitoring foundations, models and applications for education and training. We have also illustrated how these models can be extended for development of predictive maintenance using AI technology.