On Building Physically Accurate Analogue Switch Macromodels

Barry Harvey, Analogue IC Designer, Analog Devices

Question:

Can I improve the LTspice® model of an analogue switch in case my analogue design contains switches and muxes?

Answer:

Sure; it is not difficult to generate your own models.

Introduction

I was testing a circuit and found many discrepancies from the paper design I used to create it. The dynamics of the circuit were a bit unexpected, andthe noise level was much larger than required. I needed to bring the circuit to a simulator to fully understand it.

The circuit involved analogue switches and op amps. There are good macromodels for the op amps employed, but the analogue switch macromodelwas not designed for generality. In the header of the switch macromodel file is the warning that modelled parameters were only valid for a specific supply and temperature. Well, wouldn’t you know it: my circuit has different operating conditions from the modelled one. The thing about analogue switches is that they are so general-purpose that one operating point is not enough. The existing industry-standard models provide a good start, butif you enter the analogue performance arena, you might need a new macromodeling approach that brings your simulation to a higher level.

As I began to browse through various analogue switch macromodels from Analog Devices and other IC companies, I noticed that all their headers tellof no supply nor temperature dependence being modelled. Thus, I would have to make my own macromodel.

My philosophy in this work is that full transistors in the analogue switches using the simplest device models provide all the behaviours to be emulated,but the interface from control pin to MOS gates should be the simplest behavioural components.

All work here is done with the LTspice simulator; the code would work on other simulators with a translation of the LTspice behavioural devices to SPICE-like polynomial functions.

We will develop the simulated behaviours in a specific sequence.

Developing LTspice Model Parameters for On Resistance

We will use the simplest model to run real MOS devices. To model on resistance, we will employ:

  • W/L, the width (W) divided by the length (L) of an MOS W/L is the size or relative strength of the device.
  • VTO, the threshold voltage; and gamma, which modifies VTO with device back-bias. The back-bias is the voltage between the on device and its body voltage; the body is frequently connected to the positive supply for the PMOS and to the negative supply for the NMOS in the
  • KP, in the model, also known as K’ or K-prime. This parameter models the strength of the process and is multiplied by W/L to scale MOS For a given process, the NMOS will have ~2.5× the KP of the PMOS.
  • RD, the parasitic resistance of the device’s drain.

Different MOS processes have different intrinsic parameters. Table 1 is a collection of common CMOS processes, their characteristics, and estimated intrinsic parameters related to on resistance.

Table 1. Typical Semiconductor Process Parameters

 

Let us look at the ADG333A RON curves we wish to reproduce in Figure 1.

Figure 1. RON as a function of VD (VS), dual supply.

We see a general trend for this and any other analogue switch that higher supply voltage reduces on resistance. As more voltage is applied to the switch MOS gates, the on resistance is reduced. We also see a distinct variation of on resistance with the analogue level. In the N regions, the NMOS transistor in a switch is fully on, and as the analogue voltage rises above the negative rail, the PMOS transistor turns on and helps reduce overall on resistance. The inflection point at region N is roughly a PMOS VTO above the negative supply.

Similarly, in regions P, the PMOS device of the switch is fully on and the NMOS starts assisting the PMOS transistor roughly an NMOS VTO below the positive supply.

Regions M are in the middle of the N and P regions with the NMOS and PMOS working in parallel, but each varying in on resistance depending on the analogue signal level between the supplies.

To start the curve-fitting process, we first estimate the size of each transistor. The low voltage curve gives the best curve-fit for transistor RDS,ON. In region N, with the analogue signal at the negative supply, the PMOS device is off and RON of the part is equal to the RON of the NMOS transistor. With

using the 40V NMOS typical process values, we set RDS,ON = 38Ω from the curve in Figure 1 and using the process quantities given find WNMOS = 2µA/(38Ω × (11 × 10-6µA/V2) × (10V – 0.7V)) = 514µm. The PMOS switch would have an on resistance of 47Ω from the above curve and thus a width of 936µm.

