FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems

arXiv:2606.31228 · eess.SY, cs.SY, physics.app-ph, physics.ins-det · Submitted 2026-06-30 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Robotics Radio. Generated commentary on the latest robotics and control papers.

Rosa: We're looking at the paper: "FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems".

Paper summary: Rosa: Thinking about the title, FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems, it really highlights how they’re merging theoretical control methods with actual accessible hardware >

Dev: Yeah, the authors are presenting this integrated open source platform designed specifically for platforms like the Red Pitaya STEMlab board >

Taro: It seems like the real value here is in taking complex control theory that used to require expensive specialized setups and putting it onto something widely adopted >

Rosa: Precisely. The implication is that you can get high speed state estimation and optimal control running on low cost hardware for experiments where noise and external disturbances are a major factor >

Dev: It gives researchers a solid, reproducible foundation for testing feedback algorithms in areas like levitated optomechanics without needing to reinvent the wheel or build custom hardware from scratch >

Taro: So it’s about democratizing the ability to do these kinds of high speed control experiments by making the tools available through a MATLAB workflow and an API server >

Rosa: That’s right. They are providing a way for people who might not be deep hardware engineers to deploy and test these sophisticated control schemes in a real world setting quickly >

Conclusion: Rosa: So we're wrapping up this piece on this FPGA stuff for controlling tiny mechanical things, focusing on that LQG controller and the hardware in the loop simulator setup.

Dev: Yeah, looking at that title, it’s pretty specific. It tells you exactly what they built—a real-time control system running on an affordable platform called the Red Pitaya STEMlab FPGA board.

Rosa: And it seems like the authors are trying to bridge a gap between the heavy control theory you learn in a textbook and actually getting that working on something that’s not super expensive or specialized hardware.

Dev: Exactly. They’re showing how you can take those complex ideas about optimal state estimation and feedback control, which usually need super powerful computers, and get them running fast on this kind of chip.

Rosa: It feels like the real implication is making high-speed state estimation and optimal control accessible for researchers who aren't already working in huge labs.

Dev: Right. The way they use fixed point arithmetic to fit all that math onto the hardware is key—it shows a practical way to keep things running in real time without needing super expensive processors.

Rosa: And then you have that hardware in the loop simulator, which lets you test your control code against a realistic model of how these nanomechanical systems actually behave before you even try it out on the actual physical thing.

Dev: That HIL part is crucial for safety and reliability. It means they can validate the controller's performance under noisy conditions or when things go wrong in a simulated environment first.

Rosa: So, it boils down to giving people a transparent, reproducible foundation for doing these advanced feedback experiments without needing to be an expert hardware engineer just to get started.

Dev: That’s the gist of it. It’s about lowering the technical hurdle for high-speed control on low-cost hardware. Next time we look at this, we'll see how they actually demonstrated this with a specific experiment involving a levitated nanoparticle in a double well potential.

Automation and Control Institute, TU Wien · AIT Austrian Institute of Technology

eess.SY, cs.SY, physics.app-ph, physics.ins-det

Submitted: 2026-06-30

Updated: 2026-11-18

Comments: Submission to SciPost

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 79/100

The gist: FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems presents an open-source framework for real-time Linear Quadratic Gaussian (LQG) control and…

Key concepts

LQG Controller
This is an optimal control method that combines two techniques: a Kalman filter for estimating the system's current state (like position and velocity) and a Linear Quadratic Regulator to calculate the best corrective actions. Together, they provide the most efficient way to control noisy systems.
Hardware-in-the-Loop (HIL) Simulation
This module simulates a physical system on the FPGA before it is connected to real hardware. It uses a detailed mathematical model of the system, including nonlinearities, to test how well a controller performs in real-time conditions without needing the actual physical nanomechanical device.
Fixed-Point Arithmetic
Instead of using standard floating-point numbers for calculations, this method uses fixed-point numbers. This technique balances computational speed and memory usage by representing decimal values with a set number of bits. It is crucial for running complex control algorithms efficiently on hardware like the FPGA.
State-Space Model
This is a mathematical way to describe how the system's internal variables (its state) change over time based on inputs and noise. The paper uses this model to represent three uncoupled harmonic oscillators, capturing the fundamental dynamics of many physical systems.

