Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
courses:456:2023:projects:456-2023-01:project-01 [2023/05/10 02:37] – [Milestones and Status] bbanks15courses:456:2023:projects:456-2023-01:project-01 [2023/05/11 04:01] (current) – [Reports and presentations] bbanks15
Line 1: Line 1:
 ======Transparency Optimization of the Galen Surgical System with a Frequency Domain Admittance Controller Design====== ======Transparency Optimization of the Galen Surgical System with a Frequency Domain Admittance Controller Design======
-**Last updated: 5/9/2023 at 8:13 PM**+**Last updated: 5/10/2023 at 3:55 PM**
  
  
Line 268: Line 268:
  
 {{:courses:456:2023:projects:456-2023-01:TOGAC29_AMBF_IN_ConnectMatlab2AMBF.pdf| TOGAC29_AMBF_IN_ConnectMatlab2AMBF}} {{:courses:456:2023:projects:456-2023-01:TOGAC29_AMBF_IN_ConnectMatlab2AMBF.pdf| TOGAC29_AMBF_IN_ConnectMatlab2AMBF}}
 +
 +{{:courses:456:2023:projects:456-2023-01:TOGAC50_AMBF_in_AdmittanceControlTeleop.pdf| TOGAC50_AMBF_in_AdmittanceControlTeleop}}
  
 With an interface for interacting with the Galen robot created testing of simulated admittance controllers in real time could be performed. Using our developed galen_interface() methods we controlled the Galen robot in AMBF with MATLAB over ROS at ~200Hz. Our intent was to control the system first with joint control, then develop our own Cartesian control package. We started in one dimension to evaluate the system. Initially, we chose the up and down Z dimension and turned off simulated gravity to mimic the gravity compensation found in the real controller. With AMBF acting as the lower or mid level controller, MATLAB served as the high level controller for admittance. We identified the system of the simulated Galen robot in the z direction with both a chirp and step response to ensure proper characterization of the linear transfer function. The stability of the identified function was analyzed as well as the transparency. We compared our results with the stability Analysis of [2], however we were unable to properly reproduce the results of [2] and the conclusions of stability maps feasibility is somewhat uncertain because of this. The methods of [2] do not adequately describe their stability analysis and make it difficult to understand how they intend to account for multi DOF control stability. The summary of this analysis and the results can be found in  With an interface for interacting with the Galen robot created testing of simulated admittance controllers in real time could be performed. Using our developed galen_interface() methods we controlled the Galen robot in AMBF with MATLAB over ROS at ~200Hz. Our intent was to control the system first with joint control, then develop our own Cartesian control package. We started in one dimension to evaluate the system. Initially, we chose the up and down Z dimension and turned off simulated gravity to mimic the gravity compensation found in the real controller. With AMBF acting as the lower or mid level controller, MATLAB served as the high level controller for admittance. We identified the system of the simulated Galen robot in the z direction with both a chirp and step response to ensure proper characterization of the linear transfer function. The stability of the identified function was analyzed as well as the transparency. We compared our results with the stability Analysis of [2], however we were unable to properly reproduce the results of [2] and the conclusions of stability maps feasibility is somewhat uncertain because of this. The methods of [2] do not adequately describe their stability analysis and make it difficult to understand how they intend to account for multi DOF control stability. The summary of this analysis and the results can be found in 
Line 275: Line 277:
 {{:courses:456:2023:projects:456-2023-01:TOGAC34_AMBF_R_LumpedSystemIdentification.pdf| TOGAC34_AMBF_R_LumpedSystemIdentification}} {{:courses:456:2023:projects:456-2023-01:TOGAC34_AMBF_R_LumpedSystemIdentification.pdf| TOGAC34_AMBF_R_LumpedSystemIdentification}}
  
-To implement velocity Cartesian control in simulation, the Jacobian of the simulated robot was needed. The forward kinematics were found for the Galen robot in simulation using the prismatic robot case found in [12] and the jacobian was found by transforming from the result of [12] to the end effector of the Galen robot. With the jacobian in place for control of the 5 joints, the full system was identified with chirp velocity inputs applied individually to the 5 DOF. The systems were identified using MATLAB's system identification toolbox just as in the previous cases. The stability maps for all 5 DOF were generated. The following transfer functions with their % quality match to the chirp signal were obtained, and their respective stability cost maps are shown here:+To implement velocity Cartesian control in simulation, the Jacobian of the simulated robot was needed. The forward kinematics were found for the Galen robot in simulation using the prismatic robot case found in [12] and the jacobian was found by transforming from the result of [12] to the end effector of the Galen robot. With the jacobian in place for control of the 5 joints, the full system was identified with chirp velocity inputs applied individually to the 5 DOF. The systems were identified using MATLAB's system identification toolbox just as in the previous cases. The stability maps for all 5 DOF were generated. Admittance gains were selected from each figure and tested in impedance situations with galen robot controller in simulation. The results for these tests, figures, and the derivation of the forward kinematics can all be found in the following files.
  
-XTF = 132.8/(s + 145.8)   77.93% Match 
  
-{{ :courses:456:2023:projects:456-2023-01:xupper.png?300 }}+{{:courses:456:2023:projects:456-2023-01:togac51_ambf_r_cartesiansystemidentification.pdf| TOGAC51_AMBF_R_CartesianSystemIdentification.}}
  
-YTF = 131.8/(s + 132.4) 92.15% Match+{{:courses:456:2023:projects:456-2023-01:togac40_d_deltakin.pdf| TOGAC40_D_DeltaKin}}
  
-{{ :courses:456:2023:projects:456-2023-01:yupper.png?300 }}+Additionally, functionality was added to the admittance controller design to include the use of teleoperation via a GUI and joystick. For instructions on how to use this see the following.
  
-ZTF = 1.973e06/(s^2 + 1.558e04*s + 1.975e06)  92.58% Match+{{:courses:456:2023:projects:456-2023-01:TOGAC50_AMBF_in_admittancecontrolteleop.pdf| TOGAC50_AMBF_in_AdmittanceControlTeleop}}
  
-{{ :courses:456:2023:projects:456-2023-01:zupper.png?300 }} 
  
-WxTF = 2.542e05/(s^2 + 153.1*s + 2.561e05) 89.39% Match+__**Single Axis Galen Implementation of Admittance Control**__
  
-{{ :courses:456:2023:projects:456-2023-01:wxupper.png?300 }}+Time allotted for the implementation and testing of one single axis of the Galen robot. The Z dimension was chosen and used to evaluate the admittance control’s ability to interpret the user’s input into a velocity reference.
  
-WyTF = 1.587e04/(s^2 + 230.7*s + 1.584e04) 91.04% Match+The following transfer functions for the X, Y, and Z axis were obtained for the real Galen robot system identificationNote that the actual system features a few new errors introducing variablesTwo prominent variables that will be addressed here are the delay and the motor backlash.
  
-{{ :courses:456:2023:projects:456-2023-01:wyupper.png?300 }}+{{:courses:456:2023:projects:456-2023-01:tfreal.png?400|}}
  