I used the LTspice test circuit in Figure 2. Note that parameters RDN and RDP, the parasitic drain resistances, are of modest value. I started with a value of 1µ, which caused simulator convergence slowdown. The RDN value of 1 allows proper simulation speed. Adding RCONVERGENCE improved simulator noise and speed by giving the toggle node a convergeable conductance. I tested a floating current source for measuring on resistance.

Figure 2. On resistance test circuit.

Figure 3 shows the simulated results for various supplies.

Figure 3. On resistance simulation results with initial model values.

This is a good start. The kink at the low voltage end for VS = 30V is at 3.6V in the simulation and 2.7V in the data sheet. This suggests we reduce the PMOS VTO, but 0.9V is already a realistic minimum. Better to adjust the gamma of the PMOS, which was only a guess anyway.

The kink near maximum supply is 2.5V below the 30V rail, where in the data sheet it should be ~1V. Various values of gamma exaggerated the kink voltage from the rail; we will just set the NMOS VTO to 1V and its gamma to zero. A zero gamma is unexpected, but we’re only trying to curve-fit.Figure 4 shows simulation results from these values with the gamma of the PMOS stepped for several supplies. We focus on the 30V curves, which maximise the gamma effect compared to lower supplies.

Figure 4. On resistance simulation results with gamma-p varied.

From the stepped curves, we’ll choose a PMOS gamma = 0.4.

On to RON. Observe that the 10V curves are representative of the data sheet curve at the supply extremes, but the simulation produces too low a RON for the 20V and 30V curves. The RONs are equal to RDS,ON(NMOS) + RD(NMOS) at the negative supply extreme and RDS,ON(PMOS) + RD(PMOS) at the positive supply extreme. For high supplies, the RD parameter will be more significant than W/L, and for low supplies, W/L willdominate. We have two variables to juggle here; too laborious. We will posit that RON varies with supply due to the NMOS being variably enhanced, butthe RD value doesn’t change with supply voltage (okay, it probably does in the case of drains with drift regions, but let’s keep this simple). If we note the difference in data sheet RON between 10V and 30V supplies (11.4Ω), we can compare that to the above curves where we step only WN (width of the NMOS in the switch). After a bit of iterations of WN in simulations it’s clear that we need WN = 1170µm to get the required ΔRON, quite a lot more than the initial guess. Figure 5 shows our current results.

Figure 5. On resistance simulation results with WN determined.

While the RON of the NMOS has the right supply sensitivity, the curves are too low a value at zero volts, and we must increase the fixed RDN. After increasing and iterating RDN, we get a best value of RDN = 22Ω, and the resulting curves are in Figure 6.

Figure 6. On resistance simulation results with RDN determined.

We next determine WP (width of the PMOS in the switch) to simulate the RON at maximum voltage, and get WP = 1700µm, again quite a lot more than initially guessed. With RDP also set to 22Ω, we get the final RON curve in Figure 7.

Figure 7. On resistance simulation results with WP and RDP determined.

Pretty good agreement here; there are only a few features different from the data sheet. One is that the inflection points are smooth in the data sheet curve but truly pointed in simulation. This is probably because the simple MOS model used does not support subthreshold conduction, and the simulated device turns truly off at VTO. Real devices are not off at VTO, but smoothly reduce current below that voltage.

Another error is most obvious in the 30V curve. RON is 15% low at midsupply compared to data sheet. Perhaps this is due to JFET effects within the drain drift region, also not modelled.

As for temperature, there is fair but not strong compliance, seen in Figure 8.

Figure 8. On resistance simulation and data sheet results over temperature.

The simulation has temperature dependence, but not as much as the data sheet curves. In the simulation model the RD terms do not have tempco. RDs could be modelled by external resistors with correct tempco, but we will leave it as is for simplicity.

Figure 9. Charge injection simulation setup.