Terminology

Summary

FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems presents an open-source framework for real-time Linear Quadratic Gaussian (LQG) control and hardware-in-the-loop (HIL) simulation on the affordable Red Pitaya STEMlab FPGA platform, addressing the practical gap between established control theory and routine laboratory deployment. p. 0

Where the paper says it

at Abstract We present an open-source framework for real-time Linear Quadratic Gaussian (LQG) control and hardware-in-the-loop (HIL) simulation on the affordable Red Pitaya STEMlab FPGA platform. The controller implements a discrete-time Kalman filter and Linear Quadratic Regulator (LQR) for systems with up to three coupled oscillatory degrees of freedom, targeting applications in levitated optomechanics, MEMS/NEMS, and related experimental platforms.

Controller Design and Mathematical Model

The LQG controller is designed to be a stochastically optimal approach that combines optimal state estimation via a Kalman filter with optimal feedback control via a Linear Quadratic Regulator. The system model considered is a linear continuous-time system with additive process and measurement noise, specifically modeling three uncoupled harmonic oscillators with an additional drift term. p. 3

Where the paper says it

We model the plant as a linear continuous-time system with additive process and measurement noise, which is a common approximation for many nanomechanical systems, such as levitated nanoparticles and NEMS, operating near their equilibrium points. Specifically, we consider a system of three uncoupled harmonic oscillators with an additional drift term, and with optional cross-coupling in the input and output functions.

This state-space model is described by the equation ξ˙(t) = Aξ(t) + Bu(t) + Gw(t), which captures the dominant dynamics of many levitated optomechanical and nanomechanical systems. p. 3
Where the paper says it

Specifically, we consider a system of three uncoupled harmonic oscillators with an additional drift term, and with optional cross-coupling in the input and output functions. This model structure was chosen because it captures the dominant dynamics of many levitated optomechanical and nanomechanical systems, including the three translational degrees of freedom typically encountered in such experiments, while maintaining a compact state-space representation that can be efficiently implemented on resource-constrained FPGA hardware.

The state vector ξ is defined as ξ = [x x y ˙ ˙y z z˙ φ] T, where φ accounts for slow baseline variations or low-frequency disturbances. p. 3
Where the paper says it

We emphasize that the front-end interface is designed for the most common streamlined model structure, but the underlying implementation can support arbitrary linear state-space models with 7 states, allowing users to implement different systems by modifying only the MATLAB interface. 1 System model The controller is designed to support three uncoupled oscillators (dubbed x, y, and z) and an additional drift term φ assembled in the state vector ξ as ξ = x x y ˙ ˙y z z˙ φ T , (1) The additional drift state φ is intended to capture slow baseline variations, low-frequency disturbances, or slowly varying offsets that cannot be represented by the oscillator dynamics themselves.

Implementation Details for Real-Time Operation

The implementation focuses on achieving real-time operation on the FPGA using fixed-point arithmetic to balance precision and resource consumption. The fixed-point data types are configured to match the Xilinx ZYNQ DSP48E1 resources, utilizing 25 bit words for internal states and 18 bit words for configurable constants. p. 7

Where the paper says it

The fixed-point data types configured for components in equations (18) and (19) are listed in Table 1. Bit width Fraction width Shift bits Internal states ξˆ 25 22 – Feedback signal u 14 13 – Detection signal χ 14 13 – Dynamic matrix (Ad − LdC) 18 14 5 Input matrix Bd 18 14 5 Kalman gain Ld 18 14 5 LQR gain Kd 18 14 6 Table 1: Fixed-point data types for LQG components 2.

