Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

69

ENPM808J
Rehabilitation Robotics

Lectures #4-5 - Part III

Anindo Roy, PhD


185

Tools: Bond Graphs


Analysis of coupled systems
• Need to consider causality (i.e. choice of input and output) for each system –
in general, this is determined by the nature of connection between systems.

• Analysis tool: power-based network modeling techniques e.g. Bond graphs.

Bond graphs:

 Graphical representation of physical dynamical systems.

 Arcs: bi-directional exchange of physical energy (unlike block, signal flow diagram -
unilateral information flow)

 Multi-energy domain (electrical, mechanical, hydraulic, thermal etc.).

 Bonds link single, double or multiple ports; represents flow of power.


Bond graphs: efforts & flows
Bond graphs:

 Flow in each bond denoted by pair of variables called “power variables” (effort, flow)
whose product must be power of that energy domain.
 Example: electrical circuit, power variables = V, I.

Energy Domain Effort Flow


Mechanical, translation Force Linear velocity
Mechanical, rotation Torque Angular velocity
Electrical Electromotive force Current
Magnetic Magnetomotive force Flux rate
Hydraulic Pressure Volumetric flow rate
Thermal Temperature Entropy flow rate
Bond graphs: half-arrows
Bond graph features:

• Half-arrow: denotes choice of positive energy flow.


 Choice of positive direction arbitrary but must be consistent for given analysis.
 My choice: positive direction as transfer of energy from source (system doing work;
energy output) to sink (system upon which work is being performed; receiving
energy).

Effort

Source Flow Sink

Direction of flow of energy


Bond graphs: causal strokes
Bond graph features:

• Causal Stroke: vertical bar only on one end of bond.

 Choice not arbitrary; governed by rules for assigning proper causality to a given port; rules for
precedence amongst ports.

 Port at the end of causal stroke specifies flow of the bond, while the bond imposes effort upon that port.
 Port on the end without causal stroke imposes effort to the bond, while bond imposes flow to that port.

Effort: torque, Flow: angular velocity


Causal stroke at the end of the wheel port
Bond imposes effort (torque) upon the wheel, or wheel specifies flow (velocity) of the bond
Bond graphs: full arrows
Bond graph features:

• Full arrow: only for signal measurement or status.

 Called signal bonds.


 Amount of power flow through bond is insignificant.
 Example: power required to activate a relay
 Orders of magnitude smaller than the power through the relay itself; making it relevant only
to convey whether the switch is on, not the power consumed by it.
Bond graphs: junctions
Bond graph features:

• Junctions: points in a Bond graph where power bonds join.

 “0” junction
 Flows sum to zero, efforts are equal.
 Analogy: in electrical circuits, flow = current. Hence, a “0” junction is the same as node in an
electrical circuit: per KCL, algebraic sum of electrical currents at a node = 0 per incoming and
outgoing convention, since charge cannot accumulate at a node.
 Example: resistors in parallel.

V1
V1 = V2 = V0 Same effort
(voltage)
Σ Flows = 0
i + (-i1) + (-i2) = 0
V2
Bond graphs: junctions
Bond graph features:

 “1” junction
 Efforts sum to zero, flows are equal.
 Analogy: in electrical circuits, effort = voltage. Hence, a “1” junction is the same as a loop in
electrical circuits: per KVL, directed sums of voltages (efforts) around a loop is zero.
 Example: resistors in series.

I1 I2

I1 = I2 = I
Same flow Σ Efforts = 0
(current) If the loop
is closed! VAB + (-I1R1) + (- I2R2) = 0
Bond graphs: junctions
Bond graph features:

 “1” junction
 Efforts sum to zero, flows are equal.
 Analogy: in electrical circuits, effort = voltage. Hence, a “1” junction is the same as a loop in
electrical circuits: per KVL, directed sums of voltages (efforts) around a loop is zero.
 Example: resistors in series.

Note that I have not specified any causal strokes


I1 I2

= =
I1 = I2 = I R1 + R2 = R i1 = i2
Direction of flow Direction of flow
of electrical power of electrical power
Bond graphs: key steps
Key steps to drawing a Bond graph

 Step 1: Identify key “1” and “0” junctions associated with identifiable efforts and
flows in the system.

 Step 2: Identify the dissipative (R, or B) and storage elements (I and C, or M and L),
power sources.

 Step 3: Draw bonds wherever power or information flow between the sources,
junctions, and storage/dissipative components.

 Step 4: Assign sign conventions (arrow heads), and causality.

 Step 5: (optional) Derive equations describing the behavior of the system using the
