top of page

Research Blog

Buscar
  • Foto del escritor: Carlos Osorio
    Carlos Osorio
  • 23 oct 2024
  • 4 min de lectura

Actualizado: 6 dic 2024

We explore the integration of Dynamic Mode Decomposition (DMD) with Physics-Informed Neural Networks (PINNs) to enhance control systems for UAV quadcopters. This innovative approach applies DMD techniques and PINNs to solve the Riccati equation, which is critical for accurate UAV position estimation. By embedding the UAV control problem within physics-based constraints, the models remain faithful to the physical principles governing UAV dynamics. DMD is used to extract key dynamic modes from a rich dataset of UAV flight parameters—such as position, velocity, and control inputs—yielding a reduced-order representation that encapsulates the essential UAV dynamics. This streamlined representation is then embedded within the PINN framework to solve the Riccati equation accurately. The resulting control strategy significantly enhances position estimation accuracy and optimizes overall control performance. Real-time validation was performed in a Unity-based physics simulation, factoring in real-world conditions like gravity and perturbation noise. The outcomes show notable improvements in estimation accuracy and control stability over conventional methods.

Fig.1 . Integrating DMD with PINN for UAV position and orientation estimation involves a step-by-step workflow. This sequence highlights the training procedure, detailing the neural network architecture and the loss function used to optimize the model.


DYNAMIC MODE DECOMPOSITION (DMD) WITH PHYSICS-INFORMED NEURONAL NETWORK (PINNS)


The integration of DMD and PINNs provides a robust control strategy for precise estimation of UAV position and orientation, even in the presence of noise and environmental perturbations. By optimizing a composite loss function, the PINN framework ensures that the estimated states adhere to the physical laws governing UAV dynamics, leading to improved accuracy and stability. During training, the neural network parameters are fine-tuned to minimize this loss, which in turn enhances the overall performance of the control system.


For the process of integrating DMD with PINN define the following steps:


Data Acquisition and Preprocessing: A comprehensive dataset, denoted as Xin​, is collected, comprising UAV flight information such as Euler angles (ϕ,θ,ψ,), position coordinates (x,y,z), and noisy observations. This dataset serves as the input for the DMD process.


Dynamic Mode Decomposition (DMD): The input data is processed using DMD to extract system matrices [A, B, Q, R], which represent the UAV dynamics and control parameters. These matrices form a reduced-order model that captures the dominant modes of the UAV's behavior.

Solving the Discrete Algebraic Riccati Equation (DARE): The matrices derived from DMD are then used to solve the discrete algebraic Riccati equation (DARE), yielding an initial state estimate X^1​.


Neural Network (NN) Refinement: The initial state estimate ˆX1 is then refined using a Physics-Informed Neural Network (PINN). The architecture consists of fully connected layers with ReLU activation functions between layers: • Input Layer: The network takes as input system matrices. • First Layer: The flattened input passes through a fully connected layer with 128 neurons, followed by a ReLU activation. • Second Layer: The output of the first hidden layer is passed through another fully connected layer with 128 neurons, again followed by a ReLU activation. • Output Layer: The output from the second hidden layer is passed through a final fully connected layer that outputs a vector reshaped into the desired size of A (state dimension squared), producing an estimated matrix ˆXk for the given system. This matrix represents a control output in the form of a transformation of the input matrices. This neural network framework incorporates physical laws and constraints directly into the learning process, improving the accuracy of the state estimates. The refinement process involves minimizing a composite loss function, where the variable α=0.1 and β=0.05 used to adjust the loss function:

  • PDE Loss: Ensures that the neural network solution adheres to the partial differential equations governing the UAV dynamics.

  • Initial Condition Loss: Penalizes deviations from the initial conditions.

  • Boundary Condition Loss: Ensures continuity and smoothness in the state estimates over time.


 Control Law and Position Estimate: The refined state estimate Xk is used to update the control law.

Output: The final output position (X,Y,Z) and Euler angles (ϕ,θ,ψ,) estimate.


The training process for the PINNs focuses on minimizing composite loss functions by adjusting the neural network parameters. By incorporating physical constraints and utilizing the dynamic modes extracted through DMD, the PINNs framework ensures robust and accurate UAV state estimations, even in the presence of noise and environmental disturbances. For training, we employed the IMCIS and Package Delivery UAV datasets. The network was trained for up to 5000 iterations, with early stopping triggered by an error tolerance threshold of 10^{-4}. The Adam optimizer was used, and the training duration ranged from 30 to 50 minutes. The network architecture consisted of three fully connected (Linear) layers and two ReLU activation functions. All computations were performed on an NVIDIA GTX GeForce RTX 4060 GPU. For model testing, we developed a Unity environment that included a physics-based simulation, accounting for factors like gravity and perturbation noise. Integration between the control model and the simulation environment was achieved via the UDP communication protocol.


