Appearance
Chapter 4 — Sources and control signals
Module 1 built the whole per-step engine for smooth, linear elements — resistors, inductors, capacitors — driven by an idealized source. Real power systems are more demanding in two ways. First, sources have waveforms (DC, AC, Harmonics, a soft-start ramp) and impedance (they are not infinitely stiff). Second, almost nothing runs open-loop: a controller senses a quantity, computes, and commands a device. This chapter covers both — how a source enters the time-domain solve, and how the control domain is solved alongside the electrical network — and ends by tracing a control signal all the way to the gate of a switch. That last step is the doorway to the switching devices of Chapters 5-7.
Learning objectives
By the end of this chapter you should be able to:
- Write the time-domain expression for a DC and an AC source.
- Add a source's series (Thévenin) impedance and predict the terminal-voltage sag under load.
- Explain why a soft-start ramp avoids startup transient.
- Describe what the control domain is and how it differs from the electrical network it is solved alongside.
- Explain why control blocks are evaluated in a topological order, and what a feedback loop needs in order to have one.
- Trace a control signal from a sensed quantity to a device command in a real closed loop.
4.1 Independent sources in the time domain
An independent source imposes a known waveform regardless of the rest of the circuit. The two you will meet constantly:
- DC source: a constant,
. Every sample in Module 1 used one. - AC source: a sinusoid,
set by an amplitude, a frequency , and a phase .
In power systems it is customnary to specify the RMS value of the source. A sinusoid's RMS and peak are related by
So a source you set to "
Recall from Chapter 3 that an ideal voltage source does not have a Norton equivalent and thus cannot be simulated using classical nodal analysis; NumaSim overcomes this limitation using modified nodal analysis, adding the source branch current as an extra unknown and a constraint row.
4.2 Source impedance (the Thévenin view)
A truly ideal source holds its voltage no matter how much current it delivers. Real sources cannot: a generator, a wall outlet, or the grid behind a bus all have internal impedance. The standard model is a Thévenin equivalent — an ideal source in series with an impedance
Under a load drawing current
The stiffer the source (smaller series_resistance (and optional l_main) for exactly this; the power-electronics samples set it very small (milliohms) so the source is nearly ideal, but the same knob is what lets a source represent a weak grid or sets the available fault current (a theme we return to in Module 6).
4.3 Ramps and soft-starts
Energizing a circuit with a hard step at ramp_time instead of stepping it:
Ramping over several cycles lets the inductors and capacitors charge gently, so the circuit slides into its steady state instead of lurching into it. This is why several NumaSim samples specify a non-zero ramp_time.
4.4 The control domain
Everything so far lives in the electrical network — nodes, branches, and Kirchhoff's current law. NumaSim solves a second world in lock-step: the control domain, a signal-flow graph of blocks wired output-to-input. These are not electrical nodes; a control wire carries a single scalar value in one direction, not a voltage/current pair obeying KCL. Typical blocks:
| Block | Does | Example NumaSim type |
|---|---|---|
| Constant | emits a fixed value (a setpoint) | const_dbl |
| Gain | multiplies by | gain |
| Adder | adds/subtracts inputs | add2 |
| Integrator | accumulates | integrator |
| Transfer function | a filter / lag | tf1 |
| PID | proportional-integral-derivative control | pid |
| Multiply | products of two signals | multiply |
| PWM | turns a duty command into a gate pulse train | pwm |
A continuous block such as the lag
Because control signals are named, they are observables you can plot on the scope like any voltage — see Observables.
Evaluation order is a topological sort
Unlike the electrical network, the control domain is never assembled into a matrix and solved simultaneously. Each block is a plain assignment,
Read the control domain as a directed graph — one vertex per block, an edge from each producer to each consumer — and "every producer runs before its consumers" is exactly a topological sort of that graph. NumaSim computes one once, when the circuit is compiled, and every step then walks the same fixed schedule; it is the control-domain twin of factorizing
multiply tf1 add2 pid pwm,
with the const_dbl setpoint emitted anywhere before the adder. Several orders are usually valid and all give identical numbers.
A topological order exists only for an acyclic graph, and a feedback loop is a cycle — so something has to break it. A loop that closes through the electrical network breaks itself, because signals crossing between the domains carry the previous step's value; that is why the loop of §4.5 sorts cleanly with no work from you. A loop confined to the control domain is a genuine algebraic loop and needs an explicit unit delay (unit_delay, the
Chapter 17 takes both of these apart: which connections the sort deliberately ignores, what happens when you leave a cycle unbroken, and exactly how many steps of delay a signal picks up crossing between the domains — in each direction and around a loop.
4.5 From a control signal to a device command
The payoff of the control domain is closing a loop: sense an electrical quantity, compute a correction, and command a device. The PWM power control sample is a compact, complete example. Its job is to hold the average power delivered to a resistive load at a setpoint, by modulating an IGBT.
Follow the signals (every name below is a real observable in the file):
- A
const_dblemits the setpointP_ref. - A adder (
add2) forms theerror. - A
pid(here a PI) turns the error into adutycommand in. - A
pwmblock converts the duty into a gate pulse train. - The gate drives the IGBT, an electrical switch, which chops the
bus into the load. - Sensing closes the loop: the load voltage
V_Rand currentI_Raremultiply-ed into instantaneous powerP_inst, then a first-order transfer function (tf1) averages out the switching ripple toP_avg, which returns to the adder.
The control signal gate is the hinge: it is computed in the control domain but consumed by an electrical device. How that IGBT — and diodes and thyristors — turn a gate or a terminal voltage into a change in the network is the whole of Chapter 5.
4.6 Lab: sources and a control loop
Lab 4A — read an AC source and confirm the RMS/peak factor
Open the half-wave rectifier in simulator →
(Full description: half-wave rectifier.)
Run it and look at Vac, the source waveform:
- Its peak is about
, not — because the source is rated RMS and . - Its period is
.
(We will study the rectified output Vdc in Chapter 7; for now just confirm the input.)
Lab 4B — watch a control loop acquire its setpoint
Open the PWM power controller in simulator →
(Full description: PWM power control.)
Run it and plot error and P_avg. The controller starts off-setpoint, and over the run the PI drives error toward zero while P_avg climbs to and holds the setpoint of error, duty, P_avg) versus electrical (carrying the
4.7 Summary
- A DC source is a constant; an AC source is
, and NumaSim rates AC amplitude in RMS, so the peak is times the rating. - Real sources carry a Thévenin series impedance; the terminal voltage sags as
under load. - A soft-start ramp eases the network into its operating point instead of hitting it with an artificial step.
- The control domain is a signal-flow graph solved alongside the network, never assembled into a matrix; each continuous block becomes one difference equation updating its own private state.
- Those blocks are evaluated in a topological order of the signal-flow graph, computed once at compile time so every producer runs before its consumers. A loop closing through the network is cut by the cross-domain delay; a loop confined to the control domain needs an explicit
unit delay. - Closing a loop means sensing an electrical quantity, computing in the control domain, and commanding a device — the
gatesignal that drives a switch is the bridge into Chapter 5.
4.8 Problems
Problem 4.1. A NumaSim AC source is set to
Solution 4.1
The rating is RMS, so the peak is
Problem 4.2. A Thévenin source has open-circuit voltage
Solution 4.2
The current is
Problem 4.3. Why might you ramp a source up over several cycles rather than applying it as a step, even when you ultimately want the steady state?
Solution 4.3
A hard step excites the circuit's full transient (inrush, ringing) that then has to decay before the steady state is visible — and it can drive nonlinear elements (saturating transformers, limiter-equipped controllers) into large excursions. Ramping the amplitude lets the inductors and capacitors charge gradually, so the circuit slides into its operating point with little or no surge, giving a clean steady state sooner.
Problem 4.4. In the PWM-power-control loop, list the signal path from the sensed load quantities to the IGBT gate, and classify each block as control- or electrical-domain.
Solution 4.4
Sensed V_R and I_R (electrical measurements) multiply P_inst tf1 filter P_avg add2, subtracting from P_ref) error pid (PI) duty pwm gate. Every block from multiply through pwm is in the control domain; the IGBT and the load it feeds are electrical. The gate signal is the control-to-electrical hand-off.
Problem 4.5. The instantaneous power P_inst is low-pass filtered to P_avg before being compared with the setpoint. Why not feed P_inst directly to the adder?
Solution 4.5
P_inst is the product of a switched voltage and current, so it is full of switching-frequency ripple. Feeding that raw into the controller would make the PI chase the ripple, not the average. The loop's job is to regulate average delivered power, so a first-order filter extracts the slow average P_avg and the controller acts on that. (This is the same reason a rectifier needs a reservoir capacitor — Chapter 7.)
Problem 4.6. Four control blocks are wired
Solution 4.6
Adding unit_delay on the
4.9 References
- H. W. Dommel, Electromagnetic Transients Program (EMTP) Theory Book, Bonneville Power Administration — sources and the transient analysis of control systems.
- P. Kundur, Power System Stability and Control, McGraw-Hill — modeling of control blocks and transfer functions.
- J. Arrillaga and N. R. Watson, Power Systems Electromagnetic Transients Simulation, IET Power and Energy Series 39 — source representation and control/network interfacing.
Previous: Chapter 3 — Building and solving the network each step · Next: Chapter 5 — Switches and self-commutating devices.