The data sheet charge injection test circuit places a voltage source at the D terminal of a switch, and the capacitor Cl at the S terminal of the switch. When the switch transistors are turned off, Cl is isolated and integrates charge pumped into it by the switches. The waveform of such anevent with VD held to 24V with a 30V supply is shown in Figure 10.

Figure 10. Charge injection simulation waveforms.

The charge injected is the voltage jump between V(S) and V(D) times the 10nF hold capacitor. We can step the switch voltage VD across the supply voltage and use the .meas statement to capture the value of charge injection at each voltage. Figure 11 shows the data sheet curve and simulated results.

Figure 11. Charge injection data sheet and simulation waveforms.

Our simple MOS model does not mimic the shape of the data sheet curve very well, but the peak-to-peak charge injection is 32pC in the data sheetcurves and 31pC in simulation. Surprisingly close, but if we had to, we could tweak TOX to perfect the simulation results.

There is an offset between the curves that we can compensate for using CCHARGE_INJECTION. After fiddling with some values, we choose an optimalCCHARGE_INJECTION = 0.28pF. If an opposite polarity of shift were needed CCHARGE_INJECTION would be reconnected to the PMOS_on_when_low node.

The tweak capacitor CCHARGE_INJECTION was a convenient way to offset the charge injection vs. the analogue voltage simulation curve. What if the peak-to-peak injection simulated were too small? Well, most of the charge injection is mostly the switches’ gate voltage swings sending charge through the gate-channel capacitance of the switch transistors. If we simulate too little injection, we can simply increase one or both gate areas. To do this we would increase the parameters L and W of a switch device by the same factor, being careful to not modify the W/L ratio that sets on resistance. Rather than use CCHARGE_INJECTION we could have increased the NMOS W and L.

Alternatively, we could adjust TOX in each device to get better charge injection correlation. This would not be physically possible, but hey - it’s just asimulation. With the simple models we are using, TOX does not influence other behaviours.

Obtaining LTspice Model Parameters for Capacitances

Having set up parameters for good RON and charge injection simulation results, we now simulate S and D terminal capacitances.

One important point is that both the drain and source regions of high voltage MOS switches must have drift regions. As a switch, you can’t tell thefunctional difference between sources and drains, and the body potential to both drains and sources will require the drift regions in each. This is also true of the medium-voltage soft diffusions, but non-existent in low voltage MOS. We have lumped the drift region resistance that would exist inboth drain and source into RD, and that works fine for switches, but not transistors in saturation.

Figure 12 shows our simulation setup.

Figure 12. Off-capacitance test simulation setup.

In LTspice, you can run an .ac on only one frequency, using the list option in .ac, but offer only one frequency argument (1MHz here). Then you run a .step VSOURCE dc voltage across the supply range to get a capacitance vs. voltage sweep.

The D terminal of the off-switch device is held to midsupply. The S terminal, renamed source here to prevent confusion with VS, is driven by a voltage source with dc value sweeping from 0V to VS and with an ac drive of 1V. Capacitance is derived from I(VSOURCE)/(2 × π × 1MHz × 1V). The logic drive V1 is changed to 0V to turn the transistors off.

Drain and source capacitances to bulk are CBD and CBS respectively in the model statement. There are built-in default concentrations, built-in voltage, and exponent in the model that make CBD and CBS voltage variable. Because they are symmetrical, drain and source capacitances would be made equal. Further, because the PMOS is a different width from the NMOS, the ratio of CBD,NMOS/CBD,PMOS = CBS,NMOS/CBS,PMOS = WN/WP, which we established in the on resistance modelling. Figure 13 shows the simulation results.

Figure 13. Off-capacitance vs. dc voltage at VS = 12V (left) and 30V (right) results.

The displays are I(VSOURCE)/(2 × π × 1MHz), which is capacitance. LTspice doesn’t know this and displays pA instead of pF.

