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

  1. What are the two variables of the surface?
  2. Does the chart use a logarithmic scale of the frequencies?
  3. Why is the 2D section useful?

Worked solution

  1. Frequency and resistance; the height represents the voltage ratio.
  2. No, the scale shown is linear.
  3. It allows to read the answer to a fixed resistance without ambiguity of perspective.

Download the Module 13 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *