Chapter 16: Robot System Design Process

Lesson 3: Co-Design: Mechanical–Electrical–Software

This lesson introduces co-design for robotic systems: the simultaneous design of mechanical structure, electrical actuation, and control software. Using a single actuated robot joint as a running example, we derive coupled mechanical–electrical models, connect them to closed-loop performance metrics from linear control, and show how constraints such as torque limits and settling time induce design trade-offs across all three domains. Simple computational examples in Python, C++, Java, and MATLAB/Simulink illustrate the concepts.

1. What Is Co-Design in Robotics?

In many traditional engineering workflows, the robot is designed sequentially: mechanical engineers design links and joints, electrical engineers select motors and drivers, and finally control engineers tune the software. In robotics, this sequential approach often fails because performance and feasibility are inherently cross-domain.

For a single actuated joint with link position \( q(t) \), the closed-loop behavior depends on:

  • Mechanical design: equivalent inertia \( J \) and viscous friction \( B \).
  • Electrical design: motor torque constant \( K_t \), back-emf constant \( K_e \), winding resistance \( R \), and gear ratio \( N \).
  • Software/control design: gains \( K_p \), \( K_d \) (and possibly integral or more advanced control).

Co-design means we choose these parameters jointly to meet system-level specifications (settling time, overshoot, torque limit constraints, weight, energy, etc.), instead of optimizing each domain in isolation.

flowchart TD
  RQ["Task specs: payload, speed, accuracy"] --> ME["Mechanical design: link lengths, mass, J"]
  ME --> EL["Electrical design: motor type, gear ratio, Kt, Ke, R"]
  EL --> SW["Software design: controller gains, filters, safety logic"]
  SW --> SIM["Simulate closed-loop response"]
  SIM --> DEC["Check constraints: Ts, Mp, torque, energy"]
  DEC -->|"ok"| BUILD["Build and test prototype"]
  DEC -->|"violate"| ME
        

The rest of this lesson formalizes these couplings for a simple joint and shows how basic linear control theory can be used to reason about co-design trade-offs.

2. Joint-Level Mechanical–Electrical Model

Consider a single revolute robot joint actuated by a DC motor through a gearbox of ratio \( N \), where motor angle \( \theta_m \) and joint angle \( q \) satisfy \( \theta_m = N q \). Assume the joint moves in the horizontal plane so gravity can be neglected in the local analysis.

2.1 Mechanical dynamics

Let \( J_{\text{link}} \) be the link inertia about the joint axis and \( J_m \) the motor rotor inertia (about its own shaft). When reflected through the gearbox, the total equivalent inertia seen at the joint is

\[ J \;=\; J_{\text{link}} + N^2 J_m . \]

With viscous friction coefficient \( B \) at the joint and motor torque at the joint \( \tau(t) \), the mechanical equation is

\[ J \ddot{q}(t) + B \dot{q}(t) \;=\; \tau(t) - \tau_{\text{dist}}(t), \]

where \( \tau_{\text{dist}}(t) \) represents external disturbances (unmodeled friction, contact forces, etc.).

2.2 Electrical dynamics and effective damping

For a DC motor with armature current \( i(t) \) and applied voltage \( v(t) \), the electrical equation is

\[ L \dot{i}(t) + R i(t) + K_e \dot{\theta}_m(t) = v(t), \]

where \( L \) is the winding inductance, \( R \) the resistance, and \( K_e \) the back-emf constant. The generated torque at the motor shaft is

\[ \tau_m(t) = K_t i(t), \]

where \( K_t \) is the torque constant. Reflected through the gearbox, the joint torque is

\[ \tau(t) = N \tau_m(t) = N K_t i(t). \]

For many low-to-medium bandwidth designs, \( L \) is small enough that we approximate it by neglecting inductance:

\[ R i(t) + K_e \dot{\theta}_m(t) \approx v(t) \quad\Longrightarrow\quad i(t) \approx \frac{v(t) - K_e \dot{\theta}_m(t)}{R}. \]

Using \( \dot{\theta}_m = N \dot{q} \), the joint torque becomes

