Virtual reality tool to support fluid power curriculum

Remote learning has recently become a crucial need in engineering education. In applied disciplines such as fluid power (FP), hands‐on lab experiences constitute an essential component for educating future engineers at both the graduate and undergraduate levels. Physical hydraulic trainers have been developed over the years to expose students to applications of modern FP technology. However, there is a notable absence of virtual tools that can provide students with a realistic feeling of assembling, troubleshooting, and operating an actual hydraulic circuit. This paper describes the effort made to develop an original virtual trainer that fulfills these needs. This virtual trainer is designed to replicate existing physical trainers that were recently designed and implemented for FP education but on a virtual platform. The virtual trainer is implemented in Unity3D software, using CAD drawings of the components from the actual trainer, and provides the user with an interactive environment that reproduces all the aspects of a real lab experience. The tool allows the students to learn by mistake, as in typical activities with a physical trainer and includes realistic operating noise. The core part of the virtual trainer is the object‐oriented simulation model that is behind every hydraulic component. First successfully used in the Fall of 2020, and subsequently utilized in both Spring and Fall 2021 courses, the simulator represents an alternative for hands‐on experiences, and could be a valid option for distance learning students in the future. Details of the implementation approach and some significant cases are covered in the following work.


| INTRODUCTION
Online education has been gaining popularity as a useful and effective way to reach a broader audience of students in recent years. However, many educators have doubted the effectiveness of online education approaches, particularly for engineering classes requiring practical lab experiences. Due to these doubts, there has been limited concentrated development of tools suitable for online education in many applied engineering disciplines. The COVID-19 pandemic drastically impacted this situation, with the vast majority of educators realizing both the opportunity and need for online tools that can be used as effective replacements for traditional in-person approaches.
The above consideration particularly applies to the fluid power (FP) discipline, in which, as detailed later, there is a significant deficiency of tools for online education. FP refers to the discipline that involves the use of fluids to perform mechanical actuation. It is a wellestablished and independent discipline that has been the subject of concentrated research for over 70 years. The educational and research activities related to the FP discipline serve a large and widespread industry with applications in agriculture, construction, transportation, aerospace, marine, manufacturing, and entertainment industries. A study published by the US Department of Energy (DOE) estimates that FP actuation and drive systems account for approximately 5% of the nation's total energy consumption [23]. Compared with other technologies for transmitting mechanical energy (i.e., electric or pure mechanical systems), FP has a high power-to-weight ratio advantage, which makes FP systems particularly suitable for applications requiring high forces or torques, or low weight. There are numerous examples of FP applications, in both the industrial and mobile sectors, with most vehicles adopting FP in at least some of the operating functions. FP is responsible for all actuations in large excavators, used heavily in aircraft technology, and present in passenger cars (i.e., braking, engine lubrication, and transmission systems), to name a few significant examples.
When considering the development of FP education methods, the main goal is to eliminate the existing gap between industry expectations and students' capabilities upon graduation. FP is a highly evolving technology, with increasing development toward the adoption of new industrial trends, such as environmentally friendly fluids, electrification of energy transmission systems, and so on [33]. However, the majority of FP education is currently outdated, with widely adopted textbooks from the 1960s, such as Merritt [26] and Blackburn et al. [3], still being the primary references in most FP classes. The lag between industry and education has been prominent in FP for the past several decades, due to both a lack of higher degree course offerings from educators and minimal pursuit of the discipline from students [22]. To bridge this gap, it is imperative for an effective FP education to develop educational material that (i) reflects the evolution of the technology while building on wellestablished basics of the discipline and (ii) captivates the students' attention by emphasizing the modern FP systems that take advantage of high integration with other engineering technologies, such as electric systems, modern sensors, and data acquisition concepts.
One aspect of FP education in which there is general concurrence is the importance of hands-on experiences that complement theoretical concepts from lectures. Knowledge of FP transmission and control is an important concept for the modern mechanical engineer, and several authors emphasize the importance of handson experiences in developing an adequate understanding of applied disciplines, particularly in undergraduate engineering courses [5,9,19]. To this end, physical hydraulic and pneumatic trainers have been developed and utilized by universities and industry to train FP engineers in assembling, operating, and troubleshooting FP circuits.
Relevant examples of such trainers are offered by different FP companies, such as Bosch Rexroth [32] and Parker Hannifin [29], and target the training of industry professionals. Though professionally built, these trainers are often too limited in their flexibility for use in engineering academic education, as common practice is to design trainers that facilitate only a few specific functions. A highly flexible trainer suitable for academic training has been developed at Purdue University, with the support of Parker Hannifin (Figure 1). Six of these units were recently installed in the new FP laboratory of the Agricultural Biological Engineering building of Purdue University. The features of the trainer were presented in Assaf and Vacca [1], and are briefly addressed in Section 3 of this paper.
Despite the positive learning outcomes that a physical trainer can bring to an FP class, the adoption of a physical trainer comes with notable challenges: i. Cost: Physical trainers are expensive. The current commercial value of one of the developed trainers mentioned above ranges from $60 to $70 k. In addition to this cost, hands-on labs put a high demand on space, instructor time, and experimental infrastructure, all of which increase overall expenses [8]. ii. Limitation of lab hours: With the density of modern engineering curricula, the hours that a course can dedicate to lab experiences are very limited. Instructors are challenged in identifying a maximum of around 10 "most essential labs" among many that could be very significant in supporting learning objectives. iii. Usage constraints: Only a limited number of students can simultaneously work to a trainer. This creates the logistical challenge of arranging access to trainers for all students in a class. Grouping or alternating students to a trainer is not always optimal for a hands-on experience. iv. Safety: FP trainers are usually compliant with the strictest safety regulations. Safety measures are adopted in trainer design, such as limited maximum operating pressure, that makes them almost riskfree. However, even when appropriate precautions are met for operating a trainer (i.e., wearing of appropriate personal protective equipment, safety glasses, proper shoes, etc.), there is always a minimum risk of incidents to be considered.
In light of these challenges and the need for better online teaching tools, there is a great opportunity for integrating virtual material in replacement of hands-on labs in FP. If virtual labs are successfully made available to students, all the above limitations i-iv can be overcome. The introduction of virtual labs is also supported by the literature and adopted in some engineering fields such as electrical engineering education [20], and mechanical engineering education [2]. Per definition, virtual labs are imitations of real experiments. A virtual three-dimensional (3D) experimental setup should provide the learner with a friendly and easy-touse environment. Klahr et al. [21] concluded that there is no difference between physical and virtual materials in either learning or confidence, and both scenarios should be considered hands-on activities. The findings of Klahr et al. [21] confirm what was also observed by Pusca et al. [31], that there was no negative effect on the quality of learning using virtual models, even though physical and virtual models differ in the visual and tactile information they provide. Brinson [4] having reviewed 56 different studies related to student learning outcome achievement in both traditional hands-on experiences and virtual hands-on experiences, similarly concluded that the data suggest learning outcome can be achieved at an equal or greater frequency with virtual laboratories.
In recent years, some effort has been made on developing virtual learning tools to support the online learning of FP. Gao et al. [10] developed two different kinds of simulators, for a total of eight lab experiences. One consists of a two-dimensional (2D) environment where the user can build and run circuits, while the other uses virtual reality markup language based on the 3D environment. An evaluation of the effectiveness in delivering content and success at attaining prescribed learning objectives was performed after implementing these labs in the classroom, and the students provided positive feedback regarding the experiences and skills gained. While the previous example targeted the demonstration of FP system operation, Pauniaho et al. [30] focused on the component operation and utilized a 3D virtual environment to illustrate what happens inside a hydraulic control valve. Wong et al. [38] implemented a bond graph method combined with a singular perturbation approach to solve the hydraulic and pneumatic equations in an FP system, coupled with graphical animation. In this way, they could demonstrate the motion of actuators, while using a color-coded scheme to represent the dynamic variables such as a change in pressure, temperature, and so on.
With the exception of Wong et al. [38], which uses ISO labels of the components in a 2D environment, the past work on virtual FP tools has the significant limitation of not allowing the user to build the hydraulic circuit from scratch. In fact, most of the mentioned efforts only adopt premade circuits where the user can control the system and observe the circuit response to given commands. Essential elements of learning, such as starting with a given schematic and selecting components to build the circuit, verifying if the assembled circuit can work, and learning by mistake, are missing in such tools. Moreover, the above tools are limited to basic concepts, and therefore, not suitable to educate students or industry professionals on advanced concepts of the FP discipline. This gap is partially covered by some established simulation software in the FP field. Simulation tools such as Automation Studio [12], FluidSIM [13], Simcenter Amesim [15], Simulation X [16], and Gamma Technologies [14] allow the user to simulate a hydraulic circuit using built-in library components. Currently, many FP courses base their labs on these simulation tools. However, these tools usually require a certain degree of simulation skills: the user might be prompted to select specific modeling equations and assumptions for each component, depending on the desired simulation output. As a consequence, the process of building an FP circuit and possible troubleshooting mistakes is more analogous to the typical debugging of a programming tool and does not help students develop proficiency in working on an actual device. Even by customizing the tool to preset a certain circuit, so that the submodel selection process is made invisible to the user, students still lack the realistic experience of connecting physical components and visualizing the actual operation of a hydraulic circuit.
Simulation software also does not provide any spatial sense to the user. A circuit can be built with no spatial limitations, while in reality, the placement of components and sensors is restricted by both their availability and installation requirements. Therefore, while simulation software can be successfully used in FP education to complement theoretical concepts and provide students with important simulation skills, these tools do not give the instructor a means to familiarize students with the requirements and physical processes of operating an actual FP machine.
The above limitations can be addressed by creating a virtual test stand of a physical trainer, taking advantage of the recent progress of 3D virtual reality software. In the work described in this paper, the virtual simulator Unity3D [35], a popular 3D game engine, is used to build a virtual test stand version of the previously mentioned hydraulic trainers ( Figure 1). The virtual test stand is created using the CAD models of the actual components implemented on the physical trainer, to achieve a similar appearance to the real one. The process of selecting components for a desired operation, connecting the component hydraulic ports with hoses, and operating the system is reproduced through a graphical interface that also includes audio sounds recorded from the physical trainer.
With such a virtual test stand available, the instructor of an FP class gains the freedom to design coursework with more flexibility by using the virtual trainer to support course content in a multitude of ways. Some examples are replacing or supplementing traditional homework problems with virtual labs, de-densifying student presence at a single station with hybrid lab experiences (if physical trainers are available), or allowing students the opportunity to dedicate extra time to run a particular lab virtually. Virtual trainers not only allow an educator to overcome logistical constraints but also to increase the number of essential labs that students experience, removing this limitation on their exposure to crucial FP concepts.
The rest of the paper provides a description of the innovative virtual tool and is organized as follows. In Section 2, the objectives of typical hands-on experiences in FP hydraulic control classes are introduced. Section 3 is an overview of the physical hydraulic trainer that is used to accomplish such objectives and was developed at the author's University. Taking this physical trainer as a reference, the development of the virtual test stand is presented in Section 4. Considerations on the use of these tools are made in Section 5, which precedes final conclusions on the work in Section 6.

