Advanced Octave A74 — RLC response surfaces
Advanced GNU Octave with GX-TXT · Module 13
How does the response of a circuit change to both frequency and resistance? A 3D surface makes the effect of damping visible; a 2D section helps to read a precise condition.
Objectives and prerequisites
We repeat complex numbers and basic course circuits, as well as A41 surfaces. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import and run superficie_rlc.m, then sezione_rlc.m. octave_rlc_surface and octave_rlc_slice IDs are created-only: to repeat, use a new Session or change IDs.
Model and surface
We consider an ideal RLC in series, excited sinusoidally, and the voltage on the capacitor compared to the input. With L = 0,01 H, C = 1e-6 F, frequencies from 100 to 5000 Hz and resistors from 20 to 200 Ω, we calculate Zc = 1/(j*omega*C) and |H| = |Zc/(R+j*omega*L+Zc)|.
The reticle contains 51 frequencies and 41 resistances. The test produces league gains between approximately 0.0920 and 5,0222. Axes are linear: frequency in Hz, ohm resistance and dimensionless voltage ratio. The automatic axle extensions beyond the samples are graphical margins, not additional data.
Constant resistance section
The second script calculates a more dense section at R = 100 Ω :
The ideal natural frequency 1/(2*pi*sqrt(L*C)) is about 1591,55 Hz. It should not be automatically identified with the maximum voltage on the capacitor: the damping changes the position and height of the peak. The voltage ratio can exceed one even in a passive circuit, because it describes tensions on a component, not power gain.
The model neglects loss and non-ideality of the components. Zero frequency and resistance require special attention to ideal expressions and conditions; here we only use positive frequencies and resistances.
Exercise
- What are the two variables of the surface?
- Does the chart use a logarithmic scale of the frequencies?
- Why is the 2D section useful?
Worked solution
- Frequency and resistance; the height represents the voltage ratio.
- No, the scale shown is linear.
- It allows to read the answer to a fixed resistance without ambiguity of perspective.
Other steps of this project
- Advanced Octave A75 — Dynamical systems in phase space
- Advanced Octave A81 — Geography of the waves and a 3D surface
- Advanced Octave A82 — Age, sex and demographic inequalities
- Advanced Octave A83 — All-cause mortality, certified COVID deaths and surveillance
- Advanced Octave A84 — A reproducible public account
- Advanced Octave A73 — Optimization landscapes and 3D trajectories