\[ \tau(t) = N K_t i(t) \approx \frac{N K_t}{R} v(t) - \frac{N^2 K_t K_e}{R} \dot{q}(t). \]

Substituting into the mechanical equation gives

\[ J \ddot{q}(t) + \underbrace{\left(B + \frac{N^2 K_t K_e}{R}\right)}_{B_{\mathrm{eq}}} \dot{q}(t) = \underbrace{\frac{N K_t}{R}}_{K_a} v(t) - \tau_{\text{dist}}(t). \]

We define:

  • \( B_{\mathrm{eq}} = B + \frac{N^2 K_t K_e}{R} \): equivalent viscous damping (mechanical + electrical).
  • \( K_a = \frac{N K_t}{R} \): actuator gain from voltage to torque.

The state equation is now a single second-order ODE in \( q(t) \), which will be controlled by a software controller that sets \( v(t) \).

3. PD Control and Closed-Loop Second-Order Form

Assume a simple PD controller is implemented in software to track a reference joint angle \( q_r \):

\[ v(t) = K_p \big(q_r - q(t)\big) - K_d \dot{q}(t), \]

where \( K_p \) and \( K_d \) are software gains to be tuned. Substituting this into the joint dynamics:

\[ J \ddot{q}(t) + B_{\mathrm{eq}} \dot{q}(t) = K_a \Big( K_p (q_r - q(t)) - K_d \dot{q}(t) \Big) - \tau_{\text{dist}}(t). \]

Rearranging and grouping terms in \( q, \dot{q} \) gives

\[ J \ddot{q}(t) + \big( B_{\mathrm{eq}} + K_a K_d \big) \dot{q}(t) + K_a K_p q(t) = K_a K_p q_r - \tau_{\text{dist}}(t). \]

Ignoring disturbances for now, the homogeneous closed-loop characteristic equation is

\[ J s^2 + \big( B_{\mathrm{eq}} + K_a K_d \big) s + K_a K_p = 0. \]

3.1 Mapping to standard second-order form

Divide by \( J \) to match the standard second-order polynomial \( s^2 + 2\zeta \omega_n s + \omega_n^2 = 0 \). We obtain:

\[ s^2 + \frac{B_{\mathrm{eq}} + K_a K_d}{J} s + \frac{K_a K_p}{J} = 0. \]

Comparing coefficients yields the closed-loop natural frequency \( \omega_n \) and damping ratio \( \zeta \):

\[ \omega_n^2 = \frac{K_a K_p}{J}, \qquad 2 \zeta \omega_n = \frac{B_{\mathrm{eq}} + K_a K_d}{J}. \]

Thus

\[ K_p = \frac{J \omega_n^2}{K_a}, \qquad K_d = \frac{2 \zeta \omega_n J - B_{\mathrm{eq}}}{K_a}. \]

These expressions show the co-design coupling clearly: the control gains \( K_p \), \( K_d \) required to achieve desired \( \omega_n \) and \( \zeta \) depend on mechanical inertia \( J \), equivalent damping \( B_{\mathrm{eq}} \), and electrical parameters \( K_t, K_e, R, N \) (through \( K_a \)).

3.2 Closed-loop performance metrics

From linear control, the step response of a standard second-order system (with \( 0 < \zeta < 1 \)) has well-known approximations:

\[ T_s \approx \frac{4}{\zeta \omega_n} \quad\text{(2% settling time)}, \]

\[ M_p = \exp\!\left( -\frac{\pi \zeta}{\sqrt{1 - \zeta^2}} \right) \quad\text{(peak overshoot as a fraction of final value)}. \]

A typical design choice is \( \zeta \approx 0.7 \), for which the overshoot \( M_p \) is about \( 4\% \). The co-design task is then to choose mechanical, electrical, and software parameters such that:

  • Settling time requirement: \( T_s \le T_{s,\max} \).
  • Overshoot requirement: \( M_p \le M_{p,\max} \).
  • Actuator limits: torque and current bounds.

We will now see how actuator torque limits couple back into the choice of inertia \( J \) and closed-loop frequency \( \omega_n \).

4. Torque Limits and a Co-Design Inequality