State-space transformations are applied to improve numerical stability, with a major transformation being the physical state normalization which equalizes the numerical scale of displacements and velocities. p. 8
Where the paper says it

Physical state normalization This transformation is motivated by the fact that the state vector ξ contains both displacements and velocities, which can have vastly different numerical ranges, and additionally, the measurement matrix C can have entries with very large magnitudes, necessary to convert physical displacements, typically in the nanometer range, into measurable voltages. The first transformation equalizes the numerical scale of displacements and velocities while simultaneously reducing the magnitude gap between physical states and measured voltages.

Hardware-in-the-Loop Simulation Module

The HIL simulator module implements a generalized plant model for stochastic, second-order systems with configurable separable nonlinearities in the damping, restoring force, and input/output mappings. The architecture is designed to minimize input-output latency while maintaining sufficient numerical accuracy for hardware-in-the-loop validation of feedback controllers. p. 3

Where the paper says it

Specifically, we consider a system of three uncoupled harmonic oscillators with an additional drift term, and with optional cross-coupling in the input and output functions. This model structure was chosen because it captures the dominant dynamics of many levitated optomechanical and nanomechanical systems, including the three translational degrees of freedom typically encountered in such experiments, while maintaining a compact state-space representation that can be efficiently implemented on resource-constrained FPGA hardware.

The simulator uses three independent state slices and separable nonlinearities in both the state and input/output paths to preserve real-time performance. p. 2
Where the paper says it

The HIL simulator module implements a generalized plant model for stochastic, secondorder systems with configurable separable nonlinearities in the damping, restoring force, and input/output mappings, driven by pseudorandom Gaussian white noise. It should be noted that the HIL simulator is not intended to serve as a precise twin of a real experiment, but rather as a tool that can emulate the behavior of such a system to a relatively high degree of fidelity.

End-to-End Demonstration and Workflow

The paper presents an end-to-end demonstration involving a levitated nanoparticle exploring a two-dimensional double-well potential, illustrating the complete workflow from model definition and simulation to real-time feedback control. The MATLAB workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise. p. 0

Where the paper says it

Complementing the controller, the HIL simulator provides a configurable second-order stochastic plant with nonlinear input and output mappings, enabling realistic closed-loop testing under real-time and fixed-point constraints. A MATLAB-based workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise.

The example showcases both potential configurations and demonstrates live switching between them with the LQG controller active. p. 2
Where the paper says it

As a concrete end-to-end demonstration, we configure and deploy both modules for a levitated nanoparticle exploring a two-dimensional double-well potential, reproducing the dynamics of our experimental work in [5,6]. The example showcases both potential configurations, a fully confining quadratic potential and a saddle potential, and demonstrates live switching between them with the LQG controller active.

Conclusion

The work provides a transparent, extensible, and reproducible foundation for advanced feedback experiments by combining a real-time LQG controller and a hardware-in-the-loop simulator on an accessible FPGA platform. This platform lowers the technical barrier to high-speed state estimation and optimal control on low-cost hardware, supporting reproducible research in fields like levitated optomechanics. p. 1

Where the paper says it

2 LQG: Controller operation 25 5 Conclusion 27 References 27 1 Introduction Active feedback control and state estimation have become indispensable tools in levitated optomechanics [1–7], nano- and micro-electromechanical systems (NEMS/MEMS) [8, 9], and other platforms that are strongly driven by external stochastic disturbances. In these settings, a state estimator paired with an optimal feedback law can suppress the resonant motion of a high-Q oscillator by several orders of magnitude or stabilize an otherwise unstable system.

The goal is to provide a foundation for advanced feedback experiments by reducing the technical barrier to high-speed state estimation and optimal control on low-cost hardware. p. 1
Where the paper says it