| LEARNING OBJECTIVES OF HANDS-ON FP LABORATORIES
Decisions concerning the use of hands-on labs as an educational tool in an FP class depend on the class learning objectives (LOs). Without clear LOs hands-on experiences can be ineffective and distract students from educational goals. A good definition of LOs, and a proper metric for measuring class performance toward each LO, help both the instructor and the students to determine if curricular goals have been met. The LOs list is a representative subset of possible LOs suitable for virtual or hands-on experiences and was adopted in FP classes for engineering students at the author's university, at both graduate and undergraduate levels. Each objective starts with the following: "After completion of the course, the student will be capable of (course learning objective) …." Forming a clear teaching plan to meet these objectives allows the fulfillment of general student outcomes, in line with the criteria for the engineering program accreditation of ABET. These pertain to students' ability to identify, solve and formulate complex engineering problems, communicate effectively with a range of audiences, develop and conduct appropriate experimentation, analyze and interpret data, and use engineering judgment to draw conclusions [11].
The virtual hands-on tool should be designed to support the LOs. This implies some critical aspects that must be accounted for while creating the virtual test stand: i. The graphical user interface (GUI) must reproduce the real trainer appearance, including the actual sound (as it is an important component performance identifier). ii. The mistakes that a student can make while operating the real trainer must also be reproduced, to enable a "learn by mistake strategy." iii. The virtual tool should be responsive to student actions as a real-time interactive tool. iv. All the labs that can be performed on the real trainer must be replicated by the virtual test stand, as a minimum requirement. A higher number of labs might also be enabled, to allow use of the virtual simulator to support LOs outside class hours.
These aspects were considered in the development of the virtual tool, as described in Section 4.