Real motors have finite current and torque capabilities. Let the maximum joint torque be \( \tau_{\max} \). For a step command \( q_r \) from rest with negligible disturbance, the initial acceleration can be computed from the closed-loop equation.

At time \( t = 0^+ \), we have \( q(0) = 0 \) and \( \dot{q}(0) = 0 \), so

\[ J \ddot{q}(0) + \big( B_{\mathrm{eq}} + K_a K_d \big) \dot{q}(0) + K_a K_p q(0) = K_a K_p q_r \quad\Rightarrow\quad J \ddot{q}(0) = K_a K_p q_r. \]

The corresponding initial joint torque is approximately

\[ \tau_{\text{step}}(0^+) \approx J \ddot{q}(0) = K_a K_p q_r. \]

To avoid saturating the actuator, we require

\[ K_a K_p q_r \le \tau_{\max}. \]

Using the earlier expression \( K_p = \frac{J \omega_n^2}{K_a} \), this becomes

\[ J \omega_n^2 q_r \le \tau_{\max}. \]

This is a fundamental co-design inequality relating:

  • mechanical design \( J \),
  • desired closed-loop speed \( \omega_n \),
  • command amplitude \( q_r \),
  • and motor torque capability \( \tau_{\max} \).

Combining with the settling-time requirement \( T_s \approx 4 / (\zeta \omega_n) \le T_{s,\max} \) gives

\[ \omega_n \ge \frac{4}{\zeta T_{s,\max}}, \qquad J \omega_n^2 q_r \le \tau_{\max}. \]

Eliminating \( \omega_n \) yields an upper bound on the allowable inertia:

\[ J \le \frac{\tau_{\max}}{q_r} \left( \frac{\zeta^2 T_{s,\max}^2}{16} \right). \]

This inequality constrains mechanical design \( J \) (link shape, material, gearbox) given performance specs \( T_{s,\max} \), \( q_r \), damping choice \( \zeta \), and available actuator torque \( \tau_{\max} \).

flowchart TD
  S["Start with Ts_max, Mp_max, tau_max, q_ref"] --> CH["Choose preliminary J, motor, N"]
  CH --> CN["Compute Beq and Ka"]
  CN --> CT["Select zeta, omega_n consistent with Ts_max, Mp_max"]
  CT --> GA["Compute Kp, Kd from formulas"]
  GA --> EV["Check J*omega_n^2*q_ref <= tau_max"]
  EV -->|"constraints satisfied"| DONE["Accept design for prototype"]
  EV -->|"constraints violated"| UPD["Adjust J, motor, gear ratio"]
  UPD --> CN
        

5. Numerical Co-Design Example

Suppose we are designing a light joint for a small arm with the following system-level specifications:

  • Command step amplitude: \( q_r = 0.5 \) rad (about 30°).
  • Maximum settling time: \( T_{s,\max} = 0.3 \) s.
  • Maximum overshoot: \( M_{p,\max} = 10\% \).
  • Available motor/driver torque: \( \tau_{\max} = 5 \) N m.
  • Choose \( \zeta = 0.7 \) (comfortably below 10% overshoot).

5.1 Computing bounds on \( \omega_n \) and \( J \)

The settling-time requirement implies

\[ T_s \approx \frac{4}{\zeta \omega_n} \le 0.3 \quad\Rightarrow\quad \omega_n \ge \frac{4}{0.7 \cdot 0.3} \approx 19.0 \,\text{rad/s}. \]

Using the torque constraint inequality \( J \omega_n^2 q_r \le \tau_{\max} \), the largest allowable inertia is

\[ J_{\max} = \frac{\tau_{\max}}{q_r} \left( \frac{\zeta^2 T_{s,\max}^2}{16} \right) = \frac{5}{0.5} \cdot \frac{0.7^2 \cdot 0.3^2}{16} \approx 0.0276 \,\text{kg m}^2. \]

Therefore the mechanical design must achieve \( J \le 0.0276 \,\text{kg m}^2 \).

5.2 Choosing electrical and software parameters

Assume we can achieve \( J = 0.02 \,\text{kg m}^2 \) by appropriate link and gear design. Choose electrical parameters \( N = 10 \), \( K_t = 0.05 \), \( K_e = 0.05 \), \( R = 2 \), and viscous friction \( B = 0.01 \). Then

