DiffFR: Differentiable SPH-based Fluid-Rigid Coupling for Rigid Body Control

Zhehao Li 1   Qingyu Xu 1   Xiaohan Ye 2    Bo Ren 2   Ligang Liu1  
teaser figure: flag post Figure 1. Gradient-based optimization results. The stone skipping task with our differentiable SPH-based fluid-rigid coupling simulator. We optimize the initial linear and angular velocities of the stone to make it pass through the target red ring after bouncing.

Abstract

1. Motivation: Differentiable physics simulation has shown its efficacy in inverse design problems. Given the pervasiveness of the diverse interactions between fluids and solids in life, a differentiable simulator for the inverse design of the motion of rigid objects in two-way fluid-rigid coupling is also demanded.

2. Challenges: There are two main challenges to develop a differentiable two-way fluid-solid coupling simulator for rigid body control tasks: the ubiquitous, discontinuous contacts in fluid-solid interactions, and the high computational cost of gradient formulation due to the large number of degrees of freedom (DoF) of fluid dynamics.

3. Contributions: In this work, we propose a novel differentiable SPH-based two-way fluid-rigid coupling simulator to address these challenges. Our purpose is to provide a differentiable simulator for SPH which incorporates a unified representation for both fluids and solids using particles. However, naively differentiating the forward simulation of the particle system encounters gradient explosion issues. We investigate the instability in differentiating the SPH-based fluid-rigid coupling simulator and present a feasible gradient computation scheme to address its differentiability. In addition, we also propose an efficient method to compute the gradient of fluid-rigid coupling without incurring the high computational cost of differentiating the entire high-DoF fluid system.

4. Results: We show the efficacy, scalability, and extensibility of our method in various challenging rigid body control tasks with diverse fluid-rigid interactions and multi-rigid contacts, achieving up to an order of magnitude speedup in optimization compared to baseline methods in experiments.


Video


If you have no access to YouTube, you can watch our video on BiliBili: [SIGGRAPH Asia 2023] DiffFR 论文补充视频

Result 1. Rigid Body Trajectory Optimization

1.1 Stone Skipping
Optimize the releasing linear and angular velocity of the stone to make it pass the target red ring at the target time after bouncing.
238507 particles, 713103 DoFs, 6 design parameters.


1.2 Water Rafting
Optimize the releasing linear and angular velocity of the bunny to reach the target position and pose at the target time after riding on the river flow.
107004 particles, 315468 DoFs, 5 design parameters.


1.3 High Diving
Optimize the releasing angular velocity of the duck to reach the target pose at the target time after rolling in the pool.
156122 particles, 468372 DoFs, 3 design parameters.

1.4 Bottle Flip Challenge
Stage 1: Optimize the releasing linear and angular velocity of the bottle to reach the target position near above the table and a 360° rotation. Stage 2: Fine tune the stage-1 result to make the bottle stop and stand stably on the table after rigid-rigid contact.
27360 particles, 39942 DoFs, 6 design parameters.

1.5 On-water Billiards
Let the water pool be your billiards table! Optimize the initial linear and angular velocity of the yellow ball to make the red ball reach the target position at the target time after collision.
90217 particles, 262053 DoFs, 6 design parameters.

Result 2. Self-supervised Learning of Water Bottle Flipping Control Policy

We integrate our differentiable fluid-rigid coupling simulator into a neural network bottle flip controller, which facilitates the training to be in an end-to-end manner with the gradient information directly from the simulator.

Result 3. Closed-loop On-water Inverted Pendulum Robot Controller

Finally, we train a closed-loop controller that keeps the pole balanced on the undulating water surface disturbed by two baffles, where the controller applies appropriate forces on the cart at regular intervals.

Paper

Paper

Z. Li, Q. Xu, X. Ye, B, Ren, L. Liu
DiffFR: Differentiable SPH-based Fluid-Rigid Coupling for Rigid Body Control
ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2023)

PDF (15MB) Low-res PDF (2MB)
Paper

Supplementary

PDF (700KB)

Presentation

Pre

Presentor: Zhehao Li
DiffFR: Differentiable SPH-based Fluid-Rigid Coupling for Rigid Body Control
Talk on SIGGRAPH Asia 2023

PDF (59MB)

Code


BibTex

@article{Li2023:DiffFR,
          title = {DiffFR: Differentiable SPH-based Fluid-Rigid Coupling for Rigid Body Control}, 
          author = {Zhehao Li, Qingyu Xu, Xiaohan Ye, Bo Ren and Ligang Liu},
          journal = {{ACM Trans. Graph.},
          year = {2023},
          month = {Dec},
          volume = {42},
          number = {6},
          numpages = {17},
          url={https://doi.org/10.1145/3618318}