| REFERENCE HYDRAULIC TRAINER
The virtual test stand presented in this paper was built considering a hydraulic trainer developed by the authors as a reference, which was presented in Assaf and Vacca [1] and shown in Figure 1. For the sake of completeness, this section summarizes the main features of the trainer. This innovative trainer was developed to support the LOs outlined in Section 2, with a design that gives priority to the following factors, in the interest of addressing the challenges stated in the introduction.
i. Space requirement: A flexible working area was incorporated into the trainers, reducing the space required to assemble different hydraulic circuits and maximizing the number of trainers that can fit in a given lab space. ii. Cost and safety: Components from the mobile hydraulics market were chosen for the trainers to illustrate concepts that are valid for both industrial and mobile hydraulics. Such components are usually less expensive than those for industrial hydraulics. An electric motor with constant speed (i.e., without a variable frequency drive) was chosen to limit cost. To maximize safety and mitigate the risk of highpressure systems while still meeting the LOs of each lab experience, the maximum pump pressure was limited to 50 bar by adjusting the pressure limiter setting. A lower maximum pressure setting would not allow demonstration of load sensing concepts, due to the pressure margin of the pump being equal to 17 bar. iii. Human experience: The trainers maximize students' engagement by using the latest engineering technology based on a touch screen, which allows students to visualize the lab experience assignment, the ISO schematics, and the value of the different sensors while running the experiment. iv. Available set of lab experiences: The trainers offer labs to support both basic and advanced concepts that represent the state-of-the-art of present in FP technology.
The trainer has multiple fixed components ( Figure 1) that the user cannot move but only adjust (left, in Figure 1). These parts include heavy components, those that required fixed electric wiring, and the hydraulic supply system. These components are indicated with (F) in Table 1. A working area is available to build a given hydraulic circuit by simply attaching additional hydraulic components from the carrier (right, in Figure 1), and connecting them with hydraulic hoses and quick ASSAF and VACCA | 1141 connectors. These movable components are indicated with (M) in Table 1.

| Power supply
The hydraulic power supply used in the trainer has the unique feature of reproducing different pump types depending on the demand of the lab experience. Settings were implemented on the displacement adjustment system of the pump used in the trainer (Table 2), a Parker Hannifin PVP series commercial unit, to replicate three different behaviors: a fixed displacement unit, a variable unit with a differential flow limiter (or load sense flow regulator), and a constant pressure supply unit. In this way, experiences involving either impressed flow or impressed pressure concepts for the supply can be run. Figure 2 shows all the different operating modes for the supply.

| Load module
A unique feature of the trainer is the ability to test the nature of different load types on the hydraulic actuators, including both resistive and overrunning loads. This is accomplished by a load module represented in Figure 3. The module has two cylinders (a control cylinder and a load cylinder) physically connected through a mechanical rail to handle possible side loads. The control cylinder has open connections (quick connectors) for the user to connect, depending on the lab experience ( Table 3). The load cylinder is used to establish the desired load on the control cylinder, which is set by two separate supply units (gear pumps listed in Table 2) connected, respectively, to two pressure-reducing/relieving control valves that fix the pressures in the load cylinder chambers. The range of load that the user can set varies from 0 and 3500 N for resistive loads, and from 0 to −500 N for overrunning loads.