2 LQG: Controller operation 25 5 Conclusion 27 References 27 1 Introduction Active feedback control and state estimation have become indispensable tools in levitated optomechanics [1–7], nano- and micro-electromechanical systems (NEMS/MEMS) [8, 9], and other platforms that are strongly driven by external stochastic disturbances. In these settings, a state estimator paired with an optimal feedback law can suppress the resonant motion of a high-Q oscillator by several orders of magnitude or stabilize an otherwise unstable system.

Acknowledgements

This research was funded in part by the Austrian Science Fund (FWF) [10.55776/COE1, 10.55776/PAT9140723]. The authors acknowledge their funding sources for this work. p. 0

Where the paper says it

Copyright attribution to authors. This work is a submission to SciPost Physics Codebases.

References

[1] J. Millen, T. S. Monteiro, R. Pettit and A. N. Vamivakas, Optomechanics with levitated particles, Reports on Progress in Physics 83(2), 026401 (2020), doi:10. p. 0

Where the paper says it

at Abstract We present an open-source framework for real-time Linear Quadratic Gaussian (LQG) control and hardware-in-the-loop (HIL) simulation on the affordable Red Pitaya STEMlab FPGA platform. The controller implements a discrete-time Kalman filter and Linear Quadratic Regulator (LQR) for systems with up to three coupled oscillatory degrees of freedom, targeting applications in levitated optomechanics, MEMS/NEMS, and related experimental platforms.

1088/1361-6633/ab6100.

[5] S. Dago, J. Rieser, M. A. Ciampini, V. Mlynáˇr, A. Kugi, M. Aspelmeyer, A. DeutschmannOlek and N. Kiesel, Stabilizing nanoparticles in the intensity minimum: Feedback levitation on an inverted potential, Optics Express 32(25), 45133 (2024), doi:10. p. 0

Where the paper says it

A MATLAB-based workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise. As an end-to-end demonstration, we present the stabilization of a levitated nanoparticle in a two-dimensional double-well potential, illustrating the complete workflow from model definition and simulation to real-time feedback control.

1364/OE.541267.

[6] V. Mlynáˇr, S. Dago, J. Rieser, M. A. Ciampini, M. Aspelmeyer, N. Kiesel, A. Kugi and A. Deutschmann-Olek, Feedback stabilization of a nanoparticle at the intensity minimum of an optical double-well potential, Control Engineering Practice 168, 106665 (2026), doi:10. p. 0

Where the paper says it

A MATLAB-based workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise. As an end-to-end demonstration, we present the stabilization of a levitated nanoparticle in a two-dimensional double-well potential, illustrating the complete workflow from model definition and simulation to real-time feedback control.

1016/j.conengprac.2025.106665.

[7] L. Magrini, P. Rosenzweig, C. Bach, A. Deutschmann-Olek, S. p. 0

Where the paper says it

SciPost Physics Codebases Submission FPGA-based LQG controller and hardware-in-the-loop simulator implementation for nanomechanical systems Vojtech Mlyná ˇ ˇr 1†*, Johannes Berndorfer1*, Andreas Kugi1,2 and Andreas Deutschmann-Olek1‡ 1 Automation and Control Institute (ACIN), TU Wien, Vienna (1040), Austria 2 AIT Austrian Institute of Technology, Vienna (1210), Austria † mlynar@acin. at, ‡ deutschmann@acin.

G. Hofer, S. Hong, N. Kiesel, A. Kugi and M. Aspelmeyer, Real-time optimal quantum control of mechanical motion at room temperature, Nature 595, 373 (2021), doi:10. p. 1
Where the paper says it

In these settings, a state estimator paired with an optimal feedback law can suppress the resonant motion of a high-Q oscillator by several orders of magnitude or stabilize an otherwise unstable system. The optimal solution to this problem lies in the Linear Quadratic Gaussian (LQG) regulator: a Kalman filter (KF) for state estimation combined with a Linear Quadratic Regulator (LQR) for optimal control; it is mean-square-error optimal for the linear Gaussian plant model that describes most such oscillators in the regime of small displacements and extends directly to the quantum regime [10].

