{"Affiliation":[{"label":"Affiliation","value":"Applied Science, Faculty of","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","classmap":"vivo:EducationalProcess","property":"vivo:departmentOrSchool"},"iri":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","explain":"VIVO-ISF Ontology V1.6 Property; The department or school name within institution; Not intended to be an institution name."},{"label":"Affiliation","value":"Mechanical Engineering, Department of","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","classmap":"vivo:EducationalProcess","property":"vivo:departmentOrSchool"},"iri":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","explain":"VIVO-ISF Ontology V1.6 Property; The department or school name within institution; Not intended to be an institution name."}],"AggregatedSourceRepository":[{"label":"Aggregated Source Repository","value":"DSpace","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider","classmap":"ore:Aggregation","property":"edm:dataProvider"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider","explain":"A Europeana Data Model Property; The name or identifier of the organization who contributes data indirectly to an aggregation service (e.g. Europeana)"}],"Campus":[{"label":"Campus","value":"UBCV","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#degreeCampus","classmap":"oc:ThesisDescription","property":"oc:degreeCampus"},"iri":"https:\/\/open.library.ubc.ca\/terms#degreeCampus","explain":"UBC Open Collections Metadata Components; Local Field; Identifies the name of the campus from which the graduate completed their degree."}],"Creator":[{"label":"Creator","value":"Rezvanfar, Erfaan","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/creator","classmap":"dpla:SourceResource","property":"dcterms:creator"},"iri":"http:\/\/purl.org\/dc\/terms\/creator","explain":"A Dublin Core Terms Property; An entity primarily responsible for making the resource.; Examples of a Contributor include a person, an organization, or a service."}],"DateAvailable":[{"label":"Date Available","value":"2024-09-23T22:14:38Z","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/issued","classmap":"edm:WebResource","property":"dcterms:issued"},"iri":"http:\/\/purl.org\/dc\/terms\/issued","explain":"A Dublin Core Terms Property; Date of formal issuance (e.g., publication) of the resource."}],"DateIssued":[{"label":"Date Issued","value":"2024","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/issued","classmap":"oc:SourceResource","property":"dcterms:issued"},"iri":"http:\/\/purl.org\/dc\/terms\/issued","explain":"A Dublin Core Terms Property; Date of formal issuance (e.g., publication) of the resource."}],"Degree":[{"label":"Degree (Theses)","value":"Master of Applied Science - MASc","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#relatedDegree","classmap":"vivo:ThesisDegree","property":"vivo:relatedDegree"},"iri":"http:\/\/vivoweb.org\/ontology\/core#relatedDegree","explain":"VIVO-ISF Ontology V1.6 Property; The thesis degree; Extended Property specified by UBC, as per https:\/\/wiki.duraspace.org\/display\/VIVO\/Ontology+Editor%27s+Guide"}],"DegreeGrantor":[{"label":"Degree Grantor","value":"University of British Columbia","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#degreeGrantor","classmap":"oc:ThesisDescription","property":"oc:degreeGrantor"},"iri":"https:\/\/open.library.ubc.ca\/terms#degreeGrantor","explain":"UBC Open Collections Metadata Components; Local Field; Indicates the institution where thesis was granted."}],"Description":[{"label":"Description","value":"Precise modeling of dynamical systems can be crucial for engineering applications. Traditional analytical models often have shortcomings when capturing real-world complexities, particularly due to challenges in system nonlinearity representation and model parameter determination. Data-driven models, such as deep neural networks (DNNs), offer better accuracy and generalization but require large quantities of high-quality data. The present thesis introduces a novel method termed the Synthesized-Data Neural Network (SDNN), which integrates analytical models, which represent physics, with DNNs to enhance the dynamic model. The main steps of the present method are given below, with particular reference to the practical situation of a physical robot. The first three degrees of freedom (DOF) of a Kinova Gen3 Lite manipulator are formulated using the Euler-Lagrange equations of motion. The experimental data are recorded from the manipulator. Simulated data from the analytical model are combined with the experimental data to train the neural network. The model\u2019s performance is evaluated using the Mean Squared Error (MSE) in real-time experiments with the Kinova Gen3 Lite manipulator. Training datasets represent 14 robotic trajectories, with the MSE calculated for four testing trajectories. The results obtained have led to the following conclusions: The SDNN model has shown improved performance in predicting joint torques when compared to the purely analytical model or the purely data-driven model. The SDNN, when trained with synthesized data from 14 trajectories (SDNN-14) achieved the lowest MSE of 2.1442, outperforming the analytical model (MSE of 2.8054) and the neural network trained solely on experimental data (MSE of 3.0521).","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/description","classmap":"dpla:SourceResource","property":"dcterms:description"},"iri":"http:\/\/purl.org\/dc\/terms\/description","explain":"A Dublin Core Terms Property; An account of the resource.; Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource."}],"DigitalResourceOriginalRecord":[{"label":"Digital Resource Original Record","value":"https:\/\/circle.library.ubc.ca\/rest\/handle\/2429\/89276?expand=metadata","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO","classmap":"ore:Aggregation","property":"edm:aggregatedCHO"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO","explain":"A Europeana Data Model Property; The identifier of the source object, e.g. the Mona Lisa itself. This could be a full linked open date URI or an internal identifier"}],"FullText":[{"label":"Full Text","value":"Integration of Physics into MachineLearning for Enhanced RobotDynamic ModelingbyErfaan RezvanfarB.Sc., University of Tehran, 2021A THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFMASTER OF APPLIED SCIENCEinTHE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES(Mechanical Engineering)THE UNIVERSITY OF BRITISH COLUMBIA(Vancouver)September 2024\u00a9 Erfaan Rezvanfar 2024The following individuals certify that they have read, and recommend tothe Faculty of Graduate and Postdoctoral Studies for acceptance, the thesisentitled:Integration of Physics into Machine Learning for Enhanced RobotDynamic Modelingsubmitted by Erfaan Rezvanfar in partial fulfillment of the requirementsfor the degree of Master of Applied Sciencein Mechanical EngineeringExamining Committee:Dr. Clarence W. de Silva, Mechanical Engineering, UBCSupervisorDr. Xiaoliang Jin, Mechanical Engineering, UBCSupervisory Committee MemberDr. Kefei Wen, Mechanical Engineering, UBCSupervisory Committee MemberiiAbstractPrecise modeling of dynamical systems can be crucial for engineering appli-cations. Traditional analytical models often have shortcomings when cap-turing real-world complexities, particularly due to challenges in system non-linearity representation and model parameter determination. Data-drivenmodels, such as deep neural networks (DNNs), offer better accuracy and gen-eralization but require large quantities of high-quality data. The presentthesis introduces a novel method termed the Synthesized-Data Neural Net-work (SDNN), which integrates analytical models, which represent physics,with DNNs to enhance the dynamic model. The main steps of the presentmethod are given below, with particular reference to the practical situationof a physical robot. The first three degrees of freedom (DOF) of a KinovaGen3 Lite manipulator are formulated using the Euler-Lagrange equationsof motion. The experimental data are recorded from the manipulator. Sim-ulated data from the analytical model are combined with the experimentaldata to train the neural network. The model\u2019s performance is evaluated us-ing the Mean Squared Error (MSE) in real-time experiments with the KinovaGen3 Lite manipulator. Training datasets represent 14 robotic trajectories,with the MSE calculated for four testing trajectories. The results obtainedhave led to the following conclusions: The SDNN model has shown improvedperformance in predicting joint torques when compared to the purely ana-lytical model or the purely data-driven model. The SDNN, when trainedwith synthesized data from 14 trajectories (SDNN-14) achieved the lowestMSE of 2.1442, outperforming the analytical model (MSE of 2.8054) andthe neural network trained solely on experimental data (MSE of 3.0521).iiLay SummaryFor precise control of complex systems like robotic arms, scientists developmodels that predict and guide their behavior. These models fall into twocategories: Analytical models, based on physical laws, and Experimentalmodels, which are mainly AI models trained on real-world data.Analytical models, while based on fundamental physics principles, canbe inaccurate due to a lack of knowledge, complexities, and necessary sim-plifications. On the other hand, Experimental models can suffer from issueslike poor-quality or insufficient data. Our research presents a new techniquethat develops a model by combining the real-world pertinence of experimen-tal approaches with reliable physical principles of analytical methods.Our synthesized model has been experimentally verified to outperformindividual models, with an accuracy improvement of 29.7% over experimen-tal models and 23.6% over analytical models. This combined approach isparticularly useful in controlling complex systems where neither analyticalmodels nor experimental models alone provide sufficient accuracy.iiiPrefaceThe research presented in this thesis was conducted by Erfaan Rezvanfar atthe Industrial Automation Laboratory (IAL), under the supervision of Pro-fessor Clarence W. de Silva, at the University of British Columbia (UBC).Dr. de Silva suggested the research topic, provided the basis of the research,instructed my colleague Jing Wang to work on the project, supervised theproject throughout, and revised the draft thesis.This thesis aims to bridge the gap between analytical models based onphysical laws and experimental models trained on real-world data, by com-bining the two approaches. The research presented here demonstrates im-provements achieved by our approach, in model accuracy, which will havepositive practical implications in the modeling of complex dynamical sys-tems.My contributions to this project included developing the analytical model,operating the robotic manipulator and conducting experiments, reducing thedegrees of freedom of the robot for simulation, and writing the thesis.Sections 2.5 and 2.6, which involve the development of the neural net-work and the evaluation of its performance, were primarily done by mycolleague, Jing Wang.The experiments were conducted on a Kinova Gen3 Lite manipulator,which was provided by the laboratory of Dr. Christoph Sielmann.I hope that the findings of this thesis will contribute to further advance-ments in the field and inspire future research in the modeling and control ofdynamical systems.ivTable of ContentsAbstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiLay Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . vList of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiList of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiList of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixList of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . xAcknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . xi1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Current Approaches and the Existing Gaps . . . . . . . . . . 11.3 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . 21.4 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1 Experimental Data Collection . . . . . . . . . . . . . . . . . 82.2 Reduction of Degrees of Freedom . . . . . . . . . . . . . . . . 82.2.1 Advantages of using 3 DOF instead of 6 DOF . . . . 82.2.2 The reduction of the degrees of freedom . . . . . . . . 92.3 Analytical Model Development . . . . . . . . . . . . . . . . . 112.3.1 Kinetic energy K . . . . . . . . . . . . . . . . . . . . 122.3.2 Potential energy U . . . . . . . . . . . . . . . . . . . 142.3.3 Formulating the Lagrange equation . . . . . . . . . . 16v2.4 Analytical Data Generation . . . . . . . . . . . . . . . . . . . 162.4.1 Analytical Data - Collection . . . . . . . . . . . . . . 162.4.2 Analytical Data - Preprocessing . . . . . . . . . . . . 172.5 Synthesized-Data Neural Network Model . . . . . . . . . . . 182.6 Evaluation of SDNN Model\u2019s Effectiveness . . . . . . . . . . 193 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . 203.1 Reduction of Degrees of Freedom . . . . . . . . . . . . . . . . 203.2 Analytical Model Development . . . . . . . . . . . . . . . . . 203.3 Analytical Data Generation . . . . . . . . . . . . . . . . . . . 203.4 Evaluation of the SDNN Model . . . . . . . . . . . . . . . . 214 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1 Objectives of the Research . . . . . . . . . . . . . . . . . . . 254.2 Main Contributions . . . . . . . . . . . . . . . . . . . . . . . 254.3 Possible Future Work . . . . . . . . . . . . . . . . . . . . . . 254.3.1 Constructing a fully theoretical trajectory for the an-alytical model . . . . . . . . . . . . . . . . . . . . . . 264.3.2 Assesment of the quality of each model using torquecontrol . . . . . . . . . . . . . . . . . . . . . . . . . . 26Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28AppendicesA Rotation Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 31A.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31A.2 Rodrigues Rotation Formula . . . . . . . . . . . . . . . . . . 32B Lagrange Equations of Motion; Python Code . . . . . . . . 33B.1 Python program that computes the symbolic equations of mo-tion for the reduced Kinova Gen3 Lite . . . . . . . . . . . . . 34B.2 Python program that computes the equations of motion forthe reduced Kinova Gen3 Lite, with values instead of symbols 38viList of Tables2.1 Desired units for the data . . . . . . . . . . . . . . . . . . . . 183.1 Evaluation of SDNN using MSE . . . . . . . . . . . . . . . . 213.2 Reduced Kinova Gen3 Lite Properties . . . . . . . . . . . . . 24viiList of Figures2.1 Kinova Gen3 Lite Manipulator . . . . . . . . . . . . . . . . . 52.2 Kinova Gen3 Lite Components . . . . . . . . . . . . . . . . . 72.3 The reference plane for computing the potential energy . . . 153.1 Noise reduction using moving average filtering . . . . . . . . . 224.1 The current process of generating analytical data . . . . . . . 27A.1 Rotation Matrix Explanation . . . . . . . . . . . . . . . . . . 31viiiList of Symbols\u03b1 The angular acceleration of a body (vector).I The inertia tensor in a body.v The linear velocity of a body at its origin (vector).vc The linear velocity of a body at its center of mass (vector).\u03c9 The angular velocity of a body (vector).q\u02d9 The angular velocity of a joint (scalar). It may be referred to as \u201djointvelocity\u201d.q\u00a8 The angular acceleration of a joint (scalar). It may be referred to as \u201djointacceleration\u201d.\u03c4 The value of the torque of a joint (scalar).ixList of AbbreviationsANN: Artificial Neural NetworkCNN: Convolutional Neural NetworkDOF: Degree-of-FreedomNN: Neural NetworkPINN: Physics Informed Neural NetworkSDNN: Synthesized-Data Neural NetworkxAcknowledgementsI would like to express my deepest gratitude to my supervisor, ProfessorClarence W. de Silva, for his invaluable guidance and support, includingfinancial support, throughout this research. I also extend my thanks to mylab mates for their kindness and support in my research and life.Special thanks are due to my family, the pillars of my strength, for theirunwavering belief in me and for providing the foundation upon which I havebuilt my academic career. I am also grateful to my friends for their supportand companionship during my master\u2019s studies.Finally, I would like to acknowledge the funding support, through thegrant RGPIN-2023-03243, from the Natural Sciences and Engineering Re-search Council of Canada (NSERC), held by Dr. Clarence de Silva, whichmade this research possible.xiChapter 1Introduction1.1 BackgroundThe mechanics of a dynamical system, such as a robotic arm or a drone, canbe modeled in several ways. The model of a dynamical system representsthe physical behavior of that system and is an essential tool for its designand control. Therefore, modern engineering and industrial automation relyon the development of a precise model to optimize the performance [1\u20133]and the safety [4, 5] of the dynamical system.1.2 Current Approaches and the Existing GapsThere are various ways to model a dynamical system. A mathematicalmodel (also known as an analytical model) is widely used in this context.The mathematical model represents the system\u2019s dynamics through a set ofequations that come from the fundamental principles of physics [6]. Math-ematical modeling has been used in engineering and scientific research fordecades, offering a methodical way to model and understand dynamicalsystems. However, mathematical models come with their limitations. Theysimplify the real-world system and may not completely consider the system\u2019sspecifications. The resulting abstractions may limit their ability to replicatethe behavior of a complex dynamical system entirely. In response to thisgap, some researchers have turned to Artificial Neural Network (ANN) mod-els, or simply Neural Network (NN) models, as an alternative approach [7].Neural network models are computational architectures inspired by the hu-man brain, using interconnected nodes to process data and make predictions.Instead of using mathematical equations, this method directly observes andlearns from data obtained from the real system itself. For example, an input,such as force or current, is applied to the real physical dynamic system, andthe corresponding output is recorded. The Neural Network model is trainedusing this input-output data, thereby creating a model that can adapt tothe system\u2019s unique characteristics better than a mathematical model. How-1ever, while NN models do well in capturing the specifications of the systemfrom data, they lack interpretability and an understanding of the physicallaws governing the system. It is like a black box that predicts the output fora specific input to the box. Additionally, the dataset that the NN model istrained on may not be big enough, or the data may be too noisy, or in somecases, if the operating environment of the robot changes the data will notrepresent the corresponding behavior, and hence the model will not performwell. While such problems limit the use of NN models, mathematical modelsdo not face such issues. So a model solely based on NN may not always bethe most effective approach to model a dynamical system. Then it is likelythat we can benefit from the strengths of both mathematical models andNN-based models and compensate for the limitations of each approach.1.3 Research ObjectivesIn the present study, we introduce a new model that we call the Synthe-sized Data Neural Network (SDNN) model. In this approach, we merge thedata from physics-based analytical models with real-world data and train aNeural Network over this synthesized dataset. Although the resulting modelmay not compensate for all the limitations of one another, it reduces their in-dividual shortcomings. In our methodology, first, we derive a physics-basedanalytical model to simulate the system under ideal conditions and collectinput-output data from this model. Second, we gather real-world data (ex-perimental data) from the real system\u2019s operation. The two datasets arethen combined and used to train a Neural Network model. The achievedmodel will rely partly on the laws of physics (from the analytical model\u2019sdata) and partly on the specific conditions of the system (from the real-world data). As a result, the developed model is less likely to deviate fromthe expected natural performance (physical laws) of a dynamical system andcan compensate for the simplifications made in a mathematical model.1.4 Related WorkIn the field of Dynamical Systems, the merging of physical principles withmachine learning techniques has seen varied approaches. This integrationprimarily revolves around two aspects: how physics is embedded into ma-chine learning models and the choice of machine learning methods like Arti-ficial Neural Networks (ANNs) and Convolutional Neural Networks (CNNs),among others.2One widespread use of ANNs involves solving Partial Differential Equa-tions (PDEs) derived from the physical equations of Fluid Dynamic Systems[8, 9]. Alternatively, researchers have also utilized physical equations to en-hance feature engineering within ANNs [10]. The adoption of CNNs is onthe rise, with some being employed to formulate algebraic equations rep-resenting the dynamics of specific systems, as seen for example in bearingsystems [11] Moreover, researchers have utilized simulation results groundedin physics to define parameters within CNN architectures [12].The work by Rackauckas et al. introduces the concept of Universal Dif-ferential Equations (UDEs), which integrate neural networks and differentialequations into a unified modeling framework. At the core of the UDE ap-proach is the use of neural networks to parameterize the right-hand sideof a differential equation, allowing the model to learn the underlying dy-namics from data while retaining the structure and interpretability of thedifferential equation. The authors propose several strategies for constructingUDE architectures, including the use of residual connections, Runge-Kuttaintegrators, and adjoint-based sensitivity analysis for efficient training. Im-portantly, UDEs enable the incorporation of known physical principles andconstraints into the model structure, ensuring that the learned dynamicsadhere to relevant scientific laws and principles [13].A paper by Brunton et al. presents a new approach that combines data-driven machine learning with traditional physics-based modeling. Their keyinnovation is a technique called \u201dsparse identification of nonlinear dynam-ics\u201d (SINDy), which can automatically discover the underlying mathemati-cal equations that govern a complex system, using only observational data.Rather than relying on prior physics knowledge, SINDy analyzes patternsin the data to determine the minimal set of mathematical terms neededto describe the system\u2019s behavior. By keeping the final model sparse andinterpretable, the authors show how this data-driven approach can provideinsights into the physical mechanisms at play [14].The study by Weinan et al. focuses on two main methodological aspectsof integrating machine learning with physics-based modeling. Firstly, theauthors highlight the importance of properly imposing physical constraintswithin the machine learning models in order to develop interpretable andreliable physics-based representations. This is a key challenge, as machinelearning models need to respect the underlying physical principles and laws.Secondly, the paper emphasizes the criticality of obtaining optimally repre-sentative datasets for training the machine learning components. The qual-ity and coverage of the training data are crucial for successfully applyingmachine learning techniques to physics problems [15].3Compared to the available approaches to integrate physics into machinelearning, our method is different. We employ a conventional neural networktrained on synthesized data, a blend of physics-based data and real-worlddata. This strategy represents a data-fusion methodology, aiming to es-tablish a link between theoretical frameworks and practical applications inDynamical Systems.4Chapter 2MethodologyThis section outlines the methodology used in the present study to integrateexperimental data with an analytical model for precise modeling of the me-chanics of a dynamical system, focusing on a Kinova Gen3 Lite roboticmanipulator (Figure 2.1). The process of experimental data collection isdescribed first, highlighting the reduction of the robot\u2019s degrees of freedomfor analysis. Subsequently, the development of a mathematical model of itsmechanics using Lagrange\u2019s method is detailed, emphasizing the derivationof the equations of motion for a three-degree-of-freedom (3-DOF) robot arm.Next, the Synthesized-Data Neural Network (SDNN) model is introduced,which merges the physics-based analytical model with real-world experimen-tal data. Finally, the integration of data and model validation techniquesare discussed to assess the prediction accuracy of the SDNN model. In thepresent study, the dynamical system is a Kinova Gen3 Lite, reduced to threedegrees of freedom from its full (6-DOF) capability (Figure 2.2).Figure 2.1: Kinova Gen3 Lite manipulator 11https:\/\/www.kinovarobotics.com\/product\/gen3-robots5The methodology consists of the following steps:1. Experimental Data Collection: The process of gathering experi-mental data from the robot.2. Reduction of Degrees of Freedom: The computations needed toreduce the robot\u2019s degrees of freedom from 6 DOF to 3 DOF, for thepresent modeling purposes.3. Analytical Model Development: The derivation of the mechanics-based analytical model using Lagrange\u2019s method for a 3 DOF robotarm.4. Analytical Data Generation: The process of generating data usingthe analytical model.5. Synthesized-Data Neural Network (SDNN) Model: Introduc-tion of the structure of the SDNN model that merges the physics-basedanalytical model with experimental data.6. Evaluation of SDNN Model Effectiveness: Evaluation of theeffectiveness of the SDNN model when compared to both a standaloneneural network and an analytical model.6(a) (b)Figure 2.2: a) Main components of the Kinova Gen3 Lite manipulator. b)Frame assignments for reduced degrees of freedom (composed of links 1, 2,and 3\u2019)72.1 Experimental Data CollectionExperimental data were collected using a Kinova Gen3 Lite robotic manip-ulator (Figure 2.1). The robotic manipulator is equipped with sensors tocapture real-time response data for feedback. Our research required data onjoint angle, joint velocity, and torque. While specific sensors were availablefor joint angle and joint velocity measurements, the manipulator lacked adedicated torque sensor. Therefore, torque data were estimated based oneach joint\u2019s current using the API provided by Kinova.As previously specified, only the initial three joints of the robot aredesignated as movable joints, while the remaining three are set to theirzero positions. Consequently, experimental data is exclusively gathered bymanipulating the first three joints while keeping the other three joints intheir fixed configuration. To achieve this, random trajectories comprisingangle data were independently assigned to joints 1, 2, and 3. The torquesgenerated during these movements were recorded using the robot\u2019s built-in sensors. A total of 14 experiments were conducted using the Reduced-Degree-of-Freedom Kinova Gen3 Lite to create a dataset encompassing avariety of dynamic behaviors. Each of these experiments was 20 secondslong and was taken at a frequency of 1kHz. This high frequency was morethan adequate and, therefore, was reduced to 100 Hz in the present research.The input to the robot was the required position sequence. The robot\u2019sbuilt-in controller then generated the appropriate torques to execute thespecified trajectory, which were collected as the robot\u2019s output.It was immobilizing specific joints that resulted in the reduction of therobot\u2019s degrees of freedom. However, to analytically model the reduced-degree-of-freedom robot, it is necessary to calculate the properties (mass,inertia, length of the links, and center of mass location) of the robot withthe new bodies the reduction of degrees of freedom has formed. Whilethe properties of the first two links remain known, a new third link hasbeen introduced, which is the combination of the fourth through sixth links.Determining the properties of the new third link requires calculating thembased on the properties of each of the four individual links that form it.2.2 Reduction of Degrees of Freedom2.2.1 Advantages of using 3 DOF instead of 6 DOFAlthough optimizing the model for a 6 DOF robot may seem advantageousdue to its comprehensive industrial applications, the complexity involved8in developing an analytical model for such a system can detract the focusfrom the primary objective of the present research. Thus, a 3 DOF sys-tem was chosen as a more suitable alternative for the physical system inthis research. A 3 DOF system presents a compromise between simplicityand complexity, allowing for meaningful analysis without overwhelming thestudy with unnecessary complications and problems particularly caused bycomputational errors. The compromised level of complexity also ensuresthat the performance differences observed are significant and not obscuredby overly simplistic models or masked by non-focal effects.The primary aim is to determine whether combining physics-based andexperimental data can enhance the system model. For this purpose, a lesscomplex system like the 3 DOF robot would provide a more desirable plat-form for experimentation, observation, and analysis.Additionally, third-party software packages for simulating the behav-ior of serial robots (such as MATLAB Robotics System Toolbox2 and Ro-boDK3) were considered. However, these tools function as black boxes,giving limited insight into the factors influencing the discrepancies betweensimulated and experimental data. Due to this lack of transparency, theywere deemed unreliable for the present study and the robot was modelledafter reducing it to 3 degrees of freedom.2.2.2 The reduction of the degrees of freedomThe degrees of freedom of the serial robot were reduced by immobilizingspecific joints, resulting in a system with three active joints and three corre-sponding links. Upon reducing the degrees of freedom of the robot, links 3through 6 are considered to be rigidly connected to each other, introducinga new link. The new link is referred to as link 3\u2032 and is shown in Figure2.2b. The properties -mass, center of mass, moment of inertia, and length\u2014of the new link were calculated based on the properties of the individuallinks comprising it.The necessary equations for the needed calculations are provided below.2Robotics System Toolbox - MATLAB (mathworks.com)3Simulator for industrial robots and offline programming - RoboDK9Computing the new mass (m)The mass of a link that is a combination of several consecutive links is thesum of the masses of those links:mcombined =n\u2211i=jmi (2.1)In Equation (2.1), mcombined denotes the total mass of the combination oflinks j through n of an n-link serial robot. Therefore, the mass of link 3\u2032 inour case will be:m3\u2032 =6\u2211i=3mi (2.2)Computing the new Center of Mass (c)The center of mass of a link that is a combination of several consecutivelinks is calculated using the following equation, as clear from the momentbalance:ccombined =\u2211ni=j micimcombined(2.3)Here, ccombined represents the coordinates of the new center of mass, and cidenotes the coordinates of the center of mass of each individual link. Thecenter of mass of link 3\u2032 in our case will be:c3\u2032 =\u22116i=3micim3\u2032(2.4)Computing the new Moment of Inertia (I)The inertia of a link that is a combination of several consecutive links iscalculated using the equation:Icombined =n\u2211i=jIi +n\u2211i=jmid2i (2.5)This Equation results from the well-known parallel axis theorem. Here, Idenotes the moment of inertia. It is important to note that all the inertiaIi are represented about the center of mass of their corresponding link\u2019scenter of mass ci and with respect to the inertial frame. The inertial frameand the body-attached frames of the three links of the robot are depicted in10Figure 2.2b. The inertial frame coincides with frame 1 when q1 = 0. Thevector di represents the distance between link i\u2019s center of mass and thenew \u201ccombined\u201d center of mass:di = ci \u2212 ccombined (2.6)According to Equation (2.5), the moment of inertia of our new link canbe computed by calculating the moment of inertia of each of the old linksaround the new center of mass (the parallel axis theorem) and summingthem up. Therefore,I3\u2032 =6\u2211i=3Ii +6\u2211i=3mid2i (2.7)Computing the new Length (l)The length of a link that is a combination of several consecutive links iscalculated by adding the lengths of all those links. Similar to the momentof inertia, all the lengths must be represented in the directions of the in-ertial frame and not each link\u2019s body frame orientation, assuming that thelast several links are fully stretched and aligned (as true in the conductedexperiments),lcombined =n\u2211i=jli (2.8)Therefore, the length of link 3\u2032 is calculated as:l3\u2032 =6\u2211i=3li (2.9)Mass m is scalar, moment of inertia I is a 3\u00d73 matrix, center of mass c,distance d and length l are 1\u00d7 3 row vectors. The corresponding elements(with subscripts) are scalars. The links\u2019 lengths could be considered scalar,however, they are considered as vectors for ease of calculations. The aboveequations will result in the properties of link 3\u2032 which will be used alongwith the properties of links 1 and 2 for deriving the analytical model of therobot.2.3 Analytical Model DevelopmentTo complement the experimental data, an analytical model, also referredto as a mathematical model or a physics-based model, was developed us-ing Lagrange\u2019s method for the reduced-degree-of-freedom Kinova Gen3 Lite11manipulator. This results in the equations of motion of the robotic system,providing a set of differential equations that represent the dynamics of thatsystem. Lagrange\u2019s method involves expressing the kinetic energyK and po-tential energy U of the system in terms of generalized coordinates and theirtime derivatives. In the context of our robotic system, these generalizedcoordinates correspond to the joint angles q, which define the configurationof the robot at any given time.The Lagrange equation is given by,\u03c4 =ddt(\u2202L\u2202q\u02d9)\u2212 \u2202L\u2202q(2.10)Here, \u03c4 is the joint torque vector, q and q\u02d9 are the joint angle and jointvelocity vectors respectively, and L is the Lagrangian. Notably, \u03c4 , q and q\u02d9are n\u00d71 vectors where n indicates the degrees of freedom of the serial robotand is equal to 3 in our case. The Lagrangian is computed from the kineticenergy K and potential energy U of the system, asL = K \u2212 U (2.11)Given the properties of the three links of the robot, Equation 2.10 providesan analytical model for the required torque of all joints (\u03c4 ), as a function ofjoint angles, joint velocities, and joint accelerations (q(t), q\u02d9(t), and q\u00a8(t)).2.3.1 Kinetic energy KIn a mechanical dynamic system, the total kinetic energy K is the sum ofthe kinetic energies associated with each of its degrees of freedom.K =3\u2211i=1Ki (2.12)Here, K is the kinetic energy of the robot, which is needed for the La-grangian. Ki is the kinetic energy of the ith link, and n is the number oflinks. In our case, n is 3.The kinetic energy of a single link i (rigid body), is calculated as,Ki =12mivTci,0vci,0 +12\u03c9iTRi,0IiRTi,0\u03c9i (2.13)Here, mi is the mass of the link (scalar), vi is the linear velocity vector(3x1), \u03c9i is the angular velocity vector (3x1), Ri,0 is the rotation matrix12(3x3) between the body-attached frame and the inertial frame, and Ii is themoment of inertia tensor (3x3) around the center of mass of the body andwith respect to the body-attached frame.The mass m and inertia I values for the first two links are known and thoseof the third link are computed, as indicated in section 2.2.2. The rotationmatrices Ri,0, the angular velocities \u03c9i, and the linear center of mass ve-locities vci,0 are the unknowns of Equation 2.13, which will be computednow.Rotation Matrix RWith the frame assignments shown in Figure 2.2, the rotation matrices be-tween the four frames (inertial frame being frame 0) are as follows:R0,1 = R(\u2212q1, k\u02c6)R1,2 = R(\u2212q2, j\u02c6)R2,3 = R(q3, j\u02c6)(2.14)The rotation matrix R is computed from Rodrigues\u2019 rotation formula whichis presented below:R = I+ sin qS+ (1\u2212 cos q)S2 (2.15)In this equation, S is the skew-symmetric matrix of the unit vector rep-resenting the axis of rotation. More information about the definition ofrotation matrix can be found in Appendix A.1.Taking into account that,Ri,j = RTj,i (2.16)the rotation matrices Ri,0, which are required in Equation 2.13, are com-puted as follows:R2,0 = R1,0 \u00d7R2,1,R3,0 = R1,0 \u00d7R2,1 \u00d7R3,2(2.17)Angular Velocity \u03c9The angular velocity vector \u03c9i of the three rigid links are obtained as follows:\u03c91 = q\u02d91k\u02c6,\u03c92 = R1,2\u03c91 + q\u02d92j\u02c6,\u03c93 = R2,3\u03c92 \u2212 q\u02d93j\u02c6.(2.18)13It is noted that q\u02d9i is the derivative of the ith joint angle. In other words,q\u02d9i (scalar) is the joint velocity of link i, while \u03c9i (vector) is the angularvelocity of that link in its body-attached frame.Linear Velocity at the center of mass vcThe linear velocity at the center of mass of each link with respect to itsbody-attached frame vci,i is calculated as:vci,i = \u03c9i \u00d7 ci (2.19)In Equation 2.19, ci refers to the coordinates of the center of mass of link iin that link\u2019s body-attached frame.Consequently, the linear velocity of each center of mass with respect to theinertial frame vci,0 is calculated:vc1,0 = R1,0 \u00d7 vc1,1vc2,0 = v2,0 +R2,0 \u00d7 vc2,2 ,vc3,0 = v3,0 +R3,0 \u00d7 vc3,3 .(2.20)Where, vi,0 indicates the linear velocity of the frame (origin) of link i:v2,0 = R1,0 \u00d7 \u03c91 \u00d7 l1, (l1: length of link 1)v3,0 = v2,0 +R2,0 \u00d7 \u03c92 \u00d7 l2, (l2: length of link 2)(2.21)Using Equations 2.13 through 2.21, and substituting into Equation 2.12, thekinetic energy of the robot is computed as a function of q(t), q\u02d9(t), and q\u00a8(t).2.3.2 Potential energy UThe potential energy of the entire robot U is the sum of the potential energyof all three links.U =3\u2211i=1Ui (2.22)The potential energy of a single link i (rigid body) is computed as follows:Ui = mighi (2.23)In this equation, g is the gravitational acceleration (scalar), and hi is theheight of the center of mass of link i (scalar), which is the only value thatmust be computed here. As shown in Figure 2.3, the plane containing the14Figure 2.3: The reference plane for computing the potential energy. Theplane coincides with Frame 0x and y axes of the inertial frame (frame 0) is considered the reference forcomputing the potential energy. The height of the center of mass of eachlink (hi) is the distance it has with the described reference plane:h1 = cz1,h2 = \u2225l1\u2225+ cz2 cos q2,h3 = \u2225l1\u2225+ \u2225l2\u2225 cos q2 + cz3 cos(q2 \u2212 q3).(2.24)Here, czi represents the z-component of the center of mass of link i. Addi-tionally, li is the length of link i, and \u2225li\u2225 denotes the norm (magnitude) ofthe li vector.The potential energies of the three links are therefore calculated as follows:U1 = m1gcz1,U2 = m2g(\u2225l1\u2225+ cz2 cos q2),U3 = m3g(\u2225l1\u2225+ \u2225l2\u2225 cos q2 + cz3 cos(q2 \u2212 q3)).(2.25)By substituting from Equation 2.25 into Equation 2.22, the potential energyof the robot is obtained as a function of q(t), q\u02d9(t), and q\u00a8(t).152.3.3 Formulating the Lagrange equationKnowing T and U , the Lagrangian L is determined using Equation 2.11 andsubstituted into Equation 2.10, to obtain the equations of motion. Becausethe simplified robot has only three degrees of freedom, Equation 2.10 willbe in the form,\u03c4 =\uf8eb\uf8ed\u03c41\u03c42\u03c43\uf8f6\uf8f8 =\uf8eb\uf8ec\uf8ec\uf8ec\uf8edddt(\u2202L\u2202q\u02d91)\u2212 \u2202L\u2202q1ddt(\u2202L\u2202q\u02d92)\u2212 \u2202L\u2202q2ddt(\u2202L\u2202q\u02d93)\u2212 \u2202L\u2202q3\uf8f6\uf8f7\uf8f7\uf8f7\uf8f8 (2.10)These steps were carried out and the analytical model was developed for theReduced Kinova Gen3 Lite robot in Python.2.4 Analytical Data Generation2.4.1 Analytical Data - CollectionThe analytical model provides equations for joint torques \u03c4 as functions ofq, q\u02d9, and q\u00a8. The same inputs were given to the analytical model as to thephysical robot. The same inputs were provided to both the analytical modeland the physical robot. For the physical robot, the input consisted of a jointangle trajectory (a time sequence of q), while the time sequences of q\u02d9 and q\u00a8are required as inputs to the analytical model to obtain the output \u03c4 . Thejoint velocities q\u02d9 were read from the robot\u2019s relevant built-in sensors. How-ever, joint accelerations q\u00a8 are also required, but not directly provided by therobot sensors. Therefore, the joint accelerations were computed using thejoint velocity data.The time derivative of the joint velocity q\u02d9 was calculated to obtain thejoint acceleration q\u00a8. The Finite Difference method was used which approxi-mates the derivative as,q\u00a8(t) \u2248 q\u02d9(t+\u2206t)\u2212 q\u02d9(t\u2212\u2206t)2\u2206t(2.26)where:\u2022 q\u00a8(t) is the joint acceleration at time t.\u2022 q\u02d9(t) is the joint velocity at time t.16\u2022 \u2206t is the time interval between consecutive data points (1 ms in thepresent application).For boundary points, forward and backward differences are used. Thismethod provides a reliable and efficient way to derive the joint accelera-tions from the given joint velocity data.The joint velocity data collected from the robot are raw and not suitablefor theoretical models. The reason for using feedback data for the analyticalmodel is that the real data (the trajectories) are generated based on therobot\u2019s controller. This means that the joint velocities are not defined the-oretically, but generated by the robot\u2019s controller. Alternative approachesare discussed in Section 4.3.1 for future consideration. In view of this, beforeutilizing the feedback angular velocities, preprocessing them is necessary.2.4.2 Analytical Data - PreprocessingThe feedback data has a frequency of 1 kHz, resulting in discrete data pointsspaced 1 ms apart. This high frequency is, however, more than necessaryand was reduced to 100 Hz for the present study. Additionally, the jointvelocity data extracted from the robot sensors were highly noisy. A simplemoving average (SMA) filter was applied to the data to reduce the noise.This step is essential for obtaining cleaner joint velocity data and hence, foraccurately computing the joint acceleration data. The moving average is asimple yet effective method for smoothing noisy data, where averaging overa specified window of data points is performed. Our joint velocity data weregathered over 20 seconds at a frequency of 100 Hz. The window size for thefilter was 40 data points, equivalent to averaging over 0.4 seconds of data.As mentioned earlier, the filtered joint velocity data was used to createthe joint acceleration data. Since the joint velocity data is not perfect evenafter passing through the SMA filter, and given that taking the derivativetends to amplify noise, the resulting joint acceleration data is also noisy.Therefore, the joint acceleration data was further filtered to reduce noise.The same SMA filter applied to the joint velocity data was used on the jointacceleration data. That is because derivation causes the noise in the velocitydata to amplify and a filter on the acceleration data can help reduce thatnoise.The units of the data were converted to the desired units. The desiredunits are presented in Table 2.1:17Table 2.1: Desired units for the dataQuantity Symbol UnitJoint Angle q radJoint Velocity q\u02d9 rad\/sJoint Acceleration q\u00a8 rad\/s2Torque \u03c4 Nm2.5 Synthesized-Data Neural Network ModelAs mentioned in Section 2.1, 14 trajectories were executed on the KinovaGen3 Lite robot using only its first three joints. The sensor readings forjoint angles q, joint velocities q\u02d9, and joint torques \u03c4 were collected.Out of the 14 trajectories, 10 were randomly selected for training, andthe remaining 4 were used for testing the model. Additionally, as explainedin Section 2.4, analytical data were generated corresponding to the 10 ex-perimental training datasets.The present research aims to analyze the effectiveness of adding ana-lytical data to the training process. Therefore, the mapping function (theNeural Network model) is chosen to be a Multi-Layer Perceptron (MLP), alightweight and straightforward method for training the robot model. If theaddition of analytical data proves effective, more complex mapping functionscan be implemented to improve the model quality.The primary goal has been demonstrating the effectiveness of the NeuralNetwork model trained on the synthesized dataset, which combines bothexperimental and analytical data (1). For comparison, the Neural Networkwas also trained separately on each dataset alone: on experimental data only(2) and on analytical data only (3). Additionally, the analytical model (nota Neural Network) was included in the analysis (4). Consequently, there arefour models to be compared:1. Neural Network trained on Synthesized Data2. Neural Network trained on Experimental Data only3. Neural Network trained on Analytical Data only4. Analytical Model (not Neural Network)182.6 Evaluation of SDNN Model\u2019s EffectivenessThe performance of each of the four models described in the previous sectionwas evaluated using a set of experimental data. Despite its limitations,experimental data is a practical reference for initial evaluation. A morerobust and reliable method for evaluating the effectiveness of the SDNNmodel is suggested in Section 4.3.2, which outlines future work and potentialimprovements.The performance of the proposed SDNN model was assessed using themean square error (MSE) as the evaluation metric. The MSE was deter-mined by comparing the predicted joint torques generated by the SDNNmodel with the ground truth joint torques (known from the experiments)required for the end-effector to follow the desired trajectory. Lower MSE val-ues indicate a closer match between the predicted and actual joint torques.For the four models mentioned in the previous section, each evaluationexperiment was repeated five times. Different initialization seeds were usedfor the neural network parameters in each of the five experiments.19Chapter 3Results and Discussion3.1 Reduction of Degrees of FreedomGiven equations 2.1-2.8 and the properties of the links of the 6-DOF KinovaGen3 Lite robot, the properties for the reduced-degrees-of-freedom 3-DOFrobot are established, as given in Table 3.2. In this table, the moment ofinertia matrices are computed around the center of mass of each link withrespect to their body-attached frame. The length of each link is consideredin the sole direction of its longest length. The center of mass of each link iswith respect to the body-attached frame of that link. In this thesis, all thebody-attached frames are considered parallel to the inertial frame when attheir zero positions (q = 0), as depicted in Figure 2.2b.3.2 Analytical Model DevelopmentThe analytical model, i.e., the equations of motion, for the reduced (3-DOF)serial manipulator was derived. The inputs to the model are nine values intotal: the angles, joint velocities, and joint accelerations of the three joints(q, q\u02d9, q\u00a8), each represented as a 3\u00d71 vector. The output is the joint torquesvector \u03c4 (3\u00d7 1).The Python code used to derive the equations of motion is provided inAppendix B. The resulting equations of motion themselves are too lengthyto be included here and can be obtained by running the provided code.3.3 Analytical Data GenerationThe results of data generation using the analytical model are presented inthis section. As explained in section 2.4, the inputs to the analytical modelare joint angles, joint velocities, and joint accelerations of the three joints,and the outputs are the joint torques of the three joints. From the mentionedinputs, the joint angles and joint velocities are in this case generated by theKinova Gen3 Lite\u2019s controller, and the joint accelerations are calculated as20the derivative of the joint velocities. The preprocessing steps, including theapplication of the SMA filter to the joint velocity and acceleration data,significantly improved the quality of the analytical results. In Figure 3.1a,the original and filtered joint velocity data are compared for joint no. 2 ofthe robot, with a random trajectory. Figure 3.1b shows the comparison ofthe joint acceleration data of joint no.2, for the same random trajectory,before and after filtering.The filtering process reduced noise, thereby making the data more suit-able for analytical purposes. This step was crucial, as the derivation ofacceleration from velocity data amplifies noise, which could lead to signifi-cant inaccuracy in the torque calculations.3.4 Evaluation of the SDNN ModelThe average MSE errors for testing the Synthesized-Data Neural Network(SDNN) model, as well as the other three models employed for comparison,are given in Table 3.1.Table 3.1: The Averaged Mean Squared Errors of different models comparedto experimental data. A lower value corresponds to better performance.Models Mean Squared Error (RMS)Analytical Model (Euler-Lagrange) 2.8054 \u00b1 0.0NN trained on Experimental Data only 3.0521 \u00b1 0.4235NN trained on Synthesized-Data (SDNN) 2.1442 \u00b1 0.1159The experiments for evaluating the performance of the four models wererepeated five times. The standard deviations of these repeated experimentsare included in Table 3.1. The Lagrange analytical model provides the bestrobustness, with zero variance.The evaluation results show a significant improvement in the accuracywith the proposed SDNNmodel over the baseline methods. The mean squareerror (MSE) on the testing set for the Lagrange analytical model, which isa conventional analytical model, is 2.81.The model trained solely with experimental data results in an MSE of3.05, which is a weaker performance than the Analytical model. Severalfactors contribute to the weaker performance of the data-driven model whencompared to the Lagrange model:21(a) SMA Filter applied on Angular Velocity(b) SMA Filter applied on Angular AccelerationFigure 3.1: (a) Noisy joint-velocity data of joint no.2 in a random trajectory,and the result of moving average filtering; (b) Noisy joint-acceleration dataof joint no.2 in the random trajectory, and the result of moving averagefiltering.22\u2022 Noise and Inconsistencies: The presence of noise and inconsis-tencies in the data can significantly impact model performance. Forinstance, shaking disturbances of the robot arm during data collectioncan introduce significant noise, leading to inaccurate measurements ofjoint angles, velocities, and torques.\u2022 Missing Data and Sensor Errors: Missing data points or errors insensor readings can degrade the quality of the training data, resultingin a model that struggles to generalize well to new data.\u2022 Limited Diversity and Quantity of Training Data: In real-worldapplications, it is challenging to collect comprehensive datasets thatcover all possible operational conditions and trajectories. This limiteddata availability can prevent the data-driven model from learning thefull range of system dynamics, making it less reliable in unobservedconditions.It is apparent that the NN models mentioned here and the analyticalmodel each have their benefits and limitations. These factors point to thekey contribution of the present thesis, showing that training data-drivenmodels using experimental data alone might yield sub-optimal solutions,even compared to conventional analytical models. This also underscores theimportance of incorporating analytical data to enhance the robustness andaccuracy of data-driven models.The experimental results demonstrate that SDNN, being a Neural Net-work trained on both experimental and analytical data, models the dynamicsof the Kinova Gen3 Lite more effectively. This indicates the model\u2019s robust-ness and reliability in handling the complex dynamics of robot manipulators.23Table 3.2: Reduced Kinova Gen3 Lite PropertiesLink Mass (kg) Inertia Matrix (kg.m2) Length (m) Center of Mass (m)1 0.9597\uf8eb\uf8ec\uf8ec\uf8ec\uf8ed0.00166 0 00 0.0014 00 0 0.000895\uf8f6\uf8f7\uf8f7\uf8f7\uf8f8 (0 0 0.115) (0 0.0221 0.0994)2 1.1776\uf8eb\uf8ec\uf8ec\uf8ec\uf8ed0.0115 0 00 0.0113 00 0 0.00103\uf8f6\uf8f7\uf8f7\uf8f7\uf8f8 (0 0 0.28) (0.03 \u22120.0483 0.0966)3 1.907\uf8eb\uf8ec\uf8ec\uf8ec\uf8ed4.35e\u2212 03 6.67e\u2212 05 1.13e\u2212 036.67e\u2212 05 3.96e\u2212 03 1.80e\u2212 031.13e\u2212 03 1.80e\u2212 03 1.73e\u2212 02\uf8f6\uf8f7\uf8f7\uf8f7\uf8f8 (0 0 0.48) (0.031 \u22120.0136 0.186)24Chapter 4Conclusion4.1 Objectives of the ResearchThis thesis presented a novel approach to modeling dynamic systems bymerging analytical physics models with deep neural networks through theproposed Synthesized-Data Neural Network (SDNN). The experiments withthe Kinova Gen3 Lite manipulator demonstrated that the SDNN signif-icantly improved the accuracy of dynamics predictions when compared tostandalone models. By combining simulated (analytical\/physics-based) dataand experimental (real) data, the SDNN offered a more reliable frameworkfor engineering applications such as precise control and operation of robotsin diverse environments.4.2 Main ContributionsThe evaluation results showed that the SDNN model achieved the lowestmean square error (MSE) of 2.1442, outperforming the Lagrange analyticalmodel (MSE of 2.8054) and the NN trained with experimental data only(MSE of 3.0521). These findings emphasized the importance of incorporat-ing analytical data to enhance the robustness and accuracy of data-drivenmodels.The SDNN\u2019s ability to accurately predict joint torques for the KinovaGen3 Lite manipulator demonstrates its robustness and reliability in han-dling complex robotic dynamics. The proposed method advances the un-derstanding of system dynamics and provides a valuable tool for developingadvanced robotic control strategies, thereby contributing to the fields ofindustrial automation and robotic manipulation.4.3 Possible Future WorkFuture work will explore the application of SDNN to systems with higherdegrees of freedom and carrying out more complex tasks, further validating25its potential in broader robotic applications. In addition, some approachesin this research may be modified to perform more reliable comparisons andpossibly achieve even better performance from the model. For this purpose,the following modifications can be made in the future work:1. Construct a fully theoretical trajectory for the analytical model.2. Asses the quality of each model using torque control.A detailed explanation of each of these activities is provided next.4.3.1 Constructing a fully theoretical trajectory for theanalytical modelCurrently, certain way-points are defined for the robot, and a trajectory-a set of joint angles and joint velocities- is generated by the robot. Thistrajectory, called the experimental trajectory, is then processed and fed tothe analytical model. The process of gathering this trajectory and feeding itto the analytical model is shown in Figure 4.1. However, the data collectedfrom the experiment is prone to noise which may lead to miscalculation.Therefore, constructing a fully theoretical trajectory and not relying on thedata from experiments can boost the effectiveness of the analytical model.4.3.2 Assesment of the quality of each model using torquecontrolCurrently, the performance of each model is compared to a set of experi-mental data. However, due to inherent noise, experimental data does notrepresent a perfect trajectory. A potentially superior evaluation method in-volves feeding the predicted torques from each model back into the robot.The robot then follows a trajectory using open-loop torque control. Themodel that produces a trajectory most closely matching the initially plannedtrajectory is considered to have best captured the system\u2019s dynamics.26Figure 4.1: The current process of generating analytical data. The trajectorygenerated in the experiment is filtered and used as an input to the analyticalmodel, resulting in analytical torque outputs.27Bibliography[1] H. Fang, B. Xin, and X. Zhang, \u201dWorkspace-constrained optimal de-sign of three-degrees-of-freedom parallel manipulators with minimumparasitic motions by integrating interval analysis, region mapping, anddifferential evolution,\u201d Engineering Optimization, vol. 47, no. 3, pp.407-428, 2015, doi: 10.1080\/0305215X.2014.895337.[2] P. K. Jamwal, A. Kapsalyamov, S. Hussain, and M. H. Ghayesh,\u201dPerformance-based design optimization of an intrinsically com-pliant 6-DOF parallel robot,\u201d Mechanics Based Design of Struc-tures and Machines, vol. 50, no. 4, pp. 1237-1252, 2022, doi:10.1080\/15397734.2020.1746669.[3] J. N. Mart\u00b4\u0131nez-Castela\u00b4n and M. G. Villarreal-Cervantes, \u201dIntegratedstructure-control design of a bipedal robot based on passive dynamicwalking,\u201dMathematics, vol. 9, no. 13, p. 1482, 2021. [Online]. Available:https:\/\/doi.org\/10.3390\/math9131482.[4] E. A. Alandoli, T. S. Lee, V. Vijayakumar, Y. J. Lin, and M.Q. Mohammed, \u201dDynamic model and integrated optimal controllerof hybrid arms robot for laser contour machining,\u201d Journal of Vi-bration and Control, vol. 29, no. 13-14, pp. 3006-3024, 2023, doi:10.1177\/10775463221090000.[5] K. S. Yakovlev, A. A. Andreychuk, J. S. Belinskaya, et al., \u201dSafeinterval path planning and flatness-based control for navigationof a mobile robot among static and dynamic obstacles,\u201d AutomRemote Control, vol. 83, pp. 903\u2013918, 2022. [Online]. Available:https:\/\/doi.org\/10.1134\/S000511792206008X.[6] A. Palacios, Mathematical Modeling: A Dynamical Systems Approachto Analyze Practical Problems in STEM Disciplines, Springer Interna-tional Publishing, 2022.[7] S. Kamalasadan and A. A. Ghandakly, \u201dA neural network parallel adap-tive controller for dynamic system control,\u201d IEEE Transactions on In-28strumentation and Measurement, vol. 56, no. 5, pp. 1786-1796, 2007.[Online]. Available: https:\/\/doi.org\/10.1109\/TIM.2007.895674.[8] J. Blechschmidt and O. G. Ernst, \u201dThree ways to solve partialdifferential equations with neural networks \u2013 A review,\u201d GAMM-Mitteilungen, vol. 44, no. 2, p. e202100006, 2021. [Online]. Available:https:\/\/doi.org\/10.1002\/gamm.202100006.[9] M. Raissi, P. Perdikaris, and G. E. Karniadakis, \u201dPhysics informed deeplearning (part i): Data-driven solutions of nonlinear partial differentialequations,\u201d arXiv preprint arXiv:1711.10561, 2017.[10] M. A. Chao, C. Kulkarni, K. Goebel, and O. Fink, \u201dHybrid deep faultdetection and isolation: Combining deep neural networks and systemperformance models,\u201d arXiv preprint arXiv:1908.01529, 2019.[11] M. Sadoughi and C. Hu, \u201dPhysics-based convolutional neural networkfor fault diagnosis of rolling element bearings,\u201d IEEE Sensors Journal,vol. 19, no. 11, pp. 4181-4192, 2019.[12] K.-H. Lee, G. Ros, J. Li, and A. Gaidon, \u201dSpigan: Privileged adversariallearning from simulation,\u201d arXiv preprint arXiv:1810.03756, 2018.[13] C. Rackauckas, et al., \u201dUniversal differential equations for scientificmachine learning,\u201d arXiv preprint arXiv:2001.04385, 2020.[14] S. L. Brunton, J. L. Proctor, and J. N. Kutz, \u201dDiscovering governingequations from data by sparse identification of nonlinear dynamicalsystems,\u201d Proceedings of the National Academy of Sciences, vol. 113,no. 15, pp. 3932-3937, 2016. doi: 10.1073\/pnas.1517384113.[15] W. E, J. Han, and L. Zhang, \u201dIntegrating machine learning withphysics-based modeling,\u201d arXiv preprint arXiv:2006.02619, 2020. [On-line]. Available: https:\/\/doi.org\/10.48550\/arxiv.2006.02619.[16] J. Kober, J. A. Bagnell, and J. Peters, \u201dReinforcement learning inrobotics: A survey,\u201d The International Journal of Robotics Research,vol. 32, no. 11, pp. 1238-1274, 2013.[17] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, etal., \u201dGPT-4 technical report,\u201d arXiv preprint arXiv:2303.08774, 2023.[18] J. Betker, G. Goh, L. Jing, T. Brooks, J. Wang, L. Li, et al., \u201dImprovingimage generation with better captions,\u201d Computer Science, vol. 2, no.293, p. 8, 2023. [Online]. Available: https:\/\/cdn.openai.com\/papers\/dall-e-3.pdf.[19] K. Saito, K. Watanabe, Y. Ushiku, and T. Harada, \u201dMaximum classifierdiscrepancy for unsupervised domain adaptation,\u201d in Proceedings of theIEEE Conference on Computer Vision and Pattern Recognition, pp.3723-3732, 2018.[20] M. Lutter and J. Peters, \u201dCombining physics and deep learning tolearn continuous-time dynamics models,\u201d The International Journal ofRobotics Research, vol. 42, no. 3, pp. 83-107, 2023. [Online]. Available:https:\/\/doi.org\/10.1177\/02783649231169492.[21] M. Lutter, et al., \u201dDeep Lagrangian Networks: Using Physics as ModelPrior for Deep Learning,\u201d arXiv preprint arXiv:1907.04490, 2019.[22] N. Bjorck, C. P. Gomes, B. Selman, and K. Q. Weinberger, \u201dUnder-standing batch normalization,\u201d in Advances in Neural Information Pro-cessing Systems, vol. 31, 2018.[23] J. Liu, P. Borja, and C. Della Santina, \u201dPhysics-Informed Neural Net-works to Model and Control Robots: A Theoretical and ExperimentalInvestigation,\u201d Advanced Intelligent Systems, vol. 6, no. 5, p. n\/a, 2024.30Appendix ARotation MatrixA.1 DefinitionFigure A.1: Defining a vector P\u02c6 in two coordinate systems A and BFigure A.1 shows two frames. Frame B results from rotating frame Ain the positive Z direction. Vector p\u02c6 originates from the origin and ends atpoint D. p\u02c6A represents p\u02c6 with respect to frame A, while p\u02c6B represents p\u02c6with respect to frame B. The rotation matrix RA,B = R(30\u25e6, k\u02c6) is used in,p\u02c6A = RA,Bp\u02c6B (A.1)The rotation matrix RA,B can be interpreted in two ways:1. RA,B rotates the vector p\u02c6B by 30\u25e6 around the vector k\u02c6 (Z direction),while the coordinate system B remains unchanged.2. RA,B rotates the coordinate system B by \u221230\u25e6 around the vector k\u02c6,while the vector p\u02c6B remains unchanged.In both cases, p\u02c6B with respect to frame B ends up in the same position.31A.2 Rodrigues Rotation FormulaThe Rotation matrix R is computed using Rodrigues\u2019 rotation formula, asgiven in Equation 2.15.R(q, s) = I+ sin qS+ (1\u2212 cos q)S2 (2.15)As Matrix S is the skew-symmetric matrix of the unit vector representingthe axis of rotation:S =\uf8eb\uf8ed 0 \u2212sz sysz 0 \u2212sx\u2212sy sx 0\uf8f6\uf8f8 (A.2)The vector s =\uf8eb\uf8edsxsysz\uf8f6\uf8f8 is the unit vector along the axis of rotation.For example, s = k\u02c6 =\uf8eb\uf8ed001\uf8f6\uf8f8 when the rotation is about the Z axis, resultingin:A.2\u2212\u2212\u2192 S =\uf8eb\uf8ed0 \u22121 01 0 00 0 0\uf8f6\uf8f8 2.15\u2212\u2212\u2192 R(q, k\u02c6) =\uf8eb\uf8edcos q sin q 0sin q \u2212 cos q 00 0 1\uf8f6\uf8f832Appendix BLagrange Equations ofMotion; Python CodeThe first code presented in this section is a Python script that generates asymbolic equation of motion for the Kinova Gen3 Lite manipulator. Thismanipulator has its first three degrees of freedom active, while the remaininglinks are fixed at their zero positions. The second code is a modified versionof the first, where specific values replace the symbols. The specific valuesare given in Table 3.2. The resulting equation from the second code uses thejoint angles, joint torques, and joint accelerations of the first three joints ofthe Kinova Gen3 Lite robot as inputs.33B.1 Python program that computes the symbolicequations of motion for the reduced KinovaGen3 Liteimport sympy as spimport numpy as npt = sp.symbols(\u2019t\u2019)# Define q as a function of tq1 = sp.Function(\u2019q_1\u2019)(t)q2 = sp.Function(\u2019q_2\u2019)(t)q3 = sp.Function(\u2019q_3\u2019)(t)# Lengthl1, l2, l3 = sp.symbols(\u2019l_1, l_2, l_3\u2019)# Center of massc1_x, c1_y, c1_z = sp.symbols(\u2019cx_1 cy_1 cz_1\u2019)c2_x, c2_y, c2_z = sp.symbols(\u2019cx_2 cy_2 cz_2\u2019)c3_x, c3_y, c3_z = sp.symbols(\u2019cx_3 cy_3 cz_3\u2019)com1 = sp.Array([0, 0, c1_z])com2 = sp.Array([0, 0, c2_z])com3 = sp.Array([0, 0, c3_z])# Massm1, m2, m3 = sp.symbols(\u2019m_1 m_2 m_3\u2019)g = sp.symbols(\u2019g\u2019)# Define symbols for inertia matrix I1I1xx, I1xy, I1xz, I1yx, I1yy, I1yz, I1zx, I1zy, I1zz = sp.symbols(\u2019I_{1xx}I_{1xy} I_{1xz} I_{1yx} I_{1yy} I_{1yz} I_{1zx} I_{1zy} I_{1zz}\u2019)# Create inertia matrix I1I1 = sp.Matrix([[I1xx, I1xy, I1xz],[I1yx, I1yy, I1yz],[I1zx, I1zy, I1zz]])# Define symbols for inertia matrix I234I2xx, I2xy, I2xz, I2yx, I2yy, I2yz, I2zx, I2zy, I2zz = sp.symbols(\u2019I_{2xx}I_{2xy} I_{2xz} I_{2yx} I_{2yy} I_{2yz} I_{2zx} I_{2zy} I_{2zz}\u2019)# Create inertia matrix I2I2 = sp.Matrix([[I2xx, I2xy, I2xz],[I2yx, I2yy, I2yz],[I2zx, I2zy, I2zz]])# Define symbols for inertia matrix I2I3xx, I3xy, I3xz, I3yx, I3yy, I3yz, I3zx, I3zy, I3zz = sp.symbols(\u2019I_{3xx}I_{3xy} I_{3xz} I_{3yx} I_{3yy} I_{3yz} I_{3zx} I_{3zy} I_{3zz}\u2019)# Create inertia matrix I3I3 = sp.Matrix([[I3xx, I3xy, I3xz],[I3yx, I3yy, I3yz],[I3zx, I3zy, I3zz]])# Define Rodrigues\u2019 Rotation Matrixdef R(angle, axis):axis = axis \/ np.linalg.norm(axis)ux = axis[0]uy = axis[1]uz = axis[2]if isinstance(angle, sp.Function) or isinstance(angle, sp.Mul):cosTheta = sp.cos(angle)sinTheta = sp.sin(angle)else:cosTheta = round(np.cos(angle),2)sinTheta = round(np.sin(angle),2)oneMinusCosTheta = 1 - cosThetaR = np.array([[cosTheta + ux**2*oneMinusCosTheta,ux*uy*oneMinusCosTheta - uz*sinTheta,ux*uz*oneMinusCosTheta + uy*sinTheta],[uy*ux*oneMinusCosTheta + uz*sinTheta,cosTheta + uy**2*oneMinusCosTheta,uy*uz*oneMinusCosTheta - ux*sinTheta],[uz*ux*oneMinusCosTheta - uy*sinTheta,uz*uy*oneMinusCosTheta + ux*sinTheta,35cosTheta + uz**2*oneMinusCosTheta]])return R# Calculations for the Kinetic energy KR_1_0 = R(q1,[0,0,1])w_1 = np.array([[0],[0],[sp.diff(q1,t)]])R_2_1 = R(q2,[0,1,0])R_1_2 = R(-q2,[0,1,0])w_2 = R_1_2@w_1 + np.array([[0],[sp.diff(q2,t)],[0]])R_3_2 = R(-q3,[0,1,0])R_2_3 = R(q3,[0,1,0])w_3 = R_2_3@w_2 + np.array([[0],[-sp.diff(q3,t)],[0]])R1 = R_1_0R2 = R_1_0@R_2_1R3 = R_1_0@R_2_1@R_3_2P_c1_1 = com1v_c1 = np.cross(w_1.reshape(1,3),P_c1_1).reshape(3,1)P_2_1 = np.array([0, 0, l1])v_2_1 = np.cross(w_1.reshape(1,3),P_2_1).reshape(3,1)v_2_0 = R1 @ v_2_1P_c2_2 = com2v_c2 = np.cross(w_2.reshape(1,3),P_c2_2).reshape(3,1)P_3_2 = np.array([0, 0, l2])v_3_2 = np.cross(w_2.reshape(1,3),P_3_2).reshape(3,1)v_3_0 = v_2_0 + R2 @ v_3_2# P_c2_2 = np.array([lc2, 0, 0])P_c3_3 = com3v_c3 = np.cross(w_3.reshape(1,3),P_c3_3).reshape(3,1)v_c1_0 = R1 @ v_c1v_c2_0 = v_2_0 + R2 @ v_c2v_c3_0 = v_3_0 + R3 @ v_c3a11 = m1*sp.transpose(v_c1_0)@v_c1_0a22 = m2*sp.transpose(v_c2_0)@v_c2_0a33 = m3*sp.transpose(v_c3_0)@v_c3_036b11 = w_1.T@R1@I1@R1.T@w_1b22 = w_2.T@R2@I2@R2.T@w_2b33 = w_3.T@R3@I3@R3.T@w_3K1 = 1\/2*(a11+b11)K2 = 1\/2*(a22+b22)K3 = 1\/2*(a33+b33)K = K1 + K2 + K3# Calculation for the Potential energy UU1 = m1*g*com1[2]U2 = m2*g*(l1 + com2[2]*sp.cos(q2))# com1 is wrt coordinate 1 and com2 wrt coordinate 2U3 = m3*g*(l1 + l2*sp.cos(q2) + com3[2]*sp.cos(q2-q3))U = U1 + U2 + U3# Calculations for the equations of motion (tau) based on Lagrange equationdK_dq1d = sp.diff(K[0,0],sp.diff(q1))d_dt_dk_dq1d = sp.diff(dK_dq1d,t)dK_dq2d = sp.diff(K[0,0],sp.diff(q2))d_dt_dk_dq2d = sp.diff(dK_dq2d,t)dK_dq3d = sp.diff(K[0,0],sp.diff(q3))d_dt_dk_dq3d = sp.diff(dK_dq3d,t)d_dt__dK_dqd = np.vstack((d_dt_dk_dq1d, d_dt_dk_dq2d, d_dt_dk_dq3d))dK_dq1 = sp.diff(K[0,0],q1)dK_dq2 = sp.diff(K[0,0],q2)dK_dq3 = sp.diff(K[0,0],q3)dK_dq = np.vstack((dK_dq1, dK_dq2, dK_dq3))dU_dq1 = sp.diff(U,q1)dU_dq2 = sp.diff(U,q2)dU_dq3 = sp.diff(U,q3)dU_dq = np.vstack((dU_dq1, dU_dq2, dU_dq3))tau_Kinova = sp.simplify(d_dt__dK_dqd - dK_dq + dU_dq)37B.2 Python program that computes theequations of motion for the reduced KinovaGen3 Lite, with values instead of symbolsimport sympy as spimport numpy as npt = sp.symbols(\u2019t\u2019)# Define q as a function of tq1 = sp.Function(\u2019q_1\u2019)(t)q2 = sp.Function(\u2019q_2\u2019)(t)q3 = sp.Function(\u2019q_3\u2019)(t)# Massm1 = 0.9597m2 = 1.1776m3 = 1.907# Lengthl1 = 0.115l2 = 0.280l3 = 0.140+0.105+0.105+0.130# Center of Masscom1 = np.array([0, 0.02214, 0.09938])com2 = np.array([0.029983, -0.0453, 0.21155]) - np.array([0,-0.003,l1])com3 = np.array([0.03096, -0.01334, 0.5811]) - np.array([0,-0.003,l1+l2])g = 9.81 # Free fall acceleration# Moment of InertiaI1 = np.diag([0.001660, 0.001404, 0.0008949])I2 = np.diag([0.01149, 0.01133, 0.001029])I3 = np.array([[4.34927145e-03, 6.67148531e-05, 1.13243008e-03],[6.67148531e-05, 3.96456682e-03, 1.79733321e-03],[1.13243008e-03, 1.79733321e-03, 1.73430192e-02]])# Rodrigues\u2019 Rotation Formula38def R(angle, axis):axis = axis \/ np.linalg.norm(axis)ux = axis[0]uy = axis[1]uz = axis[2]if isinstance(angle, sp.Function) or isinstance(angle, sp.Mul):cosTheta = sp.cos(angle)sinTheta = sp.sin(angle)else:cosTheta = round(np.cos(angle),2)sinTheta = round(np.sin(angle),2)oneMinusCosTheta = 1 - cosThetaR = np.array([[cosTheta + ux**2*oneMinusCosTheta,ux*uy*oneMinusCosTheta - uz*sinTheta,ux*uz*oneMinusCosTheta + uy*sinTheta],[uy*ux*oneMinusCosTheta + uz*sinTheta,cosTheta + uy**2*oneMinusCosTheta,uy*uz*oneMinusCosTheta - ux*sinTheta],[uz*ux*oneMinusCosTheta - uy*sinTheta,uz*uy*oneMinusCosTheta + ux*sinTheta,cosTheta + uz**2*oneMinusCosTheta]])return R# Calculations for the Kinetic energy KR_1_0 = R(q1,[0,0,1])w_1 = np.array([[0],[0],[sp.diff(q1,t)]])R_2_1 = R(q2,[0,1,0])R_1_2 = R(-q2,[0,1,0])w_2 = R_1_2@w_1 + np.array([[0],[sp.diff(q2,t)],[0]])R_3_2 = R(-q3,[0,1,0])R_2_3 = R(q3,[0,1,0])w_3 = R_2_3@w_2 + np.array([[0],[-sp.diff(q3,t)],[0]])R1 = R_1_0R2 = R_1_0@R_2_1R3 = R_1_0@R_2_1@R_3_239P_c1_1 = com1v_c1 = np.cross(w_1.reshape(1,3),P_c1_1).reshape(3,1)P_2_1 = np.array([0, 0, l1])v_2_1 = np.cross(w_1.reshape(1,3),P_2_1).reshape(3,1)v_2_0 = R1 @ v_2_1P_c2_2 = com2v_c2 = np.cross(w_2.reshape(1,3),P_c2_2).reshape(3,1)P_3_2 = np.array([0, 0, l2])v_3_2 = np.cross(w_2.reshape(1,3),P_3_2).reshape(3,1)v_3_0 = v_2_0 + R2 @ v_3_2# P_c2_2 = np.array([lc2, 0, 0])P_c3_3 = com3v_c3 = np.cross(w_3.reshape(1,3),P_c3_3).reshape(3,1)v_c1_0 = R1 @ v_c1v_c2_0 = v_2_0 + R2 @ v_c2v_c3_0 = v_3_0 + R3 @ v_c3a11 = m1*sp.transpose(v_c1_0)@v_c1_0a22 = m2*sp.transpose(v_c2_0)@v_c2_0a33 = m3*sp.transpose(v_c3_0)@v_c3_0b11 = w_1.T@R1@I1@R1.T@w_1b22 = w_2.T@R2@I2@R2.T@w_2b33 = w_3.T@R3@I3@R3.T@w_3K1 = 1\/2*(a11+b11)K2 = 1\/2*(a22+b22)K3 = 1\/2*(a33+b33)K = K1 + K2 + K3# Calculations for the Potential energyU1 = m1*g*com1[2]U2 = m2*g*(l1 + com2[2]*sp.cos(q2))# com1 is wrt coordinate 1 and com2 wrt coordinate 2U3 = m3*g*(l1 + l2*sp.cos(q2) + com3[2]*sp.cos(q2-q3))U = U1 + U2 + U3dK_dq1d = sp.diff(K[0,0],sp.diff(q1))d_dt_dk_dq1d = sp.diff(dK_dq1d,t)40dK_dq2d = sp.diff(K[0,0],sp.diff(q2))d_dt_dk_dq2d = sp.diff(dK_dq2d,t)dK_dq3d = sp.diff(K[0,0],sp.diff(q3))d_dt_dk_dq3d = sp.diff(dK_dq3d,t)d_dt__dK_dqd = np.vstack((d_dt_dk_dq1d, d_dt_dk_dq2d, d_dt_dk_dq3d))dK_dq1 = sp.diff(K[0,0],q1)dK_dq2 = sp.diff(K[0,0],q2)dK_dq3 = sp.diff(K[0,0],q3)dK_dq = np.vstack((dK_dq1, dK_dq2, dK_dq3))dU_dq1 = sp.diff(U,q1)dU_dq2 = sp.diff(U,q2)dU_dq3 = sp.diff(U,q3)dU_dq = np.vstack((dU_dq1, dU_dq2, dU_dq3))tau_Kinova = sp.simplify(d_dt__dK_dqd - dK_dq + dU_dq)The result of this code is \u03c4Kinova, which is a function of q, q\u02d9, and q\u00a8.41","attrs":{"lang":"en","ns":"http:\/\/www.w3.org\/2009\/08\/skos-reference\/skos.html#note","classmap":"oc:AnnotationContainer"},"iri":"http:\/\/www.w3.org\/2009\/08\/skos-reference\/skos.html#note","explain":"Simple Knowledge Organisation System; Notes are used to provide information relating to SKOS concepts. There is no restriction on the nature of this information, e.g., it could be plain text, hypertext, or an image; it could be a definition, information about the scope of a concept, editorial information, or any other type of information."}],"Genre":[{"label":"Genre","value":"Thesis\/Dissertation","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/hasType","classmap":"dpla:SourceResource","property":"edm:hasType"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/hasType","explain":"A Europeana Data Model Property; This property relates a resource with the concepts it belongs to in a suitable type system such as MIME or any thesaurus that captures categories of objects in a given field. It does NOT capture aboutness"}],"GraduationDate":[{"label":"Graduation Date","value":"2024-11","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#dateIssued","classmap":"vivo:DateTimeValue","property":"vivo:dateIssued"},"iri":"http:\/\/vivoweb.org\/ontology\/core#dateIssued","explain":"VIVO-ISF Ontology V1.6 Property; Date Optional Time Value, DateTime+Timezone Preferred "}],"IsShownAt":[{"label":"DOI","value":"10.14288\/1.0445428","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/isShownAt","classmap":"edm:WebResource","property":"edm:isShownAt"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/isShownAt","explain":"A Europeana Data Model Property; An unambiguous URL reference to the digital object on the provider\u2019s website in its full information context."}],"Language":[{"label":"Language","value":"eng","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/language","classmap":"dpla:SourceResource","property":"dcterms:language"},"iri":"http:\/\/purl.org\/dc\/terms\/language","explain":"A Dublin Core Terms Property; A language of the resource.; Recommended best practice is to use a controlled vocabulary such as RFC 4646 [RFC4646]."}],"Program":[{"label":"Program (Theses)","value":"Mechanical Engineering","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#degreeDiscipline","classmap":"oc:ThesisDescription","property":"oc:degreeDiscipline"},"iri":"https:\/\/open.library.ubc.ca\/terms#degreeDiscipline","explain":"UBC Open Collections Metadata Components; Local Field; Indicates the program for which the degree was granted."}],"Provider":[{"label":"Provider","value":"Vancouver : University of British Columbia Library","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/provider","classmap":"ore:Aggregation","property":"edm:provider"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/provider","explain":"A Europeana Data Model Property; The name or identifier of the organization who delivers data directly to an aggregation service (e.g. Europeana)"}],"Publisher":[{"label":"Publisher","value":"University of British Columbia","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/publisher","classmap":"dpla:SourceResource","property":"dcterms:publisher"},"iri":"http:\/\/purl.org\/dc\/terms\/publisher","explain":"A Dublin Core Terms Property; An entity responsible for making the resource available.; Examples of a Publisher include a person, an organization, or a service."}],"Rights":[{"label":"Rights","value":"Attribution-NonCommercial-NoDerivatives 4.0 International","attrs":{"lang":"*","ns":"http:\/\/purl.org\/dc\/terms\/rights","classmap":"edm:WebResource","property":"dcterms:rights"},"iri":"http:\/\/purl.org\/dc\/terms\/rights","explain":"A Dublin Core Terms Property; Information about rights held in and over the resource.; Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights."}],"RightsURI":[{"label":"Rights URI","value":"http:\/\/creativecommons.org\/licenses\/by-nc-nd\/4.0\/","attrs":{"lang":"*","ns":"https:\/\/open.library.ubc.ca\/terms#rightsURI","classmap":"oc:PublicationDescription","property":"oc:rightsURI"},"iri":"https:\/\/open.library.ubc.ca\/terms#rightsURI","explain":"UBC Open Collections Metadata Components; Local Field; Indicates the Creative Commons license url."}],"ScholarlyLevel":[{"label":"Scholarly Level","value":"Graduate","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#scholarLevel","classmap":"oc:PublicationDescription","property":"oc:scholarLevel"},"iri":"https:\/\/open.library.ubc.ca\/terms#scholarLevel","explain":"UBC Open Collections Metadata Components; Local Field; Identifies the scholarly level of the author(s)\/creator(s)."}],"Supervisor":[{"label":"Supervisor","value":"De Silva, Clarence W.","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/contributor","classmap":"vivo:AdvisingRelationship","property":"dcterms:contributor"},"iri":"http:\/\/purl.org\/dc\/terms\/contributor","explain":"A Dublin Core Terms Property; An entity responsible for making contributions to the resource.; Examples of a Contributor include a person, an organization, or a service."}],"Title":[{"label":"Title ","value":"Integration of physics into machine learning for enhanced robot dynamic modeling","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/title","classmap":"dpla:SourceResource","property":"dcterms:title"},"iri":"http:\/\/purl.org\/dc\/terms\/title","explain":"A Dublin Core Terms Property; The name given to the resource."}],"Type":[{"label":"Type","value":"Text","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/type","classmap":"dpla:SourceResource","property":"dcterms:type"},"iri":"http:\/\/purl.org\/dc\/terms\/type","explain":"A Dublin Core Terms Property; The nature or genre of the resource.; Recommended best practice is to use a controlled vocabulary such as the DCMI Type Vocabulary [DCMITYPE]. To describe the file format, physical medium, or dimensions of the resource, use the Format element."}],"URI":[{"label":"URI","value":"http:\/\/hdl.handle.net\/2429\/89276","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#identifierURI","classmap":"oc:PublicationDescription","property":"oc:identifierURI"},"iri":"https:\/\/open.library.ubc.ca\/terms#identifierURI","explain":"UBC Open Collections Metadata Components; Local Field; Indicates the handle for item record."}],"SortDate":[{"label":"Sort Date","value":"2024-12-31 AD","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/date","classmap":"oc:InternalResource","property":"dcterms:date"},"iri":"http:\/\/purl.org\/dc\/terms\/date","explain":"A Dublin Core Elements Property; A point or period of time associated with an event in the lifecycle of the resource.; Date may be used to express temporal information at any level of granularity. Recommended best practice is to use an encoding scheme, such as the W3CDTF profile of ISO 8601 [W3CDTF].; A point or period of time associated with an event in the lifecycle of the resource.; Date may be used to express temporal information at any level of granularity. Recommended best practice is to use an encoding scheme, such as the W3CDTF profile of ISO 8601 [W3CDTF]."}]}