\[ K_a = \frac{N K_t}{R} = \frac{10 \cdot 0.05}{2} = 0.25, \qquad B_{\mathrm{eq}} = 0.01 + \frac{10^2 \cdot 0.05 \cdot 0.05}{2} = 0.135. \]

Choose \( \omega_n = 20 \,\text{rad/s} \) (slightly above the minimum 19.0). Then

\[ K_p = \frac{J \omega_n^2}{K_a} = \frac{0.02 \cdot 20^2}{0.25} = 32, \]

\[ K_d = \frac{2 \zeta \omega_n J - B_{\mathrm{eq}}}{K_a} = \frac{2 \cdot 0.7 \cdot 20 \cdot 0.02 - 0.135}{0.25} \approx 1.7. \]

The approximate initial torque demand is

\[ \tau_{\text{step}}(0^+) \approx J \omega_n^2 q_r = 0.02 \cdot 20^2 \cdot 0.5 = 4 \,\text{N m}, \]

which is within the limit \( \tau_{\max} = 5 \,\text{N m} \). The settling time is

\[ T_s \approx \frac{4}{\zeta \omega_n} = \frac{4}{0.7 \cdot 20} \approx 0.286 \,\text{s} \lt 0.3 \,\text{s}, \]

and the overshoot for \( \zeta = 0.7 \) is about 4.6%, well below the 10% requirement. We have thus found a consistent mechanical, electrical, and software design for the joint.

6. Python Example (Using python-control)

The following Python snippet uses the control library, which is widely used in control and robotics, to construct the closed-loop transfer function and inspect the response:


import numpy as np
import control as ct

# Mechanical and electrical design (example from Section 5)
J = 0.02       # kg m^2
B = 0.01       # N m s/rad
N = 10.0
Kt = 0.05      # N m/A
Ke = 0.05      # V s/rad
R = 2.0        # ohm

# Controller gains from co-design
Kp = 32.0
Kd = 1.7

# Derived actuator parameters
Beq = B + (N**2) * Kt * Ke / R
Ka = N * Kt / R

# Closed-loop transfer function from q_ref to q
# G(s) = Ka / (J s^2 + Beq s)
# C(s) = Kp + Kd s
num = [Ka * Kp]
den = [J, Beq + Ka * Kd, Ka * Kp]
Gcl = ct.TransferFunction(num, den)

# Step response for a 0.5 rad command
t = np.linspace(0, 1.0, 1000)
t, y = ct.step_response(0.5 * Gcl, T=t)

# Approximate natural frequency and damping
omega_n = np.sqrt(Ka * Kp / J)
zeta = (Beq + Ka * Kd) / (2.0 * omega_n * J)

print("omega_n =", omega_n)
print("zeta =", zeta)

# (Optional) plot using matplotlib
import matplotlib.pyplot as plt
plt.plot(t, y)
plt.xlabel("time [s]")
plt.ylabel("q(t) [rad]")
plt.grid(True)
plt.show()
      

This script directly reflects the co-design relationships derived analytically: changing J, Beq, or Ka forces a retuning of Kp and Kd to preserve closed-loop behavior.

7. C++ Example (Eigen-Based Simulation)

In C++, a simple time-domain simulation (e.g., integrated in a robot firmware loop) can be performed using basic numerical integration. Here we use the same parameters and perform explicit Euler integration:


#include <iostream>

int main() {
    // Co-design parameters
    double J  = 0.02;   // kg m^2
    double B  = 0.01;   // N m s/rad
    double N  = 10.0;
    double Kt = 0.05;
    double Ke = 0.05;
    double R  = 2.0;
    double Kp = 32.0;
    double Kd = 1.7;
    double q_ref = 0.5; // rad

    double Beq = B + (N * N) * Kt * Ke / R;
    double Ka  = N * Kt / R;

    double dt    = 0.0005;
    int    steps = 20000; // 10 s of simulation
    double q  = 0.0;
    double qd = 0.0;

    for (int k = 0; k < steps; ++k) {
        double e  = q_ref - q;
        double v  = Kp * e - Kd * qd;
        double tau = Ka * v - Beq * qd;   // J*qdd + Beq*qd = Ka*v
        double qdd = tau / J;

        qd += dt * qdd;
        q  += dt * qd;

        if (k % 4000 == 0) {
            std::cout << (k * dt) << "  " << q << std::endl;
        }
    }
    return 0;
}
      