Discussion of Simulation Results:

Fig.2 . Reference drone trajectory used for evaluating the performance of DMD and PINN control methods.


The integration of DMD with PINNs has led to significant improvements in UAV trajectory control, as evidenced by both quantitative and qualitative metrics. The DMD-PINN model achieved considerably lower RMSE and MAE compared to other models, including CNN, MLR, and the DMD-only model (refer to Table I). These results highlight the superior accuracy and reliability of the DMD-PINN approach for controlling UAV trajectories. Additionally, the DMD-PINN model closely matched the ground truth trajectories and demonstrated strong performance across various test scenarios, showcasing its robustness in handling noise and maintaining precision in dynamic environments. The combination of DMD and PINNs offers a powerful method for enhancing the fidelity of UAV control systems under diverse operational conditions.


C. A. Osorio Quero and J. Martinez-Carranza, "Physics-Informed Machine Learning for UAV Control," 2024 21st International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City, Mexico, 2024, pp. 1-6, doi: 10.1109/CCE62852.2024.10770871.


BibTeX

@INPROCEEDINGS{10770871,author={Osorio Quero, Carlos Alexander and Martinez-Carranza, Jose},booktitle={2024 21st International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE)}, title={Physics-Informed Machine Learning for UAV Control}, year={2024},volume={},number={},pages={1-6},doi={10.1109/CCE62852.2024.10770871}}



Actualizado: 6 nov 2024




Abstract


Traditional deep-learning techniques for image reconstruction often demand extensive training datasets, which might not always be readily available. In response to this challenge, methods not requiring pre-trained models have been developed, leveraging the training of networks to reverse-engineer the physical principles behind image creation. In this context, we introduce an innovative approach with our untrained Res-U2Net model for phase retrieval. This model allows us to extract phase information, crucial for detecting alterations on an object's surface. We can use this information to create a mesh model to represent the object's three-dimensional structure visually. Our study evaluates the effectiveness of the Res-U2Net model in phase retrieval tasks, comparing its performance with that of the UNet and U2Net models, specifically using images from the GDXRAY dataset.


Fig.1. 3D phase retrieval: (a) 2D Ray-X test image, (b) 2D phase retrieval estimate, and (c) resulting 3D mesh.


Method

Overview of the proposed architecture for Phase Retrieval:



Fig.2. Res-U2Net architecture: (a) U2Net model configuration, based on a multi-scale sequence of Res-UNet models, (b) Res-UNet model, the encoder extracts features using convolutional layers (Conv2D) with batch normalization, ReLU activation (ResBlock), and spatial resolution reduction via max pooling (MaxPooling2D). This is followed by a decoder assigning phases to the features by upsampling using transpose convolutions (Conv2DTranspose) with skip connections. Residual connections link the encoder and decoder layers to improve the training performance. Finally, a 1×440×4401×440×440 convolutional layer generates the segmentation mask, resulting in the network output.


BibTeX