| Data acquisition and control system
The trainer provides the user with an intuitive and interactive environment through a data acquisition and control (DAQ) system connected to a touch screen. This DAQ controls the main operating features of the trainer during the experience, allowing the user to control the different components in the system such as the electronically controlled valves and the supply power unit. The DAQ is implemented with a Parker IQAN MD4 connected to an expansion module IQAN XC43 via CAN, which allows the management of many input/ output channels to the system. Figure 4a schematically shows the instrumentation implemented on the trainer, along with the approximate location of each sensor and valve. The corresponding signal details and types are tabulated in Figure 4b.
A user-friendly GUI is implemented in the touch screen following a top-down structure that allows the student to navigate between pages with a touch experience. In particular, the GUI allows a choice of hydraulic power supply type and displays all sensor readings while running an experiment. The GUI also includes specific instructions for each lab experience, a visualization of the hydraulic circuit to be implemented, a description of the lab experience goals and main procedures, and specific questions associated to the experience. This effort was made with the purpose of reducing the need for printed lab handouts.

| Lab experiences
FP does not have an established method of teaching. FP courses generally cover components (such as pumps, valves, actuators) in a similar manner, but often deviate in the way FP systems are presented. This is confirmed by the nature of the most-used textbooks in universities.
To cite some significant examples, the book from Esposito [7] focuses mainly on components, while the texts of Ivantysyn and Ivantysynova [18], as well as Costa and Sepehri [6], concentrate only on some key aspects of FP technology, such as positive displacement machines and hydrostatic transmissions. Other famous textbooks, such as Blackburn et al. [3], Merritt [26], and McCloy and Martin [25], are suitable for showing the theory behind the function of hydraulic control systems but do not cover any modern control concepts. Watton [37] and Manring and Fales [24] provide a full analysis of servohydraulic systems but do not cover the technology commonly used in mobile applications. Both Nervegna and Rundo [28] and Schmitz and Murrenhoff [27] follow an approach similar to that of the authors' institution, reflected in Vacca and Franzoni [36], where a whole range of FP solutions are presented after a description of the main components. Therefore, it can be challenging to design a hydraulic trainer and a corresponding set of lab experiences suitable for all the existing approaches to teaching FP. With the target of providing a trainer that can serve a wide spectrum of teaching approaches, the proposed trainer has been conceived to allow experiences that illustrate the operation of single components, as well as those that introduce concepts of a complete FP system. The set of available experiences to date (more can be derived by using the available components) is provided in Table 3. There are essentially three groups of experiences: (C) component-focused labs, (T) troubleshooting labs (to identify a potential problem in a hydraulic circuit), and system labs. The system labs are further divided into (S) single-function labs, which illustrate the basic concepts of controlling a single actuator, and (M) multifunction labs, which build on single actuator concepts learned in (S) to instead control multiple functions with a single supply source, as is common in commercial FP machines. Table 3 reports the set of 29 lab experiences that are used for a 3 credit (36 h) senior engineering course that introduces hydraulic control technology. Given the components available in the trainer, and its flexible design, a higher number of labs, or an entirely different set of lab experiences, could be planned to accommodate different educational needs or teaching preferences.

| VIRTUAL SIMULATOR
The virtual test stand that replicates the physical trainer described in Section 3 is implemented with the virtual platform Unity3D, which is a popular 3D gaming application. As a fully integrated, cross-platform professional virtual reality engine, Unity3D can be used for interactive content, such as 3D visual stimulation and architecture visualization [35]. The development process started by creating a virtual room to place the simulator inside, representing the traditional lab space. The actual 3D models of all the trainer's mechanical parts were imported from Solid-Works as STL files into Blender, which converted them into the FBX file format readable by Unity. Inside Unity, the imported 3D models are treated as Gameobjects. Every object in the simulator is considered a Gameobject, from characters, to lights, to cameras. Throughout this paper, Gameobject and component are used interchangeably, as they share the same meaning. Gameobjects do not accomplish objectives themselves but instead act as containers for coded items that implement their functionality, making an item the true functional part of a Gameobject. Unity has built-in items, and the user can create their own by writing scripts. A script is a piece of code that allows the user to create new items, modify existing ones, as well as facilitate system response to user input. Development of a hydraulic item refers to modeling the behavior and physics of the hydraulic valves, actuators, and so on, in the simulator.
The rendering of the virtual trainer is implemented inside Unity by using its Universal Render Pipeline (URP), which provides artist-friendly tools for the creation of proper graphic effects. All the mentioned steps are summarized in Figure 5. Aside from the visual part, each hydraulic component is modeled using objectoriented programming C#, with details provided in Section 4.3. The Unity Scripting tool was utilized for the actual execution of a lab experience, where running a script inside Unity executes a number of event functions in a predetermined order. This execution order is given in Figure 6 and it is further explained here. The three functions Awake, OnEnable, and Start are called only when a scene starts and once for each Gameobject to appear in the scene during initialization. A scene is where the user can work with content in Unity, and it is an asset that contains the virtual simulator application. Figure 7 shows the scene of the virtual simulator tool. The underlying mathematical equations representative of the physics of the system are solved under the FixedUpdate function, which runs with a fixed time step of 0.02 s (50 calls per second). While this is the default value for the software, it was also found to be the appropriate time step length for the proposed virtual tool F I G U R E 5 Development pipeline for virtual simulator using Unity 3D.
F I G U R E 6 Script lifecycle overview. with further validation. The physical equations in the simulator are explained in detail in Section 4.3. Following initialization, the Input OnMouseXXX function continuously checks for user input from the computer mouse. Meanwhile, the Update function, called once per frame, is used to check the position of the Gameobjects (valves, hoses, etc.) and the physical connections between them. In this application, it is the main workhorse function for frame updates. The internal animation update is called when Unity evaluates the animation system, while scene rendering determines which objects are visible to the camera and provides the graphical rendering of the scene. OnBecameVisible/ OnBecameInvisible is called when an object becomes visible/invisible to the camera. OnRenderObject can be used to draw any geometry and is called after regular scene rendering is completed. OnRenderimage is called after the scene rendering is done to allow postprocessing of the image. During lab experience execution, the GUI rendering function is called multiple times in response to GUI events [35]. GUI events correspond to user input which can be key presses or mouse actions. The GUI capabilities and functions are shown in Section 4.2. The OnApplicationQuit function is called on all the Gameobjects before the application is terminated.
In this application, it is necessary for scripts to access other Gameobjects' (components') data, or more precisely, to access items of other Gameobjects. For example, while running a lab experience, the power unit may need to transmit the flow and pressure information to the hydraulic circuit. Among several options available in Unity for retrieving data from other objects, the most straightforward one for finding a related Gameobject is to add a public Gameobject variable to the script. This variable will be visible in the inspector as a Gameobject field. After that, the user can drag the Gameobject from the scene onto this variable to assign it [35], enabling the script to access all the variables of that Gameobject.
The appearance of the virtual test stand is represented in Figure 7. As the figure shows, the intent is to make the appearance of the virtual tool similar to the actual trainer of Figure 1