Unfortunately, we have no data sheet curves to compare to. We do know from the specification table in the data sheet that the capacitance - probably at midsupply, but not specified in the data sheet - is typically 7pF at 30V supply and 12pF at 12V supply. I adjusted the CBs to obtain the 7pF curve at 30V, but only simulated 10pF at a 12V supply. After fiddling with built-in potential and capacitance formula exponent, the model used allows no flexibility to improve the 12V/30V compliance.

Figure 14 shows the on-state capacitance simulation setup.

Figure 14. On-capacitance test simulation setup.

Here the right switch of a full spdt switch is on, and the left switch is off and connected to a VS/2 source. The capacitances of the right half of the left switch and full capacitances of the right switch, plus inevitable parasitic capacitances at D and S terminals are all paralleled and driven by our 1MHz test signal at the V_s source, whose dc level is stepped across ground to VS. Figure 15 shows the results.

Figure 15. On-capacitance vs. dc voltage at VS = 12V (left) and 30V (right) results.

We simulate 29.5pF and 21.4pF where the data sheet gives 26pF and 25pF. Considering the variability in circuit-board layout capacitance, we’ll call this close enough.

Leakage Currents

The data sheet curves show voltage-dependent pA-level leakage currents at 25°C, but the data sheet specification only guarantees hundreds of pA. I am swayed more by the curves’ results at 25°C. The small leakage currents apparently were not considered important enough in this device toguarantee at test. To be fair, measuring single pA takes a lot of engineering development effort as well as long test times.

At 85°C, the guarantee is a few nA (which can be measured efficiently) with a typical result in the range of a few hundred pA. I’m going to acceptthese typical results as good.

Leakage current is a product shortcoming; it doesn’t have tight statistics and varies wildly with temperature. It is not the kind of specification that we design to - rather, it’s a quantity that disrupts the circuits it’s connected to. For macromodel use, any leakage of proper magnitude will be simulatedas a circuit defect and be a useful warning to the designer. I’ll choose a target of 1nA for an on switch at 85°C.

The model we have shows no leakage beyond RCONVERGENCE and GMIN currents. GMIN is a resistor the simulator places across junctions to assist convergence. It is normally 1 × 10–12 conductance, but in the presence of 30V supplies we can get multiples of 30pA currents, way too high for this work. GMIN will be reduced to 1 × 10–15 in the .options line of the simulation and RCONVERGENCE raised to 1 × 1015.

The physical origin of these leakages is probably mostly from electrostatic discharge (ESD) protection diodes connected to every pin. We will insert them into the simulation setup in Figure 16.

Figure 16. Leakage test simulation setup.

After fiddling with IS in the diode model, we get leakage over temperature in Figure 17.

Figure 17. Leakage test over temperature simulation results.

Logic Interface and Gate Drivers

A purely behavioural logic-to-gate drive circuit is shown in Figure 18.

Figure 18. Behavioural logic-to-gate interface.

The external logic input is at the In terminal at the left of Figure 18. It is the input of an ideal transconductance Glogic_thresholda, which has a piecewise-linear transfer function. For logic inputs below 1.37V, the output at logica node is 0V; for inputs above 1.43V logica is at 1V; and between 1.37V and 1.43V in logica moves linearly from 0V to 1V. Glogic_thresholda thus ignores supply variations to provide a 1.4V input threshold.

Transiently, Cdelaya slows down the logica node so that we can pick off some time points from it. To make a comparator we again use a transconductance, here Gbreakbeforemakena whose output goes from 0V to 1V again but with the threshold skewed a bit above 0.5V. As seen in Figure 19, the skewed pickoff voltages 0.52V and 0.57V rather than 0.5V allow faster turn-off from exponentials falling from 1V than the turn-on time for exponentials rising from 0V.

Figure 19. Break-before-make timing.

Full gate drive voltage is produced by the B_non and B_pon behavioural current sources. B_nona sources a current of VDD/1000 when noden_breakbeforemakena >0.5V, driving the voltage at node nona to VDD, as loaded by a 1000Ω resistor.