graph as a kind of guide or map.
Bond graphs: causality
Rules to assign causality

 Rule 1: Only one end of power bond can define effort, so only one end can have a causal
stroke.

 Rule 2: Passive components (e.g. L, C or M, K) have only one sort of causation.

 Component that determines flow is at the end of the causal stroke i.e. the bond imposes effort.
 Component that determines effort has causal stroke at the junction end i.e. it imposes effort to bond.

 Rule 3: Non-passive components (e.g. R or B) get flow (e.g. current or velocity) instantly in
response to flow (e.g. voltage or force), so they can be on either end of a causal bond.
Causal analysis of interaction ports
• Two mechanical systems (S1, S2) such that their common interaction port has same
flow (velocity) – this is the most common connection in robotic systems.

 The interaction port is therefore a “1” junction.

S1 1 S2

 Assume power flow is positive into both systems; hence, half-arrow toward both systems.

S1 1 S2

 If S1: actuator, then it takes flow (motion, v) as input, produces effort (force, F) as output.
Hence, S1 imposes effort to the bond, so it must be without the causal stroke (at other end).

S1 1 S2

 Hence, bond imposes effort on S2, so there must be causal stroke at its end.
186

Causality Analysis of Interaction


Causal analysis of interaction ports
Rule: Output from
robot: Force
• Two systems connected by a “1” junction, if one system as
impedance, the other must be admittance. Why?

 If S1 is an actuator, then it takes motion (v) as input and produces


force F as output. By definition, S1 may be treated as an S1
impedance w/ output written as F = Zv. S2

 Causality analysis dictates that S2 must then be admittance. How?

 Clearly, effort (F) goes into S2 to result in flow (v).

 Only way to ensure that the output is flow (v) is to treat S2 as


admittance such that v = FY.

Input into robot: Motion


Output from human: Motion
Causal analysis of interaction ports
Output from
robot: Force

Robot
Z
Power
S1 in = Fv
S2

=
Power
out = -Fv
Human
Y

Input into robot: Motion


Output from human: Motion
Causal analysis of interaction ports
• Two robots (S3, S4) acting on workspace (S5) such that their common
interaction ports have same flow (v).

S3
Object S5 imposing
motion (flow)

S4

 Example: two robots pushing against the same workpiece.


Causal analysis of interaction ports
• Two robots (S3, S4) acting on workspace (S5) such that common
interaction ports have same flow (v).

• If we choose to represent workspace dynamics as admittance (i.e. F =


input, v = output), then both robots must be impedances (as in the
case of two systems). Why?

• By causality analysis,

 Input of S5 (output of S3, S4) is force, which means that input of S3, S4
must be motion, hence S3 and S4 must be impedances, Z3 and Z4 (by
definition).

 Note the causal stroke at the end of workspace (because power bond imposes effort
upon the port, and the port defines flow of the bond).
 Half-arrows are directed at each system as positive power goes into each system.
Causal analysis of interaction ports
Robot1
Z3

Workpiece
S3 Y
Object S5 imposing
motion (flow) Power
in = Fv Robot2
Z4
Summed
S4
= effort Power
out = -Fv

These are not like electrical circuits, where flow


(e.g. current) splits at a node. These are
mechanical nodes i.e. common physical
connection with common flow (e.g. motion)
Causal analysis of interaction ports
Robot1
Z3

Workpiece
Y
Multiple Robotic
Robot2 Workpiece
Hardware -1
= Z4
Zequiv
Y

Power Power =
in = Fv out = -Fv

Multiple impedances (or admittances) can be represented by a single equivalent impedance (or admittance)
Multiple systems in general, need not represent distinct pieces of hardware but rather superimposed control algorithms acting on one robot.
Impedance (or admittance) reduction
• Leverage two key concepts:

 Concept 1: Mechanical impedances (or admittances) for linear systems can be represented by
transfer functions.

 Concept 2: Mechanical systems with common interaction port(s) i.e. flow or effort i.e. “1
or “0” junctions, respectively, are reducible to single “equivalent robot” interacting with
the environment, satisfying causality conditions.

=
187

Impedance/Admittance Reduction
Impedance (or admittance) reduction
• Impedances in “parallel structure” with common flow i.e. motion (“1” junction):

Zequiv = Z1 + Z2 + … = ΣZi

• Impedances in “parallel structure” with common effort i.e. force (“0” junction):

1/Zequiv = 1/Z1 + 1/Z2 + … = Σ1/Zi

• Admittances in “parallel structure” with common effort i.e. force (“0” junction):