-There is no Wz DOF for the Galen Robot+The tfest MATLAB estimator was able to estimate the transfer functions in addition to measuring the time delays. This time delay could be caused by several factors. A few of these factors are due to the control processing delay between communication from the mid-level control to low-level to ROS and the actual robot. The delay is also a result of the lagging time in the acceleration or inertia of the robot hardware. This is especially present in the case of motor backlash. When the commanded velocity or present velocity of the robot reaches zero, especially on robot initialization, commands that move the robot out of a stationary state must first overcome the effects of static friction. This is called motor backlash and can cause significant delays and shifting of the output signal. 
 + 
 +{{:courses:456:2023:projects:456-2023-01:zchirpout.png?400|}} 
 + 
 +//The output position of the real Galen robot, the velocity, and an fft of the velocity noise// 
 + 
 +Observe the above figure for the velocity input and output plot. The motor backlash delay can be seen at any point where the velocity out reaches zero. Until the robot can break the static friction and overcome the initial motor inertia, the velocity controller must quickly compensate to catch up to the reference.  
 + 
 +We also can see that the output velocity of the robot, in orange, is a rather noisy signal. This is due to the fact that we only have access to the position measuring crtk_command tools that observe the motor encoders. To get the velocity of the position signal, we use a finite differentiation method between the current timestep and the previous time step to derive the position.This introduces lots of noise, and in order to utilize a more precise velocity signal for feedback control it is important to filter the data.  
 + 
 +We ran an fft on the finite differentiated velocity to observe what appropriate cutoff frequency should be used and deemed 75 Hz was an appropriate frequency to use in a first order low pass filter. 
 + 
 +The above figure also shows an example of the response of the Z axis identification. This axis showed the smallest time delay of the 3 identified systems. We notice that this time delay is large rather large on the X axis and there are many factors still to be investigated that could be causing this. There is much more work to be done on the real system implementation and testing. 
 + 
 + 
 + 
 +For our current approach, we chose to start simply with a single axis where we were most confident to obtain a good admittance response. We found the Z to have the smallest time delay and the stability analysis was deemed the most stable according to the following maps. 
 + 
 +{{:courses:456:2023:projects:456-2023-01:zstabout.png?400|}} 
 + 
 +//Upper bound (with human and environment) impedance and Lower bound (only human) impedance stability and transparency maps for the Galen z axis.// 
 + 
 +With the above results we were able to select a set of gains for the human only contact impedance case and test them on the real Galen robot. 
 + 
 +{{:courses:456:2023:projects:456-2023-01:handovercontrol.jpg?400|}} 
 + 
 +// User interacting with the Galen robot end effector to apply a wrench// 
 + 
 +The admittance gains of 8kg and 20Ns/m were chosen for the mass and damping values respectively. A test was run for 10 seconds with the robot in gravity compensation mode. The user was instructed to wait 5 seconds and then apply an upwards input on the robot end effector. The following plot was obtained for the input reference velocity vs the input user force. 
 + 
 + {{:courses:456:2023:projects:456-2023-01:galencontrol.png?400|}} 
 + 
 +//The recorded input reference velocity as calculated from the admittance controller and the measured true force from the Galen robot end effector sensor.// 
 + 
 +As anticipated, the robot tracked the force references and converted the input wrench to a clean and smooth velocity trajectory. Notice that even with the Galen gravity compensation on, during the 0 to 4 second period without human contact, the robot experiences a small downward force. This indicates that the Galen robot needs to be recalibrated or adjusted to better handle gravity compensation.  
 + 
 +The present gains for the admittance controller in this Z axis show a good level of admittance that feels smooth, light, and controllable. Qualitatively, compared to Z motions on the current on-board Galen controller, our controller is noticeably better at feeling more transparent. However true testing and evaluation of the controllers will prove if the results truly are more transparent. 
 + 
 + 
 +======Project Close Out and Discussion====== 
 +All of the minimum deliverables in the project were completed and delivered in the expected time frame. 
 + 
 +The expected deliverables are in progress. System Identification has been done for the X, Y, and Z DOF of the real system, and a prototype controller is on board the Galen Robot that has yet to be thoroughly tested. No work on the virtual fixtures has been attempted yet since the controller is not running. The stability analysis of the identified systems has been done, but they are not yet verified. 
 + 
 +The maximum deliverables have not been achieved during the duration of this course. 
 + 
 +Due to the time spent developing the controller theory, testing in MATLAB and AMBF, and the caution surrounding the real hardware, the maximum and some expected results were not achieved. Priority was given to ensure that the proof of concept behind the admittance control design was truly feasible. We have been able to show this much as outlined in this report and the others found on the project wiki. 
 + 
 +Other key factors outside the scope of our project became important subtasks for each deliverable. These greatly extended the time of development as well. For instance, we were unaware of the rigorous testing and analysis we would need to perform system identification in both simulation and on the real hardware. The execution of this task took longer than expected and was not originally in scope. In addition to the system identification, the maximum deliverable used to contain a user study that was in deliberation for some of the early weeks of the project. The decision to drop the user for the time being freed up time to focus on the development tasks, but we expect to reconsider adding the user study in our maximum deliverables again once the real Galen Robot admittance controller is functional. 
 + 
 +With the project in its current state, the software, development, design, and instructions are all well documented and available for review and reference. Future work will be done to complete the outstanding deliverables post spring 2023 semester until the beginning of 2023 summer. 
 + 
 + 
 + 
 +**Discussion** 
 + 
 +Overall, the project is a success. We were able to accomplish a significant amount of work with only a few hands. I had the help of great mentors who helped streamline the project and direct me to the resources I needed. We succeeded in generating a working Admittance controller in the AMBF simulation that gives us the expected performance we would like with the real hardware. In addition to the controller in simulation, tools to connect the robot to AMBF and teleoperate the system with easily repeatable tools will now allow us to perform many different control tests faster and repeatably.  
 + 
 +The control framework presented in the AMBF simulation is applicable to more robots than the Galen Robot. This MATLAB interface can be extended in use for any serial robot or other AMBF robots. The controller dynamics could easily be updated, the stability and transparency maps can similarly be calculated with these tools, and the admittance gains can simply be selected. This will make applying admittance controllers to any form of cobot relativley simple. 
 + 
 +While the controller has been verified in contact in the simulation, it still would be nice to have seen this fully implemented on the real hardware. The efforts to do so are still on going, and the results have yet to be seen. We do anticipate the implementation of the controller to be promising as we have observed in the Z axis control on the Galen robot. With the full onboard admittance controller repeatable testing of the real hardware with the old controller and our new controller will allow us to capture results that show a measurable improvement. 
 + 
 +**Next Steps** 
 + 
 +Several next steps have been discussed throughout this report and will be summarized here again. 
 + 
 +A few more steps are necessary to ensure that the AMBF simulation controls well for the robot. It has been shown to work in simulated contact, but it would be very interesting to study the performance of the robot in the AMBF simulation with different forms of contact. If AMBF features tools to control the stiffness, penetration depth, and angle of contact, we could further investigate how the robot performs in contact, that may better predict how it would respond to contact in the real world. This contact could also be done in more rigorous ways by moving the robot in several DOF at different rates and impedance values. 
 + 
 +If we are able to more accurately see how the robot interacts with a simulated environment, there are ways we could use the simulated objects in AMBF to create virtual fixtures. We could ‘twin’ the two control systems, to possibly use this controller as a virtual fixture. With objects in contact in AMBF, we could run the real Galen Robot in parallel and observe when they both reach certain positions and velocities. If there is contact in AMBF, we could impose a virtual contact on the real system that would stop the robot and push it back.  
 + 
 +This, of course, requires us to first have the controller also working on the actual Galen robot. The next steps in scope of the project completion before summer 2023 are to have the real Galen robot controller running and performing similarly to the AMBF simulation. In turn we should be able to select admittance gains that improve the transparency and stability of the Galen robot. 
 + 
 +With the Galen robot controller verified and the other aspects of the simulation environment running as we would like, we will consider performing a user study to asses the qualitative response of the robot. We will have ENT surgeons operate the robot with the previously implemented Galen robot controller and also operate it with our new admittance controller. We will design a series of tests consisting of repeatable and measurable tasks where we will measure their performance. We will also ask for their feedback on the system. 
 + 
 +In conclusion, there is still much work to be done to get the controller working on the real robot. This work will be continued. All the design documents, reports, and software are present on the course website and available for my mentors through the LCSR. Any code written specifically for control of the Galen Robot is on the computer in the MOCK OR. I will continue to work on the project until the beginning of summer as well to complete the controller implementation and publish the work we have done in admittance control development. 
 +
  
 ======Reports and presentations====== ======Reports and presentations======
