Silicon ChipCircuit Surgery - September 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Super-accurate analogue clock
  7. Feature: We both have truths, are mine the same as yours? by Max the Magnificent
  8. Feature: The Fox Report by Barry Fox
  9. Feature: Net Work by Alan Winstanley
  10. Project: GPS-Synchronised Analogue Clock by Geoff Graham
  11. Project: MINI LEDRIVER by Tim Blythman
  12. Project: Wide-Range OHMMETER by Phil Prosser
  13. Feature: Make it with Micromite by Phil Boyce
  14. Feature: Max’s Cool Beans by Max the Magnificent
  15. Feature: AUDIO OUT by Jake Rothman
  16. Feature: Circuit Surgery by Ian Bell
  17. Feature: Electronic Building Blocks by Julian Edgar
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the September 2023 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Circuit Surgery Regular clinic by Ian Bell Gyrators A recent post on the EEWeb forum asked about converting a low-frequency square wave (around 7Hz) to a sinusoid. At the time of writing, as was pointed out by one of the replies, few details of the requirements were available (eg, frequency range) so it was difficult for respondents to give much advice beyond general suggestions about filtering. However, one reply mentioned possible use of a gyrator circuit, which is something we have not looked at before. So, this month we will discuss gyrators. Gyrators are very useful in some filtering applications, particularly the filters in equalisers used in audio applications. Gyrators are also used in analogue telephones and some RF systems to separate AC signals from DC (power). Gyrators are part of a range of circuits that can be generally described as ‘impedance converters’. They have specific names, such as Negative Impedance Converter (NIC), General Impedance Converter (GIC) and Frequency-Dependent Negative Resistor (FDNR). NICs can take an impedance and convert it to its negative – so applied to a resistor R, the NIC circuit behaves like a resistor of value –R. Circuits such as these are used quite frequently by integrated circuit designers, but they are probably less common in discrete circuit design. Converting capacitors to inductors The most important property of gyrators in general circuit design is that they can be used to create circuits that behave like inductors without using any inductors. Gyrators can effectively invert impedance. The impedances (Z) (effective resistance) of a capacitor (ZC) and inductor (ZL) are given by the well-known formulae: " 𝑍𝑍! = #$%! and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 where f is frequency in hertz. An ideal gyrator converts a capacitor of impedance ZC to S/ZC = 2πfSC, where S 𝑣𝑣# = 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 58 𝑖𝑖# = –𝑣𝑣" /𝑅𝑅 or 𝑣𝑣" = –𝑅𝑅𝑖𝑖# is a scaling factor. Comparing the above i2 i1 equations shows that the converted Two-port capacitor behaves like an inductor v1 v2 network with value SC. i1 i2 This means that RL and RLC filter circuits can be created without using Fig.1. General two port network. Examples inductors. Furthermore, as the effective include the transformer and gyrator. inductance value depends on resistances Gyrators in the gyrator circuit, the effective Gyrators inductance can be changed by varying variant of the transformer which converts a resistor – which means that it is input voltage to output current, also " reasonably easy to make the circuits 𝑍𝑍 with a scaling factor, which is called the ! = #$%! and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 " tuneable using a variable resistor, such 𝑍𝑍 gyration resistance (R). Similarly, the ! = #$%! and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 as a potentiometer. input current is converted to an output Using a gyrator with a capacitor voltage. Specifically, the relationships to create inductance has a number (with reference to Fig.1) are: 𝑣𝑣# = 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 of potential advantages. Where large 𝑣𝑣# = 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 inductors are required the total weight, size and cost of a gyrator-based 𝑖𝑖# = –𝑣𝑣" /𝑅𝑅 or 𝑣𝑣" = –𝑅𝑅𝑖𝑖# implementation can be much lower. Real inductors tend to be less ideal 𝑖𝑖# = –𝑣𝑣" /𝑅𝑅 or 𝑣𝑣" = –𝑅𝑅𝑖𝑖# and suffer from more problems than The gyrator was proposed by Bernard real capacitors, so converting a good Tellegen in 1948 in the Philips Research 𝑣𝑣# in a paper titled, The quality capacitor to an inductor may Reports journal 𝑖𝑖 = − 𝑣𝑣#𝑋𝑋 give good performance despite the need gyrator, #a new electric network element. ! 𝑖𝑖# = a−largely for additional circuity. This was theoretical paper – 𝑋𝑋! Areas where gyrator-based inductors there are no relatively simple physical may help avoid potential problems implementations of gyrators as there are inherent with wound inductors with resistors, inductors and 𝑅𝑅𝑣𝑣capacitors, # 𝑣𝑣" =𝑅𝑅𝑣𝑣 Subsequently, however, include influence of magnetic fields, transformers. 𝑋𝑋# ! self-resonance due to inter-winding many𝑣𝑣gyrator circuits using vacuum " = 𝑋𝑋! capacitance and core saturation, and tubes, transistors and op amps were power dissipation if DC is applied. developed. To put the date in context, Gyrator-based inductors are not suitable in 1948 the first working transistors 𝑅𝑅𝑅𝑅𝑅𝑅" for use in circuits such as power had only 𝑣𝑣" just =𝑅𝑅𝑅𝑅𝑅𝑅been created and tube op 𝑋𝑋"!been available for a few converters which rely heavily on the amps𝑣𝑣had only " = 𝑋𝑋! energy storage properties of inductors. years. The name ‘gyrator’ came from a mathematical analogy between currents and voltages in the gyrator and the Defining the gyrator mechanical𝑣𝑣"parameters in a gyroscope. The formal definition of a gyrator is based 𝑅𝑅# 𝑍𝑍'( =𝑣𝑣 =𝑅𝑅# on the concept of a two-port network "𝑖𝑖" 𝑋𝑋! 𝑍𝑍'( = with = – a device with two pairs of terminals Gyrator 𝑖𝑖" 𝑋𝑋!capacitor (as shown in Fig.1) with a specific Fig.2 shows an ideal gyrator, with relationship between the currents and gyration resistance R, and a capacitor voltages at the two ports. A well know 𝐿𝐿 = (𝑅𝑅" − 𝑅𝑅# )𝑅𝑅# 𝐶𝐶 example of this is the transformer, for 𝐿𝐿 = (𝑅𝑅" − 𝑅𝑅# )𝑅𝑅# 𝐶𝐶 which (with an AC signal) v2 = Nv1 and i2 i1 i2 = i1/N, where N is the turns ratio. The Zin Gyrator transformer converts an input (primary C v1 v2 R 𝐿𝐿 = 𝑅𝑅 𝑅𝑅 𝐶𝐶 " # or port 1) voltage to an output (secondary 𝐿𝐿 = 𝑅𝑅" 𝑅𝑅i1# 𝐶𝐶 i2 or port 2) voltage scaled by N. Similarly, the primary current is converted to a secondary current. The gyrator is like a Fig.2. Gyrator with a capacitor on port 2. 𝑅𝑅S = 𝑅𝑅# Practical𝑅𝑅SElectronics | September | 2023 = 𝑅𝑅# 𝑅𝑅) = 𝑅𝑅" − 𝑅𝑅# 𝑅𝑅 = 𝑅𝑅 − 𝑅𝑅 𝑋𝑋! 𝑣𝑣" 𝑅𝑅# 𝑍𝑍'( 𝑣𝑣 =" 𝑅𝑅 =# 𝑋𝑋! " behaviour like an inductor. 𝑍𝑍'( = 𝑖𝑖 𝑖𝑖= 𝑋𝑋! i1 R2 " R2 One of the simplest and most popular is shown in Fig.3. It iin iin U1 Zin U1 vA creates an impedance (Z in ) vin – – Zin C to ground that behaves like 𝐿𝐿 = (𝑅𝑅" − 𝑅𝑅# )𝑅𝑅# 𝐶𝐶 C vB + + an inductor. The circuit can𝐿𝐿 = (𝑅𝑅" − 𝑅𝑅# )𝑅𝑅# 𝐶𝐶 i2 be used in place of wound L R1 inductors in circuits using R1 " 𝑍𝑍!! = "" and 𝑍𝑍&& = 2𝜋𝜋𝜋𝜋𝜋𝜋 grounded inductors. 𝐿𝐿 = 𝑅𝑅 𝑅𝑅 𝐶𝐶 #$%! and 𝑍𝑍 = 2𝜋𝜋𝜋𝜋𝜋𝜋 " # 𝑍𝑍! = #$%! & " 𝐿𝐿 = 𝑅𝑅" 𝑅𝑅# 𝐶𝐶 The circuit in Fig.3 is 𝑍𝑍! #$%! = and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 #$%! not particularly easy to understand intuitively, and Fig.5. Gyrator analysis Fig.3. Gyrator circuit to produce behaviour equivalent it does not correspond to the 𝑅𝑅S = 𝑅𝑅# 𝑣𝑣## =to 𝑅𝑅𝑖𝑖an or 𝑖𝑖 = 𝑣𝑣 /𝑅𝑅 " inductor. " # theoretical two-port network 𝑣𝑣# = 𝑅𝑅𝑖𝑖"" or 𝑖𝑖"" = 𝑣𝑣## /𝑅𝑅 𝑅𝑅S = 𝑅𝑅# 𝑣𝑣# = 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 gyrator in an obvious way. A brief 𝑅𝑅 = 𝑅𝑅 − 𝑅𝑅 explanation is as follows. The op amp 𝑅𝑅 =) 𝑅𝑅 −" 𝑅𝑅 # (C) on its second port. We can show 𝑖𝑖## = –𝑣𝑣"" /𝑅𝑅 or 𝑣𝑣"" = –𝑅𝑅𝑖𝑖## ) " # is configured as a unity-gain buffer. like an inductor. With reasonable circuit values it is 𝑖𝑖# = –𝑣𝑣that or 𝑣𝑣"1=behaves –𝑅𝑅𝑖𝑖# " /𝑅𝑅 port 𝑖𝑖# = –𝑣𝑣 /𝑅𝑅 or 𝑣𝑣 = –𝑅𝑅𝑖𝑖 " port 2 "the current # The op amp outputs a voltage equal to At and voltage are straightforward to create equivalent that across R1, which is proportional related by the capacitor’s reactance: inductances of units to tens, or even hundreds of henrys – values to the capacitor current (which also 𝑣𝑣# which would require large, heavy flows through R1). So, the input voltage 𝑖𝑖## = − 𝑣𝑣##Gyrators 𝑖𝑖# = − 𝑋𝑋!! 𝑣𝑣# and expensive windings, or even be is forced (via R2) to be equal to the op 𝑋𝑋 𝑖𝑖# = −! 𝑋𝑋! this for i2 in the gyrator unpractical, if implemented as standard Substituting amp’s output, which is proportional to wound inductors. For example, with the capacitor’s current. This follows the equation v1 = –Ri2 we get: " 𝑍𝑍! gyrator = and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 R1 = 100kΩ, R2 = 100Ω and C = 200nF in Fig.2 where the port #$%! behaviour Gyrators 𝑅𝑅𝑣𝑣## 1 voltage is proportional to the capacitor then the equivalent inductance is 2.0H. # 𝑣𝑣"" = 𝑅𝑅𝑣𝑣 (port 2) current. Resistor R2 is usually 𝑣𝑣" = 𝑋𝑋!!𝑅𝑅𝑣𝑣# 𝑋𝑋! 𝑣𝑣" = relatively small and is effectively in Circuit analysis " 𝑋𝑋! 𝑍𝑍 = and 𝑍𝑍& = 2𝜋𝜋𝜋𝜋𝜋𝜋 series with the gyrator input (as driven Substituting the other gyrator equation! #$%! The circuit in Fig.5 is the gyrator from 𝑣𝑣# = 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 by the op amp) so will appear in series v2 = Ri1 for v2, the above gives: Fig.3 labelled with voltages and currents with the effective inductance. to facilitate analysis. We have input 𝑅𝑅𝑅𝑅𝑅𝑅"" " 𝑣𝑣"" = 𝑅𝑅𝑅𝑅𝑅𝑅 voltage and current (v in and iin) from 𝑖𝑖# = –𝑣𝑣" /𝑅𝑅 or 𝑣𝑣" = –𝑅𝑅𝑖𝑖# 𝑣𝑣" = 𝑋𝑋!!𝑅𝑅𝑅𝑅𝑅𝑅" which we can find Zin using vin/iin. The circuit 𝑣𝑣" =𝑋𝑋! 𝑣𝑣# =Equivalent 𝑅𝑅𝑖𝑖" or 𝑖𝑖" = 𝑣𝑣# /𝑅𝑅 𝑋𝑋! op amp’s two input voltages are labelled Unlike an ideal gyrator with an ideal v A and v B at the inverting and noncapacitor, the circuit in Fig.3 does not Dividing by i 1 gives the impedance behave like an ideal inductor, even looking into port 1 (Z inverting inputs respectively. The op ) as: 𝑖𝑖# = –𝑣𝑣" /𝑅𝑅 or 𝑣𝑣" =𝑣𝑣#–𝑅𝑅𝑖𝑖# in # 𝑣𝑣"" 𝑅𝑅## 𝑖𝑖 = − if all the components are ideal. An amp’s output voltage is also equal to vA # 𝑅𝑅 𝑍𝑍'( = 𝑣𝑣" = 𝑋𝑋 𝑋𝑋! 𝑍𝑍'( =" !! 𝑅𝑅# " 𝑣𝑣 equivalent circuit is shown in Fig.4. by virtual of the 100% negative feedback '( = 𝑖𝑖" 𝑖𝑖" 𝑋𝑋 𝑍𝑍'( = =! This includes both series and parallel connection. Analysis of the circuit 𝑖𝑖" 𝑋𝑋! resistance, is helped by using the assumption 𝑣𝑣# which is similar to what 𝑖𝑖# = be − expected for a wound inductor. might that the feedback controls the circuit As discussed above the capacitor’s 𝑋𝑋!𝑅𝑅𝑣𝑣 # amps will contribute Non-ideal op to maintain zero voltage difference has been inverted. Thus, with (𝑅𝑅"" − 𝑅𝑅## )𝑅𝑅 𝐿𝐿 =reactance 𝐶𝐶 # 𝑣𝑣" = # 𝐶𝐶 𝐿𝐿 =a(𝑅𝑅 " − 𝑅𝑅# )𝑅𝑅of # value C connected to port 𝑋𝑋non-ideal additional characteristics, between the two op amp inputs (vA = capacitor ! (𝑅𝑅 )𝑅𝑅 𝐿𝐿 = " − 𝑅𝑅# # 𝐶𝐶 which we will discuss later. 2 of a gyrator with gyration resistance vB). This is true for an ideal device and It is possible to analyse the circuits R, port 1 behaves like an inductor with well approximated for a real op amp 𝑅𝑅𝑣𝑣# 2 in𝑣𝑣Fig.3 and Fig.4 to obtain formulae value as long as it is not saturated; that is, if 𝐿𝐿 = 𝑅𝑅""L𝑅𝑅##=𝐶𝐶R C. " = !𝑅𝑅𝑅𝑅𝑅𝑅values 𝐿𝐿 = 𝑅𝑅" 𝑅𝑅# 𝐶𝐶 to relate𝑋𝑋the in the two circuits. the output voltage is within its linear " 𝐿𝐿 = 𝑅𝑅" 𝑅𝑅# 𝐶𝐶 " = This𝑣𝑣requires a lot of algebraic steps, operating range and is not too close to Implementing gyrators 𝑋𝑋! so we outline the process later rather one of its supply voltages. There are a variety of transistor and opthan doing so in minute detail. We will The input current splits between amp-based circuits using the gyrator 𝑅𝑅 = 𝑅𝑅## 𝑅𝑅𝑅𝑅𝑅𝑅" simulations which show also present the two branches formed by C and R1 or𝑅𝑅SSSsimilar = 𝑅𝑅# principles to implement 𝑣𝑣 = 𝑅𝑅S = 𝑅𝑅# the" equivalence of the two circuits until (current i2) and R2 (current i1). Analysis 𝑋𝑋𝑣𝑣! 𝑅𝑅# " 𝑅𝑅)) = 𝑅𝑅"" − 𝑅𝑅## limited by op amp performance. of the circuit is simplified by assuming 𝑍𝑍 = = '( 𝑅𝑅) = 𝑅𝑅" − 𝑅𝑅# 𝑖𝑖" 𝑋𝑋! to Fig.3 and Fig.4, the With reference that no current flows into the op amp 𝑅𝑅) = 𝑅𝑅" − 𝑅𝑅# iin Zin gyrator circuit’s equivalent inductance inputs. Again, this is true for an ideal # by: value𝑣𝑣is given device and well approximated by real op 𝑅𝑅 " 𝑍𝑍'( = = amp under normal operating conditions. RS 𝑖𝑖" − 𝑋𝑋𝑅𝑅! )𝑅𝑅 𝐶𝐶 𝐿𝐿 = (𝑅𝑅 For this analysis we will start by " # # using the reactance of the capacitor Typically, R1 is relatively large (eg, tens to (its effective resistance) as XC. A full hundreds of kilohms) and R2 is relatively analysis of the circuit really requires RP L (𝑅𝑅" − )𝑅𝑅 𝐿𝐿 =small use of the complex number or Laplace 𝐿𝐿 (hundreds =𝑅𝑅𝑅𝑅#" 𝑅𝑅##𝐶𝐶𝐶𝐶 of ohms or less) so (R1 domain impedance for the capacitor (see – R2) is not much different from R1 and later), but this is sufficient to show the a simplified formula can be used: way to proceed without needing the advanced maths. The voltage v B can 𝐿𝐿 = 𝑅𝑅 𝑅𝑅 𝐶𝐶 " # 𝑅𝑅S = 𝑅𝑅# be found using the potential divider Fig.4. Equivalent circuit for the gyrator formula on XC and R1, specifically: Also, in the equivalent circuit we have: in Fig.3. 𝑅𝑅) = 𝑅𝑅" − 𝑅𝑅# Practical Electronics | September | 2023 𝑅𝑅S = 𝑅𝑅# 59 𝑣𝑣* = 𝑅𝑅 𝑣𝑣+'(𝑋𝑋! 𝑖𝑖# = " 𝑅𝑅" + 𝑋𝑋! 𝑣𝑣'( # = argument helps indicate that the but 𝑖𝑖this 𝑅𝑅" 𝑅𝑅 +"𝑋𝑋 𝑣𝑣'( ! 𝑖𝑖"equation = 5𝑣𝑣'( − makes sense 67𝑅𝑅# and corresponds 𝑅𝑅" + 𝑋𝑋! with an approximation of the ideal gyrator case discussed above. 𝑅𝑅" 𝑣𝑣'( 𝑅𝑅" + 𝑋𝑋! 𝑅𝑅" 𝑣𝑣'( 𝑣𝑣* = Given𝑅𝑅that " + 𝑋𝑋i!2 is flowing in R 1, and R 1 𝑅𝑅" 𝑣𝑣'( = 5𝑣𝑣'( − 67𝑅𝑅# has vB across it, i2 is vB/R1 so we divide 𝑖𝑖" Equivalence 𝑅𝑅 + 𝑋𝑋!analysis (𝑅𝑅 # "+ 𝑋𝑋! )𝑣𝑣 '( 𝑣𝑣'(by𝑅𝑅R" 𝑣𝑣'( the above To𝑖𝑖'(prove = that Fig.4 is a valid equivalent 1 to get: 𝑖𝑖# = 𝑣𝑣* = )𝑅𝑅# 𝑋𝑋!gyrator 𝑅𝑅" + 𝑋𝑋𝑅𝑅 circuit (𝑅𝑅 for" + the inductor we can ! " + 𝑋𝑋! 𝑣𝑣'( also find its impedance (Z LE ), then 𝑖𝑖# = 𝑅𝑅" + 𝑋𝑋! equate(𝑅𝑅the two)𝑣𝑣formulae (put Zin = ZLE) # + 𝑋𝑋! '( and 𝑖𝑖'( =compare terms. The impedance (𝑅𝑅 𝑣𝑣'(inductor 𝑅𝑅#𝑋𝑋(𝑅𝑅 𝑋𝑋! ) "+ ! )𝑅𝑅 #equivalent 𝑣𝑣'( R is vin – vA, which 𝑅𝑅" 𝑣𝑣'(across "+ of =the circuit is The voltage 𝑍𝑍'( = 𝑖𝑖" = 5𝑣𝑣'( − 𝑖𝑖# = 67𝑅𝑅# 2 (𝑅𝑅 ) 𝑖𝑖 + 𝑋𝑋 𝑅𝑅in𝑅𝑅 + 𝑋𝑋 the series sum of resistor R is equal𝑅𝑅"to+v𝑋𝑋 – v . So, the current in R '( # ! " ! ! " 𝑣𝑣'( B 2 S plus the 𝑅𝑅 𝑅𝑅in"= 𝑣𝑣–"'(𝑣𝑣 𝑣𝑣 is i1𝑣𝑣=* (v parallel combination of resistor RP and v'( * = B)/R 2. Using the equation 𝑖𝑖" = 5𝑣𝑣'( − 𝑅𝑅" + 7𝑅𝑅𝑋𝑋#! 𝑅𝑅"𝑋𝑋6+ ! get: for vB above the inductive reactance XL: 𝑅𝑅" + 𝑋𝑋!we 𝑣𝑣'( 𝑅𝑅# (𝑅𝑅" + 𝑋𝑋! ) 𝑍𝑍'( = = (𝑅𝑅#𝑅𝑅+ 𝑖𝑖'( ) 𝑋𝑋𝑋𝑋 &! ) (𝑅𝑅# + 𝑋𝑋! )𝑣𝑣𝑅𝑅'(" 𝑣𝑣'( 𝑍𝑍 = 𝑅𝑅 𝑖𝑖" = 5𝑣𝑣'( − 67𝑅𝑅# &+ , + 𝑖𝑖'( = 𝑅𝑅) + 𝑋𝑋& 𝑅𝑅𝑣𝑣" + 𝑋𝑋! (𝑅𝑅" + 𝑋𝑋𝑣𝑣! )𝑅𝑅 '( #'( (𝑅𝑅 𝑋𝑋!𝑅𝑅)𝑣𝑣'( # = 𝑖𝑖# #=𝑖𝑖+ 𝑋𝑋! 𝑅𝑅 i +"we 𝑋𝑋+ 𝑖𝑖'(To=obtain ! add However, this is not enough – the two the two equations (𝑅𝑅" + "𝑋𝑋 in ! )𝑅𝑅# 𝑅𝑅) 𝑋𝑋& equations for i 1 and i 2 together (i in = i 1 + i 2 by 𝑍𝑍&+ = 𝑅𝑅, +have to be manipulated into 𝑅𝑅𝑅𝑅)# )𝑅𝑅 + #𝑋𝑋𝐶𝐶& forms in order to the right equivalent Kirchhoff’s current (𝑅𝑅" − 𝐿𝐿 = 𝑣𝑣'( 𝑅𝑅# (𝑅𝑅"# + 𝑋𝑋!!))𝑣𝑣'( law). This give = 𝑍𝑍'( =quite𝑖𝑖= '( be able to relate terms and obtain the a cumbersome expression, which (𝑅𝑅 )𝑅𝑅 + 𝑋𝑋 (𝑅𝑅𝑅𝑅 𝑖𝑖'( "𝑣𝑣𝑅𝑅𝑋𝑋 ! # "!𝑣𝑣)'( # "+ '( results stated earlier, such as: can be simplified by a few algebraic 𝑖𝑖 = 5𝑣𝑣 − 6 7 𝑅𝑅 𝑖𝑖" =𝑣𝑣"'( 5𝑣𝑣'( 𝑅𝑅 −'(# (𝑅𝑅"𝑅𝑅+ + 𝑋𝑋6)7𝑅𝑅 # 𝑅𝑅" +"𝑋𝑋! !𝑋𝑋! # to obtain equal 𝑍𝑍'( =steps: = multiplying (𝑅𝑅# + 𝑋𝑋! ) 𝑖𝑖'( denominators and cancelling equivalent 𝐿𝐿 = (𝑅𝑅 −"𝑅𝑅+# )𝑅𝑅 𝐶𝐶 ) 𝑅𝑅#"(𝑅𝑅 1⁄#𝑗𝑗𝑗𝑗𝑗𝑗 𝑍𝑍'( = terms in resulting numerator: (𝑅𝑅 ⁄ ) + 1 𝑗𝑗𝑗𝑗𝑗𝑗 (𝑅𝑅 ) 𝑣𝑣'(the 𝑅𝑅 + 𝑋𝑋 𝑅𝑅) 𝑋𝑋&# " # ! 𝑍𝑍&+ 𝑍𝑍='(𝑅𝑅= It is well known that ‘resistance’ of a , + = (𝑅𝑅 𝑖𝑖'(𝑅𝑅(𝑅𝑅 + '( 𝑋𝑋! ) 𝑋𝑋 ) #+ & #! )𝑣𝑣 (𝑅𝑅 )𝑣𝑣 𝑋𝑋+𝑋𝑋 #+ capacitor is given by its reactance XC = 𝑅𝑅) 𝑋𝑋!& '()𝑅𝑅 𝑖𝑖'( 𝑖𝑖='( = (𝑅𝑅 + 𝑋𝑋 𝑍𝑍&+ = 𝑅𝑅, (𝑅𝑅 + " +"𝑋𝑋! )𝑅𝑅!# # 1/2πfC. However, strictly speaking this is ) 𝑅𝑅# (𝑅𝑅 " + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 𝑅𝑅) + 𝑋𝑋& 𝑍𝑍just '( = the magnitude of the impedance at (𝑅𝑅# + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) From this we obtain Zin as: frequency f – it does not account for phase 𝐿𝐿 = (𝑅𝑅" − 𝑅𝑅# )𝑅𝑅# 𝐶𝐶 𝑅𝑅) 𝑋𝑋& shift. Because capacitors and inductors 𝑍𝑍&+ = 𝑅𝑅, + 𝑋𝑋)𝑋𝑋 ) "+ &!) (𝑅𝑅 𝑅𝑅#"𝑅𝑅 cause both amplitude and phase shift 𝑣𝑣'( 𝑣𝑣'(𝑅𝑅# (𝑅𝑅 + 𝑋𝑋+ ! (𝑅𝑅= )𝑅𝑅 𝐶𝐶 + 𝑋𝑋 ) −=𝑅𝑅 = 𝑍𝑍𝐿𝐿'(=𝑍𝑍='( effects when they are used in a circuit, 𝑖𝑖"'( 𝑖𝑖'( # (𝑅𝑅##(𝑅𝑅 +#𝑋𝑋! ) ! a single number, ‘the resistance’, cannot ) 𝑅𝑅indicated # (𝑅𝑅" + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 fully account for their behaviour. As above, R is generally a 𝑍𝑍'( = 𝐿𝐿 = (𝑅𝑅 − 𝑅𝑅 )𝑅𝑅 𝐶𝐶 1 (𝑅𝑅# + 1large ⁄" 𝑗𝑗𝑗𝑗𝑗𝑗value )# # and R2 is generally relatively 𝑅𝑅# (𝑅𝑅" + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗𝑅𝑅) If𝑋𝑋 R was very small Advanced maths 𝑅𝑅 𝑋𝑋 ) & 2 𝑍𝑍'( relatively = 𝑍𝑍 = 𝑅𝑅small. +) )& &+ 𝑅𝑅 ,𝑗𝑗𝑗𝑗𝑗𝑗 𝑍𝑍&+(𝑅𝑅 = +⁄to ,1 compared we To overcome this, we use ‘complex #+ + 𝑋𝑋could ignore R2 in C)𝑋𝑋 𝑅𝑅)X𝑅𝑅 + & & the denominator. Similarly, if R1 was numbers’ to represent impedances 𝑅𝑅# (𝑅𝑅 " + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 )to X we could in circuits containing inductors or very large compared C 𝑍𝑍'( = (𝑅𝑅#the ⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) +1 capacitors. Complex numbers are twoignore XC in numerator. The equation part numbers: they have a real part (like would become R R /X which is an ="(𝑅𝑅 𝑅𝑅##)𝑅𝑅 𝐿𝐿 =𝐿𝐿(𝑅𝑅 −"𝑅𝑅−# )𝑅𝑅 𝐶𝐶 2# 𝐶𝐶1 C standard numbers) plus an imaginary inverted capacitive reactance scaled by part (standard numbers multiplied by R1R2 to give effective inductance L = the square root of –1, symbol j). So R1R2C. These approximations will not complex numbers are of the general be true at all frequencies as X varies, C 𝑅𝑅#"(𝑅𝑅 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) ) 𝑅𝑅# (𝑅𝑅 +"1+ 𝑍𝑍'( 𝑍𝑍='( = (𝑅𝑅 + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) (𝑅𝑅# +#1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) 𝑣𝑣* = 𝑖𝑖" = 5𝑣𝑣'( − 𝑅𝑅" 𝑣𝑣'( 67𝑅𝑅# 𝑅𝑅" + 𝑋𝑋! iin 𝑖𝑖'( = 𝑍𝑍'( = (𝑅𝑅# + 𝑋𝑋! )𝑣𝑣'( (𝑅𝑅" + 𝑋𝑋!R)𝑅𝑅# Out L 𝑋𝑋! ) 𝑣𝑣'( 𝑅𝑅# (𝑅𝑅" + = (𝑅𝑅# + 𝑋𝑋! ) 𝑖𝑖'( 𝑅𝑅) 𝑋𝑋&filter. Fig.6. 𝑍𝑍&+ RL = 𝑅𝑅high-pass , + 𝑅𝑅) + 𝑋𝑋& form A + jB. Capacitors have purely imaginary impedance such that XC = 1/jωC, where ω is the frequency in 𝐿𝐿 = (𝑅𝑅 𝑅𝑅# )𝑅𝑅with # 𝐶𝐶 f in hertz). Using radians (ω" − = 2πf the complex impedance, we can write Zin as: 𝑍𝑍'( = 𝑅𝑅# (𝑅𝑅" + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) (𝑅𝑅# + 1⁄𝑗𝑗𝑗𝑗𝑗𝑗 ) This is still not whole story, as such circuits are often analysed in what is called the Laplace domain. This is a mathematical transformation of circuit equations in time to the Laplace domain variable s, which is a complex number related to frequency. In the Laplace domain the impedance of a capacitor is 1/sC. We can sometimes use s = jω, which takes us to the complex impedance mentioned above. This is all based on advanced mathematics, but using XC = 1/sC and XL = sL you can manipulate the equations using standard circuit theory and standard algebra. To find the equivalence between the terms in Zin = ZLE we write their formulae in the Laplace domain and wrangle them both into a form where all the s terms are isolated – that is s appears on its own, not multiplied or divided by anything; for example, as in (s + 1/CR1), not as Fig.7. LTspice schematic for simulating a gyrator-based RL filter. 60 Practical Electronics | September | 2023 Fig.8. Frequency response of gyrator and ideal inductor-based RL filters from Fig.7. Fig.9. Frequency response of gyrator and equivalent-circuit-based RL filters from Fig.7. 200nF and effective L = 2.0H (more accurately 1.998H). If R = 5.0kΩ then we have a cut-off frequency of 398Hz. Fig.7 shows an LTspice schematic of the RL high-pass filter implemented with the gyrator from Fig.3 (output OutGy) and three potentially equivalent RL circuits for comparison. This first equivalent uses an ideal inductor (output OutRL_I), the second is the equivalent circuit from Fig.4 (output OutRL_SPR) and the third is the same as the second with some parallel capacitance added to the inductor. The simulation is configured to perform AC analysis to obtain the frequency response over the range 1Hz to 1MHz. The component values are set using a SPICE .param directive. This allows all the components to be updated to new values at once. The parallel resistance value for R7 and R10 is set equal to R1-R2 using behavioural resistors – this is an undocumented LTspice feature which allows resistor formulae to be used, which we have discussed previously. The gyrator is implemented using an idealised/general op amp model, specifically UniversalOpamp2 (found at the end of the list of op amps in the component selector). This op amp model has some limitations, such as limited output voltage range, bandwidth and slew rate, which can be changed to investigate their impact on the circuit. The op amp is powered using split ±15V supplies implemented with V2 and V3. Split supplies make it straightforward to handle AC signals and are commonly used with op amps. The input to all the circuits is implemented with V1, which is configured for AC analysis at 1V. Using 1V produces plots with correct gain values in dB from the AC analysis. Results Fig.10. Measuring the cut-off frequency from the response in Fig.9. in (1 + sCR 1). This takes a few steps for both equations and there is further algebraic manipulation to simplify the comparable terms. Readers interested in the gory details can see every step explained in a video by Old Hack EE here: https://youtu.be/zpGm4R9eGJk Simulation We can simulate the gyrator circuit in Fig.3 in LTspice, along with some equivalent circuits for comparison, Practical Electronics | September | 2023 to check how well it implements an inductor. Since gyrators are often used in filters it is appropriate to use the gyrator to implement a simple filter – specifically the first order high-pass RL filter shown in Fig.6. This has a grounded inductor, as required by the gyrator implementation. The filter’s cut-off frequency is given by the wellknown formula f = R/2πL. Using the example values from above for the gyrator: R 1 = 100kΩ, R 2 = 100Ω, C = Some results from simulating Fig.7 are shown in Fig.8, which shows the response of the gyrator and ideal inductor-based versions of the RL filter. It can be seen that in the middle of the frequency range, including around the cut-off frequency, the responses match quite closely. At low frequencies the gain of the ideal inductor circuit (red trace) continues to decrease as frequency decreases, whereas the gain of the gyrator-based circuit (green trace) levels off. This is due to the series resistance present in the gyrator circuit. At low frequencies an inductor is effectively a short circuit, so the circuit becomes a potential divider formed by the frequency-setting resistor (RF in Fig.7, R in Fig.6) and the inductor series resistor. With a series resistance of 100Ω and R in the RL filter having a value of 61 simulation of the RL filter using the gyrator inductor equivalent circuit from Fig.4 along with the response of gyrator circuit itself. It can be seen that the responses are very close, except at high frequencies. The lowfrequency levelling off is very accurate and Fig.11. Default parameters for UniversalOpamp2 in the the matching is also LTspice Attribute Editor. better than for the ideal inductor version in the middle range due 5.0kΩ, the potential divider attenuates to inclusion of the parallel resistance in the signal by a factor of 100/(5000+100) = the inductor equivalent circuit. 0.0196, which is 20log(0.0196) = –34dB. Fig.10 shows measurement of the We see the response in Fig.8 levels off cut-off frequency by zooming in on at around –34dB at low frequencies. the response in Fig.9 and using the The gyrator has a series resistance measurement cursors. The –3dB point is (equal to R2), which is included in the at 427Hz, not 398Hz due to the presence second equivalent circuit, that accounts of the series and parallel resistance for this behaviour. It is worth noting around the inductor. that wound inductors also have series resistance (winding resistance) which results in similar behaviour to that seen Op amp bandwidth here for the gyrator inductor circuit The deviation of the gyrator circuit from at low frequencies. Fig.9 shows the the equivalent circuit at high frequencies Fig.12. Frequency response of gyrator and equivalent-circuit-based RL filters from Fig.7 using the equivalent circuit with the parallel capacitor added to account for op amp GBW. is not due to a fundamental problem with the equivalent circuit but is due to the limited bandwidth of the op amp used in the simulation. The equivalent circuit assumes an ideal op amp, but the UniversalOpamp2 in LTspice has finite gain-bandwidth product (GBW) as one of its model parameters. The value of this and other parameters can be set using the attribute editor (see Fig.11), which is accessed by right-clicking the op amp symbol on the schematic. Fig.11 shows the default UniversalOpamp2 parameters, including GBW = 10MHz. The GBW means that the op amp in the circuit in Fig.7 effectively has a lowpass cut-off frequency of 10MHz. We can model this in the equivalent circuit by adding a capacitor in parallel with the gyrator equivalent inductor. The capacitor should be chosen to give the GBW frequency cut-off in combination with the filter series resistor R2. That is, we need 1/2πR2C = 10MHz, so with R2 = 100Ω, this gives C = 159pF. At low frequencies this additional capacitor is effectively an open circuit and does not change the response of the equivalent circuit. This effect is similar to that of winding capacitance in wound inductors. Fig.12 shows the simulation of the RL filter using the gyrator inductor equivalent circuit with the addition of the parallel capacitor along with the response of the gyrator circuit itself. The two traces now match very closely over the whole frequency range. We can change the op amp GBW to a higher value to produce a more ideal result. To do this, open the attribute editor (Fig.11) and doubleclick the text for value 2: Avol=1Meg GBW=10Meg Slew=10Meg to enable editing. Change the GBW – for example, setting GBW=100Meg. Then click OK to close the attribute editor. This results in the response shown in Fig.13. This is for the equivalent circuit without the additional capacitor, and the gyrator circuit (the same signals as in Fig.9). We see that the gyrator circuit matches the equivalent circuit to a much higher frequency. Using general op amp models such as UniversalOpamp2 provides a straightforward way to explore the effects of op amp characteristics on circuit performance. One parameter can be changed at a time, unlike switching between models of real devices where many characteristics will change. Simulation files Fig.13. Frequency response of gyrator and equivalent-circuit-based RL filters with op amp GBW increased with respect to the circuit used for Fig.9. 62 Most, but not every month, LTSpice is used to support descriptions and analysis in Circuit Surgery. The examples and files are available for download from the PE website. Practical Electronics | September | 2023