Yequiv = Y1 + Y2 + … = ΣYi
Impedance reduction, “1” junction
Impedance reduction, “0” junction
Admittance reduction, “0” junction
Impedance (or admittance) reduction
Key rule:

 Impedances (or admittances) cannot be in series: Why?

 Consider Z1 in series with Z2. By definition, output of Z1 is force, which is also input of Z2.
But Z2 by definition must have motion (velocity) as input, thereby contradicting causality.
Similar argument holds for admittances.

 Corollary: if two mechanical systems are interacting in series (i.e. serial connection), per
causality analysis, and if one is treated as an impedance, Z (or admittance, Y) and the other
must be treated as an admittance, Y (or impedance, Z).

Robot1
Not ideal for
Robot2 impedance control, but
doable theoretically
188

Impedance/Admittance Regulation:
Preference vs. Requirement
Impedance vs. admittance regulation
• Which to use for robot vs. environment (e.g. human)?
 Causality analysis provides insight.

• For most robotic applications, environment = movable objects


+ kinematic constraints. Prefer admittance

 Movable objects take force as input and produce acceleration


(motion): hence, for inertias, admittance preferred.

 Kinematic constraint imposes zero motion regardless of applied


force: impedance cannot be used (impedance requires input motion).
Hence, for kinematic constraints, admittance is necessary.

• If environment is modeled as admittance, then by causality


analysis, robot must be impedance (remember “1” junction, or
serial connection?)

Need admittance
Impedance vs. admittance regulation
• Ideal robot behavior is impedance (generalized spring) that returns force in response
to applied displacement.

 In practice, robot hardware easier to model as admittance because of linkages, motor inertias.
 Most robots consist of links of relatively large mass driven by actuators.
 Actuators are geared to amplify motor torque, the total inertia apparent at the end effector is increased by
the reflected inertia of the motor; indeed for high gear ratios this dwarfs the mass of the links.
 Thus, it is difficult to make a robot behave as a spring (or impedance), and it is usually more feasible to
make it behave as primarily a mass (or admittance), an argument for admittance control (Newman, 1992).

• Hence, impedance behavior is ideal, but admittance behavior is often more easily
implemented in real hardware, which itself prefers admittance causality because of its
inertial nature.

 Choice of particular controller structure for an application must be based on the anticipated
structure of environment and manipulator, as well as the way that they are coupled.
Coupled system stability analysis
• Owing to impedance (or admittance) reduction, it suffices to analyze the basic 2-
system with common interaction port as a “1” junction.

• Causality analysis: if S1 is impedance, S2 must be admittance.

• Note power-continuous coupling i.e. the coupling is lossless and does not require
power input to be implemented; all power out of one system goes into the other.
Coupled system stability analysis
• We can leverage classical feedback analysis tools to evaluate the stability of
this coupled system, using only the impedance/admittance transfer functions.

 See Colgate, 1988; Colgate and Hogan, 1988 for more details. I can provide those
reading (not needed though).

 How? By interpreting the interaction as a unity negative feedback.

 This allows the application of Bode and/or Nyquist frequency response analysis.

Impedance
Z

Admittance
Y
189

Tools: Nyquist Stability


Nyquist stability criterion: a review
• Nyquist stability provides information about closed-loop stability of linear systems.

 Based on Cauchy’s principle of argument applied to the system’s open-loop transfer function.
 Nyquist stability can be used to determine
 Closed-loop stability
 Relative degree of system stability (phase, gain stability margins).

 Advantages over Routh-Hurwitz:


 Absolute plus relative stability, Exact stability (e.g. time delays).
 Experimental data to identify transfer functions from gain and phase margins.

• Terminology/recall:
 Characteristic equation D(s), plant G(s), compensator H(s), so D(s) = 1 + L(s), where loop gain L(s) = 1 + GH(s).
 Closed-loop transfer function M(s) = GH / (1 + HG) = L / (1 + L).
 Zeros of D(s) are closed-loop poles of M(s).
Nyquist stability criterion: a review

I expect you to revise the basics of Nyquist stability criterion on your own, including Nyquist plots
Nyquist stability criterion: a review
Take-home message:

 Criterion for absolute stability:

 The number of zeros of {1 + GH} i.e. closed-loop poles in the open RHP, Z0 = N + P0

 System is stable if and only if Z0 = 0 i.e. N = -P0, or the {number of encirclements + number of
open-loop poles in the open RHP} = 0.
Nyquist stability criterion: a review
• Encirclements

 (Definition) a point is said to be encircled by a closed path if it is found inside the path.
 Directionality of encirclement: By convention, clockwise (CW) encirclements have positive
sign, counterclockwise (CCW) encirclements have negative sign.

• Steps for implementing Nyquist stability criterion:

Step 1. Determine loop gain GH(s).