Line 318: Line 393:
     * {{:courses:456:2023:projects:456-2023-01:team01_final_checkpoint.pptx| Poster Teaser presentation}}     * {{:courses:456:2023:projects:456-2023-01:team01_final_checkpoint.pptx| Poster Teaser presentation}}
   * Project Final Presentation   * Project Final Presentation
-    * {{:courses:456:2023:projects:456-2023-01:final_poster_pdf.pdf|PDF of Poster}}+    * {{:courses:456:2023:projects:456-2023-01:togac49_p_finalcis2poster.pdf.pdf|PDF of Poster}}
   * Project Final Report   * Project Final Report
-    * {{:courses:456:2023:projects:456-2023-01:final_report.pdf|Final Report}} +    * {{:courses:456:2023:projects:456-2023-01:togac52_d_finalreport.pdf|Final Report}}
-    * links to any appendices or other material+
   * Project Mentor's Report   * Project Mentor's Report
 +    * {{ :courses:456:2023:projects:456-2023-01:cis_2_project_mentors_report.pdf |Mentor's Report}}
  
 ======Project Bibliography======= ======Project Bibliography=======
Line 381: Line 456:
  
 {{ :courses:456:2023:projects:456-2023-01:togac36_ambf_r_aydinstab.pdf?250 }} {{ :courses:456:2023:projects:456-2023-01:togac36_ambf_r_aydinstab.pdf?250 }}
 +
 +
 +{{ :courses:456:2023:projects:456-2023-01:togac40_d_deltakin.pdf?250 }}
 +
 +{{ :courses:456:2023:projects:456-2023-01:togac50_ambf_in_admittancecontrolteleop.pdf?250 }}
 +
 +{{ :courses:456:2023:projects:456-2023-01:togac51_ambf_r_cartesiansystemidentification.pdf?250 }}
 +
courses/456/2023/projects/456-2023-01/project-01.1683686253.txt.gz · Last modified: by bbanks15




ERC CISST    LCSR    WSE    JHU