| Simulator features
With the switching toggle of Figure 7, the user can select between two modes: the building mode, the default mode at the start of the virtual simulator, and the running mode, which is activated in response to an input event (OnMouseXXX) from the user with a top-left toggle. The building mode is used when building a hydraulic circuit. The available hydraulic Gameobjects are located at the component carrier (left in the figure), which also has a hose rack for picking hydraulic hoses. The running mode is designed to collect different sensor data, the GUI is enabled (OnBecameVisible) and rendered in the scene (OnGUI). The same GUI described in Section 3.3, implemented in the touch screen of the physical trainer, is reproduced in the virtual tool. Each hydraulic Gameobject carries a script that checks its position under the Update function. If the hydraulic Gameobject is within the trainer stand working area, it will remain enabled. Otherwise, it will be disabled (OnDisable). This logic is reflected in Figure 8. As the GUI is not needed in the building mode, it is invisible to the user (OnBecameInvisible) and will not be rendered when passing through GUI rendering (OnGUI). Similarly, the user does not need to access the valves in running mode, so they are disabled (OnDisable). This implementation allows a frame rate of 60 fps to be achieved, maximizing the user's experience with the simulator. An essential feature of the virtual environment is that there are no safety or component cost limitations as in the actual trainers. For example, the maximum operating pressure-limited to 50 bar on the physical trainer-is raised to 270 bar in the virtual test stand, to reflect the actual maximum allowable pressure of the selected pump (Table 1). Moreover, a variable speed prime mover is available, allowing the supply pump speed to be varied within the 500-3600 rpm range. This is a useful feature to extend further the scopes of the component characterization labs, such as the C1 lab in Table 3. In such labs, wider spam of flow and pressure can lead to a better illustration of the component characteristics, such as energy efficiency parameters.
An intuitive drag-drop method based on the mouse cursor allows moving the components from the component carrier to the working area of the trainer; the same method applies to the hoses. The actuators and the sensors are fixed to the trainer stand as in the actual trainer. The total number of hoses available in the simulator is 13, which is enough for even the most complex lab experience. One hose at a time appears to the user; the next one shows up after the previous hose is placed in the working area.
The virtual trainer uses recorded sound clips to replicate the noises that occur in the real experiment. Under the start function, an audio source is defined. The audio source determines the audio clip that will be played next. As a response to user input (OnMouseXXX) under the Update function is possible to play the assigned clip. The clips include connecting and disconnecting the quick connectors, turning on the electrical motor, as well as the power unit noise. The power unit noise also depends on the outlet pressure level, and it also varies in case of cavitation as will be clarified in the next Section 4.3.2. Speech recognition, meaning the transcription from speech to text by a program, was added to the virtual trainer to enhance the student's experience with the simulator. Under the Start function, it is possible to define words, assign actions to them, and start the phrase recognizer. For the recognizer to identify a phrase, the "Phrase Recognition System," which is a class implemented inside Unity must be running [35]. At this stage of implementation, this feature is limited to several commands, such as shifting from building to running mode, switching between the two scenes that include zooming on the power unit, and enabling the lever camera. Further expansion of speech recognition will be considered as a future addition to the virtual trainer.

| GUI and virtual master control
The implemented GUI has features that differ from the building and running modes.

| Building mode
The power unit button (Zoom in button) is a zoom-in feature that allows the user to gain better insight into experiences specifically involving the power supply unit, such as the cavitation lab of Table 3. The zoom-in feature opens the view shown in Figure 9. Here, the toggle and slider (Power supply controls) allow the user to turn on the electrical motor and set the relief pressure, respectively. Holding the lever handle of the ball valve (Ball valve) and moving the mouse allows adjusting the valve opening that restricts the oil at the inlet of the pump. This induces cavitation, which will be further explained in Section 4.3.2. An additional needle valve for aeration (NV for aeration) can be adjusted with the knob colored in yellow that will allow air to the inlet line and reproduce the so-called "pseudo-cavitation."

