Skip to content

JuliaComputing/DyadBotComponents.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DyadBotComponents

Dyad models of a two-wheeled balancing robot, together with controller architectures and controller-tuning scripts.

Models (dyad/)

Plant models:

  • PlanarDyadBot: planar model of the robot. A wheel rolling without slip, an inverted-pendulum body mounted on the wheel axis through a motor (SimpleMotor), and an IMU-like sensor. Inputs/outputs: motor torque in, position/velocity/tilt/tilt-rate out.
  • DyadBot3D: three-dimensional model with two individually spinning wheels with slip-based ground contact, allowing the body to tilt.

Closed-loop models around the planar plant:

  • AngleControlledDyadBot: single PID loop stabilizing the tilt angle.
  • CascadeControlledDyadBot: cascade control with an inner tilt-angle loop and an outer position loop; all six controller gains are exposed as tunable top-level parameters.
  • CascadeFFDyadBot: the cascade extended with a feedforward generator (state-space system loaded from data/ff_*.csv) providing filtered position reference, tilt-angle feedforward and torque feedforward.
  • LQGControlledDyadBot: LQG controller with reference feedforward and integral action (state-space system loaded from data/lqg_*.csv).
  • LQGTuningDyadBot: analysis model used by the LQG design script.

Controller tuning scripts (scripts/)

Each script activates the scripts/ environment and can be run directly:

  • tune_angle_pid.jl: PID autotuning of the inner angle loop (PIDAutotuningAnalysisSpec).
  • tune_cascade_pid.jl: PID autotuning of the outer position loop, plus robustness analysis (sensitivity functions, disk margins).
  • tune_cascade_structured.jl: structured tuning of all six cascade gains simultaneously (StructuredAutoTuningProblem) with per-loop sensitivity bounds and a pole-location constraint.
  • compute_feedforward.jl: computes the feedforward generator for CascadeFFDyadBot and stores it in data/.
  • tune_lqg.jl: LQG design (LQGAnalysisSpec) producing the controller used by LQGControlledDyadBot, stored in data/.

Julia utilities (src/)

  • IMUKalmanFilter: discrete-time Kalman filter for tilt estimation from gyro and accelerometer measurements, suitable for embedded use.
  • balance_original.jl: standalone Julia implementation of the original balance controller (not part of the package module).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages