Urgent.News

What's breaking now, across hundreds of outlets.

Tech

I benchmarked 5 ways to auto-tune a robot arm's PID gains. Random search broke the safety limits in 73.8% of trials. Safe BO: 1.8%.

Hand-tuning PID gains is slow, and every payload change means starting over. Letting an optimiser explore on the real machine is tempting — but a "trial" there isn't a wasted data point, it's a torque spike into a joint limit. So I built a small testbed to ask a simple question: how much does safety-aware optimisation actually buy you? Setup: a simulated two-link arm (friction, torque limits,…

Five methods were tested to auto-tune a robot arm's PID gains in a simulated environment, all sharing the same budget and 20 independent runs each. Random search resulted in unsafe trials 73.8% of the time, while standard Bayesian optimization (EI) was unsafe 36.8% of the time. Covariance Matrix Adaptation Evolution Strategy (CMA-ES) had an unsafe trial rate of 12.7%, and Safe Bayesian Optimization (GP models of performance and safety) managed only 1.8% unsafe trials.

The SAFETY BUDGET ONLY APPROVED APPROACH reduced unsafe trials to an astonishing 1.8%. The tuned controller also improved tracking error by halving the RMS error compared to the initial gains (from 1.12° to 0.60°) without generating additional torque ripple. The researchers found that safety measures did not compromise performance; instead, they appeared to sacrifice patience.

The study also examined payload changes (from 1.0 to 2.5 to 1.75 to 0.5 to 2.0 kg), and found that using previous experiments as context allowed the system to approach the optimum within 13–17% after just 10 trials, as opposed to 18–29% for a cold start. Remarkably, after just 3 trials in later stages, the system was able to reach 20–25% of the optimum, as compared to 44–50% for a cold start.

Warm-starting was found to be more beneficial than a more advanced acquisition function in the current context. The simulation was based on a testbed featuring a two-link arm model (including friction, torque limits, a noisy 16-bit encoder, and a control delay), an industrial-style 500 Hz PID with anti-windup, and six gains to tune.

The GP model was written from scratch (Matérn-5/2 ARD) and cross-checked against scikit-learn, primarily to examine the safety logic without relying on a library in the middle. The full project, including code, raw results, and a tuning handbook, is available on Gumroad: https://gridlabnotes.gumroad.com/l/teusxx.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Stop Data Leaks in Multi-Tenant Apps with PostgreSQL Row-Level Security

Most multi-tenant SaaS bugs are not complex logic failures. They are simple, silent data leaks. They happen when a query is missing a single WHERE tenant_id = $1 clause.

  • Multi-tenant apps leak data due to missing WHERE clauses
  • PostgreSQL's Row-Level Security (RLS) provides isolation
  • Implement RLS by enabling it and defining policies on tables

HackerGadgets 4-in-1 Pi 5 HAT: RTL2832U, SX1262, GPS & RTC

The Guangzhou-based HackerGadgets RTL-SDR/LoRa/GPS/RTC HAT is a 4-in-1 RF expansion board for Raspberry Pi. It eliminates external USB dongles, though it still requires an internal USB bridge and caps…

  • HackerGadgets releases 4-in-1 Pi 5 HAT
  • Features RTL2832U, SX1262, GPS, and RTC
  • Compatible with Raspberry Pi 5's GPIO header

Why I moved my file tools to the browser (and what broke along the way)

Every "convert HEIC to PNG" or "compare two files" site I used had the same quiet problem: my file went to someone's server. For a holiday photo, fine.

  • Author moved file tools to browser to reduce server storage and improve privacy.
  • Encountered issues with image conversion, diffing, and JSON handling in browser processing.

Analyzing doctors data using SQL

Today, I focused on analyzing hospital records from a doctor's perspective. Instead of writing queries just to retrieve rows, I started asking meaningful questions that someone in hospital management…

  • Hospital doctors' data analyzed using SQL to answer management questions
  • Queries written to find available doctors, patients per doctor, gender distribution
  • Concepts like GROUP BY, COUNT(), ORDER BY, WHERE, ILIKE used for analysis

More from Tuesday 24 November →