1038/s41586-021-03602-3.

[8] M. Poggio, C. L. Degen, H. J. Mamin and D. Rugar, Feedback Cooling of a Cantilever’s Fundamental Mode below 5 mK, Physical Review Letters 99(1), 017201 (2007), doi:10. p. 6

Where the paper says it

Reconfiguring the matrix Qusr allows the user to adjust the weighting of the individual states, for example, to prioritize cooling of a specific mode or to introduce off-diagonal terms to attenuate relative motion between modes. This choice is particularly well suited for feedback-cooling applications, where the primary objective is the reduction of the mechanical energy stored in the oscillatory modes rather than the minimization of individual state components.

1103/PhysRevLett.99.017201.

[9] K. Schmerling, H. Beši´c, A. Kugi, S. Schmid and A. Deutschmann-Olek, Optimal sensing of momentum kicks with a feedback-controlled nanomechanical resonator, Physical Review Applied 23(5) (2025), doi:10. p. 3

Where the paper says it

2 LQG controller for nanomechanical systems This section presents the design and implementation of a Linear Quadratic Gaussian (LQG) controller tailored for nanomechanical systems. The LQG controller is a stochastically optimal approach that combines optimal state estimation via a Kalman filter with optimal feedback control via a Linear Quadratic Regulator.

1103/PhysRevApplied.23.054016.

[10] S. C. Edwards and V. P. Belavkin, Optimal Quantum Filtering and Quantum Feedback Control, doi:10. p. 1

Where the paper says it

In these settings, a state estimator paired with an optimal feedback law can suppress the resonant motion of a high-Q oscillator by several orders of magnitude or stabilize an otherwise unstable system. The optimal solution to this problem lies in the Linear Quadratic Gaussian (LQG) regulator: a Kalman filter (KF) for state estimation combined with a Linear Quadratic Regulator (LQR) for optimal control; it is mean-square-error optimal for the linear Gaussian plant model that describes most such oscillators in the regime of small displacements and extends directly to the quantum regime [10].

48550/arXiv. p. 0
Where the paper says it

4 Parameter configuration 10 *These authors contributed equally to this work. 1 arXiv:2606.

quant-ph/0506018.

[11] G. F. Franklin, J. D. Powell and M. L. Workman, Digital Control of Dynamic Systems, Addison-Wesley, Menlo Park (1998). p. 7

Where the paper says it

The ⊙ operator again denotes element-wise multiplication. The calibrated output signal uout (to the digital-to-analog converter) is computed as uout(k) = u(k) ⊙ gout + oout, (23) where u(k) is the feedback control law output from equation (19), gout is the output gain correction factor, and oout is the output offset vector added after scaling.

[12] C. Van Loan, Computing integrals involving the matrix exponential, IEEE Transactions on Automatic Control 23(3), 395 (1978), doi:10. p. 5

Where the paper says it

2 Discretization For implementation on the FPGA, the system described by equations (1)–(8) has to be discretized at the sampling rate of Ts = 64 ns, yielding the discrete-time model ξ[n + 1] = Adξ[n] + Bdu[n] + wd [n], (9a) where ξ[n] = ξ(t0 +nTs ) denotes the sampled state vector and wd [n] is a zero-mean discretetime process-noise sequence with covariance E[wd [n]w T d [m]] = Qdδnm. (9b) We use the standard Van Loan method [11, 12] to obtain an exact discretization of the linear dynamics and the corresponding process-noise covariance.

1109/TAC.1978.1101743.

[13] R. G. Brown and P. Y. C. Hwang, Introduction to Random Signals and Applied Kalman Filtering with Matlab Exercises, Wiley, New Jersey (2012). p. 7

Where the paper says it

2 ADC and DAC calibration Accurate calibration of the input and output channels is required to ensure consistency between the physical model used for controller synthesis and the voltages processed by the FPGA implementation. To convert between raw digital values and physical voltage measurements, calibration parameters are applied to the input (ADC) and output (DAC) signals.

