Skip to content

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, v(t)=V. Every sample in Module 1 used one.
  • AC source: a sinusoid,v(t)=Vpksin⁡(2πft+φ),set by an amplitude, a frequency f, 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

Vpk=2Vrms.

So a source you set to "10 V, 60 Hz" actually swings to a peak of 102≈14.14 V.

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 Zs (a resistance Rs, often with a series inductance Ls).

A source as a Thévenin equivalent: an ideal source V behind a series impedance Rs (optionally Ls). Under load current i the accessible terminal voltage sags to vterm=V−iRs.

Under a load drawing current i, the accessible terminal voltage is

vterm(t)=V−i(t)Rs.

The stiffer the source (smaller Rs), the less it sags. NumaSim's voltage source exposes R (series) (and an optional series L) 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 t=0 injects the network's fastest possible transient — precisely the ringing and inrush you saw in Module 1. Sometimes that is the study. But often you only want the circuit's operating point, and a startup surge just pollutes the early waveform (or saturates a machine, or trips a limiter). The fix is a soft-start: ramp the source amplitude from zero up to its final value over a short ramp time (the source's t_ramp) instead of stepping it:

v(t)={ttrampVpksin⁡(2πft+φ),t<tramp,Vpksin⁡(2πft+φ),t≥tramp.

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 t_ramp.

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:

BlockDoesNumaSim component
Constantemits a fixed value (a setpoint)Const Double
Test signala periodic wave, or a step, ramp or pulse at a set timeSignal Generator
Recorded profileplays back a table of (time, value) pointsTime Table Source
Noiseseeded random disturbance or measurement noiseNoise Source
Gainmultiplies by KGain
Adderadds/subtracts inputsAdd2 Double, Add2 Int, Sum Double, Sum Int (2 to 5 inputs)
Multiplyproducts of two signalsMultiply
Function|u|, u, eu, ln⁡u, sin⁡u, atan2(y,x), …Math Function, Trig Function
Integratoraccumulates ∫udtIntegrator
Transfer functiona filter / lag H(s)Transfer Function (1st Order), Lead-Lag / Washout, Second-Order Filter
Delayholds a signal back by a fixed timeTransport Delay
PIDproportional-integral-derivative controlPID Controller
Limitsclamps a signal or the rate it changesSaturation, Rate Limiter
Curvemaps an input through a table of breakpointsLookup Table 1-D
Compareturns a test such as u>0.9 into an int flagRelational Double, Relational Int, Hysteresis Comparator
PWMturns a duty command into a gate pulse trainPWM Generator

A continuous block such as the lag H(s)=K/(1+sT) becomes a difference equation, just as the inductor did in Chapter 2 — though by a different scheme, since control blocks do not go into the matrix and can afford a cheaper one. Chapter 17 derives the update the engine actually uses and works out what it costs in accuracy and stability. For now the shape is all you need: each block updates its state once per step from its inputs and its own stored history, and its output either feeds another control block or commands an electrical device.

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, yn=f(inputs, state), so the only thing left for the engine to get right is the order in which the blocks are evaluated. Run an adder before the gain that feeds it, and the adder adds a stale value.

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 works one out once, before the run starts, and every step then walks the same fixed schedule; it is the control-domain twin of factorizing G once in Chapter 3. For the loop of §4.5 a valid order is

Multiply → Transfer Function → Add2 → PID → PWM,

with the Const Double 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 z−1 block) on the feedback path.

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.

The closed loop in the PWM-power-control sample. A constant Pref=30 is compared with the measured average power Pavg; the error drives a PI controller whose output is the PWM duty; the PWM gates the IGBT feeding the load. The sensed load voltage and current are multiplied to instantaneous power and low-pass filtered back to Pavg.

Follow the signals (every name below is a real observable in the file):

  1. A Const Double emits the setpoint P_ref =30.
  2. An adder (Add2) forms the error =Pref−Pavg.
  3. A PID Controller (here a PI) turns the error into a duty command in [0,1].
  4. A PWM Generator converts the duty into a gate pulse train.
  5. The gate drives the IGBT, an electrical switch, which chops the 50 V bus into the load.
  6. Sensing closes the loop: the load voltage V_R and current I_R are multiplied (Multiply) into instantaneous power P_inst, then a first-order Transfer Function averages out the switching ripple to P_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 14.14 V, not 10 V — because the source is rated 10 V RMS and 102=14.14.
  • Its period is 1/60≈16.7 ms.

(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 30. Identify each block from §4.5 on the canvas, and note which wires are control (thin, one-way, carrying error, duty, P_avg) versus electrical (carrying the 50 V bus into the load).

4.7 Summary ​

  • A DC source is a constant; an AC source is Vpksin⁡(2πft+φ), and NumaSim rates AC amplitude in RMS, so the peak is 2 times the rating.
  • Real sources carry a Thévenin series impedance; the terminal voltage sags as vterm=V−iRs 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 z−1 unit delay.
  • Closing a loop means sensing an electrical quantity, computing in the control domain, and commanding a device — the gate signal that drives a switch is the bridge into Chapter 5.

4.8 Problems ​

Problem 4.1. A NumaSim AC source is set to 230 V, 50 Hz. What is its peak voltage, and what is its period?

Solution 4.1

The rating is RMS, so the peak is Vpk=2(230)≈325.3 V. The period is T=1/f=1/50=20 ms.

Problem 4.2. A Thévenin source has open-circuit voltage 100 V and series resistance Rs=2 Ω. It feeds a 18 Ω resistive load. Find the load current and the terminal voltage.

Solution 4.2

The current is i=V/(Rs+RL)=100/(2+18)=5 A. The terminal voltage is vterm=V−iRs=100−5(2)=90 V (equally, iRL=5(18)=90 V). The 10 V lost across Rs is the source's internal sag.

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 → first-order Transfer Function → P_avg → adder (Add2, subtracting from P_ref) → error → PID (PI) → duty → PWM Generator → 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 A→C, B→C, C→D, and B→D. In what order or orders may the engine evaluate them? Now add a wire D→B. What changes?

Solution 4.6

A and B have no inputs, so either may go first; C needs A and B; D needs B and C. Exactly two topological orders satisfy that: A,B,C,D and B,A,C,D. Both give the same numbers.

Adding D→B creates the cycle B→D→B (and B→C→D→B), so the graph is no longer acyclic and no topological order exists. If the loop lies entirely in the control domain, insert a Unit Delay on the D→B path: B then reads D's previous-step output, the edge stops constraining the order, and A,B,C,D is valid again. Without the explicit delay the engine breaks the cycle itself and warns you — see Chapter 17 for where the delay ends up in that case.

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.