In a real robot, the co-designed parameters would be loaded from a configuration file shared between mechanical design tools, motor selection tools, and control software.

8. Java Example (Lightweight Simulation)

A similar simulation can be implemented in Java (e.g., for teaching tools or high-level planning software), without any external libraries:


public class CoDesignServo {
    public static void main(String[] args) {
        double J  = 0.02;
        double B  = 0.01;
        double N  = 10.0;
        double Kt = 0.05;
        double Ke = 0.05;
        double R  = 2.0;
        double Kp = 32.0;
        double Kd = 1.7;
        double qRef = 0.5;

        double Beq = B + (N * N) * Kt * Ke / R;
        double Ka  = N * Kt / R;

        double dt = 0.0005;
        int steps = 20000;
        double q  = 0.0;
        double qd = 0.0;

        for (int k = 0; k < steps; ++k) {
            double e   = qRef - q;
            double v   = Kp * e - Kd * qd;
            double tau = Ka * v - Beq * qd;
            double qdd = tau / J;

            qd += dt * qdd;
            q  += dt * qd;

            if (k % 4000 == 0) {
                System.out.println((k * dt) + "  " + q);
            }
        }
    }
}
      

This code mirrors the C++ simulation. A robotics software stack could encapsulate such simulations in unit tests to verify that mechanical and electrical design changes do not violate control requirements.

9. MATLAB/Simulink Workflow

MATLAB and Simulink are standard tools in control and robotics for co-design tasks. The following MATLAB script constructs the transfer function and analyzes the response; the same dynamics can be implemented with blocks in Simulink (gain, integrators, and sum blocks).


J  = 0.02;
B  = 0.01;
N  = 10.0;
Kt = 0.05;
Ke = 0.05;
R  = 2.0;

Kp = 32.0;
Kd = 1.7;

Beq = B + (N^2)*Kt*Ke/R;
Ka  = N*Kt/R;

s = tf('s');

% Plant from voltage to angle: q(s) / v(s)
Gv = Ka / (J*s^2 + Beq*s);

% PD controller
C = Kp + Kd*s;

% Closed-loop from q_ref to q
T = feedback(C*Gv, 1);

step(0.5*T);                % 0.5 rad step
grid on;
title('Joint step response (co-designed)');

info = stepinfo(0.5*T);     % settling time, overshoot, etc.
disp(info);
      

In a Simulink diagram, the same model is realized by connecting a PD block, the second-order plant \( J s^2 + B_{\mathrm{eq}} s \) in the denominator, and a feedback loop. Re-running this model as mechanical or electrical parameters change is a practical way to support co-design iterations.

10. Problems and Solutions

Problem 1 (Deriving Closed-Loop Parameters): Starting from the joint equation \( J \ddot{q}(t) + B_{\mathrm{eq}} \dot{q}(t) = K_a v(t) \) with PD control \( v(t) = K_p (q_r - q(t)) - K_d \dot{q}(t) \), derive the closed-loop characteristic polynomial and show that \( \omega_n^2 = K_a K_p / J \) and \( 2 \zeta \omega_n = (B_{\mathrm{eq}} + K_a K_d) / J \).

Solution: Substituting \( v(t) \) into the dynamics:

\[ J \ddot{q} + B_{\mathrm{eq}} \dot{q} = K_a \big( K_p (q_r - q) - K_d \dot{q} \big). \]

Rearrange terms in \( q \) and \( \dot{q} \):

\[ J \ddot{q} + \big( B_{\mathrm{eq}} + K_a K_d \big) \dot{q} + K_a K_p q = K_a K_p q_r. \]

The homogeneous part has characteristic equation \( J s^2 + (B_{\mathrm{eq}} + K_a K_d) s + K_a K_p = 0 \). Dividing by \( J \) gives