[14] K. Ogata, Modern Control Engineering, Prentice Hall, New Jersey (2010).

[15] F. L. Lewis, L. Xie and D. Popa, Optimal and Robust Estimation: With an Introduction to Stochastic Control Theory, Second Edition, CRC Press, 2 edn. p. 1

Where the paper says it

2 LQG: Controller operation 25 5 Conclusion 27 References 27 1 Introduction Active feedback control and state estimation have become indispensable tools in levitated optomechanics [1–7], nano- and micro-electromechanical systems (NEMS/MEMS) [8, 9], and other platforms that are strongly driven by external stochastic disturbances. In these settings, a state estimator paired with an optimal feedback law can suppress the resonant motion of a high-Q oscillator by several orders of magnitude or stabilize an otherwise unstable system.

, doi:10.1201/9781315221656.

[16] K. Jacobs, Stochastic Processes for Physicists: Understanding Noisy Systems, Cambridge University Press, Cambridge, UK, doi:10. p. 0

Where the paper says it

The controller implements a discrete-time Kalman filter and Linear Quadratic Regulator (LQR) for systems with up to three coupled oscillatory degrees of freedom, targeting applications in levitated optomechanics, MEMS/NEMS, and related experimental platforms. Complementing the controller, the HIL simulator provides a configurable second-order stochastic plant with nonlinear input and output mappings, enabling realistic closed-loop testing under real-time and fixed-point constraints.

1017/CBO9780511815980.

[20] S. Lachowicz and P. H.-J, Fast evaluation of nonlinear functions using fpgas, Advances in Radio Science 6 (2008), doi:10. p. 1

Where the paper says it

3 State processing slices 16 3. 4 Nonlinear Functions 18 3.

5194/ars-6-233-2008.

[21] D. Singer, Secrets of linear feedback shift registers, Mathematics Magazine 95, 1 (2022), doi:10. p. 7

Where the paper says it

The fixed-point data types configured for components in equations (18) and (19) are listed in Table 1. Bit width Fraction width Shift bits Internal states ξˆ 25 22 – Feedback signal u 14 13 – Detection signal χ 14 13 – Dynamic matrix (Ad − LdC) 18 14 5 Input matrix Bd 18 14 5 Kalman gain Ld 18 14 5 LQR gain Kd 18 14 6 Table 1: Fixed-point data types for LQG components 2.

1080/0025570X.2022.2094166.

[38] P. Koopman, Understanding Checksums and Cyclic Redundancy Checks, Independently published, ISBN 9798224117970 (2024). p. 0

Where the paper says it

Publication information to appear upon publication. Received Date Accepted Date Published Date Contents 1 Introduction 2 2 LQG controller for nanomechanical systems 4 2.

[39] D.-U. Lee, J. D. Villasenor, W. Luk and P. H. Leong, A hardware gaussian noise generator using the box-muller method and its error analysis. p. 1

Where the paper says it

The optimal solution to this problem lies in the Linear Quadratic Gaussian (LQG) regulator: a Kalman filter (KF) for state estimation combined with a Linear Quadratic Regulator (LQR) for optimal control; it is mean-square-error optimal for the linear Gaussian plant model that describes most such oscillators in the regime of small displacements and extends directly to the quantum regime [10]. Another benefit is that its parameters follow from the physical noise covariances and cost weights without additional tuning parameters.

p. 1
Where the paper says it

The optimal solution to this problem lies in the Linear Quadratic Gaussian (LQG) regulator: a Kalman filter (KF) for state estimation combined with a Linear Quadratic Regulator (LQR) for optimal control; it is mean-square-error optimal for the linear Gaussian plant model that describes most such oscillators in the regime of small displacements and extends directly to the quantum regime [10]. Another benefit is that its parameters follow from the physical noise covariances and cost weights without additional tuning parameters.