| Running mode
To start the electrical motor driving the supply pump, the user clicks on the electrical motor start/stop from Figure 7. In the run mode, the user sets the pressure relief valve (PRV) cracking pressure (in the range of 0-270 bar) with the slider (PRV setting) highlighted in Figure 10. Similarly, it is possible to control the electric motor speed with the slider (Electrical motor speed). The solenoid valves are commanded in the range of −100% to 100% by moving the levers (Electronic levers) backward and forward with the mouse cursor. By clicking on the lever page (Levers page), an in-depth visualization of the commands sent to the controlled valves is provided, as the lever reading page (Figure 11). The measures page ( Figure 10) permits the user to read the sensor values, as shown in the inside view of the measurement page ( Figure 11). The GUI permits the selection between the different power supply types by using a dropdown as shown in the power unit page in Figure 11. The GUI shows the proper ISO schematic that matches the lab selection made by the user. From the labs manual page (Figure 11), when the user selects one experience-for example, the "hydrostatic transmission" (lab page)-the simulator opens a page as illustrated in Figure 12, where the lab schematic (Circuit) corresponding to the lab experience is provided. Using the lever dropdown, the user can also select the lever used to control each specific valve from the three available options (1, 2, 3). Finally, the user can read the sensor values directly from the lab experience page without the need to navigate between pages and go back to the measurements page discussed earlier.

| Modeling approach
A systematic and computationally efficient approach for modeling the electrohydraulic and mechanical components used in each experience was implemented to ensure a robust and stable application for the virtual trainer. Each component is modeled with its own set of equations, and it is treated as a multiport element.
The modeling approach used for fixed components (F, in Table 1) of the trainer is separated into two categories. The first category is the supply unit, which includes the electric motor and the pump in addition to its connection to the manifold; the second is related to the return, which includes the parts from the manifold back to the tank (consisting of the filter, plumbing, and the tank itself).
On the other hand, every movable component (M, in Table 1) that can be placed in the working area is treated as a single element. Every element has a number of connecting ports, and there are two variables assigned to each port. These variables are flow and pressure for hydraulic ports; force and velocity for mechanical ports. This modeling scheme is based on the bond graph approach [34], which is also implemented in some wellestablished commercial software such as Simcenter F I G U R E 10 Virtual Simulator in the running mode. PRV, pressure relief valve.
F I G U R E 11 GUI different pages. GUI, graphical user interface.
F I G U R E 12 GUI lab experience example: virtual(left); actual (right). GUI, graphical user interface.
Amesim [11]. These ports carry information with a direction not known a priori. This means that the inputoutput relationship of an element depends on the network topology; in other terms, it depends on the connecting element. Based on the topology, the solver can determine the input-output information relationship of every connected port online and the flow direction inside the circuit.
An example of a hydraulic element that is crossed by flow is represented in Figure 13 (left). Such an element has an inlet and an outlet port. Figure 13 (left) shows that each port has two physical quantities assigned to it, pressure and flow, that can be transmitted to other hydraulic components. The arrow entering the component indicates that this information is an input to the equation being solved, while if the arrow is going out from the component indicates that this information is an output from the equation. Instead, for the mechanical component, the arrow represents the direction of the physical quantities used to identify the working quadrant of the actuators.
Each hydraulic element has a node assigned to each hydraulic port. The node is a Boolean logic information (True/False) that allows identifying the flow direction inside the circuit. In particular, if the node is true, then the flow enters the port; and it exits from the port when the node is false. The pump establishes the flow direction in the circuit as it is always outputting flow as a cascade logic and its outlet port has a false node. Each element receives the flow direction from the downstream element connected to it and it sends it to its upstream element. This method allows solving the circuit without the need to induce hydraulic capacitances and can be suitable when solving steady-state equations. The element ( Figure 13) has an inlet (port 1) and an outlet port (port 2). Port 1 has Node A to be True whenever the flow is entering that port and False in case the flow is exiting from that port.
Proper modeling equations representative of the steady-state functioning are defined for each component listed in Table 4. This means that dynamic effects which occur on a low time scale (such as the switching of a valve position) are neglected when operating the virtual trainer. This assumption of no-transient is consistent with the scopes of all the lab experiences that are offered by both the virtual and the actual trainer. For brevity, Section 4.3.1 provides insight into the model of the LS variable pump, which is taken as a significant example. All the other components follow the same logic.

| Flow supply
The power supply sets the input/output information to the downstream components. For each type of power supply (fixed and variable displacement), two conditions are considered, in which, if the flow rate is the output information (logic 1), the pressure information is the inlet, and vice versa (logic 2). For a fixed displacement pump, these two conditions are based on the status of the PRV considered as part of the flow supply. In particular, the PRV can operate in relieving mode or in closed mode. In the default condition, the pump sends to the component connected to the outlet flow information (PRV closed) and it receives the pressure information in return. This pressure information is compared to the PRV setting, and in case it is higher the PRV opens, and the pump switches its output information from flow rate to pressure. A very similar logic describes the other cases of variable displacement pump types. In this case, the switching between the pressure and flow condition is based on a so-called flow saturation, which happens when the circuit requires a flow rate higher than the pump's maximum displacement. The logic and equations are listed in Table 5. The user sets the parameters in purple and, therefore, known parameters when solving the equations. Ideally, whenever a PRV is open the system pressure is equal to it is cracking pressure. However, the PRV component is implemented with realistic equations that consider the typical effects of spring compression and internal flow forces [36], so that the system pressure depends on the flow rate passing through the PRV. Energy losses are accounted for to consider the realistic operation of the supply pump.
These losses impact the input power from the electrical motor as well as the outlet flow rate from the pump. The loss quantification is made by using the expression of volumetric efficiency, Equation (1), mechanical efficiency, Equation (2), with look-up tables that reproduce the efficiency maps available from the pump datasheet.
These maps provide the influence of pressure, shaft speed, and instantaneous displacement on the pump efficiency.
An important note for all the equations presented in this paper is the units used for each physical quantity. All expressions are provided considering SI units, which are uncommon in the FP field. This allows writing lean expressions without conversion factors, that would appear when non-SI units are used. A typical example is displacement V d , which should be (m 3 /rad) in the formula of the papers as opposed to (cm 3 /rev) as commonly used in the field. To solve the unit-related problems, formulas including conversion factors for typical metric and English units are provided to the user of both the physical and the virtual trainer.