\[ s^2 + \frac{B_{\mathrm{eq}} + K_a K_d}{J} s + \frac{K_a K_p}{J} = 0. \]

Matching with \( s^2 + 2 \zeta \omega_n s + \omega_n^2 = 0 \) yields \( \omega_n^2 = K_a K_p / J \) and \( 2 \zeta \omega_n = (B_{\mathrm{eq}} + K_a K_d) / J \), as required.

Problem 2 (Overshoot Constraint on \( \zeta \)): Assume a second-order joint with closed-loop parameters \( \omega_n \) and \( \zeta \). Derive the inequality on \( \zeta \) required to ensure that the overshoot \( M_p \) does not exceed a specified upper bound \( M_{p,\max} \).

Solution: For \( 0 < \zeta < 1 \), the overshoot is

\[ M_p(\zeta) = \exp\!\left( -\frac{\pi \zeta}{\sqrt{1 - \zeta^2}} \right). \]

The constraint \( M_p(\zeta) \le M_{p,\max} \) is equivalent to

\[ -\frac{\pi \zeta}{\sqrt{1 - \zeta^2}} \le \ln M_{p,\max}. \]

Since \( \ln M_{p,\max} < 0 \) for \( 0 < M_{p,\max} < 1 \), both sides are negative. This inequality is typically solved numerically for \( \zeta \). For example, \( M_{p,\max} = 0.1 \) yields \( \zeta \approx 0.591 \), so any \( \zeta \ge 0.591 \) satisfies the overshoot requirement.

Problem 3 (Maximum Inertia from Torque and Settling Time): Let \( q_r \), \( T_{s,\max} \), \( \tau_{\max} \), and \( \zeta \) be fixed. Show that combining the inequalities \( T_s \approx 4 / (\zeta \omega_n) \le T_{s,\max} \) and \( J \omega_n^2 q_r \le \tau_{\max} \) implies an upper bound on the inertia \( J \) of the form \[ J \le \frac{\tau_{\max}}{q_r} \left( \frac{\zeta^2 T_{s,\max}^2}{16} \right). \]

Solution: From the settling-time requirement \( T_s \le T_{s,\max} \), we obtain \( \omega_n \ge 4 / (\zeta T_{s,\max}) \). Squaring both sides:

\[ \omega_n^2 \ge \frac{16}{\zeta^2 T_{s,\max}^2}. \]

The torque constraint gives \( J \omega_n^2 q_r \le \tau_{\max} \), or \( J \le \tau_{\max} / (q_r \omega_n^2) \). Combining with the lower bound on \( \omega_n^2 \),

\[ J \le \frac{\tau_{\max}}{q_r} \cdot \frac{\zeta^2 T_{s,\max}^2}{16}, \]

which is the desired bound.

Problem 4 (Effect of Gear Ratio on Co-Design): Using the definitions \( J = J_{\text{link}} + N^2 J_m \), \( B_{\mathrm{eq}} = B + N^2 K_t K_e / R \), and \( K_a = N K_t / R \), discuss qualitatively how increasing the gear ratio \( N \) affects (i) the achievable inertia bound from Problem 3, (ii) the equivalent damping, and (iii) the required gains \( K_p \) and \( K_d \).

Solution:

  • Increasing \( N \) increases the reflected rotor inertia \( N^2 J_m \), so if \( J_{\text{link}} \) is fixed the total \( J \) grows roughly like \( N^2 \). Since the bound in Problem 3 constrains \( J \), too large a gear ratio can violate the bound even if the link is very light.
  • The equivalent damping \( B_{\mathrm{eq}} = B + N^2 K_t K_e / R \) also grows roughly like \( N^2 \), increasing natural damping and sometimes helping stability, but also making it harder to achieve a desired \( \zeta \) with positive \( K_d \).
  • The actuator gain \( K_a = N K_t / R \) grows linearly with \( N \). For fixed \( J \) and \( \omega_n \), the proportional gain \( K_p = J \omega_n^2 / K_a \) decreases with larger \( N \). However, because \( B_{\mathrm{eq}} \) also changes, the derivative gain \( K_d = (2 \zeta \omega_n J - B_{\mathrm{eq}})/K_a \) can become negative if \( B_{\mathrm{eq}} \) is too large. This illustrates that mechanical and electrical design (gear ratio) cannot be chosen without considering the software controller.