Step 2. Determine number of poles of GH in the open RHP (P0). Note that P0 ≥ 0.
Step 3. Draw Nyquist stability plot.
Step 4. Determine number of encirclements (N) of the (-1, j0) point in the GH(s)-plane (N).

 Note that for an encirclement around (-1, j0), a radial line from (-1, j0) to a point on the contour
rotates in the prescribed direction through 2π rad.
 Note that N can be positive (CW), negative (CCW), or zero (no encirclements).
Nyquist stability criterion: a review
Step 1. Determine loop gain GH(s).
Step 2. Determine number of poles of GH in the open RHP (P0). Note that P0 ≥ 0.
Step 3. Draw Nyquist stability plot.
Step 4. Determine number of encirclements (N) of the (-1, j0) point in the GH(s)-plane (N).
Nyquist stability criterion: a review
Step 4. Determine number of encirclements (N) of the (-1, j0) point in the GH(s)-plane (N).

k = 0.8

k=1

-1

-1 -1

k = 1.2
Nyquist stability criterion: a review
Corollaries / Scenarios:

 If the (-1, j0) point is outside of the Nyquist stability contour, then N
= 0 (by encirclement definition).

 The number of surplus encirclements (greater than N + P0) is exactly


the number of unstable poles of the closed-loop system (Z0).

 If N > 0, then CL is unstable regardless of whether the open-loop


system is stable (P0 = 0) or not (P0 > 0).

 In other words, Z0 = N + P0 ≥ 0 if N > 0 for any P0 ≥ 0 (the latter a


constraint on P0).

 If N < 0, then CL is stable if and only if: a) there are as many open-
loop RHP poles, or b) as many poles at the origin enclosed by the
Nyquist path (right of the contour), as |N|.
Nyquist stability criterion: a review
Corollaries / Scenarios (contd.):

 If the open-loop is stable (P0 = 0), then CL is unstable for any


encirclement of the point (-1, j0).

 In other words, Z0 > 0 for N > 0 if P0 = 0.

 If the open-loop is unstable (P0 > 0), then there must be one CCW
encirclement of (-1, j0) for each unstable pole of the open-loop
system.

 If N = 0, then CL is stable if and only if the open-loop is stable i.e.


P0 = 0.

 In other words, Z0 = 0 if and only if P0 = 0 for N = 0.


Metrics for relative stability
• Phase crossover frequency
 Frequency at which the phase angle is -π rad (-180 deg).

 Graphically: frequency at which the polar plot of GH(jω) crosses the negative real axis.
 Analytically: insert s = jω into the TF, then compute the phase angle and set it to -π rad to
calculate ω.

• Gain crossover frequency


 Frequency at which |GH(jω)| = 1.

• Gain margin
 Magnitude of 1 / GH(jω) at phase crossover frequency.

• Phase margin
 Calculated using {π + phase angle at gain crossover frequency}.
 Negative phase margin indicates system instability.
Metrics for relative stability
• Some notes to help analytical calculations

 Phase of s±n = ±π/2


 Phases of product terms in a TF add together.
 Phase of 1/F(s) = -arg(F(s)).
 tan-1(x) = -π/2 - tan-1(1/x) for x < 0, and tan-1(x) = π/2 - tan-1(1/x) for x > 0.

• Using above, we can show (in-class?):

arg (1 / (s + α)) = -tan-1(ω/α)


arg (1 / (s - α)) = +tan-1(ω/α)
arg (s + α) = tan-1(ω/α)
arg (s - α) = -tan-1(ω/α)
Metrics for relative stability
• Using previous properties, we can show:

arg (1 / s (s + p1) (s + p2) …) = -π/2 - tan-1(ω/p1) - tan-1(ω/p2) - …

arg (1 / s (s - p1) (s - p2) …) = -π/2 + tan-1(ω/p1) + tan-1(ω/p2) - …

arg (s (s + z1) (s + z2) …) = π/2 + tan-1(ω/z1) + tan-1(ω/z2) + …

arg (s (s - z1) (s - z2) …) = π/2 - tan-1(ω/z1) - tan-1(ω/z2) + …


Metrics for relative stability
In-class example:

• Derive gain and phase crossover frequencies, margins for GH = 1 / (s ± α).

 Phase angle = -tan-1(ω/α), +tan-1(ω/α).

 Hence, crossover frequency = 0 rad (i.e. when phase angle = -π rad and because
tan(±π) = 0).

 Gain crossover frequency is computed from ω2 = 1 - α2.

 Gain margin = (α2 + ω2)1/2.

 Phase margin = π + phase angle at gain crossover frequency w/ the latter computed
from above.

You might also like