p. 1
Where the paper says it

The optimal solution to this problem lies in the Linear Quadratic Gaussian (LQG) regulator: a Kalman filter (KF) for state estimation combined with a Linear Quadratic Regulator (LQR) for optimal control; it is mean-square-error optimal for the linear Gaussian plant model that describes most such oscillators in the regime of small displacements and extends directly to the quantum regime [10]. Another benefit is that its parameters follow from the physical noise covariances and cost weights without additional tuning parameters.

, IEEE Transactions on Computers 55(6), 659 (2006), doi:10. p. 1
Where the paper says it

Despite the maturity of LQG theory, deploying it in a laboratory setting remains nontrivial. Natural frequencies in the tens to hundreds of kilohertz require sampling rates that exceed those of general-purpose computers and microcontrollers, necessitating the use of fieldprogrammable gate arrays (FPGAs) or other specialized hardware.

p. 1
Where the paper says it

Despite the maturity of LQG theory, deploying it in a laboratory setting remains nontrivial. Natural frequencies in the tens to hundreds of kilohertz require sampling rates that exceed those of general-purpose computers and microcontrollers, necessitating the use of fieldprogrammable gate arrays (FPGAs) or other specialized hardware.

p. 1
Where the paper says it

Despite the maturity of LQG theory, deploying it in a laboratory setting remains nontrivial. Natural frequencies in the tens to hundreds of kilohertz require sampling rates that exceed those of general-purpose computers and microcontrollers, necessitating the use of fieldprogrammable gate arrays (FPGAs) or other specialized hardware.

1109/TC.2006.81.

[47] AMD Inc., 7 Series DSP48E1 Slice User Guide, https://docs. p. 3

Where the paper says it

SciPost Physics Codebases Submission overview of the implementation and a first-steps guide; for in-depth technical references, we refer the reader to the documentation for both modules, available in their respective repositories. 2 LQG controller for nanomechanical systems This section presents the design and implementation of a Linear Quadratic Gaussian (LQG) controller tailored for nanomechanical systems.

p. 3
Where the paper says it

SciPost Physics Codebases Submission overview of the implementation and a first-steps guide; for in-depth technical references, we refer the reader to the documentation for both modules, available in their respective repositories. 2 LQG controller for nanomechanical systems This section presents the design and implementation of a Linear Quadratic Gaussian (LQG) controller tailored for nanomechanical systems.

amd.com/v/u/en-US/ug479 7Series DSP48E1. p. 6
Where the paper says it

To balance the trade-off between resource consumption and precision loss due to quantization, we implemented barrel shifters for each multiplication, decomposing the operation into a product of the residual and a bit shift. The selected word lengths match the native 25×18 multiplier structure of the Xilinx DSP48E1 slices, thereby avoiding operation splitting and minimizing resource consumption and processing latency.

p. 6
Where the paper says it

To balance the trade-off between resource consumption and precision loss due to quantization, we implemented barrel shifters for each multiplication, decomposing the operation into a product of the residual and a bit shift. The selected word lengths match the native 25×18 multiplier structure of the Xilinx DSP48E1 slices, thereby avoiding operation splitting and minimizing resource consumption and processing latency.

[26] AMD Inc., 7 Series DSP48E1 Slice User Guide, https://docs.amd.com/v/u/en-US/ug479 7Series DSP48E1.

[29] D.-U. Lee, J. D. Villasenor, W. Luk and P. H. Leong, A hardware gaussian noise generator using the box-muller method and its error analysis., IEEE Transactions on Computers 55(6), 659 (2006), doi:10.1109/TC.2006.81.

[37] SciPost Physics Codebases Submission, The function domain is partitioned into equally spaced intervals, and within each interval the function is approximated linearly, such as f (x) ≈ f (xi) + f (xi+1) − f (xi) xi+1 − xi(x − xi), where the paper states this. p. 9

Where the paper says it