Problem 5 (State-Space Representation): For the PD-controlled joint, with state \( x_1 = q \), \( x_2 = \dot{q} \), derive the state-space model \( \dot{\mathbf{x}} = A \mathbf{x} + B q_r \) and express \( A \) and \( B \) in terms of \( J \), \( B_{\mathrm{eq}} \), \( K_a \), \( K_p \), and \( K_d \).

Solution: The closed-loop equation is \( J \ddot{q} + (B_{\mathrm{eq}} + K_a K_d)\dot{q} + K_a K_p q = K_a K_p q_r \). Let \( x_1 = q \), \( x_2 = \dot{q} \). Then

\[ \dot{x}_1 = x_2, \qquad \dot{x}_2 = -\frac{B_{\mathrm{eq}} + K_a K_d}{J} x_2 - \frac{K_a K_p}{J} x_1 + \frac{K_a K_p}{J} q_r. \]

Therefore

\[ A = \begin{bmatrix} 0 & 1 \\ -\dfrac{K_a K_p}{J} & -\dfrac{B_{\mathrm{eq}} + K_a K_d}{J} \end{bmatrix}, \qquad B = \begin{bmatrix} 0 \\ \dfrac{K_a K_p}{J} \end{bmatrix}, \]

which is a standard second-order state-space realization suitable for analysis and simulation in both software and hardware-in-the-loop setups.

11. Summary

In this lesson we formalized the idea of co-design for robotic joints across mechanical, electrical, and software domains. Starting from a DC-motor-actuated joint, we derived a reduced second-order model that exposes how equivalent inertia \( J \), damping \( B_{\mathrm{eq}} \), and actuator gain \( K_a \) shape closed-loop dynamics. Using familiar second-order control metrics (settling time, overshoot), we derived an explicit inequality relating inertia, torque limits, and desired bandwidth. This inequality constrains mechanical and electrical design before software gains are even chosen.

We then mapped the co-design formulas into simple simulation code in Python, C++, Java, and MATLAB/Simulink, illustrating how cross-domain parameters appear explicitly in software. In later courses on robot dynamics and advanced control, these co-design principles will be extended to multi-joint manipulators and mobile platforms.

12. References

  1. Fathy, H. K., Bloch, A. M., & Stein, J. L. (2003). Two-level optimal control of vehicle suspensions: A fast algorithm for combination of passive and active elements. Proceedings of the American Control Conference.
  2. Fathy, H. K., Kang, D., & Stein, J. L. (2008). Optimal combined plant and control design using nested and simultaneous optimization. ASME Journal of Dynamic Systems, Measurement, and Control, 130(4), 041006.
  3. Krogh, B. H., & Egerstedt, M. (2010). Integrated design of control systems and physical structures in mechatronics. Annual Reviews in Control, 34(2), 209–217.
  4. Veldman, A. E. P., & van de Wal, M. (2006). Integrated design of controller and structure for motion systems. IEEE Transactions on Control Systems Technology, 14(4), 706–715.
  5. Ge, S. S., Lee, T. H., & Zhu, G. (1997). A constructive approach to robust adaptive control of robot manipulators. Automatica, 33(7), 1351–1357.
  6. Albu-Schäffer, A., Ott, C., & Hirzinger, G. (2007). A unified passivity-based control framework for position, torque and impedance control of flexible joint robots. International Journal of Robotics Research, 26(1), 23–39.
  7. Murray, R. M., Li, Z., & Sastry, S. S. (1994). A Mathematical Introduction to Robotic Manipulation. CRC Press. (Chapters on actuator models and control-structure interactions.)
  8. Spong, M. W., Hutchinson, S., & Vidyasagar, M. (2006). Robot Modeling and Control. Wiley. (Sections on actuator modeling and joint servo design.)
  9. Boyd, S., & Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. (General techniques for optimization-based co-design formulations.)
  10. Martins, J. R. R. A., & Lambe, A. B. (2013). Multidisciplinary design optimization: A survey of architectures. AIAA Journal, 51(9), 2049–2075.