@article{OsorioQuero:24,author = {Carlos Osorio Quero and Daniel Leykam and Irving Rondon Ojeda},journal = {J. Opt. Soc. Am. A},keywords = {Biomedical imaging; Computational imaging; Fluorescence lifetime imaging; Imaging techniques; Inverse design; Phase retrieval},number = {5},pages = {766--773},publisher = {Optica Publishing Group},title = {Res-U2Net: untrained deep learning for phase retrieval and image reconstruction},volume = {41},month = {May},year = {2024},url {https://opg.optica.org/josaa/abstract.cfm?URI=josaa-41-5-766}, doi = {10.1364/JOSAA.511074}}







Abstract

Capturing 3D details of human pose and body shape from just one monocular image poses a significant challenge in computer vision. Traditional approaches rely on RGB images, which are limited by changes in lighting and obstructions. However, advances in imaging technology have led to novel methods like single-pixel imaging (SPI), which overcome these obstacles. SPI, especially in the near-infrared (NIR) spectrum, excels at detecting 3D human poses. This wavelength can go through clothing and is less affected by lighting changes than visible light, offering a dependable way to capture accurate body shape and pose information, even in challenging environments. In this research, we investigate using an SPI camera operating in the NIR spectrum with time-of-flight (TOF) technology at 850 and 1550 nm wavelengths. This setup is designed to identify humans in low-light conditions. We employ the vision transformers (ViT) model to recognize and extract human features, integrating them into a 3D body model called SMPL-X through deep learning-based 3D body shape regression. To test the effectiveness of NIR-SPI for 3D image reconstruction, we created a lab environment that mimics night conditions, allowing us to explore the potential of NIR-SPI as a vision sensor in outdoor night settings. By analyzing the data from this experiment, we aim to showcase NIR-SPI's capabilities as a powerful tool for nighttime human detection and for capturing precise 3D human body pose and shape.


Human modeling


Using parametric human models, such as SMPL-X, allows for a concise representation of human shapes by utilizing shape and pose parameters to encode variations [6]. The SMPL-X model offers various advantages:


  • It disentangles the human shape and pose, allowing for independent analysis and control of each shape.

  • It avoids modeling rugged and twisted shapes directly, which can pose difficulties for neural network-based methods, by utilizing a skinning process to model deformation and

  • It is differentiable and can be easily integrated with neural networks. For this research, we used SMPL-X as the underlying representation for modeling 3D humans.


Proposed Method


The process used to obtain the 3D human model from NIR-SPI. It involves several steps that use different computer vision techniques to reconstruct a 3D human pose from a single low-resolution image. Here is a detailed explanation of each step:


  • Take a single-pixel low-resolution image. This step involves capturing an image of a human. The image contrast is adjusted to extract the basic shape of the person, and then the background is removed using U2Net. This deep-learning model can accurately segment the foreground and background of an image. Thus, an image segmentation technique isolates the person from the background to obtain the image’s silhouette. This image only shows the person's outline without any details of the surface or texture.

  • Applied over the silhouette image, ViT can identify four human poses: lying, bending, sitting, and standing. Once the pose is identified, it can be used to generate a 3D human pose using the VIBE method, a deep learning model that can estimate the 3D pose of a human from a single image or video.

  • Finally, we can reconstruct the human body shape and pose in 3D space. As discussed above, this can be done using a tool such as SMPL-X.

Fig.1. Overview of the proposed network architecture, which takes NIR single-pixel imaging input and outputs 3D body reconstruction based on SMPL-X shape and pose parameters. The entire network consists of three main modules: (i) NIR-SPI-based image acquisition. (ii) Feature extraction using deep learning: The NIR-SPI image extracts the background to obtain the silhouette. (iii) 3D pose estimation using a regression-based approach: The silhouette image is used to obtain the gait features (shape estimation), which are then used to pose the human using ViT and skeleton joint features. These features are used to pre-define the pose SMPL-X model; from the pre-defined parameters (pose 𝜃, shape 𝛽 and camera s, R, T), the SMPL-X model is fed to the off-the-shelf SMPL-X model to obtain the reconstructed 3D human mesh.


Fig.2. Capture human pose imaging at a distance of 1 m: (a) Capture NIR-SPI imaging of human pose standing, sitting, and bending, (b) silhouette image, and (c) 3D human pose regression based on SMPL-X model.


The proposed methods to obtain a 3D human model from NIRSPI imaging, for human poses such as lying, bending, sitting, and standing. The best accuracy was achieved in the sitting position, with an accuracy of around 91%, as shown in the V2V and MPJPE errors. The results demonstrate the effectiveness of the proposed approach, with limitations in hand positioning due to the low contrast of the NIR-SPI image. However, the level position of the core person detection shows an accurate estimation of the 3D pose of the person through qualitative and quantitative evaluations. These findings highlight the potential of the proposed approach for 3D human modeling from a single low-resolution image.


In comparison, the presented SMPL-X model captures the body, face, and hands jointly, and the SMPL-X approach fits the model to a single NIR-SPI image and 2D joint detections. The results of this work demonstrate the expressivity of SMPL-X in capturing bodies, hands, and faces from NIR-SPI images. However, we observed that the bending and lying pose presented the highest V2V and MPJPE error levels, indicating limitations in the pose parameters θ. Therefore, it is recommended that a compensation model be implemented in future applications. Future work may involve the development of a dataset of in-the-wild SMPL-X fits and the direct regression of SMPL-X parameters from NIR-SPI images.


BibTeX

@article{OsorioQuero:24, author = {Carlos Osorio Quero and Daniel Durini and Jose Rangel-Magdaleno and Jose Martinez-Carranza and Ruben Ramos-Garcia}, journal = {J. Opt. Soc. Am. A},keywords = {Image metrics; Imaging techniques; Machine vision; Single pixel imaging; Three dimensional imaging; Three dimensional reconstruction}, number = {3}, pages = {414--423}, publisher = {Optica Publishing Group}, title = {Enhancing 3D human pose estimation with NIR single-pixel imaging and time-of-flight technology: a deep learning approach}, volume = {41}, month = {Mar}, year = {2024}, url = {https://opg.optica.org/josaa/abstract.cfm?URI=josaa-41-3-414},doi = {10.1364/JOSAA.499933},}

bottom of page