| Pump cavitation
Both the virtual tool and the actual trainer can demonstrate cavitation and pseudo-cavitation (lab T1 in Table 3). The modeling approach used to reproduce this aspect leverages the fact that the entire flow supply is treated as a single component (Figure 14). The cavitation condition occurs when the user reduces the inlet pressure of the pump by closing orifice O1 (Figure 14). This leads to the release of a certain amount of air as the fluid pressure falls below saturation conditions (p ) sat which are assumed at the tank (Figure 15). A further decrease in pressure (below vapor pressure p ( ) vap eventually results in air being completely released, and the hydraulic fluid is in vapor form. Opening O2 ( Figure 14) will allow air from the environment (at p atm ) to the pump inlet (below p atm ), causing the so-called entrained air or pseudo-cavitation [36].
The presence of air or vapor in the liquid is a typical multiphase flow problem. In the virtual trainer, simple onefluid equations are utilized, assuming equivalent fluid properties. This requires the evaluation of the amount of air at the inlet port 1 (Figure 14), which in this case is performed assuming isothermal condition (5), as suggested in [18,28,36]. This allows calculating the equivalent new density of the fluid at port 1 (6) and at port 2 (7), which is the high-pressure port. Finally, by applying mass conservation, it is possible to obtain the flow at port 2 (8).
For the pseudo-cavitation, the simulator mimics the experimental data where the inlet suction pressure equalizes the atmospheric pressure allowing air from the environment to the suction line. The collapse of this air in the high-pressure pump outlet causes the pump to become unstable so its outlet flow will oscillate around a certain average value. The detailed modeling of this effect would require complex dynamic equations; instead, for simplicity, the outlet flow in these conditions is provided with an artificial oscillation that approximates the actual pump behavior observed in the actual trainer.

| Circuit example
This example ( Figure 16) considers lab S2 from Table 3 is described in the ISO standard [17]. The NV loads the pump outlet by restricting the return path to the tank. The valve NV works as a compensator when the pump outlet pressure is less than the relief setting (logic 1), or as a metering element when the pump outlet pressure is higher or equal to the relief setting (logic 2) regulating the flow passing through it. Figure 17 corresponds to the case of logic 1. In this condition, the pump outlet information is the flow rate and it receives pressure information as input. This pressure is compared to the setting of the PRV, whenever it is higher, the PRV diverts flow into the tank to keep the pump pressure constant. This condition is depicted when the pump outlet information is pressure (logic 2). In this second condition, the orifice uses this pressure information to solve the flow in the circuit. This flow information is sent back to the pump and compared to the pump flow. If the outlet circuit demands equal or higher flow than what the pump can actually supply, the relief will close, and the pump goes back to the configuration of Figure 17. The flow direction inside the circuit is shown in Figure 17. It is worth noting that to simplify the circuit only the hose at the pump outlet was represented, and the filter was omitted from the circuit ( Figure 18).

| LAB ASSIGNMENTS AND VIRTUAL TOOL EVALUATION
The lab experience execution for both the physical trainer and the virtual one can last from 10 to 15 min up to 40-45 min depending on the teaching method.
Usually, the labs allow for effective active learning, through group discussions or flipped class intervals. Instead, individual learning with no student interaction mode can allow for faster execution of the labs. The procedure followed for each lab experience (using both the virtual or the actual trainer) used by the authors' institution can be summarized in the flow chart of Figure 19.
The lab starts with the handout given to the students (either printed or accessible through the GUIs). The document contains the general safety rules (only for the physical trainer), the problem description, and a detailed list of questions, related to the specific lab objectives. Usually, the problem statement includes a partial ISO schematic of the circuit that omits certain parts that the students must deduce from logic deductions. A significant example is identifying the sensor types and location (missing in the schematic) necessary to collect the necessary data. The students will follow the lab instructions to complete the circuit and assemble it in the trainer. Often, the initial circuit assembled by the students has imperfections that prevent a correct operation. In this case, the trainer allows troubleshooting at different levels (i.e., corrections with trial and error, through the assistance of labmates or instructor after proper brainstorming). Usually, the problem questions are designed in such a way that students can verify the correct operations (through basic questions such as "do you see the cylinder extending after commanding the DCV?). After the correct operation of the circuit is achieved, students will collect the specific data necessary to answer the questions. After completing the experiment, depending on the teaching mode, the instructor might facilitate a wrap-up discussion to summarize the lesson learned and the key concepts of the lab. The students can afterward postprocess the data and deliver a proper descriptive report that includes equations and a graphical representation of the results when requested.

| Lab example
This section references one of the lab experiences (see lab M6, Table 3) to describe a typical lab assignment. First, the instructor provides the students (single students or groups of two to three students to facilitate discussions) with a lab handout that describes the problem, the objectives, and some relevant passages of the lab. The circuit schematic is usually partially provided so the students need to complete that as part of the experience. A typical case is to exclude the sensors that are necessary to measure the quantities required by the problem (the red sensors in Figure 20). Therefore, students must assemble the complete circuit ( Figure 20) on the trainer, either with the virtual trainer as in Figure 21 or with a physical trainer as shown in Figure 22. Next, the students can tabulate the recorded values of the command, pressures, and actuators' speed as shown in Table 6. In a typical in-class lab, the final step includes a discussion of results with the instructor, to discuss key points of the experience and lessons learned from the mistakes that occurred during the experience. Afterward, the students are asked to deliver a technical report that can include the energy plot, as shown in Figure 23. These reports teach the students the ability to explain a hydraulic circuit from a technical perspective. All these steps are summarized in Figure 24.
Some of the common mistakes include but are not limited to (i) not using the correct sensors so the student fails to fill out the table, (ii) showing a wrong connection schematic that would bring the system to not function (all flow goes to the relief valve). These are two typical mistakes for which the instructor has to help the students as they would in a real laboratory so that the student eventually succeeds in building the right schematic.

| Virtual simulator evaluation
The virtual simulator was used for the first time in the Fall 2020 undergraduate class and the second time in the Spring 2021 graduate class. To analyze the effectiveness of the virtual tool in terms of the class learning objectives, an evaluation procedure was designed and structured as follows.
After having completed the lab experiences, students were asked to participate in a class questionnaire where the following question was asked: "The laboratories aid me in achieving the class objectives." The students were required to choose an agree, disagree scale where the options go from strongly agree to strongly disagree. Figure 25 illustrates the questionnaire results in a pie chart. In both classes, the majority of students were satisfied with their experience using the virtual tool. It is interesting to see an improvement in the Spring 2021 class after the GUI was implemented in its final version duplicating the actual DAQ in the physical reference trainer. In parallel, the authors looked at the lab evaluation to ensure that the students are still getting the concepts behind each lab. The results are shown in Figure 26. Both the undergraduate, and graduate classes showed similar results in which 70% scored A and 25% B.
Although the sample size in this study is relatively limited, the findings show potential for future adaption of this tool for a wide range of FP curricula, providing a cost-effective solution for hands-on experiences that can be used globally suitable for an academic environment.

| Fall 2021 class feedback
A specific set of questions were provided to students at the end of Fall 2021 undergraduate class (ABE 435), within the overall anonymous class-evaluation questionnaire. These questions aimed at assessing students' experience with both physical trainers and virtual tools. Students were also asked to provide specific feedback with the goal to improve such tools. The specific questions included in the survey are listed in Table 7. Answers covered a scale from" strongly agree" to "strongly disagree." Seventeen out of 21 students provided answers as summarized in Figure 27.
The majority of the students agreed on the first three statements confirming the importance of using the trainers to complement the theory and fulfill the learning objective of the undergraduate class (ABE 435), also allowing more exposure to real-world applications. More significant was the question about designing homework in a blended way between virtual lab experiences and traditional problems: only 50% of students preferred the new form of homework. Looking at detailed feedback, it appeared that several students suffered from some difficulties related to the use of a newly developed tool (such as overhead time due to software installation) and/ or the need to vary their traditional homework setting (i.e., finding a proper computer to solve homework problems). This response was unexpected by the instructor due to the large availability of computer resources for students at their institution. However, it must be considered for future usage of the tool. Expected remedies are (i) simplification of the installation procedure and manual, and (ii) avoiding weekend assignments, where more students have less convenient access to computer resources.

| Common mistakes
As mentioned, one strength of the proposed tool is to implement a learn-by-mistake strategy. On average, 6 students out of a total of 22 attended the weekly office F I G U R E 26 Lab evaluation undergraduate and graduate class.
T A B L E 7 Statements provided to the students.

S1
The use of lab experiences based on trainers (virtual or physical) is important to achieve the learning objectives of ABE 435.

S2
I feel the use of the hydraulic trainers exposed me to real-world fluid power application.

S3
The trainers are helpful in clarifying and complement the material presented in class.

S4
Designing homework that includes both virtual lab experiences and traditional problem is better than having traditional homework with only worked problems. hour or reached out to the instructor outside office hrs to clarify why a circuit does not operate properly. Several common mistakes were observed by the authors during lab sessions or office hours, most typical are (i) wrong connection of circuit, for example, a mistake connecting the pump outlet to the return port of a hydraulic control valve, (ii) selecting incorrect sensors to perform the requested data acquisition, and (iii) skip essential steps to operate the circuit, such as not properly setting maximum pressure of the system by adjusting the PRV.

| CONCLUSION
This work focused on the description of a virtual simulator that was developed to fill the gap of online education in FP without compromising the learning objectives of the class. The virtual trainer developed in Unity3D uses the actual CAD drawings of a reference newly designed physical trainers that are implemented to support FP education to provide the students with a realistic rendering. It gives the user realistic feelings of assembling, troubleshooting, and operating a hydraulic circuit. The tool can replicate the same lab experiences as the physical trainer with real noises recorded from the actual experiments and follows a learnby-mistake strategy. The modeling approach uses objectoriented programming where each component is modeled with the steady-state equation, and a cascade logic using the Boolean information (True/False) was used to determine the flow direction in the circuit. The implementation approach in Unity was detailed in this paper, and one of the significant lab assignments was described to detail the lab assignment procedure. The trainer was successfully used for the first time in the Fall of 2020 and Spring of 2021, where initial positive feedback was provided by the students. Under the class questionnaire, "The projects or laboratories aid me in achieving the class objectives," 75% of responses were "strongly agree, and 16.67% agree." NOMENCLATURES Ω opening area (mm 2 ) F force (N) Q flow rate (L/min) P power (W) p pressure (bar) p sat reference pressure (bar) p u user pressure (bar) ∆p pressure difference [bar) μ viscosity (-) γ isobaric cubic expansion (-) T torque (Nm) n speed (rpm)