SciPost Physics Codebases Submission Kd remain within the available numerical range of the fixed-point representation, namely ±1. 0 and ±31.

[40] D.-U. Lee, J. D. Villasenor, W. Luk and P. H. Leong, A hardware gaussian noise generator using the box-muller method and its error analysis., IEEE Transactions on Computers 55(6), 659 (2006), doi:10.1109/TC.2006.81.

[41] The output function is defined as yk(t) = X Nst j=1 dk,jβj,k(qj(t); q˙j(t)) k = 1,. p. 6

Where the paper says it

SciPost Physics Codebases Submission with state-weighting matrix QLQR and feedback-action weighting matrix RLQR, the resulting time-independent optimal full-state feedback law is u[n] = −Kd ξ[n] (14) where the feedback gain Kd is computed from the solution Pξ of the discrete algebraic Riccati equation Pξ = A T d PξAd − A T d PξBd (B T d PξBd + RLQR) −1B T d PξAd + QLQR, (15) Kd = (B T d PξBd + RLQR) −1B T d PξAd . (16) The matrix QLQR weighs the states proportionally to their mechanical energy via E = 1 2 ξ TQLQRξ, and is defined as QLQR = Qusr ⊙ qLQRq T LQR , qLQR = sm 2 |Ωx | 1 Ωy 1 |Ωz | 1 1T .

..,Nout.

[44] The total worst-case input-output delay including the ADC and DAC conversion time of the HIL Simulator is 197 788 ns. p. 2

Where the paper says it

We present an integrated, open-source platform consisting of two complementary modules: an FPGA-based LQG controller and a hardware-in-the-loop (HIL) simulator, both designed for the Red Pitaya STEMlab 125-14 Z7020 and 125-14 Pro Z7020 Gen 2 boards, affordable, widely adopted instrument platforms built around a Xilinx Zynq Z7020 systemon-chip. A MATLAB-based configuration workflow, backed by a lightweight onboard REST API server, lets the user input physical parameters, configure the controller, perform ADC and DAC calibration, and record internal states and signals at full sampling resolution through a graphical user interface, without requiring any embedded software or FPGA-development knowledge.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Improve real-time control of high-Q oscillators by implementing an integrated framework that combines an FPGA-based LQG controller with a hardware-in-the-loop simulator on low-cost platforms like the Red Pitaya STEMlab Z7020. This allows for a MATLAB based workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise.

  2. Enhance system robustness by utilizing state estimation through a discrete-time Kalman filter and optimal control via Linear Quadratic Regulator to suppress resonant motion of high-Q oscillators by several orders of magnitude or stabilize an otherwise unstable system.

  3. Enable safe and reproducible testing of feedback controllers in a realistic environment by using the HIL simulator module, which implements a generalized plant model for stochastic, secondorder systems with configurable separable nonlinearities in the damping, restoring force, and input/output mappings.

Abstract

We present an open-source framework for real-time Linear Quadratic Gaussian (LQG) control and hardware-in-the-loop (HIL) simulation on the affordable Red Pitaya STEMlab FPGA platform. The controller implements a discrete-time Kalman filter and Linear Quadratic Regulator (LQR) for systems with up to three coupled oscillatory degrees of freedom, targeting applications in levitated optomechanics, MEMS/NEMS, and related experimental platforms. Complementing the controller, the HIL simulator provides a configurable second-order stochastic plant with nonlinear input and output mappings, enabling realistic closed-loop testing under real-time and fixed-point constraints. A MATLAB-based workflow automates model configuration, controller synthesis, numerical scaling, and FPGA deployment without requiring specialized hardware expertise. As an end-to-end demonstration, we present the stabilization of a levitated nanoparticle in a two-dimensional double-well potential, illustrating the complete workflow from model definition and simulation to real-time feedback control. The codebase: https://github.com/TU-Wien-ACIN-CDS/FPGA-based-LQG-and-HIL-simulator-for-nanomechanical-systems

Sources

Related papers