This article has been firstly publicated in **allaboutcircuits**.

## Introduction

LTspice is a very powerful tool for simulating electronic circuits. It can perform simple simulations to verify the functionality of a new design. Besides, complex analyses such as Worst Case Analysis, frequency response, or noise analysis, among others, can be completed in a short time. Filters are critical elements in a circuit for many applications. In particular, Electromagnetic Compatibility (EMC) filters are used to reduce noise and interferences.

To obtain accurate results in the simulations, as close as possible as under a real environment, real effects need to be taken into account. Parasitics play a key role in filtering since they can provoke the opposite effect and amplify the noise. In this article, we will review the different types of noise that are present in a circuit, as well as how to have an accurate simulation of an EMC filter with LTspice.

## Common mode and differential noise

Before designing a good filter, we need to know what kind of noise can be present in a circuit.

According to Kirchoff’s laws, the total current at an electric node is zero, i.e. every current need to go back to its source. The following circuit is simple, but it will serve to explain the two types of noise. The current generated by the voltage supply V1 will circulate through R1 and then it will go back to the source, so to ground or the reference voltage.

In ideal conditions, the only current, and then voltage, present in the circuit will be the one generated by the generator V1. A noise overlapping this signal is named **differential noise**. This noise follows the same direction as the signal, as shown below.

There is a second situation, in which **common-mode noise** appears. In this case, the direction is the opposite from the ground to the load.

To be really effective against interferences, the design of filters need to consider both types of noise. The type of components and their location varies depending on the type of noise to attenuate.

## Bode plots in LTSpice

One of the most interesting analyses that LTspice can perform is the frequency analysis, also known as AC analysis. We are going to see its capabilities with a simple low-pass filter:

For any AC analysis, we need to define one AC source. Many parameters can be configured in a voltage source at LTspice, but amplitude is enough for our purposes. Scale, start and stop frequency, as well as the number of points to calculate are necessary for the definition of an AC analysis.

After running the simulation, we can plot the output level relative to the input, i.e. the filter transfer function. There are two lines, the continuous one corresponds to the magnitude (dB) while the discontinuous corresponds to the phase. We can see that the filter response is flat until reaching the cut-off frequency:

fc=12*R*C=12*1000*10-6=159,16 Hz

## Simulating noise and filters

It is important to clarify this aspect of LTspice. The Software simulates noise that is intrinsic to components, using the “Noise” type simulation. This type of simulation is suitable to verify the functionality of a circuit, as an analog filter. For EMC purposes, we need to simulate common-mode and differential mode noise, so we can be sure that our filters are good for filtering both noise types.

The following circuit is an EMC filter comprised of capacitors and a common-mode choke to attenuate common mode noise (C4, C1, L3), and two inductors and capacitors to attenuate the differential noise (L1, L2, C2, C3).

**Note**: the 3.3 µF capacitors might be too big due to the maximum leakage current accepted within an equipment. There is usually a trade-off between filter attenuation and leakage current.

To simulate a Protective Earth (PE) or a chassis connection, we use a potential that is slightly capacitively coupled to the regular ground or negative potential.

To simulate differential noise, we can superpose a voltage source to the signal generator.

For the case of the common-mode noise, it can be simulated adding a voltage source to the negative lead.

A good filter is good enough when both types of noise are attenuated enough, so never neglect one of the types of noise to focus completely on the other one.

## Ideal vs real filters

Unfortunately, real filters do not behave as well as ideal filters, and they present limitations. If we want simulations close to real results, we need to take into account the parasitic elements of filters, as well as of the board where they will be mounted on.

Parasitic components create resonances that can modify the cut-off frequency of an EMC filter. Therefore, if we do not consider parasitics, we might observe that adding a filter gets the situation worse. Knowing the exact value of each parasitic element can be difficult. Depending on the manufacturer and the given data, values can be obtained from impedances given at different frequencies. In the case that they are not given, they can be estimated to analyze the worst situation possible.

The following schematic shows the same EMC filter presented before, with some parasitics added.

The comparison between the frequency responses of the ideal filter (red) and the real filter (green) is shown below. The frequency response of the ideal filter falls smoothly until its cut-off frequency. On the other hand, the real filter is effective until the frequency of approximately 30 kHz. Hence, we can see that behavior changes considerably when we are close to a real environment.

**Note**: when downloading LTspice models, you should double-check what is contained in the models, because sometimes they include already all the parasitic elements, saving a lot of work.

## Self-resonance and damping

Self-resonances of filters can amplify noise in several dB, provoking an undesired effect. There are some methods to avoid it or, at least, to reduce the negative impact as much as possible. One of them is quite simple and consists of adding one resistance in series with the end capacitor. The value of the resistance does not need to be huge, we only need to be careful about its power rating.

An aspect of capacitors that is normally negative is the Equivalent Series Resistance (ESR), which usually needs to be as low as possible. If we want to reduce the damping of a filter, we can select a capacitor with a high ESR and we could avoid the use of an extra resistor.

The following figure shows the transfer function of a filter without damping resistance (green) and another one, corresponding to the filter with a resistance (blue). The difference between them is quite big since the amplitude around the resonance frequency is reduced by 9 dB. The tradeoff of this technique is that the filter slope is less pronounced, so all the frequency behavior has to be analyzed to ensure that all the results are acceptable.

## Conclusion

LTspice is a powerful tool that saves cost and time in many applications. EMC filters need to be designed specifically for each application, so simulating them in advance saves a lot of time. LTspice performs frequency analysis, which permits the representation of bode plots, the principal tool to study filters. LTspice also can include real parameters such as parasitics to obtain simulations as real as possible.

## Files

If you want to test the circuit on your own, you can download them from the following link EMC filter with LTspice. You will need to download the component libraries from Würth Elektronik.

## References

- LTSpice IV Getting Started Guide https://www.analog.com/media/en/simulation-models/spice-models/LTspiceGettingStartedGuide.pdf?modelType=spice-models
- The LTSPICE IV Simulator, Reference Guide, Gilles Brocard. Würth Elektronik.