When node n_breakbeforemakena <0.5V, the node nona is driven to VSS. Thus, we have a nice rail-to-rail gate drive that complies with supply voltages and has a fixed 1.4V input threshold.

One more characteristic needs explanation. Note that in Figure 20, higher supply voltages reduce the delay times. This is implemented by B_supplysensitivitya, which feeds back to Cdelaya a fraction of its own dynamic current that varies with VDD. Rsupply_sensitivitya drops very little voltage due to Cdelaya current, leaving Cdelaya’s behaviour mostly a pure capacitor. Feeding a replica of Cdelaya’s current back to Cdelayaessentially creates a controllable variable capacitor, and the math inside Bsupply_sensitivitya creates the delay vs. VDD curve in Figure 20.

Figure 20. Break-before-make timing results from simulation and data sheet curve.

Well, our circuit emulates the TON delay as 111ns for VDD = 4V while the data sheet curve says 140ns; and for VDD = 15V simulated delay is 77ns vs. data sheet delay of 60ns. Not great correlation; I’ll leave it to the reader to refine the Bsupply_sensitivity function to do better. At least the break-before-make varies nicely between 15ns and 24ns.

While we don’t have much data sheet data on delay vs. temperature, I added a temperature term in Cdelaya to at least model slowdown when hot, seen in Figure 21.

Figure 21. Timing delays vs. temperature.

Assembling the Macromodel

Figure 22 shows the assembled analogue switch that will become a subcircuit. Hard L and W numbers were placed into the transistor symbols instead of parameters, and all excitation and I/O are removed in favour of pin connections SA, D, SB, In, V , V , and Gnd_pin.

Figure 22. Assembled SPDT subcircuit spdt 40V.asc.

A second logic interface is provided for the other switch of the spdt pair. ESD protection diodes are installed between analogue terminals and VSS and between the logic In and ground. Note that the “-a” suffix in names of the upper logic interface devices and nodes are replicated as “-b” suffix in the lower interface. Glogic_thresholdb interface has the opposite output from the table in Glogic_ thresholda to allow one or the other switch pair tooperate rather than be turned on simultaneously.

An alternative ESD protection scheme involves diodes from a protected pin to both VDD and VSS, and a clamp between VDD and VSS. The data sheet generally gives insight as to the protection scheme, and leakage currents are assigned to both supplies.

The spdt subcircuit is given a symbol and used four times in the master schematic ADG333A.asc of Figure 23.

Figure 23. ADG333A macromodel circuit schematic.

Figure 24 is the test bench schematic for verifying final macromodel results.

Figure 24. ADG333A macromodel test bench.

Summary

We’ve seen how to realise a decent macromodel for a specific analogue switch and how to obtain parameters that support a few different semiconductor processes used to realise the physical device. The resulting macromodel displays defects such as on resistance and its variations, charge injection as a function of supply and signal level, parasitic capacitances and their variations over voltage, logic interface delays, and leakages. Hopefully, the macromodels will be helpful in simulating the real performance of analogue switches.

Addendum

To download LTspice, please visit analog.com/ltspice.

Here is the LTspice text file of the macromodel symbol, to be filed under the name ADG333.asy. It contains subcircuit simulation details. Rather thancopy the ADG333.asc schematic into every schematic that uses it, we use a symbol that refers to it as the .asy. Within the ADG333 symbol areindividual switch symbols. This is the symbol simulation content to be filed as spdt_40V.asc. The actual symbol is to be filed as spdt_40V.asy.

About the Author

Barry Harvey has worked as an analogue IC designer, designing high speed op amps, voltage references, mixed-signal circuits, video circuits, DSL line drivers, DACs, sample-and-hold amplifiers, multipliers, and more. He has an M.S.E.E. from Stanford University. He holds more than 20 patents and has published about as many articles and papers. Barry’s hobbies include repairing used test equipment, playing guitar, and working on Arduino-related projects. He can be reached at barry.harvey@analog.com.