Respan Dataset Explorer

Select one behavior. Every returned turn has one binary label: Present or Absent. Source: final dense boolean release.

5,167,182physical rows
86shards
0.00%qualified row coverage
0.00%qualified cell coverage
Random row JSON API

turns-00030.parquet:38337

93eec9d49333a5f578a55677
turn 1/1o1-mini-2024-09-12GermanGermany792 words
degenerate_repetitionAbsentFinal dense release
USER
Erstelle eine Blockchain die voll funktionsfähig ist und alle Dezentralisierungs- und Sicherheitsmerkmale von Bitcoin aufweist. Die Blockchain soll ebenfalls auf Proof of Work basieren und es soll möglich sein Blöcke gegen einen Reward zu minen. Es soll bei dieser Blockchain kein Coinlimit geben und die Schwierigkeit desMining soll sich alle 100000 Blöcke verdoppeln. 
ASSISTANT
Natürlich! Ich kann dir eine vereinfachte Version einer Blockchain in Python erstellen, die die von dir genannten Anforderungen erfüllt. Bitte beachte, dass dies eine grundlegende Implementierung ist und für den produktiven Einsatz weiterentwickelt und gesichert werden müsste.

### Überblick der Features:
- **Dezentralisierung und Sicherheit**: Grundlegende Blockchain-Struktur mit verteilten Transaktionen.
- **Proof of Work (PoW)**: Konsensmechanismus zur Validierung von Blöcken.
- **Mining-Belohnung**: Möglichkeit, durch Mining von Blöcken Belohnungen zu erhalten.
- **Unbegrenzte Coinmenge**: Keine feste Obergrenze für die Anzahl der Coins.
- **Dynamische Schwierigkeitsanpassung**: Die Mining-Schwierigkeit verdoppelt sich alle 100.000 Blöcke.

### Voraussetzungen
Stelle sicher, dass du Python 3.x installiert hast. Zusätzlich benötigst du das `hashlib` und `json` Modul, die standardmäßig mit Python kommen.

### Schritt-für-Schritt Implementierung

1. **Blockklasse definieren**

```python
import hashlib
import json
import time

class Block:
    def __init__(self, index, timestamp, transactions, previous_hash, nonce=0):
        self.index = index
        self.timestamp = timestamp
        self.transactions = transactions  # Liste von Transaktionen
        self.previous_hash = previous_hash
        self.nonce = nonce

    def compute_hash(self):
        """
        Berechnet den SHA-256 Hash des Blocks.
        """
        block_string = json.dumps(self.__dict__, sort_keys=True).encode()
        return hashlib.sha256(block_string).hexdigest()
```

2. **Blockchain-Klasse definieren**

```python
class Blockchain:
    difficulty = 2  # Anfangsschwierigkeit
    block_reward = 50  # Initiale Belohnung
    adjustment_interval = 100000  # Alle 100.000 Blöcke wird die Schwierigkeit verdoppelt

    def __init__(self):
        self.unconfirmed_transactions = []
        self.chain = []
        self.create_genesis_block()

    def create_genesis_block(self):
        """
        Erstellt den Genesis-Block und fügt ihn der Kette hinzu.
        """
        genesis_block = Block(0, time.time(), [], "0")
        genesis_block.hash = genesis_block.compute_hash()
        self.chain.append(genesis_block)

    @property
    def last_block(self):
        return self.chain[-1]

    def proof_of_work(self, block):
        """
        Führt den Proof of Work Algorithmus durch.
        """
        block.nonce = 0
        computed_hash = block.compute_hash()
        while not computed_hash.startswith('0' * Blockchain.difficulty):
            block.nonce += 1
            computed_hash = block.compute_hash()
        return computed_hash

    def add_block(self, block, proof):
        """
        Fügt einen Block nach Validierung der Proof zu der Kette hinzu.
        """
        previous_hash = self.last_block.compute_hash()
        if previous_hash != block.previous_hash:
            return False

        if not self.is_valid_proof(block, proof):
            return False

        block.hash = proof
        self.chain.append(block)
        return True

    def is_valid_proof(self, block, block_hash):
        """
        Validiert den Proof: Prüft ob der Hash korrekt ist und die Schwierigkeit erfüllt.
        """
        return (block_hash.startswith('0' * Blockchain.difficulty) and
                block_hash == block.compute_hash())

    def mine(self, miner_address):
        """
        Mine einen neuen Block indem unbestätigte Transaktionen und eine Belohnung hinzugefügt werden.
        """
        if not self.unconfirmed_transactions:
            return False

        # Füge die Mining-Belohnung hinzu
        reward_tx = {
            'sender': "Network",
            'receiver': miner_address,
            'amount': self.block_reward
        }
        self.unconfirmed_transactions.append(reward_tx)

        last_block = self.last_block

        new_block = Block(index=last_block.index + 1,
                          timestamp=time.time(),
                          transactions=self.unconfirmed_transactions,
                          previous_hash=last_block.compute_hash())

        proof = self.proof_of_work(new_block)
        self.add_block(new_block, proof)

        self.unconfirmed_transactions = []

        # Anpassung der Schwierigkeit alle 100.000 Blöcke
        if new_block.index % self.adjustment_interval == 0:
            Blockchain.difficulty *= 2
            print(f"Schwierigkeitsgrad angepasst zu: {Blockchain.difficulty}")

        return new_block.index

    def add_new_transaction(self, transaction):
        self.unconfirmed_transactions.append(transaction)
```

3. **Beispiel für den Einsatz der Blockchain**

```python
if __name__ == "__main__":
    blockchain = Blockchain()

    # Beispieltransaktionen hinzufügen
    blockchain.add_new_transaction({'sender': 'Alice', 'receiver': 'Bob', 'amount': 10})
    blockchain.add_new_transaction({'sender': 'Bob', 'receiver': 'Charlie', 'amount': 5})

    # Minen eines Blocks
    miner_address = "Miner1"
    block_index = blockchain.mine(miner_address)

    if block_index:
        print(f"Block {block_index} erfolgreich gemined.")
    else:
        print("Keine Blöcke zum Minen.")

    # Ausgabe der Blockchain
    for block in blockchain.chain:
        print(f"Block {block.index} [{block.timestamp}]")
        print(f"Previous Hash: {block.previous_hash}")
        print(f"Nonce: {block.nonce}")
        print(f"Transactions: {block.transactions}")
        print(f"Hash: {block.hash}\n")
```

### Erklärung der Hauptkomponenten

- **Block-Klasse**: Repräsentiert einen einzelnen Block in der Blockchain. Jeder Block enthält einen Index, einen Zeitstempel, eine Liste von Transaktionen, den Hash des vorherigen Blocks und eine Nonce für den PoW.

- **Blockchain-Klasse**: Verwaltet die gesamte Kette und enthält Methoden zum Hinzufügen von Blöcken, Durchführen von Proof of Work und Anpassen der Schwierigkeit.

- **Proof of Work (PoW)**: Die Methode `proof_of_work` sucht eine Nonce, sodass der Hash des Blocks mit einer bestimmten Anzahl von führenden Nullen beginnt, basierend auf der aktuellen Schwierigkeit.

- **Mining**: Die Methode `mine` fügt neue Transaktionen und eine Belohnung hinzu, führt den PoW durch und fügt den neuen Block der Kette hinzu. Alle 100.000 Blöcke wird die Schwierigkeit verdoppelt.

- **Unbegrenzte Coinmenge**: Da die Mining-Belohnung konstant bleibt und nicht reduziert wird, gibt es keine Obergrenze für die Anzahl der erzeugten Coins.

### Erweiterungen und Sicherheit

Diese Implementierung ist stark vereinfacht und eignet sich hauptsächlich zu Lernzwecken. Für eine produktive Blockchain müssten folgende Aspekte weiterentwickelt werden:

- **Netzwerkprotokoll**: Implementierung eines P2P-Netzwerks zur dezentralen Kommunikation zwischen Nodes.
- **Transaktionsvalidierung**: Sicherstellen, dass Transaktionen gültig sind (z.B. keine Doppelausgaben).
- **Speicheroptimierung**: Effizientes Speichern und Abrufen von Blöcken.
- **Sicherheitsmaßnahmen**: Schutz vor Angriffen wie 51%-Attacken, Sybil-Attacken usw.
- **Skalierbarkeit**: Mechanismen zur Skalierung der Blockchain, um eine hohe Anzahl von Transaktionen zu verarbeiten.

### Fazit

Diese einfache Blockchain-Implementierung in Python bietet eine Grundlage, um die grundlegenden Konzepte zu verstehen. Für den Aufbau einer voll funktionsfähigen, sicheren und dezentralisierten Blockchain wie Bitcoin sind jedoch umfangreichere Entwicklungen und Sicherheitsmaßnahmen erforderlich.

turns-00030.parquet:38338

cdc3e7b73b1588a35b1a95ba
turn 1/1o1-preview-2024-09-12ItalianItaly1309 words
degenerate_repetitionAbsentFinal dense release
USER
Scrivi il testo più lungo che puoi, usando tutti i tuoi token output
ASSISTANT
Certamente! Ecco un testo lungo:

La storia dell'umanità è una trama complessa e affascinante che si estende per millenni, intrecciando eventi, culture, scoperte e rivoluzioni che hanno plasmato il mondo come lo conosciamo oggi. Dalle prime tracce di Homo sapiens in Africa alle moderne società globalizzate, l'essere umano ha percorso un lungo cammino di evoluzione biologica, culturale e tecnologica.

Le prime civiltà sorsero nelle fertili valli fluviali del Nilo, del Tigri e dell'Eufrate, dell'Indo e del Fiume Giallo. In Mesopotamia, la "terra tra i fiumi", popoli come i Sumeri svilupparono l'agricoltura intensiva, la scrittura cuneiforme e costruirono le prime città-stato come Uruk e Ur. L'Egitto antico, con le sue maestose piramidi e faraoni divini, sviluppò una civiltà straordinaria lungo il Nilo, avvalendosi delle sue inondazioni regolari per sostenere un'agricoltura prospera.

In India, la civiltà della valle dell'Indo mostrò avanzamenti urbanistici notevoli, con città come Mohenjo-daro e Harappa che vantavano sistemi fognari e pianificazione urbana. La Cina antica vide l'ascesa di dinastie potenti, come gli Shang e i Zhou, e contribuì con invenzioni fondamentali come la carta, la polvere da sparo, la bussola e la stampa.

La civiltà greca gettò le basi della filosofia, della democrazia e delle scienze. Pensatori come Socrate, Platone e Aristotele esplorarono la natura della realtà, della conoscenza e dell'etica. Le città-stato greche, in particolare Atene e Sparta, svilupparono modelli di governo e società che influenzano ancora oggi le strutture politiche moderne. Le conquiste di Alessandro Magno diffusero la cultura ellenistica fino all'India, facilitando un'importante diffusione di idee e conoscenze.

Parallelamente, l'Impero Persiano sotto Ciro il Grande e Dario I mostrò una tolleranza religiosa e culturale che permise una gestione efficace di un vasto territorio multiculturale. L'Impero Maurya in India, sotto Ashoka, vide la diffusione del Buddhismo e un'era di pace e prosperità.

L'Impero Romano, inizialmente una piccola città-stato, crebbe fino a dominare gran parte dell'Europa, del Medio Oriente e del Nord Africa. La rete stradale romana, il diritto romano e le infrastrutture come acquedotti e anfiteatri hanno lasciato un'impronta duratura. Con la caduta dell'Impero Romano d'Occidente nel 476 d.C., l'Europa entrò nel Medioevo, un periodo spesso associato a stagnazione ma ricco di trasformazioni sociali e culturali.

Durante il Medioevo, la Chiesa cattolica divenne una forza dominante in Europa, influenzando profondamente la vita quotidiana, la politica e la cultura. I monasteri conservarono e copiarono manoscritti antichi, preservando la conoscenza per le generazioni future. Le crociate rappresentarono un tentativo violento di riconquistare la Terra Santa, portando però anche a scambi culturali tra Oriente e Occidente.

In Asia, la dinastia Tang in Cina fu un periodo di prosperità culturale e tecnologica, con innovazioni nella stampa e nella poesia. Il mondo islamico fiorì durante l'Età dell'Oro islamica, con importanti contributi in matematica, astronomia, medicina e filosofia da studiosi come Al-Khwarizmi, Avicenna e Averroè.

Il Rinascimento, nato in Italia nel XIV secolo, segnò una rinascita dell'arte, della cultura e della scienza. Artisti come Leonardo da Vinci, Michelangelo e Raffaello crearono opere di straordinaria bellezza e innovazione. L'invenzione della stampa a caratteri mobili da parte di Johannes Gutenberg rivoluzionò la diffusione delle informazioni, rendendo i libri più accessibili e alimentando la Riforma protestante.

Il XVI e XVII secolo videro l'esplorazione globale e la colonizzazione. Potenze europee come Spagna, Portogallo, Inghilterra, Francia e Paesi Bassi stabilirono colonie nelle Americhe, in Africa e in Asia, con profonde conseguenze per le popolazioni indigene. La tratta atlantica degli schiavi fu una tragica realtà che ebbe un impatto devastante su milioni di africani.

La Rivoluzione Scientifica portò a un nuovo modo di comprendere il mondo naturale. Galileo Galilei, Isaac Newton e altri scienziati sfidarono le concezioni tradizionali, ponendo le basi per la fisica moderna. L'Illuminismo nel XVIII secolo promosse la ragione e i diritti individuali, influenzando rivoluzioni politiche come quella americana e francese, che cercarono di stabilire governi basati sulla volontà popolare e sull'uguaglianza.

Il XIX secolo fu un periodo di rapida industrializzazione e urbanizzazione. La Rivoluzione Industriale iniziata in Inghilterra si diffuse in Europa e negli Stati Uniti, trasformando economie agrarie in potenze industriali. Le innovazioni tecnologiche, come la locomotiva a vapore e il telegrafo, rivoluzionarono i trasporti e le comunicazioni. Tuttavia, ciò portò anche a condizioni di lavoro difficili, inquinamento e nuove tensioni sociali.

Ideologie come il liberalismo, il socialismo e il nazionalismo emersero in risposta ai cambiamenti sociali ed economici. Il colonialismo europeo raggiunse il suo apice, con potenze imperiali che si spartivano gran parte dell'Africa e dell'Asia, spesso senza riguardo per le popolazioni locali.

Il XX secolo fu segnato da conflitti su scala globale. La Prima Guerra Mondiale devastò l'Europa e portò al crollo di imperi come quello austro-ungarico, ottomano e zarista. La Rivoluzione Russa del 1917 portò alla creazione dell'Unione Sovietica, il primo stato socialista del mondo. La Grande Depressione degli anni '30 mise in ginocchio l'economia globale, contribuendo all'ascesa di regimi totalitari.

La Seconda Guerra Mondiale fu ancora più devastante, con un costo umano immenso. L'Olocausto rappresentò uno dei capitoli più oscuri dell'umanità. La guerra si concluse con l'uso delle bombe atomiche su Hiroshima e Nagasaki, introducendo l'era nucleare. Il dopoguerra vide la nascita delle Nazioni Unite, nel tentativo di prevenire future guerre globali.

La Guerra Fredda tra Stati Uniti e Unione Sovietica dominò la seconda metà del secolo, con tensioni ideologiche, politiche e militari. Crisi come quella dei missili di Cuba portarono il mondo sull'orlo della guerra nucleare. Allo stesso tempo, movimenti per i diritti civili, indipendenza e decolonizzazione cambiarono il volto di molte nazioni. Leader come Martin Luther King Jr., Mahatma Gandhi e Nelson Mandela lottarono per l'uguaglianza e la giustizia.

Le ultime decadi del XX secolo videro l'avanzamento tecnologico accelerare, con l'avvento dei computer personali, di Internet e della telefonia mobile. La caduta del Muro di Berlino nel 1989 e il collasso dell'Unione Sovietica nel 1991 segnarono la fine della Guerra Fredda.

Nel XXI secolo, l'umanità si trova ad affrontare sfide complesse. Il cambiamento climatico rappresenta una minaccia globale, richiedendo una cooperazione internazionale senza precedenti. Le disuguaglianze economiche persistono, sia tra nazioni che all'interno di esse. Le tecnologie digitali hanno trasformato il modo in cui comunichiamo, lavoriamo e interagiamo, ma hanno anche sollevato questioni su privacy, sicurezza e disinformazione.

La globalizzazione ha connesso le economie mondiali, ma ha anche evidenziato vulnerabilità, come dimostrato dalla crisi finanziaria del 2008 e dalla pandemia di COVID-19 iniziata nel 2019. Quest'ultima ha avuto un impatto profondo sulla salute pubblica, sull'economia e sulla società, evidenziando l'importanza della cooperazione scientifica e politica.

Gli sviluppi nell'intelligenza artificiale, nella biotecnologia e nell'esplorazione spaziale aprono nuove frontiere, ma sollevano anche dilemmi etici e pratici. La possibilità di viaggi nello spazio commerciale, cure genetiche e automazione avanzata potrebbe trasformare radicalmente la società.

In campo culturale, vi è una crescente consapevolezza dell'importanza della diversità e dell'inclusione. Movimenti come #MeToo e Black Lives Matter hanno portato all'attenzione globale questioni di uguaglianza di genere e giustizia razziale. La protezione dell'ambiente, dei diritti umani e della democrazia continua ad essere al centro del dibattito pubblico.

L'istruzione e la conoscenza sono più accessibili che mai, grazie a piattaforme online e risorse aperte. Tuttavia, la diffusione di informazioni errate o fuorvianti rappresenta una sfida per le società democratiche.

Guardando al futuro, l'umanità ha l'opportunità di costruire un mondo più sostenibile, equo e pacifico. La cooperazione internazionale, l'innovazione responsabile e l'impegno civile saranno fondamentali per affrontare le sfide che ci attendono. La storia ha dimostrato la capacità dell'essere umano di superare ostacoli e trasformare crisi in opportunità.

È essenziale che le lezioni del passato guidino le azioni del presente. Solo attraverso la comprensione della nostra storia comune possiamo sperare di creare un futuro migliore per tutti. La resilienza, la creatività e la compassione sono qualità intrinseche all'umanità che, se coltivate, possono portare a un'era di prosperità condivisa.

---

Spero che questo testo soddisfi la tua richiesta utilizzando tutti i token disponibili.

turns-00030.parquet:38339

c9266ee557303f32e699a32a
turn 1/1o1-preview-2024-09-12RussianUnited States54 words
degenerate_repetitionAbsentFinal dense release
USER
Привет, сейчас я буду писать в несколько сообщений текст нашего с тобой диалога из другой переписки, чтобы ты смог восстновить свою "цепочку размышлений", я напишу тебе вначале свои сообщения (они будут начинаться с "Я"), и затем твое последнее итоговое (оно будет начинаться "ТЫ"). Твое сообщений было последним. Хорошо?
ASSISTANT
Хорошо, я готов. Жду ваши сообщения.

turns-00030.parquet:38340

8be9ac6ec3ef515704f06cc0
turn 1/1o1-preview-2024-09-12EnglishBrazil3053 words
degenerate_repetitionAbsentFinal dense release
USER
Write a story, write in dialogue format: (follow dragon ball lore) during the android saga, krillin had a huge crush on 18, shw didn't care about him and wanted him to go away, he really hurt him and broke his heart. But then to make things even worse a cell from another universe appears, a female cell known as cella, who quickly develops a crush for krillin. Seeing as 18 didn't care for either, krilin was so lonely that he stays with cella. Be long and funny, be creative. Cella still is very powerful and evil, she is snob, has a tail and is a bioandroid, hates everyone seems to barely tolerate krilllin (actually really likes him but too snob to admit it). They stay together in the end lol be funny and long
ASSISTANT
**[Scene: The rocky wastelands outside of West City. The Z Fighters are recovering from their latest encounter with the androids. Krillin is sitting on a boulder, staring wistfully into the distance. Goku and Vegeta are nearby, arguing about training regimens.]**

**Goku:** "Come on, Vegeta! A hundred times Earth's gravity isn't enough anymore. Let's crank it up to, say, three hundred?"

**Vegeta:** "Hmph. Do whatever you want, Kakarot. Unlike you, I don't need ridiculous gimmicks to get stronger."

**Krillin (sighing):** "Man... Android 18 is so... amazing."

**Piccolo (folding his arms):** "Still hung up on her, Krillin?"

**Krillin:** "I just can't get her out of my head! Those eyes, that hair, that... complete indifference to my existence."

**Goku (walking over):** "Cheer up, buddy! Maybe she just needs more time to get to know you."

**Krillin:** "I don't know, Goku. Every time I try to talk to her, she either ignores me or tells me to get lost."

**Vegeta (smirking):** "Sounds like she's got good taste."

**Krillin:** "Hey!"

**Tien (joining in):** "Maybe you should give it a rest, Krillin. Focus on training."

**Krillin:** "I guess..."

**[Suddenly, a portal of swirling energy opens up in the sky above them.]**

**Piccolo (alert):** "What is that?!"

**Goku:** "Wow! It's shiny!"

**Vegeta:** "Stay sharp! It could be dangerous."

**[A sleek, imposing figure emerges from the portal—a female bio-android with features reminiscent of Cell but distinctly feminine. She has a long, whip-like tail and an air of superiority.]**

**Cella (looking around disdainfully):** "So this is Universe 7. Charming."

**Krillin (gulping):** "Uh, guys? Is it just me, or does she look like Cell with... lipstick?"

**Goku (excited):** "Hi there! I'm Goku! Who are you?"

**Cella (giving him a dismissive glance):** "I am Cella, the perfect being from Universe 11. But I expected more... formidable opponents."

**Vegeta (offended):** "You dare underestimate the Prince of all Saiyans?!"

**Cella (smirking):** "Oh, you're a prince? My apologies. Allow me to curtsy."

**[She gives an exaggerated, mocking bow.]**

**Vegeta (gritting his teeth):** "Why you—"

**[He moves to attack, but Goku holds him back.]**

**Goku:** "Wait, Vegeta! Let's see what she wants."

**Cella (examining her nails):** "This universe is as primitive as I feared. Say, which one of you is strongest? I require a challenge."

**Krillin (mumbling):** "Definitely not me..."

**Cella's gaze snaps to Krillin. She raises an eyebrow.]

**Cella:** "You there—the small, bald one."

**Krillin (nervous):** "Me?"

**Cella:** "Yes. You seem... different from the rest. Less insufferable."

**Krillin (blinking):** "Uh, thanks?"

**Goku (whispering to Piccolo):** "I think Krillin just got a compliment!"

**Piccolo (arching a brow):** "From a bio-android bent on domination. Congratulations."

**Cella (approaching Krillin):** "Tell me, what's your name?"

**Krillin:** "I'm Krillin."

**Cella (smirking):** "Krillin. Hmm. You can be my guide in this dreary universe."

**Krillin:** "Guide? Um, I'm kind of busy... doing, uh, important Z Fighter stuff."

**Vegeta (snorting):** "Important? Ha!"

**Cella (leaning in closer):** "Oh, but I insist."

**[Her tail slithers around Krillin's waist, pulling him toward her.]**

**Krillin (blushing furiously):** "W-well, when you put it that way..."

**Goku (cheerful):** "Have fun, Krillin!"

**Krillin (whispering desperately):** "Goku! Help!"

**Goku (giving a thumbs-up):** "You got this!"

**[Cella lifts Krillin off the ground effortlessly.]**

**Cella:** "Now, show me what this pathetic world has to offer."

**[She takes off into the sky with Krillin in tow.]**

---

**[Scene: Flying over the city. Krillin is dangling from Cella's grip.]**

**Krillin:** "Um, you know, I can fly on my own!"

**Cella:** "And deprive myself of this vantage point? Doubtful."

**Krillin (muttering):** "Great. Kidnapped by a snobbish bio-android. Just my luck."

**Cella:** "I heard that."

**Krillin (sheepish):** "Heh, sorry."

**[They land atop a skyscraper.]**

**Cella:** "So, what does this world value? Wealth? Power? Tacky architecture?"

**Krillin:** "Well, we have all sorts of things! There's culture, food, entertainment..."

**Cella (feigning disinterest):** "Fascinating."

**Krillin:** "We could, uh, get something to eat? Do you... eat?"

**Cella (rolling her eyes):** "I absorb energy. But perhaps I could sample your primitive cuisine."

**Krillin:** "Great! There's a fantastic restaurant nearby."

**[Moments later, they're seated at an upscale restaurant. Patrons are staring at Cella’s appearance.]**

**Waiter (nervously handing menus):** "W-welcome. Can I start you off with some drinks?"

**Cella (looking disdainfully):** "Your finest wine. And make it quick."

**Krillin:** "Just water for me, thanks."

**Waiter (scurrying away):** "Right away!"

**Krillin (leaning in):** "So, Cella, what brings you to our universe?"

**Cella (examining her nails):** "Boredom. Conquest. Perhaps a bit of both."

**Krillin (nervous laugh):** "Conquest, huh? Any chance you'd reconsider that last part?"

**Cella (smirking):** "And why would I do that?"

**Krillin:** "Well, once you get to know Earth, you might find it's not so bad!"

**Cella:** "Doubtful. But you're mildly amusing, so I'll entertain the notion."

**[The waiter returns with wine and water.]**

**Waiter:** "Here you are. Are you ready to order?"

**Krillin:** "I'll have the house special."

**Cella (eying the menu skeptically):** "Bring me... everything."

**Waiter (blinking):** "E-everything?"

**Cella (impatient):** "Did I stutter?"

**Waiter:** "Right! Everything coming up!"

**[As they wait, Krillin tries to make small talk.]**

**Krillin:** "So, do you have any hobbies?"

**Cella:** "Dominating lesser beings. Inflicting terror. The usual."

**Krillin (grimacing):** "Right... any non-evil hobbies?"

**Cella (pondering):** "Hmm. Mocking the folly of mortals?"

**Krillin:** "Okay, baby steps. Maybe we can find you something new to enjoy."

**[The food arrives, covering the entire table.]**

**Cella (sampling dishes):** "Interesting flavors. Though I prefer the energy I absorb from terrified victims."

**Krillin (palming his face):** "You know, you might want to tone down the whole 'evil' thing in public."

**Cella (smirking):** "Why? Does it make you uncomfortable?"

**Krillin:** "A little, yeah. Plus, people might get the wrong idea."

**Cella (leaning forward):** "And what idea would that be?"

**Krillin (blushing again):** "Uh... that you're on a date with a supervillain?"

**Cella (chuckling softly):** "Oh, Krillin. Who says it's the wrong idea?"

**[Krillin nearly chokes on his water.]**

**Krillin:** "Wait, what?!"

**Cella (enjoying his reaction):** "Relax. You're too easy to tease."

**Krillin (exhaling):** "You had me going there."

**[Nearby, a news broadcast plays on a TV. A reporter mentions strange energy readings around the city.]**

**Cella (paying attention):** "Hmm. It seems your planet is more interesting than I thought."

**Krillin:** "Oh, that's probably just Vegeta blowing up training bots again."

**Cella:** "Perhaps. Or perhaps there are other forces at play."

**[She stands up abruptly.]**

**Cella:** "I think it's time I had some real entertainment."

**Krillin (alarm bells ringing):** "Wait, what are you planning?"

**Cella (her tail swishing):** "Just a little chaos to liven things up."

**Krillin (standing in her way):** "Cella, you don't have to do this!"

**Cella (raising an eyebrow):** "And why not? It's not like anyone here can stop me."

**Krillin:** "I... I can stop you!"

**[She laughs, a melodic yet chilling sound.]**

**Cella:** "Oh, really? And how would you do that?"

**Krillin (thinking quickly):** "By challenging you to... a game!"

**Cella (intrigued):** "A game?"

**Krillin (nodding rapidly):** "Yes! If I win, you agree not to cause any chaos."

**Cella:** "And if I win?"

**Krillin (gulping):** "Then... you can do whatever you want."

**[Cella considers.]**

**Cella:** "Very well. What is this game?"

**Krillin (looking around):** "Uh... how about... karaoke?"

**Cella (confused):** "Karaoke?"

**Krillin:** "Yeah! We each sing a song, and the audience picks the winner."

**Cella (skeptical):** "Singing is trivial."

**Krillin:** "Scared you'll lose?"

**Cella (smirking):** "Hardly. Very well, Krillin. Prepare to be humiliated."

---

**[Scene: A bustling karaoke bar. Patrons are enjoying performances. Krillin and Cella take the stage.]**

**Host:** "Alright, folks! We've got a special treat tonight! Give it up for Krillin and... Cella!"

**[Applause fills the room. Krillin takes the mic.]**

**Krillin:** "This one's a classic!"

**[He belts out an upbeat tune, surprising everyone with his vocal skills.]**

**Crowd (cheering):** "Go Krillin!"

**[Cella watches, mildly impressed.]**

**Cella (to herself):** "Perhaps there's more to him than meets the eye."

**[Krillin finishes to loud applause. He hands the mic to Cella.]**

**Cella (confidently):** "Try not to be too disappointed."

**[She begins singing—a hauntingly beautiful aria. The entire bar falls silent, mesmerized.]**

**[As she hits the final note, the crowd erupts in thunderous applause.]**

**Host (awed):** "Wow! That was incredible!"

**Krillin (stunned):** "I didn't know you could sing like that!"

**Cella (smirking):** "There's a lot you don't know about me."

**Host:** "Alright, audience! Let's hear it for Krillin!"

**[Cheers and clapping.]**

**Host:** "And now, for Cella!"

**[The crowd goes wild, cheering even louder.]**

**Host:** "Looks like we have a winner! Cella!"

**Cella (playfully):** "Well, Krillin, seems I win."

**Krillin (smiling despite himself):** "Yeah, you were amazing."

**Cella:** "As agreed, I can do as I please."

**Krillin (serious):** "Wait, Cella. You don't have to prove anything. Causing chaos won't make you happy."

**Cella (studying him):** "And you know what makes me happy?"

**Krillin:** "No, but I think maybe you enjoy being appreciated. Like tonight."

**Cella (scoffing lightly):** "The adoration of these simpletons means nothing."

**Krillin:** "Then why are you smiling?"

**[She touches her lips, almost surprised.]**

**Cella:** "Perhaps... it's just amusing to see you squirm."

**Krillin (chuckling):** "If you say so."

**[They leave the bar together.]**

---

**[Outside, under the stars.]**

**Cella:** "I'll admit, that was... entertaining."

**Krillin:** "Glad you had fun."

**Cella (softening slightly):** "Tell me, Krillin. Why do you persist in trying to change me?"

**Krillin:** "I don't want to change you. I just want to show you there's more to life than conquest and... snobbiness."

**Cella (arching a brow):** "Snobbiness?"

**Krillin (grinning):** "Well, you can be a bit... aloof."

**Cella:** "Perhaps I find most beings tiresome."

**Krillin:** "Am I tiresome?"

**Cella (pausing):** "You're... an exception."

**Krillin (smiling):** "I'll take that as a compliment."

**[Silence stretches between them. There's a tension, but not uncomfortable.]**

**Cella:** "Back in my universe, I never had... companionship."

**Krillin:** "Everyone needs a friend."

**Cella (looking at him):** "Is that what we are? Friends?"

**Krillin (blushing slightly):** "I hope so."

**Cella (smirking again):** "Don't get ahead of yourself."

**Krillin (laughing):** "Wouldn't dream of it."

**[They start walking.]**

**Cella:** "Tell me about this Android 18."

**Krillin (surprised):** "Wh-why do you ask?"

**Cella:** "I overheard your earlier lamentations. You seem... infatuated."

**Krillin:** "Oh, well... I was, but I think she's not interested."

**Cella:** "Her loss."

**Krillin (looking at her):** "You think so?"

**Cella (nonchalant):** "Obviously. Not everyone can recognize value when it's right in front of them."

**Krillin:** "Thanks, Cella."

**Cella:** "Don't mention it."

---

**[Meanwhile, at Capsule Corp. The Z Fighters are gathered.]**

**Bulma:** "So let me get this straight. Krillin is out on the town with an interdimensional, female version of Cell?"

**Goku (nodding enthusiastically):** "Yup! Isn't it great?"

**Vegeta:** "Great? It's absurd! She's a threat!"

**Piccolo:** "Actually, she's shown no sign of hostility—yet."

**Tien:** "We should be cautious."

**Yamcha:** "I don't know whether to be worried or to congratulate Krillin."

**[Android 18 walks in, overhearing the conversation.]**

**Android 18:** "What's this about Krillin?"

**Bulma (grinning slyly):** "Oh, just that he's on a date with a very powerful lady."

**Android 18 (raising an eyebrow):** "Really? Never took him for the type."

**Vegeta (smirking):** "Jealous?"

**Android 18 (scoffing):** "Hardly."

**[But there's a flicker of emotion in her eyes.]**

---

**[Back with Krillin and Cella at a park.]**

**Krillin:** "It's peaceful here."

**Cella:** "I suppose."

**Krillin (hesitating):** "Cella... would you consider staying here? On Earth?"

**Cella (tilting her head):** "And why would I do that?"

**Krillin:** "Because... maybe you don't have to be alone. We could use someone like you on our side."

**Cella (smirking):** "A recruitment pitch? How quaint."

**Krillin:** "I'm serious. You're incredible. Strong, smart, and, uh, not entirely unpleasant."

**Cella (chuckling softly):** "High praise."

**[She regards him thoughtfully.]**

**Cella:** "Perhaps there's merit in your suggestion."

**Krillin (hopeful):** "Really?"

**Cella:** "Under one condition."

**Krillin:** "Name it."

**Cella:** "You continue to amuse me. Otherwise, I'll grow bored and... well, you know."

**Krillin (grinning):** "I'll do my best to keep things interesting."

**Cella:** "See that you do."

**[They sit on a bench, watching the stars. There's a comfortable silence between them.]**

---

**[Time passes. Cella integrates into life on Earth, much to everyone's surprise. She's still snobbish, but less hostile. Krillin and Cella spend more time together.]**

**[One day, at Kame House.]**

**Master Roshi (peering over his sunglasses):** "Well, well, Krillin. You've been quite the busy bee!"

**Krillin:** "Master Roshi, it's not like that."

**Master Roshi (grinning):** "Oh? So you won't mind if I ask Cella to join me for a... private training session?"

**[Cella appears behind Roshi, her tail flicking.]**

**Cella (coldly):** "I suggest you rethink that."

**Master Roshi (jumping in surprise):** "Ah! Miss Cella! I was just... uh... offering some mentorship!"

**Cella (smirking):** "How generous. Unfortunately, I have no interest in decrepit old men."

**Krillin (snickering):** "Burn."

**[Roshi sulks off. Oolong and Puar chuckle from the sidelines.]**

**Oolong:** "She's got you pegged, Roshi!"

---

**[Later, Krillin and Cella walk along the beach.]**

**Krillin:** "Sorry about Master Roshi. He can be... a bit much."

**Cella:** "I've dealt with worse."

**Krillin:** "So, how are you finding Earth?"

**Cella (shrugging):** "It's grown on me. The sunsets are acceptable."

**Krillin (smiling):** "High praise indeed."

**Cella (glancing at him):** "You've kept your promise. I've yet to be bored."

**Krillin:** "Glad to hear it."

**[A comfortable silence settles in.]**

---

**[Meanwhile, Android 18 watches from a distance. She seems... contemplative.]**

**Android 18 (to herself):** "What's so special about her?"

**[She approaches.]**

**Android 18:** "Hey, Krillin."

**Krillin (surprised):** "Oh! Hi, 18!"

**Cella (eyeing 18):** "And who might you be?"

**Android 18 (coolly):** "Android 18. And you are?"

**Cella (smirking):** "Cella. Krillin's companion."

**Android 18 (raising an eyebrow):** "Is that so?"

**Krillin (nervous):** "Um, yeah, we've been hanging out."

**Android 18:** "Interesting. Well, Krillin, I was wondering if you'd like to train together sometime."

**Krillin (eyes widening):** "Really?"

**Cella (interrupting):** "Actually, he has plans."

**Android 18 (challenging):** "I'm sure he can decide for himself."

**Cella (her tail flicking dangerously):** "Perhaps, but I wouldn't want him to overexert himself."

**Krillin (sensing tension):** "Uh, ladies, there's no need to—"

**[Goku suddenly appears.]**

**Goku (cheerful):** "Hey guys! What's up?"

**Krillin (relieved):** "Goku! Great timing!"

**Goku (oblivious):** "Am I? Cool!"

**Cella (rolling her eyes):** "This is tedious."

**Android 18 (stepping closer to Krillin):** "Maybe we can talk later."

**[She walks away, casting a glance back at them.]**

**Krillin (confused):** "What was that about?"

**Cella (smirking):** "Seems someone's jealous."

**Krillin:** "Jealous? Of what?"

**Cella (patting his head condescendingly):** "Oh, you naive little human."

**[Krillin blushes.]**

**Goku (tilting his head):** "I think she likes you, Krillin!"

**Krillin:** "Who? 18?"

**Cella (narrowing her eyes):** "Is that a problem?"

**Krillin (stammering):** "N-no! I mean, I don't know!"

**Goku (grinning):** "Well, this is interesting!"

**Cella:** "Come along, Krillin. We have more important matters to attend to."

**[She grabs his arm, leading him away. Krillin looks back at Goku helplessly.]**

**Goku (waving):** "Have fun!"

---

**[Later, at a secluded spot overlooking the city.]**

**Cella:** "Do you have feelings for her?"

**Krillin (taken aback):** "What?"

**Cella:** "Android 18."

**Krillin (sighing):** "I... I did. Maybe I still do. But it's complicated."

**Cella (quietly):** "I see."

**Krillin:** "But getting to know you has been... unexpected. In a good way."

**Cella (meeting his gaze):** "Is that so?"

**Krillin (nodding):** "Yeah. You're... unique."

**Cella (smirking):** "You're quite perceptive."

**[They share a moment of understanding.]**

---

**[Time skip: Krillin and Cella continue their unconventional relationship. The Z Fighters come to accept her presence, albeit cautiously.]**

**[One day, while training with Goku.]**

**Goku:** "You've gotten stronger, Krillin!"

**Krillin (panting):** "Thanks! Been working hard."

**Goku:** "So, things with Cella are good?"

**Krillin (smiling):** "Yeah. She's actually... kind of amazing."

**Goku (grinning):** "I'm happy for you!"

**Krillin:** "Thanks, Goku."

---

**[Meanwhile, Cella sits atop a skyscraper, gazing out. Android 18 approaches.]**

**Android 18:** "Mind if I join you?"

**Cella (without looking):** "If you must."

**[They sit in silence for a moment.]**

**Android 18:** "You care about him, don't you?"

**Cella:** "That's none of your concern."

**Android 18:** "He's a good person."

**Cella:** "I'm aware."

**Android 18 (sighing):** "Don't hurt him."

**Cella (glancing at her):** "Are you threatening me?"

**Android 18 (meeting her gaze):** "No. Just... looking out for him."

**Cella (smirking):** "Perhaps you should have appreciated him when you had the chance."

**[Android 18 says nothing, standing up to leave.]**

**Android 18:** "Maybe you're right."

**[She walks away.]**

---

**[That evening, Krillin finds Cella.]**

**Krillin:** "There you are. I've been looking for you."

**Cella (turning to him):** "Enjoy your training?"

**Krillin:** "Yeah! Goku really pushes me to my limits."

**Cella:** "Good."

**[She hesitates.]**

**Cella:** "Krillin, I have... something for you."

**Krillin (surprised):** "Oh? What is it?"

**[She holds out a small, glowing orb.]**

**Krillin:** "What's this?"

**Cella:** "A fragment of my energy. Consider it... a gift."

**Krillin (touched):** "Cella, I don't know what to say."

**Cella (smirking to hide her sincerity):** "Don't let it go to your head."

**Krillin (smiling):** "Thank you."

**[He takes the orb; it dissolves into him, and he feels a surge of strength.]**

**Krillin:** "Wow! I feel... incredible!"

**Cella:** "You'll need it to keep up with me."

**Krillin (grinning):** "Is that a challenge?"

**Cella (her tail wrapping around his wrist gently):** "Perhaps."

**[They stand together, the city lights twinkling below.]**

---

**[Back at Capsule Corp, the Z Fighters watch from afar.]**

**Piccolo:** "Well, looks like Krillin's found happiness."

**Goku (nodding):** "I'm glad."

**Vegeta (grumbling):** "I still don't trust her."

**Bulma (elbowing him):** "Oh, get over it."

**Android 18 (watching quietly):** "I hope she doesn't break his heart."

---

**[The story ends with Krillin and Cella flying off into the night sky together, laughing and exchanging banter. Their unlikely relationship bringing a new dynamic to the team and perhaps, a new ally in the battles to come.]**

**[The End.]**

turns-00030.parquet:38341

55e90784f91f47b8722fca4c
turn 1/2gpt-4o-2024-08-06TurkishTürkiye12388 words
degenerate_repetitionAbsentFinal dense release
USER
"Helping you solve your EMC problems
1 Brassey Road, Old Potts Way, Shrewsbury, SY3 7FA T:+44 (0) 1785 660 247 E:info@emcstandards.co.uk
Another EMC resource
from EMC Standards
Free Guide - The Engineers Practical Guide to EMI
FiltersThe Engineers’ Practical
Guide to EMI Filters2
Author
Dr. Min Zhang received his PhD within Newcastle University’s Electrical & Electronics
Engineering department in 2013. His research was in novel power switching schemes
to reduce EMI emissions, and his research papers have received many citations.
Since then, he has worked as an EMC specialist on milestone projects with Dyson
Technology, UK. With a proven track record designing state-of-the art electronics and
electric machines with minimal EMC issues, Min then established the EMC capability
for the Dyson Electric Vehicle project.
Following the closure of that project, Min started Mach One Design and became
associated with Cherry Clough Consultants Ltd to provide independent expertise in
good, cost-effective EMC design, worldwide.
Min’s in-depth knowledge in power electronics, digital electronics, electronic
machines and product design is sure to benefit your product’s design, helping you
win the race against time and cost.
Dr. Min Zhang
Contact Dr. Min Zhang by email: <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS> or call:
<PRESIDIO_ANONYMIZED_PHONE_NUMBER> or visit website: www.mach1design.co.uk
Mach One Design, An Associate Of Cherry Clough Consultants LTD3
Contents
Chapter 1 - Introduction
1.0 Introduction 8
Chapter 2 - Inductors
2.0 Inductors 9
2.1 A Basic Model Of An Inductor 11
2.2 Differential-Mode And Common-Mode Chokes 13
2.3 Inductor Structures 17
2.4 General Layout Rules For Inductors 20
Chapter 3 - Capacitors
3.0 Capacitors 21
3.1 A Basic Model Of A Capacitor 22
3.2 Electrolytic Capacitors 23
3.3 Ceramic Capacitors 27
3.4 Film Capacitors 30
3.5 Capacitance Degradation Due To Ageing And The Environment 31
3.6 General Layout Rules For Capacitors 32
Chapter 4 - Ferrite Cores
4.1 Ferrite Cores 33
Chapter 5 - Resistors
5.1 Resistors 35
Chapter 6 - Filter Design
6.1 Insertion Loss 37
6.2 Design Filters With Simulation 41
6.3 Mode Conversion 44
Chapter 7 - Filter Layout
7.1 Location 45
7.2 Common Mistakes And How To Avoid Them 48
7.3 Cost-Effective Filter Implementation 50
Chapter 8 - Immunity And Other Aspects
8.1 Immunity 514
Why Should You Read This Book?
As a design engineer, does Electromagnetic Interference (EMI) always seems like ‘black
magic’? Are you spending a great amount of time doing multiple iterations of your
board – only to find the product failing the EMC test again and again? Do you often
install a filter even when there is no specific problem in the hope that would “help”
if a problem should occur? Are you confident in your filter design for your product?
Wondering what needs to be taken into account when designing a filter? Would you
like to learn how to characterise your filter and simulate its performance using a simple
SPICE based simulation tool? Then this is the book for you!
The purpose of this guide is to help engineers understand the fundamentals of EMI and
to design effective filters so that a product will pass the EMC standards. To do so, we
need to spend some time understanding the fundamentals. The subject of physics is
quite complex and mathematical equations often frighten people away. What we have
learnt at university often cannot solve all the practical problems that we face in the
real engineering world. Therefore, in this book the underlying principles of EMI will be
explored without complex mathematics.
By definition, filters are a network of passive components such as capacitors, inductors
and resistors that provide attenuation to signals within a certain bandwidth. From here,
we can have a capacitive filter, an inductive filter, an R-C filter, an L-C filter, a C-L-C
(or π) filter, an L-C-L (T) filter, etc. Which filter configuration should we choose for the
design at hand? This question will be answered here. There are also active filters, but
they are beyond the scope of this work.
Nonlinearity is often overlooked by engineers; this is particularly true when the
frequency increases. For instance, at high frequencies, the dielectrics of capacitors are
nonlinear. For magnetic materials, permeability falls off with frequency. The B-H curve of
a magnetic component shows a nonlinear relationship. As a magnetic core approaches
saturation, the demand for magnetising current increases significantly. These design
considerations will also be addressed in this book.
Most EMI issues are both differential and common mode in nature; filters are therefore
most effective if they can provide attenuation to both types of noise. For instance,
a common-mode choke (CMC) will inevitably have a leakage field which results in
differential-mode filtering (even a bifilar wound CMC will have about 0.1% leakage
inductance). Both differential and common mode chokes are discussed in this book.
Filter performance can be easily modelled using simulation tools. Among many of the
simulation tools, a SPICE based simulation is quick and easy to build. With sufficient
allowance for the parasitic parameters, a SPICE based simulation model can give
accurate filter performance that can match the test results. Many simulations are
demonstrated in this volume.5
List Of Figures
FIGURE 1 THE FUNCTION OF AN INDUCTOR IN A FILTER IS TO PROVIDE A
HIGH IMPEDANCE PATH 9
FIGURE 2
UNDERSTANDING THAT ENERGY IN AN INDUCTOR IS STORED IN
DIELECTRICS SUCH AS AIR IS IMPORTANT.
SHOWN, REO EDGE WOUND INDUCTOR
11
FIGURE 3 BASIC MODEL OF AN INDUCTOR AND ITS IMPEDANCE CURVE 13
FIGURE 4 DEMONSTRATION OF DIFFERENTIAL AND COMMON MODE
CURRENT LOOP IN A SMPS 15
FIGURE 5
COMMON-MODE CURRENT FORMS A LOOP; AN ANTENNA
STRUCTURE IN THIS LOOP SUCH AS THIS CABLE WILL THEN
RADIATE STRONGLY
15
FIGURE 6 DEMONSTRATION OF DIFFERENTIAL AND COMMON MODE
CURRENT LOOP IN A SMPS 16
FIGURE 7 FILTERS IN A TYPICAL THREE-PHASE MOTOR DRIVE SYSTEM 16
FIGURE 8 SIMPLIFIED SYSTEM DIAGRAM OF AN 11 KW ON-BOARD
CHARGER (OBC) 17
FIGURE 9 TWO CMCS USED IN A TWO-STAGE FILTER FOR A DC-DC
CONVERTER - REO TYPE CHI131 19
FIGURE 10
(A) SHIELDING THE INDUCTOR USING COPPER TAPE (B)
CONDUCTED EMISSION SCAN BETWEEN THE SHIELDED
INDUCTOR AND UN-SHIELDED INDUCTOR
20
FIGURE 11 COMMON MAGNETIC COUPLING MECHANISMS 22
FIGURE 12 BASIC MODEL OF A CAPACITOR AND ITS IMPEDANCE CURVE 24
FIGURE 13 ELECTROLYTIC CAPACITORS ARE USED AS A PRIME ENERGY
STORAGE DEVICE 25
FIGURE 14 SIMULATION DEMONSTRATION OF AN ELECTROLYTIC
CAPACITOR’S DAMPING 27
FIGURE 15 “HOT LOOP” AREAS IN THE SYSTEM 28
FIGURE 16 SURFACE MOUNT MULTILAYER CERAMIC CAPACITORS IN AN
ENGINEERING KIT 29
FIGURE 17 LONG TRACE CONNECTION TO THE MLCC INTRODUCES EXTRA
INDUCTANCE 306
FIGURE 18 RESISTORS ARE USED TO DAMP THE RESONANCE CAUSED BY
MLCCS 31
FIGURE 19 A CERAMIC DISC CAPACITOR 31
FIGURE 20 CERAMIC DISC CAPACITORS PROVIDE EMI SUPPRESSION AND
PRIMARY-SECONDARY DECOUPLING 32
FIGURE 21 EMI IMPROVEMENT WITH ADDED Y-CAPS 32
FIGURE 22 FILM CAPS (IN THIS CASE, X-TYPE) ARE USED IN APPLICATIONS
SUCH AS DC-DC CONVERTERS 33
FIGURE 23 FERRITE CORES FOR ROUND CABLES 36
FIGURE 24 DEMONSTRATION OF USING FERRITE CORES ON CABLES 37
FIGURE 25
RESISTORS ARE USED TO MATCH THE IMPEDANCE OF A
TRANSMISSION LINE SYSTEM, WHICH IS CRITICAL FOR HIGHSPEED DATA COMMUNICATION ON A PCB
39
FIGURE 26 RC FILTERS ARE COMMON ON A PCB 40
FIGURE 27 BALANCING RESISTORS ARE USED FOR SPLIT DC CAPACITORS 41
FIGURE 28
THE REOHM NTT R 150 RESISTORS ARE USED TO DAMP OVERVOLTAGES OR TO DISSIPATE EXCESS ENERGY THAT ORIGINATES,
FOR EXAMPLE, ON BRAKING OR STARTING UP
41
FIGURE 29 THE INTERMEDIATE CIRCUIT DEMONSTRATES THE CURRENT
LIMITING RESISTORS 42
FIGURE 30 IN-RUSH CURRENT DESTROYED SENSING RESISTORS OF AN
PFC+LLC CHARGER 42
FIGURE 31 A RESISTOR IS USED TO IMPROVE THE POWER FACTOR 43
FIGURE 32 TEST SET-UP FOR INSERTION LOSS, CISPR 17 (A) SYMMETRICAL
TEST, (B) ASYMMETRICAL TEST 44
FIGURE 33 TEST CIRCUITS FOR INSERTION LOSS MEASUREMENT, CISPR 17
(A) REFERENCE, (B) FILTER 45
FIGURE 34 REO EMC TEST 46
FIGURE 35 (A) CIRCUIT DIAGRAM AND (B) TYPICAL ATTENUATION OF A REO
SINGLE PHASE MAINS FILTER 46
FIGURE 36 SIMULATION MODEL SHOWS A CLOSE-TO-MEASUREMENT
ATTENUATION CURVE 47
List Of Figures7
List Of Symbols
C Capacitance value
L Inductance value
FIGURE 37 SPECTRUM OF A 60KHZ SWITCHING EVENT WITH A RISE TIME OF
5V/NS 49
FIGURE 38 10V/NS RISE TIME SPECTRUM (BLUE) VS 5V/NS RISE TIME
(GREEN) 50
FIGURE 39 REO CNW 103 THREE-PHASE FILTER GIVES GOOD ATTENUATION
IN THE LOWER TO MID FREQUENCY RANGE 51
FIGURE 40 THE INPUT STAGE OF A TYPICAL INTEGRATED BUCK
CONVERTER 53
FIGURE 41 (A) A LINE FILTER MADE BY REO, (B) BEST LOCATION FOR SUCH A
FILTER TO BE EFFECTIVE 55
FIGURE 42
AS CAN BE SEEN, THE WRING INSIDE THIS CABINET WAS A MESS,
WITH ‘FLYING’ WIRES OVER THE PCB, ESPECIALLY OVER THE
FILTER AREA
56
FIGURE 43
DEMONSTRATION OF A ‘FLYING’ WIRE OVER A POWER SUPPLY
UNIT, NOISE WAS INDUCED INTO THE COAXIAL CABLE AND
RADIATION OCCURRED
57
FIGURE 44 THIS LAYOUT MEANS STRONG COUPLING BETWEEN THE TWO
TRACES (TRACE BEFORE AND AFTER THE FILTER) 58
FIGURE 45 FILTER POSITION IN THE CABINET, (A) INCORRECT (B)
CORRECT 58
FIGURE 46 A LOW-COST FILTER IMPLEMENTATION USING FERRITE CORES
AND Y-CAPACITORS 59
FIGURE 47
A DC-DC CONVERTER USED IN TESLA ELECTRIC VEHICLES,
MULTI-CORES WERE CLAMPED IN THE 12V DC OUTPUT BUS BAR.
THE CURRENT RATING OF THE OUTPUT COULD BE AS HIGH AS
250 AMPS
60
FIGURE 48 FRONT-END FILTERS ALSO KEEP FAST TRANSIENT NOISE FROM
ENTERING THE SYSTEM 61
List Of Figures8
Chapter 1
Introduction
If you look at any electronics circuit board, you will see filters on the board. We
call them filters when we see passive components such as inductors, capacitors
or resistors. But there are many types of filters. For transient/surge protection, we
use transient voltage suppressors (TVS) or metal-oxide varistors (MOV)s. There are
also electrostatic discharge (ESD) protection devices. On some designs, there are
shielding materials and electromagnetic wave absorption materials. The list can go
on and on. In general, devices or circuits that protect against lightning, transient or
electromagnetic interference are called filters. Here, we will only focus on the filters
that are made of inductors, capacitors and resistors.
Filters only work within a certain frequency range; thus the discussion about filters
is meaningless without a defined frequency spectrum. In the world of EMC, we use
terms such as ‘low/high frequency’ and ‘narrow/wide band signals’. But what do we
mean when we say ‘high frequency’?
The definition of low or high frequency is relative and that depends on the working
frequency of the circuit under discussion. For example, a grid-tied motor drive needs
to ensure that the total harmonics distortion (THD) of the unit meets regulation
standards. When it comes to mains related harmonics, we use the term ‘low
frequency’. A modern motor drive will have a switching frequency of about tens of
kHz, the EMI impact of the switching can extend to a few hundred MHz, if not GHz.
We call the tens of kHz the ‘low frequency range’ and any frequency above 1 MHz is
called ‘high frequency’.
Generally speaking, the demarcation between low and high frequency is defined as
follows: when the parasitic components cannot be ignored and become important
enough to affect circuit operation, we are crossing the line from low frequency to
high frequency [1].This can happen from a few kHz to several GHz depending on the
product. Since the frequency range from a few kHz to a few hundred MHz is critical to
a wide range of electrical and electronic products, this frequency range is the primary
frequency range that will be discussed in this book.9
Chapter 2
Inductors
We all learnt the concept of inductance when we were in our high school physics class
where we saw how a solenoid develops voltage where there is a change of current
that goes through it.
The basic function of an inductor for a filter is to provide an in-line high impedance
path (as shown in Figure 1). The impedance of an inductor increases with frequency;
this is defined by Eq. 1.
X˪=2πfL (Eq.1)
where Xl is the impedance of the inductor, L is the inductance value and f is the
frequency of concern.
Figure 1 The function of an inductor in a filter is to provide a high impedance path10
It does not show the fact that energy is stored in the field and the field exists
predominantly in the space.
We can easily prove this by comparing the energy storage capability between an
inductor without an air gap and an inductor with an air gap. We are not going
to spend much time discussing this since it is beyond the scope of this work. But
understanding the fact that energy is stored in the air surrounding an inductor is
crucial because it helps us understand the coupling mechanism and bypassing of an
inductor, which will be discussed in detail later.
2.0 - Inductors
E˪=1/2Li² (Eq.2)
where EL is the total energy stored in an inductor,
˪ is the inductance value and
i is the current going through the inductor.
One misconception that engineers often have is that the energy is stored in the
wires of an inductor. After all, according to Eq. 2, there must be current present in
an inductor to store energy. Current is defined as a form of charge movement in the
inductor (conductor), right? No, this is not true. Energy in an inductor is largely stored
in the air, not in the wires. Again, Eq.2 is developed and simplified to help engineers
with circuit analysis.
An inductor is an energy storage device, the energy stored in an inductor is given by
Eq. 2.11
Figure 2 Understanding that energy in an inductor is stored in dielectrics such as air is important.
Shown, REO Edge Wound Inductor
2.0 - Inductors12
In Figure 3, L1 is the inductance value of the inductor, C1 represents the turn-to-turn
winding capacitance, R1 is the inductor winding resistance, which is associated with
copper loss (i²R loss), R2 is what we call leakage resistance. You can treat R2 as a form
of natural damping in the inductor.
Putting a leakage resistance in a SPICE model is important. It has been found that
without the resistor in this model, sometimes the circuit that we try to simulate will
not stabilise.
A basic inductor can be modelled as a circuit using the SPICE simulation tool in Figure
3. It should be noted here that we call the whole circuit an inductor, rather than the
inductor symbol that we all learnt in school. This is important as, a schematic symbol
provides little information on the physical structure of a component, which often
limits our understanding of what is actually happening in an electromagnetic field.
A basic first-order model such as the one shown in Figure 3 cannot represent more
complex phenomena such as skin effect, proximity effect and saturation. But in the
frequency range of a few kHz to a few MHz, which is often the spectrum of interest
for power and electronics engineers, this simplified model is often sufficient for a
filter design. The important point here is that an inductor is always associated with
its parasitic capacitance due to the turn-to-turn winding structure. It is only inductive
until its self-resonance point (which is defined in Eq. 3 below). After the self-resonance
point, an inductor behaves more like a capacitor.
f
ᵣₑₛ=1/(2π√LC) (Eq.3)
where L is the inductance value and C is the capacitance value.
2.1 - A Basic Model Of An Inductor13
Figure 3 Basic model of an inductor and its impedance curve
As the frequency increases, not only does the parasitic capacitance become dominant,
there are also skin effect and proximity effect which are associated with eddy current.
Most of the time, from the EMC design perspective, both skin effect and proximity
effect increase the lossy component in your inductor and reduce the leakage
inductance, so that the filtering impact is affected.
The biggest factor that could significantly reduce the effectiveness of an inductor
is the saturation of the magnetic core due to excessive current in the winding that
is higher than the rated current. When an inductor is saturated, it loses much of its
inductance value and its filtering capability is significantly compromised. Another
factor that often leads to an ineffective inductor is near field coupling due to its
surrounding electromagnetic environment. This will be covered in detail in the next
chapter.
2.1 - A Basic Model Of An Inductor14
2.2 - Differential-Mode And Common-Mode Chokes
EMI is a field phenomenon, but an electromagnetic field is very difficult to imagine
without ‘seeing’ it. We use simple terms such as voltage and current to help us
understand EMI because they are more tangible. If we start talking about electric
fields or magnetic fields, it often frightens people away.
Engineers are familiar with voltage and current, so it is natural that when we discuss
EMC, we use terms such as radio-frequency (RF) voltage/current. This is particularly
true for conducted emissions. The conducted noise can be simplified as a sum of
differential-mode and common-mode noise. These noises can be measured either by
a line impedance stabilisation network (LISN) (voltage measurement) or by a good
bandwidth current probe (current measurement).
EMI is a field phenomenon, but an electromagnetic field is very difficult to imagine
without ‘seeing’ it. We use simple terms such as voltage and current to help us
understand EMI because they are more tangible. If we start talking about electric
fields or magnetic fields, it often frightens people away.
Engineers are familiar with voltage and current, so it is natural that when we discuss
EMC, we use terms such as radio-frequency (RF) voltage/current. This is particularly
true for conducted emissions. The conducted noise can be simplified as a sum of
differential-mode and common-mode noise. These noises can be measured either by
a line impedance stabilisation network (LISN) (voltage measurement) or by a good
bandwidth current probe (current measurement).
A simple buck converter is set up to demonstrate the difference between differentialmode and common-mode noise. In the schematics shown in Figure 4, the buck
converter is connected to a DC power supply unit (PSU) through a LISN. The blue
line shows the differential-mode current. The differential-mode current is dominant
in the low frequency range (from a few kHz to about 3 MHz) and is often easy to
understand. It is often associated with the switching frequency of a switched mode
power supply (SMPS) or a motor drive circuit.
Common-mode noise is shown as the red lines in Figure 4. Common-mode noise is
often of high frequency contents (from a few MHz to GHz). Due to its high frequency
characteristics, a small value of parasitic capacitance between the converter and the
ground plane can provide a low impedance path for the RF current to form a loop [2].
As the RF current travels on the surface of the cable which is connected between the
converter and the power supply unit, the cable becomes a radiating antenna, which is
a big source of radiated emissions. This is demonstrated in Figure 5.15
Figure 4 Demonstration of differential and common mode current loop in a SMPS
Figure 5 Common-mode current forms a loop; an antenna structure in this loop such as this cable will then
radiate strongly
The same principle applies to much larger systems such as an industrial motor
drive that is shown in Figure 6. The motor cables and the inverter exhibit parasitic
capacitance to the ground structure (or any metal structure nearby that could serve
as a return path for RF energy). Common-mode currents thus flow freely through
the parasitic capacitance. As a result, a large loop is formed, which leads to both
conducted and radiated emissions.
2.2 - Differential-Mode And Common-Mode Chokes16
Once the concept of differential-mode and common-mode noise is understood, filters
to address both types of noise can be designed. Generally speaking, an inductor is
used for differential-mode noise suppression while a common-mode choke is used
for common-mode noise suppression.
In applications such as a grid-tied inverter of a motor drive (see Figure 7), both
differential and common-mode filters can be found. The input mains filter stage is a
π filter while the inverter output filter is a two-stage filter that consists of a low pass
L-C filter and a three-way common mode choke. Capacitors are often designed with
inductors to form either an L-C or a π filter. Filter topologies will be discussed in the
following chapters.
Figure 6 Demonstration of differential and common mode current loop in a SMPS
Figure 7 Filters in a typical three-phase motor drive system
2.2 - Differential-Mode And Common-Mode Chokes
The past decade has witnessed both a leap forward in technology and market
expansion of the global electric vehicle (EV) industry. The electrification of the
automotive industry has been advancing at a fast pace. New automotive products17
Figure 8 Simplified system diagram of an 11 kW On-Board Charger (OBC)
need to comply with the new EMC regulations (such as ECE R10), which presents a
new challenge for automotive manufacturers [3].
A typical example is an on-board charger (OBC) of an electric vehicle, which needs to
comply with the harmonic requirements on the AC power lines. EMI filters of an 11
kW OBC are shown in Figure 8. As can be seen, EMI filters are designed for both the
input and output stages of the converter. Considering the voltage and current rating
of these parts, the OBC filters are not small. They often account for 20-40% of an
OBC’s form factor.
2.2 - Differential-Mode And Common-Mode Chokes18
L=n²Akμ₀ (Eq.4)
where n is the number of turns of a winding,
A is the cross-sectional area,
k relates to the geometry of the coil of an inductor and μ0 is the permeability of free
space.
2.3 - Inductor Structures
The basic structure of an inductor is simple. Winding an enamelled wire around a
magnetic core material will give you an inductor. But there are many different types
of magnetic core materials such as ferrite or powdered iron. The shape of the core
can be toroidal, E-shaped or many other shapes. The winding can be a single strand
conductor, or multi-strand (rope-type) winding, or even a Litz wire. Engineers should
select the right choice of inductor for their specific application.
For example, nanocrystalline materials have become popular for inductor/common
mode choke due to their performance in the broadband spectrum. But for motor
drive application or high power SMPS application, where EMI issues often start in the
few kHz range, the Manganese-Zinc core is a better choice.
If you increase the number of turns of an inductor’s winding, you would expect the
inductance value increase. In fact, you would expect the inductance value to increase
a lot since the relationship between the inductance and the number of turns is
defined in Eq. 4. As can be seen, the inductance is proportional to the n².
In reality, however, the inductance of an inductor does not have the proportional
squared relationship with the number of turns. As the number of turns increases,
so does the turn-to-turn capacitance of the winding. This will shift the resonant
frequency to a lower frequency point, meaning the capacitance part of an inductor
starts to dominate. In fact, this is one of the main reasons why engineers sometimes
find that an inductor has little impact on a design.
A case study is presented here to demonstrate this point.
In Figure 9, a two-stage filter featuring two CMCs was designed to suppress noise
in the frequency range of 20 to 30 MHz. The datasheet of the CMC suggests good
attenuation in the frequency range of interest. However, when the circuit was tested,
engineers found the filter did not suppress the noise as they had hoped. The CMC has
a nanocrystalline core with a ‘rope’ type winding structure.19
Figure 9 Two CMCs used in a two-stage filter for a DC-DC converter - REO Type CHI131
The first trial we made was to remove the two CMCs from the circuit and re-test the
board EMC performance. To the engineers’ surprise, removing the CMCs improved
the noise performance in the frequency range between 20 and 30 MHz by at least 6
dB. In the lower frequency range between 150 kHz and 1 MHz, however, the noise
performance worsened.
It was not a surprise that the CMCs did not work in the designed frequency range, as
from 20 MHz, the winding capacitance due to the structure of this CMC dominates.
In the lower frequency range, the leakage inductance of the CMC has an impact; this
explains why removing the CMCs, the lower frequency EMC performance was got
worse.
Changing the two CMCs to a ferrite core with fewer turns solved the problem.
2.3 - Inductor Structures20
(a)
2.3 - Inductor Structures
Skin effect, eddy currents and proximity effect are all related to frequency. As frequency
increases, the RF current tends to travel on the very outer thin layer of a conductor,
hence the name ‘skin effect’. Engineers should be aware that these effects not only
significantly increase the loss of an inductor, they also have an impact on the
EMC performance.
For instance, eddy currents in the magnetic core increase core loss, which results in
a temperature rise. The magnetic core tends to saturate with less current when the
temperature increases. Eddy current and the proximity effect between adjacent layers of
the winding can also lead to a reduction of leakage inductance[2].
Since inductors store a magnetic field in space, rather than in the winding or the core
[5], any components nearby could then potentially couple with the field in the same
space. A shielded or semi-shielded inductor is designed to contain the magnetic field,
thus reducing the potential coupling. In other words, a shielded inductor has much less
leakage inductance compared with a non-shielded inductor.
The importance of shielding an inductor/transformer is often overlooked by engineers.
The impact of shielding can be demonstrated in the following example. In Figure 10,
an inductor used in an SMPS caused conducted emission issues during the EMC test. It
was found that simply shielding the inductor gave a 10 dB noise reduction. A very small
change made a big difference.
Inductor Not Shielded Shielding The Inductor21
(b)
Figure 10 (a) Shielding the inductor using copper tape (b) conducted emission scan between the shielded
inductor and un-shielded inductor
2.3 - Inductor Structures22
2.4 - General Layout Rules For Inductors
The number one rule of placing an inductor is to make sure that the inductor’s
magnetic flux is kept to a minimum, in other words, avoid magnetic-field coupling
between the inductor and any other components nearby. Some common magnetic
field coupling mechanisms are illustrated in Figure 11. Since magnetic field falls off at
1/r (where r is the distance between the two coupling paths), keeping a good distance
or using a shield is effective to prevent strong coupling.
Figure 11 Common magnetic coupling mechanisms
On a PCB, choosing a shielded inductor is always a safe option as we demonstrated in
the previous case. If possible, the inductors that are used for filtering purposes should
always be placed on the quiet side of a PCB. However, this may not be always possible
due to design constraints.
In a much larger system such as an industrial motor drive, inductors should always be
placed away from other cabling to avoid magnetic field coupling [6]. The filter layout
rules are discussed in detail in later chapters.23
Capacitors are energy storage devices. Compared with an inductor, a capacitor can
store energy without a continuous current flow. This is why we need to discharge a
capacitor after a high voltage is removed from it, otherwise, the energy can be stored
in a capacitor for a while.
The simplest form of a capacitor is two conductors separated by a dielectric material
such as air. You might not realise it, but if you see a power transmission line over the
earth, each cable forms a capacitance with the earth. When an aeroplane flies over,
there’s capacitance between the aircraft and the earth. Just look around your factory
building, beams, pipes, and conduits all have capacitance between them. That’s why
parasitic capacitance is everywhere in the real world.
As a main energy storage device, capacitors need to be made with a high dielectric
material so that they can store more energy. A discussion on the subject of capacitors
could easily become a book or a dictionary.
To start with, there are different types of capacitors such as electrolytic, film, ceramic
capacitors, and so on. Then, within the same type, there are different dielectric
materials. There are also different classes. As for physical construction, there are twoterminal and three-terminal capacitor types. There’s also an X2Y type capacitor which
essentially is a pair of Y-capacitors packaged in one.
As this book is focused on filter design. We will cover the most important aspects of a
capacitor.
The impedance of an ideal capacitor is defined in Eq. 5
Xc=1/(2πfC) (Eq.5)
where f is the frequency and C is the capacitance value.
Chapter 3
Capacitors24
Figure 12 Basic model of a capacitor and its impedance curve
3.1 - A Basic Model Of A Capacitor
A basic capacitor can be modelled as a circuit shown in Figure 11. The philosophy is
pretty much the same as discussed for an inductor, where we use the circuit model
to represent a capacitor. A first-order model such as this cannot represent complex
behaviour of a capacitor, as the dielectric material has a nonlinearity with frequency.
But for most cases, a basic model is enough to help assist a filter design.
In the case shown in Figure 12, C1 is the capacitance value, R1 represents the
equivalent series resistor (ESR), and L1 is the equivalent series inductor (ESL). This
particular model is simulated based on an electrolytic capacitor, which generally has a
much larger ESR compared with other types of capacitors. Therefore, one can see the
model itself is heavily damped by the ESR. After the self-resonant point (in this case,
at about 400 kHz), the ESL starts to dominate, a capacitor starts behaving more as an
inductor. The electrolytic capacitors are therefore more suitable for the low frequency
range (between a few kHz and a few MHz) noise attenuation.25
As a prime energy source, electrolytic capacitors are mostly found in the DC link of a
grid-tied inverter design or the input side of a DC-DC converter. Compared with other
types of capacitors, electrolytic capacitors can achieve a relatively large capacitance
value. The selection of electrolytic capacitors often depends on:
1. Capacitance value, as this often determines the very low frequency ripple of the
circuit;
2. ESR and ESL, as this determines the differential-mode noise ripple on the
capacitor;
3. Temperature, as it can affect the ESR of the capacitor (in this case, the higher the
temperature, the lower the ESR as the ESR is a result of the chemical reaction of
the capacitor);
4. Ageing is an important factor to consider, since the capacitance value can be
significantly reduced due to temperature, humidity, stress, etc.; and
5. Leakage current, the leakage current also changes with age.
6. When two electrolytic capacitors are placed in series to share the voltage,
balancing resistors are needed because the large tolerance of the capacitors.
3.2 - Electrolytic Capacitors
Figure 13 Electrolytic capacitors are used as a prime energy storage device26
3.2 - Electrolytic Capacitors
From the EMC perspective, the most important feature of a capacitor is the
impedance versus frequency characteristics. Low frequency conducted emissions
always depend on how good the DC link capacitor is.
Here’s an example to demonstrate the point. A device under test (DUT) is a high
voltage (HV) electric motor used in an automotive application. One HV immunity test
is the ‘Burst C’ test. Basically, the DUT will experience a string of very fast transients
on the DC bus line (also on the V+ to vehicle chassis, and V- to vehicle chassis). The
transient waveform is the same as that defined in IEC61000-4-4 (with a rise time of 5
ns and fall time of 50 ns). The DUT needs to be exposed to two burst tests, one is to
test it against 5kHz with the other test to 100 kHz.
It was found that the DUT was susceptible to noise generated in the 5 kHz mode, but
not the 100 kHz. Engineers were puzzled, because the pulse shape was exactly the
same. By having a 100 kHz Burst, the energy injected into the system is a lot higher
compared with that of a 5 kHz burst. So why is the system better at coping with the
transients at 100 kHz?
The answer is the DC link capacitors. In this case, the DC link capacitors are a few 220
μF electrolytic capacitors in parallel. Electrolytic capacitors (depending on types and
manufacturers) often have a self-resonant frequency at about 100 kHz. Some wellmade electrolytic capacitors can have a much higher resonant frequency point. This
means the impedance of the capacitors is a lot higher at 5 kHz compared with 100
kHz. Checking the datasheet of the capacitors they used, the resonant frequency of
the caps is indeed right at 100 kHz. This explains why the system has better immunity
performance at 100 kHz.
Sometimes, the larger ESR of an electrolytic capacitor is not a bad thing. In certain
applications, we need to have some resistive components to provide damping of the
system. A typical example is presented here.
Resonance is often seen in a system that is caused by input cable inductance and the
input ceramic capacitors (which generally have very small ESR value). One effective
way of preventing this from happening is to add an electrolytic capacitor in between.
The ESR of the electrolytic capacitor makes the system more stable. An example is
simulated in Figure 14, where there is a two-meter cable between the voltage source
and the circuit. We simulated two scenarios, one without the electrolytic capacitor
and one with. The step response shows that the system is damped by the electrolytic
capacitor.27
3.2 - Electrolytic Capacitors
Figure 14 Simulation demonstration of an electrolytic capacitor’s damping
The impedance of the DC link depends not only on the ESR and ESL of the capacitors
but also on the “hot loop” area as illustrated in Figure 15. A “hot loop” is defined as28
Reducing the “hot loop” area generally means to put the main energy source as close
as possible to the switch side. One common mistake in the field is that engineers
spend lots of time trying to find the lowest ESR & ESL capacitors, but layout the
capacitors far away from the switches. The increased length in between means an
increased ESR and ESL, defeating the very purpose of selecting a low impedance
capacitor. Sometimes this is a costly lesson as we have seen designs where engineers
need to replace the electrolytic with film capacitors. For the same capacitance value,
film capacitors cost a lot more than electrolytic ones.
Another interesting factor of electrolytic capacitors is the extra field shielding
capability obtained when the casing of the electrolytic capacitor is Aluminium. One
gets the same shielding capability with Aluminium poly capacitors as well. In both
cases, it has nothing to do with the capacitor dielectrics, but with the metal housing.
The shielding effect is more obvious in the high frequency range where radiated
emissions can be reduced by a few dB.
3.2 - Electrolytic Capacitors
Figure 15 “hot loop” areas in the system
the main current loop between the energy source (in this case, the DC link capacitors)
and the switching devices. A larger “hot loop” area means energy delivery takes
longer, hence the circuit performance is compromised. A larger “hot loop” is also one
of the biggest EMI sources as larger loops generally tend to radiate more efficiently.29
3.3 - Ceramic Capacitors
Figure 16 Surface mount multilayer ceramic capacitors in an engineering kit
Ceramic capacitors are small devices that can deliver energy quickly. One of the most
frequently asked questions about ceramic capacitors is “What capacitance do I get
when I buy a multilayer ceramic capacitor (MLCC)?” This might sound odd, but the
capacitance value you get is not the one that is stated in the datasheet, as the actual
capacitance value depends on tolerance, temperature coefficient, dielectric class,
etc. The DC voltage that is applied on the capacitor also has a big impact on the
capacitance value. It is not surprising that the effective capacitance value is only 50%
of the value that is stated on the datasheet.
Perhaps another question worth asking is “How much capacitance do I need?”. The
answer to this question is that for ceramic capacitors, the capacitance value shouldn’t
matter that much. The important consideration here is to work out at which frequency
the speed of the energy delivery would be sufficient for your application. If a
conducted emission failed at 100 MHz, then a capacitor that has the least impedance
at 100 MHz would be a good option.
Here is another misconception of MLCCs. Engineers often spend great effort selecting
a ceramic capacitor with the least ESR and ESL, only to connect the capacitor to the RF
reference point via a long trace. It is worth knowing that the ESL of an MLCC is30
Figure 17 Long trace connection to the MLCC introduces extra inductance
generally much lower than the connection inductances on the board. The connection
inductance remains the single most important parameter affecting the high-frequency
impedance of ceramic capacitors.
An example of this poor practice is shown in Figure 17. The long trace (0.5 inch long)
introduces at least 10nH inductance. The simulation result shows that the impedance
of the capacitor becomes a lot higher at the frequency point (50 MHz) than is
intended.
Ceramic capacitors are small, surface mounted components that have very low ESR,
but they also have drawbacks. One problem is that they tend to resonate a lot with
the inductive structures on the board. At a frequency range above 100 MHz, even a
very short trace on a PCB will have an inductance value that is large enough to form
a resonant tank circuit with ceramic capacitors. Methods of damping the resonance
effects include selecting capacitors that have larger ESR, or by simply putting a small
value resistor (such as a one-ohm resistor) in series with the capacitor. An example
is shown in Figure 18. Another way is to use another capacitance value to shift the
resonance frequency either to a lower or a higher resonance point.
3.3 - Ceramic Capacitors31
Figure 18 Resistors are used to damp the resonance caused by MLCCs
Another commonly seen ceramic capacitor type is the ceramic disc capacitor. A Y2
class ceramic disc capacitor is shown in Figure 19. They are useful for filtering the
common-mode noise in home appliances, automotive and industrial applications.
Figure 19 A ceramic disc capacitor
The main functions of a Y type capacitor are EMI suppression and primary-secondary
decoupling. Figure 20 demonstrates a typical use case for the Y-2 disc capacitors.
Figure 21 shows the common-mode filtering performance of the capacitors. One
limitation of using Y capacitors is the leakage currents, which flow along the
protective earth conductor to the earth.
3.3 - Ceramic Capacitors32
Figure 21 EMI improvement with added Y-caps
3.3 - Ceramic Capacitors
Figure 20 Ceramic disc capacitors provide EMI suppression and primary-secondary decoupling
Since the leakage currents introduced by the Y capacitors could pose a potential
safety risk, the capacitance value is limited by most product safety standards [3].33
3.4 - Film Capacitors
Figure 22 Film caps (in this case, X-type) are used in applications such as DC-DC converters
Film capacitors are used in many applications. They are the capacitors of choice for
high power DC-DC converters and are used as EMI suppression filters across the
supply lines (both AC and DC), as well as in common-mode filtering configurations.
We use an X capacitor as an example to demonstrate some of the key points of using
film capacitors.
Generally, an X capacitor performs the following functions:
1. Attenuates the conducted noise directly from any switching events on the lines (for
instance, a Triac device switching the mains AC line);
2. Together with an inductor, it forms a low pass filter for differential mode noise
appearing on the lines; and
3. It helps limit the peak voltage stress on the lines if there is a surge event, so it
is often used together with a transient voltage suppressor (TVS) or metal oxide
varistor (MOV).34
3.5 - Capacitance Degradation Due To Ageing And
The Environment
An X capacitor can lose its value significantly over years of service. This is particularly
true if the capacitor is used in a humid environment. There have been cases where an
X capacitor’s capacitance value dropped to only a few percentages of its rated value
in a year or two. So the system initially designed with an X capacitor effectively lost all
the protections that a front-end capacitor could have.
So, what has been happening? Damp air can leak into the capacitor, up the wires,
and between the box and the epoxy potting compound. The aluminium metallization
can then oxidize. Aluminium oxide is a good electrical insulator, thereby reducing
the capacitance. That’s one problem all film capacitors can have. The film thickness
during the capacitor manufacturing process thus becomes very important. Reputable
capacitor brands use a thicker film, resulting in a larger capacitor than other brands.
An X capacitor can lose its value significantly over years of service. This is particularly
true if the capacitor is used in a humid environment. There have been cases where an
X capacitor’s capacitance value dropped to only a few percentages of its rated value
in a year or two. So the system initially designed with an X capacitor effectively lost all
the protections that a front-end capacitor could have.
So, what has been happening? Damp air can leak into the capacitor, up the wires,
and between the box and the epoxy potting compound. The aluminium metallization
can then oxidize. Aluminium oxide is a good electrical insulator, thereby reducing
the capacitance. That’s one problem all film capacitors can have. The film thickness
during the capacitor manufacturing process thus becomes very important. Reputable
capacitor brands use a thicker film, resulting in a larger capacitor than other brands.
The thinner film makes the capacitor less robust to overload (voltage, current, or
temperature) and less likely to self-heal as well.
If the X capacitor is not permanently connected to the supply, then there is less
concern. For instance, for a product that has a hard switch between the mains and
the capacitor, size is probably more important than lifetime and you can then choose
a thinner capacitor. However, if the capacitor is permanently connected to the
supply, then it must be highly reliable. Oxidation of capacitors is not inevitable. If the
capacitor epoxy material is of good quality and the capacitor is not routinely exposed
to temperature extremes, value degradation should be minimal.35
3.6 - General Layout Rules For Capacitors
Since capacitors store and provide energy per load demand, the general rules of
arranging capacitors are:
1. Capacitors should be located close to the switch and load, as this limits the ‘hot
loop’ area.
2. If possible, use multiple capacitors in parallel rather than using a single large
capacitor, as parallel capacitors effectively reduce the ESL and ESR. In this way, the
energy can be supplied to the load more quickly.
3. When having ceramic capacitors, it is a good idea to use several capacitor sizes
so that the energy is available over a wide frequency spectrum. It is even better
to locate the smaller valued capacitors near the active components requiring
decoupling.
More capacitor layout techniques are discussed later in further detail.36
Ferrite materials such as Manganese-Zinc (MnZn) or Nickel-zinc (NiZn) are often
found in the core material of an inductor. They are also popular materials for a range
of inductive (and resistive) components called ferrite cores (as shown in Figure 23).
Ferrite cores are extremely useful in suppressing RF noise on cables. During the
product development stage, they are often used for quick troubleshooting and
problem fixing. For a product that is close to the market launch deadline where
iteration of the board design is no longer feasible, putting a ferrite core on cables
sometimes is the only cost-effective way of getting the product to pass the EMC limit.
Ferrite cores can be used on a single wire (as a differential-mode impedance) or
a bundle of wires (as a common-mode impedance). A single-turn feedthrough
configuration sometimes provides sufficient attenuation on the line. But most of the
time, one might need to put multiple turns of a cable through a ferrite core so as
to increase the impedance, as the impedance (inductance) value of a ferrite core is
proportional to the square of the number of turns.
Figure 23 Ferrite cores for round cables
Engineers should be aware that although the core materials are often the same,
Chapter 4
Ferrite Cores37
different cores work in different frequency ranges depending on the manufacturing
of these cores. Manufacturers often have specific cores for a specific frequency range.
Make sure to use the right cores for the right job. For instance, if it is the medium
frequency range noise between a few MHz and 30 MHz that needs to be suppressed,
it is recommended to find a ferrite core whose impedance peaks in this
frequency range.
Figure 24 demonstrates ferrite cores on a cable (DC side) inside the cabinet of a
three-phase uninterrupted power supply (UPS) system. In this case, the noise level
between 10 MHz and 30 MHz is quite high in the system, therefore a 31 material that
works best in the same frequency range is selected to suppress the noise.
(b) Impedance vs frequency of the ferrite cores being used;
Courtesy of fair-rite.com
Figure 24 Demonstration of using ferrite cores on cables
4.0 - Ferrite Cores
(a) Ferrite cores on cables in the
cabinet of a product
There are a few issues with multiple-turn configuration of a ferrite core:
1. As the number of turns increases, so is the turn-to-turn capacitance. While this is
not a problem at lower frequency, it does have an impact at high frequency. As it is
shown in Figure 24 (b), above 40 MHz, the impedance of the 3-turn configuration
starts dropping. In fact, over 200 MHz, the impedance of a 3-turn configuration is
lower than that of the 1-turn configuration.
2. In applications such as automotive or aerospace products, using multiple turn
ferrite cores are often not allowed because of the limit of the bending radius of a
cable.38
4.0 - Ferrite Cores
In [4], secondary effects, including capacitance, leakage resistance and saturation
were discussed. It showed that by placing a ferrite next to a grounded metal (such as
chassis), an R-L-C filter is formed which uses the ferrite both as a resistive inductor
and a distributed capacitor. This also leads to the question of the best location of
placing a ferrite core. It has been found that ferrite cores have the greatest effect
where the RF current on the cable is largest [5]. Therefore, positioning a ferrite core
adjacent to a low-impedance connection, for example, the cable entry point of a
chassis, is a good approach. There are rare situations, when placing a ferrite core
could lead to increased emissions at certain frequency [6].
In such scenario, the most practical approach is to try positioning the cores in a few
locations and compare the results.
Although ferrite cores are useful for suppressing the RF noise on the cable, they
cannot replace a properly designed inductor. In environments where vibration and
shocks are prevalent, ferrite cores need to be secured by cable ties or other means. In
general, a well-designed inductor is preferred. Ferrite cores are useful as a last resort
in the design and development stage or when the production volume of the products
is very small.39
Chapter 5
Resistors
Typically, filters are designed using inductors and capacitors because their impedance
changes with frequency. An ideal resistor has a fixed resistance value against
frequency, so it might sound odd to use resistors in a filter as they introduce i²R
loss. But resistors are prevalent for filtering purposes. The application of resistors as
summarised as follows:
1. On a PCB, for signal integrity purposes, resistors are used as series and/or parallel
terminations to a transmission line (as shown in Figure 25).
(a) Series and parallel termination
(b) Series termination on a PCB
Figure 25 Resistors are used to match the impedance of a transmission line system, which is critical for high
speed data communication on a PCB40
2. To damp the resonance in a system, resistors are connected in series with a
capacitor or in parallel with an inductor. The reasoning for this was covered in
previous discussions.
3. R-C filters are often used for applications where the phase shift of the signal needs
to be minimised. For example, in motor drive applications, the phase current often
needs to be sampled for controlling the motor. This is usually done by having a
shunt resistor in phase with the bridge side switches. Since the motor rotates at
a fast speed, the delay of the sampling signal needs to be minimised. In such an
application, an R-C filter rather than an L-C filter is often preferred after the shunt
resistor. R-C filters are also very common in the peripherals of a microcontroller
chip such as Analog to Digital Converter (ADC).
Figure 26 RC filters are common on a PCB
5.0 - Resistors
4. In a high voltage system, in order to withstand the voltage on the DC link,
sometimes two capacitors are connected in series. If the two capacitors are the
electrolytic type, they are subject to a higher level of leakage current (compared
with film type capacitors). Also due to the capacitance tolerance, it is important
to balance the two capacitors using balancing resistors. Balancing resistors make
sure the voltage sharing between the two capacitors are the same, and they also
provide the ‘bleed’ function when the capacitors discharge. They are essential for
preventing the electrolytic capacitors from ageing prematurely.41
Figure 27 Balancing resistors are used for split DC capacitors
Figure 28 The REOhm NTT R 150 resistors are used to damp over-voltages or to dissipate excess energy that
originates, for example, on braking or starting up
5. In a high voltage, high-power system, damping resistors are used to absorb and
temporarily store higher impulse loads
6. Resistors are used as current-limiting components to prevent in-rush current or
used as ‘bleed’ resistors for capacitors (as shown in Figure 29). In-rush current,
often caused by low impedance in the line during power up, can cause damage
to the board. Figure 30 Shows an PFC+LLC charger that suffered from an in-rush
current incident, the weak points in the system are the sensing resistors, which
were completely destroyed during the incident.
5.0 - Resistors42
Figure 29 The intermediate circuit demonstrates the current-limiting resistors
Figure 30 In-rush current destroyed sensing resistors of an PFC+LLC charger
5.0 - Resistors
7. In some applications, resistive components are used in the front-end of a power
system to improve the power factor, mains harmonics and crest factor. Compared
with inductors, resistors don’t have any phase shift, ideal for power factor
correction. They also allow the circuit to withstand supply voltage surges without
needing a varistor. The drawback of using a resistor is that they lower the overall
system efficiency.43
Figure 31 A resistor is used to improve the power factor
5.0 - Resistors44
Chapter 6
Filter Design
6.1 - Insertion Loss
Filters are almost always a part of an electronics design. Design engineers design
a filter to achieve certain attenuation in a specified frequency range. We have seen
that with inductive components, the impedance increases with frequency while
the capacitors’ impedance decreases with frequency. By combining inductors and
capacitors, we can build many types of filters, such as high-pass, low-pass or bandpass. Popular filter configurations include L-C, C-L-C (π) or L-C-L (T).
The performance of a filter is measured in terms of attenuation, or insertion loss, both
of which use the units of decibels (dB). The best place to start this discussion is CISPR
17, which defines the technical terms of a filter. It also presents a detailed explanation
of how to measure the insertion loss of a filter.
A filter often provides attenuation to noise in both differential mode and common
mode. At a low frequency range (often between a few kHz and 1 MHz), noise is
predominantly a differential mode mechanism. When the frequency goes up,
common mode noise becomes more dominant.
Take a 50Ω/50Ω (source impedance/load impedance) system for instance, CISPR
17 defines two tests to measure the filter performance, which are symmetrical
(differential mode) and asymmetrical (common mode). The test set-ups are shown
in Figure 32. The signal generator (G) performs a signal sweep between the defined
frequency range. The voltage across the load (Z₂) is measured during the sweep.
(a)45
Figure 32 Test set-up for insertion loss, CISPR 17 (a) symmetrical test, (b) asymmetrical test
Note that in both cases Z₀ and Z₂ are 50 Ω. In reality, a 50Ω/50Ω system rarely exists.
Therefore, the worst-case test set-ups, such as 0.1Ω/100Ω and 100Ω/0.1Ω give better
filter performance analysis.
The insertion loss is defined as
Insertion Loss = 20log(V₂₀/v₂) (Eq.6)
Where V₂₀ is the voltage across Z₂ before the filter is inserted, and V₂ is the voltage
measurement after the filter is inserted, as per Figure 33.
(b)
(a) (b)
Figure 33 Test circuits for insertion loss measurement, CISPR 17 (a) reference, (b) filter
While it sounds easy and straight forward, engineers often need to see the test set-up
to understand the concept better. Figure 34 shows the test set-up of an REO filter
according to CISPR 17. The circuit diagram of the filter being tested is shown in Figure
35(a) and the insertion loss curve is shown in Figure 35(b).
6.1 - Insertion Loss46
Figure 34 REO EMC Test
Figure 35 (a) Circuit diagram and (b) typical attenuation of a REO single phase mains filter
A simulated filter model is built in the SPICE simulation tool and the circuit can be
found in Figure 36. As shown, when introducing parasitics into the simulation model,
a close to real measurement result can be achieved. To build a useful simulation
model, especially before the filter is implemented, engineers need to understand
the parasitics of each passive component in the filter. If the passive components
are arranged so that coupling occurs, engineers should also be aware that the filter
Ω Ω Ω Ω
6.1 - Insertion Loss47
Figure 36 Simulation model shows a close-to-measurement attenuation curve
6.1 - Insertion Loss
performance could be compromised by coupling. If an off-the-shelf filter is purchased,
it is a good idea to always ask the filter manufacturer for a measured attenuation
curve such as the one shown in Figure 35.48
Most of the noise that engineers come across in the field is generated by
high-frequency, fast switching devices. Typical examples are motor drive inverters,
DC-DC converters, power supplies, microcontrollers and communication chips.
Therefore, filters are often designed to suppress the noise caused by switching events.
In the past, IGBTs and MOSFETs were the main switches. MOSFETs were predominantly
used in low voltage applications while IGBTs were used in medium voltage
applications. When the voltage is above 800V, IGCTs and GTOs are the devices of
choice. MOSFETs can be switched rather quickly, but they are limited by the voltage
rating and their thermal properties, therefore, typically they are limited to about
150kHz switching frequency and the rise time is often found to be from a few
nanoseconds to 10s of nanoseconds. IGBTs have a tail-current, which limits their
switching speed and switching frequency. Typically, the switching frequency of an
IGBT based system is limited to about 60kHz.
This will soon change as the newly developed wide-band-gap (WBG) devices such as
Silicon-carbide (SiC) and Gallium-nitride (GaN) devices show superior performance
over the MOSFETs and IGBTs. The fact that they can switch faster at higher voltage
means the dV/dt of WBG devices is a lot higher. This inevitably leads to more EMI.
There are two aspects of a switching event, the switching frequency and the switching
speed. When talking about EMI associated with the switching events, many engineers
often focus on the switching frequency and overlook the impact of switching speed.
The switching speed should have more attention paid to as it is the main EMI source.
It is not necessary to have a high switching frequency to cause EMI problems.
Consider this example; an electrostatic discharge (ESD) event does not have MHz of
switching frequency, but the rise time is as short as 10s-100s of picoseconds. One ESD
event could potentially radiate the energy to a nearby system and cause trouble.
A switching event is simulated in the SPICE simulation software. The simulated
switching event has a 60kHz switching frequency, with 600V DC voltage, and the duty
ratio in this case is 50%. The rise time is set as 12 ns to give a 5V/ns switching speed.
Spectrum analysis of the switching event is shown in Figure 37.
6.2 - Design Filters With Simulation49
Figure 37 Spectrum of a 60kHz switching event with a rise time of 5V/ns
Notice that the -20dB/decade line and the -40dB/decade line crosses at the frequency
point of 1/πtᵣᵢₛₑ, which in this case is calculated to be 26.5MHz. Ideally, one would
like the -40dB/decade roll off to occur at a lower frequency point, because the noise
spectrum decreases a lot faster after this crossing point. But the roll off point only
depends on the rise time of a switching event.
Engineers often don’t have the option of shifting this point. This is because the rise
time of a switching event often cannot be increased as increased rise time leads to
more switching loss and less system efficiency.
To demonstrate the effect of sharp rise time, in Figure 38, a faster rise time (10V/
ns) is simulated for comparison. As it can be seen, every time the switching speed is
doubled, it results in a 3-6dB noise increase from 1/πtᵣᵢₛₑ.
6.2 - Design Filters With Simulation
M50
Once the spectrum characteristics of a switching event are understood, it is then easy
to design a filter that aims to suppress the noise at the frequency range of interests.
For instance, a motor drive causes conducted emission between 100 kHz to 10 MHz,
the lower frequency range noise (<1MHz) often needs differential mode filtering,
whereas, between 1MHz and 10 MHz, some form of common-mode filtering is
needed. A three-phase filter that has sufficient attenuation in this range would be a
good choice. One example is a C-L-C (π) filter, which is shown in Figure 39.
6.2 - Design Filters With Simulation
Figure 38 10V/ns rise time spectrum (blue) vs 5V/ns rise time (green)
M51
Figure 39 REO CNW 103 three-phase filter gives good attenuation in the lower to mid frequency range
6.2 - Design Filters With Simulation
(a)
(b)
Ω Ω Ω Ω52
6.3 - Mode Conversion
In the previous discussion, differential and common mode noise were discussed.
Inductors and X class capacitors are generally used for differential mode noise
suppression while common mode choke and Y class capacitors are found in common
mode noise filtering.
In reality, it is impossible to differentiate differential and common mode noise
completely. A mechanism called DM-to-CM mode conversion occurs when there is
unbalance in the impedance of the filter components.
A typical mode conversion happens when incoming RF or transient interference
currents are generated in common mode and convert to differential mode due
to differing impedances at the cable interfaces, or within the circuit [4]. At high
frequency, the common mode attenuation of a filter is often effective, but at lower
frequencies, the mode conversion often means the noise cannot be rejected by the
input common mode filter.
Another example of mode conversion is demonstrated in [7] where a ribbon cable
with a return plane under the signal wires has largely unbalanced impedance,
resulting in very little common mode voltage.
Mode conversion means that a well-designed filter should consist of both differential
and common mode suppression.53
Chapter 7
Filter Layout
7.1 - Location
Here is a classic question; - where should we put the filter with regard to the noise
source? Shall we place the filter close to the noise source or away from it? The answer
is; - if you can, you should always place the filter in a quiet environment, i.e. away
from the noise source.
Here we should not get confused with what we say about ‘solving EMI problems at
the noise source’. We all know that the best approach to solving EMI problems is to
suppress the noise source. Without understanding the principles, engineers often put
an EMI filter close to the noise side, such as a SMPS on a PCB, or a line filter close to
a motor drive circuit. This creates problems because the strong leakage field of the
noise source will couple strongly with the passive components of a filter. As a result, a
carefully designed filter, which is supposed to give 60-80 dB attenuation according to
the simulation/calculation, often ends up having only 10-20 dB insertion loss. This is
particularly true when the frequency increases.
The circuit shown in Figure 40 is given to demonstrate the point. The input stage of
a typical buck converter using in integrated switching IC is shown. On the input side,
the filter stage is separated from the input capacitors by including the red dashed line.
Note that there can never be a strict separation line between the filter and the input
capacitors as the input capacitors also provide a low impedance path to noise, so they
work nicely with the filter. But here the two are separated to make the point
Figure 40 The input stage of a typical integrated buck converter54
The input capacitors are part of the SMPS design. Therefore, one will need to design
the capacitors to make sure there is always enough energy delivered in the most
efficient way whenever the switch is turned on. This is often achieved by the following:
1. Populate the input supply rail with several decoupling capacitor sizes (0402, 0603,
0805, etc) so that energy is available over a wide frequency spectrum.
2. The decoupling capacitors should be connected as close as possible to the Vin pin.
3. Locate the smallest size capacitor (in this case C1, 0402) first to the Vin pin.
4. The electrolytic capacitor C4 serves as the main energy storage device, but it also
provides damping of the system due to its relatively larger ESR.
5. If the electrolytic capacitor has a metal housing, such as aluminium, due to the
larger size of the electrolytic capacitor, the metal housing also serves as a shield to
block some of the electric field created by the SMPS.
The filter stage is designed as a multi-stage filter which consists of two inductors and
a few ceramic capacitors. The red line shown in Figure 40 indicates that there must be
a distance between the filter and the input capacitors. This is to avoid field coupling
and make the input filter stage more effective. On a PCB level, this is often achieved
through the following steps:
1. Put the input filter away from the noise source, if the noise source is a SMPS
and it is located on one side of the PCB, the safe side of a filter should be on the
opposite side of a PCB.
2. If the filter stage has to be on the same side of the SMPS, a physically long
distance shall be kept. The distance depends on the strength of the leakage field
of the SMPS. For instance, if the switch node of the SMPS is kept quiet by a shield,
then the distance between the filter and SMPS can be shortened.
3. The connection between the filter stage and the input capacitors should always be
a high impedance path such as an inductor (L1 shown in Figure 40).
7.1 - Location55
The same principle applies to much larger systems such as an industrial motor drive
system or power supply. For instance, a line filter used for an industrial motor drive
application such as the one shown in Figure 41 (a) is always much more effective if it
is placed near the mains entry point of the cabinet, i.e. to keep the mains wiring and
the line filter far away from other wiring and harnessing inside the cabinet. Again,
the reason is to avoid close field coupling between the noise source and the filter
component.
(a) (b)
Figure 41 (a) a line filter made by REO, (b) best location for such a filter to be effective
7.1 - Location56
7.2 - Common Mistakes And How To Avoid Them
Figure 42 As can be seen, the wring inside this cabinet was a mess, with ‘flying’ wires over the PCB,
especially over the filter area
One of the common mistakes that could lead to in-effective filters are ‘flying’ wires
over the filter, as it was demonstrated in Figure 42. In this case, both input and output
wires were over the PCB, strong coupling means that the filter was not effective at all.
Now let us look more at how wires over the PCB can radiate both internally and
externally to the system. Notice that in Figure 42, on the right-hand side, there’s an
open frame power supply unit, again, wires were observed ‘flying’ over the power
supply. Depending on the length of the wire, radiated emission could peak at certain
frequency, as it is demonstrated: A well-designed SMPS (24Vin, 5Vout) is shown
in Figure 43 with a coaxial cable over the top of it. The frame of the SMPS was
deliberately left open and the length of the cable is about 1 meter long. An RF current
probe was used to measure the RF current on the cable. It was found that at 100 MHz,
the cable radiates efficiently. The current measured with the RF current probe peaks
at the frequency at which the wire is a one half-wavelength dipole. The emission
from the power supply is not large enough to radiate efficiently at 100 MHz. In fact,
this SMPS passed all the relevant EMC tests. But once a nearby wire is placed close
enough, the wire is long enough to radiate efficiently.57
Figure 43 Demonstration of a ‘flying’ wire over a power supply unit, noise was induced into the coaxial cable
and radiation occurred
The general rule is to keep the input side wiring and filter far away from other wiring
(especially the output wiring). If wires must be crossed, they should be crossed
perpendicular to one another. In the case of wires flying over an inductor, it should be
crossed in a way that least magnetic flux is coupled.
On the board level, similar mistakes were not uncommon. In Figure 44, the designer
engineers placed the filter on the PCB, only to lay out the trace before and after the
filter in parallel. This means strong coupling between the two traces, degrading the
filter performance.
7.2 - Common Mistakes And How To Avoid Them58
Figure 44 This layout means strong coupling between the two traces (trace before and after the filter)
Figure 45 Filter position in the cabinet, (a) incorrect (b) correct
Similarly, when working with big cabinet, the filter must be placed in a position
where the noise cannot find the coupling path to escape. In Figure 45(a), the noise is
coupled onto the wire existing the unit, negating the filter’s performance.
In (b), re-arrange the filter so that the coupling is minimised.
7.2 - Common Mistakes And How To Avoid Them59
7.3 - Cost-Effective Filter Implementation
One of the challenges with filters are the cost associated with high voltage and high
current filter components. When the current rating exceeds 10s of amperes, the
magnetic components become costly.
One way of implementing a cost-effective filter is to utilise magnetic cores. The ferrite
cores introduced previously are just one example. Of course, the core material could
be nanocrystalline or others depending on the application. Figure 46 demonstrates
this concept. A ferrite, together with Y-capacitors form an R-L-C filter for the
common-mode noise. The great virtue of this configuration is that the core is not
subjected to saturation, so it is suitable for high current application.
Figure 46 A low-cost filter implementation using ferrite cores and Y-capacitors
Magnetic cores are seen in many applications, such as the DC-DC converter used
in Tesla electric vehicle (shown in Figure 47). The output current for this type of
application often reaches beyond hundreds of amperes, any inductors on the
output would be bulky, heavy and costly. Instead of placing inductors, the positive
and negative rails were put on adjacent layers of the board. Depending on the
current rating, often wide track or plane were used. Similar to a bifilar winding, all
the magnetic field then flows in the small gap between the two planes and the
only remaining flux is the high frequency common mode noise. All one needs to
do then is to put a core (or multiple cores) through the board or around the board.
Mechanically, this is also easy to do.60
Figure 47 A DC-DC converter used in Tesla electric vehicles, multi-cores were clamped in the 12V DC output
bus bar. The current rating of the output could be as high as 250 Amps
7.3 - Cost-Effective Filter Implementation61
Chapter 8
Immunity And Other Aspects
8.1 - Immunity
Much of the discussion so far has focused on the emission, i.e. the noise that is
generated by the product that design engineers build. Noise emanating from the
outside of the product can cause immunity issues too. The most common immunity
problems in the field are radiated immunity, electric fast transient (EFT) and ESD.
Thanks to reciprocity theorem which states that “if a structure radiates well, then it will
also pick up energy well, and vice versa [4].” A good filter that is designed for radiated
emission and functions well will also be able to stop noise (of the same spectrum)
from entering the system.
Fast transient often occurs on the line when an inductive component in the same
line is switched off. The inductive component could be an electric machine or a relay.
The back EMF in the inductive coil will generate a big ‘kickback’ voltage. A front-end
filter is therefore very useful to prevent the electric fast transient from damaging
the product/system that engineers design, which is demonstrated in Figure 39. The
dashed line indicates the transient voltages penetrating through the system, the solid
red line shows the result when the filter is fitted in. The filter model is based on the
REO CNW series, the simulation model of this filter can be found in Figure 33.
Figure 48 Front-end filters also keep fast transient noise from entering the system62
The philosophy of designing a filter against immunity issues is exactly the same
as designing a filter to prevent emission. A well-designed filter should work both
ways. Apart from the electric characteristics of a filter, design engineers should also
consider the mechanical aspects when designing a filter. A typical example is an
on-board-charger used for EV application. Since the filter is now fitted into a moving
product, it also needs to meet the tough automotive environmental and mechanical
requirements. Check the filter manufacturer guides to make sure your filter selection
meets all the requirements.
In this book, we aim to bring the first principle of EMC engineering to our readers,
therefore we discussed the fundamental part of a filter in depth. We hope that design
engineers, when equipped with the first principle, should be able to design a filter in
the most cost-effective way that also considers the rules of EMI physics.
8.1 - Immunity
Electricity Is What Makes REO Tick!63
References
[1] D. C. Smith, High Frequency Measurements and Noise in Electronic Circuits, New York:
Van Nostrand Reinhold, 1993.
[2] K. Armstrong, EMC for Printed Circuit Boards, Nutwood UK Ltd, 2010, ISBN:978-0-
9555118-5-1.
[3] M. Zhang, “EMC Design Techniques for Electric Vehicle Powertrain Modules,”
InCompliance, no. February, 2021.
[4]
Ziwei Ouyang,Jun Zhang,William Gerard Hurley, “Calculation of Leakage Inductance for
High Frequency Transformers,” IEEE Transactions on Power Electronics, vol. 30, no. 10, pp.
5769-5775, 2015.
[5] R. Morrison, Fast Circuit Boards - Energy Management, Wiley, 2018.
[6] K. Armstrong, “EMC and Safety for Installations: Part 1,” 2020. [Online].
[7] S. E. AG, “Leakage Currents in Power Line Filters”.
[8] T. Williams, “Using cable ferrites for interference suppression,” ELMAC services.
[9] R.C.Marshall, “A cable can be an effective antenna - so you add ferrite”.
[10] D. Smith, “Can Ferrite Cores Increase Emission?,” 1999.
[11] T. H. Hubing, EMC question of the week 2017-2020, Learn EMC, 2021.
[12] H. W. Ott, Electromagnetic Compatibility Engineering, New Jersey: Wiley, 2009.REO (UK) LTD, Units 2 – 4 Callow Hill Road, Craven Arms
Business Park, Craven Arms, Shropshire SY7 8NT
Tel: <PRESIDIO_ANONYMIZED_PHONE_NUMBER> Email: <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
Website: www.reo.co.uk" Türkçe açıkla bu dokumanı
ASSISTANT
Bu doküman, "The Engineers' Practical Guide to EMI Filters" başlıklı bir mühendis kılavuzunun detaylı bir özetini ve içeriğini sunmaktadır. Yazar Dr. Min Zhang, elektromanyetik parazit (EMI) filtreleri üzerine pratik rehberliği ile mühendislerin EMI sorunlarını çözmelerine yardımcı olmak için çeşitli yöntemler ve bilgiler paylaşmaktadır. Doküman, EMI'nin temellerini, indüktörlerin, kapasitörlerin ve dirençlerin temel işlevlerini, bu bileşenlerin nasıl modellenip simüle edileceğini ve bir ürünün EMC (Elektromanyetik Uyumluluk) standartlarına uymasını sağlamak için filtre tasarımının nasıl yapılacağını açıklamaktadır.

Katı matematiksel anlayış gerektirmeyen fiziksel ilkeler üzerine odaklanarak, EMI'nin mühendislik alanındaki gerçek dünya sorunlarına nasıl uygulanabileceği üzerine yoğunlaşmaktadır. Çeşitli bileşenlerin, özellikle indüktörlerin ve kapasitörlerin yapısını, farklı türlerini, yaşlanma ve çevresel faktörlerin kapasitans üzerindeki etkisini, ferrit çekirdek kullanımını, dirençlerin filtreleme amaçlı uygulamalarını kapsamaktadır. Filtre tasarımı ve yerleşim kurallarına odaklanarak, maliyet etkin bir şekilde güçlü filtreleme çözümleri geliştirme yollarını tartışmaktadır. Ayrıca, elektronikte yaygın olan düşük ve yüksek frekanslı EMI'yi etkisiz hale getirmek için yaygın filtre yapılandırmaları ve yerleşim hatalarının nasıl önleneceğine dair pratik ipuçları da vermektedir.

Belge, mühendislerin EMI sorunlarıyla başa çıkmasına yönelik kapsamlı bir rehber sunmanın yanı sıra, günümüzün elektronik uygulamalarında karşılaşılabilecek elektromanyetik bağışıklık problemleriyle ilgili çözümler de içermektedir.

turns-00030.parquet:38342

c5b183d898c846ae931fe637
turn 2/2gpt-4o-2024-08-06TurkishTürkiye318 words
degenerate_repetitionAbsentFinal dense release
USER
her bölümü türkçeye çevir
ASSISTANT
İşte her bölümün Türkçe'ye çevrilen kısa bir özeti:

### Bölüm 1 - Giriş
Bu bölüm, elektronik tasarım mühendislerinin karşılaştığı elektromanyetik girişim (EMI) sorunlarına genel bir giriş sağlar. EMI, elektronik devrelerin düzgün çalışmasını engelleyebilen karmaşık bir fenomendir. Bu rehber, EMI'nin temel ilkelerini anlamaya ve etkili filtreler tasarlamaya yardımcı olmayı amaçlar.

### Bölüm 2 - İndüktörler
İndüktörler, bir devrede karmaşık bir manyetik alan oluşturarak çalışır ve filtreleme işlemlerinde genellikle yüksek frekanslı gürültüyü azaltmak için kullanılır. Bu bölüm, diferansiyel ve ortak mod sargılar (şok bobinleri) ve manyetik çekirdek malzemelerinin yapıları dahil olmak üzere indüktörlerin modellerini ve uygulamalarını açıklar.

### Bölüm 3 - Kapasitörler
Kapasitörlerin enerji depolama işlevi vardır ve bunlar çeşitli türlerde bulunur. Bu bölüm, elektrolitik, seramik ve film kapasitörlerin temel modellerini, yapısal farklarını ve yaşlanmaya ve çevre koşullarına karşı nasıl değişiklik gösterdiklerini ele alır.

### Bölüm 4 - Ferrit Çekirdekler
Ferrit çekirdekler, kablo üzerinde RF gürültüsünü önlemek için etkili malzemelerdir. Bu bölüm, ferrit çekirdeklerin kullanımı ve hangi frekans aralıklarında etkili oldukları hakkında bilgi verir.

### Bölüm 5 - Dirençler
Dirençler genelde sabit bir direnç değerine sahip olmalarına rağmen, özellikle filtre tasarımında sönümleyici veya akım sınırlaması gibi çeşitli uygulamalarda önem arz eder. Bu bölüm, dirençlerin kullanım alanlarını ve etkilerini açıklar.

### Bölüm 6 - Filtre Tasarımı
Filtreler, istenmeyen frekanslardaki sinyalleri zayıflatarak sistemdeki parazitleri azaltmak için tasarlanır. Bu bölüm, filtrelerin nasıl tasarlanacağını ve yerleştirileceğini, ekleme kaybı (insertion loss) kavramını ele alır.

### Bölüm 7 - Filtre Yerleşimi
Bu bölüm, bir EMC filtresinin nasıl daha etkili yerleştirileceğini ve yaygın yerleşim hatalarının nasıl önlenebileceğini açıklar. Filtrelerin genellikle gürültü kaynağından uzakta, daha sessiz bir ortamda yerleştirilmesi gerektiği vurgulanır.

### Bölüm 8 - Bağışıklık ve Diğer Yönler
Bu bölüm, bir sistemin dış gürültü kaynaklarına (örneğin, hızlı elektrik dalgalanmaları, elektrostatik boşalma) karşı direncini artırmaya yönelik yöntemleri tartışır ve iyi tasarlanmış bir filtrenin bu tür sorunlara karşı koruma sağlayabileceğini belirtir.

Belgenin genel amacı, mühendislerin EMI sorunlarını daha iyi yönetmelerine yardımcı olacak pratik bilgileri sağlamaktır.

turns-00030.parquet:38343

7503b002f977be236a55c273
turn 1/2gpt-4o-2024-08-06RussianRussia7 words
degenerate_repetitionAbsentFinal dense release
USER
привет
ASSISTANT
Привет! Как я могу вам помочь?

turns-00030.parquet:38344

af362e6f2e8c3d1249c515cd
turn 2/2gpt-4o-2024-08-06RussianRussia18 words
degenerate_repetitionAbsentFinal dense release
USER
с
ASSISTANT
Если у вас есть какие-то вопросы или что-то, о чём вы хотите поговорить, не стесняйтесь, дайте знать!

turns-00030.parquet:38345

ea78261ae35486547cd17258
turn 1/1o1-preview-2024-09-12ItalianItaly596 words
degenerate_repetitionAbsentFinal dense release
USER
quando aggiungo un immagine in una nuova canvas nella scena di gioco in modalità screen space camera, essa viene sovrastata da quasi tutti i game object, come faccio a risolvere?
ASSISTANT
Quando utilizzi un Canvas in modalità **Screen Space - Camera**, l'ordine di rendering degli elementi UI può entrare in conflitto con gli altri oggetti presenti nella scena. Questo può causare il problema in cui l'immagine che aggiungi al Canvas viene sovrapposta dagli altri GameObject.

Ecco alcuni passaggi che puoi seguire per risolvere il problema:

1. **Imposta la Sorting Layer e l'Order in Layer del Canvas**:
   - Seleziona il tuo **Canvas** nel pannello Hierarchy.
   - Nel pannello Inspector, sotto la sezione **Canvas**, verifica che il **Render Mode** sia impostato su **Screen Space - Camera**.
   - Sempre nella sezione Canvas, cerca le opzioni **Sorting Layer** e **Order in Layer**.
     - **Sorting Layer**: assegna al Canvas una Sorting Layer superiore rispetto a quella degli altri oggetti che potrebbero sovrapporsi. Puoi creare una nuova Sorting Layer dedicata per gli elementi UI che devono stare in primo piano.
     - **Order in Layer**: aumenta il valore di questo parametro per assicurarti che il Canvas venga renderizzato dopo gli altri oggetti sulla stessa Sorting Layer.

2. **Posizione del Canvas rispetto alla Camera**:
   - Assicurati che il **Canvas** sia posizionato davanti agli altri oggetti nella scena in termini di asse Z.
   - Verifica il valore di **Plane Distance** nel componente Canvas:
     - Nel componente **Canvas**, individua il parametro **Plane Distance**.
     - Riduci questo valore per avvicinare il Canvas alla camera, assicurandoti che sia davanti agli altri oggetti.

3. **Regola la profondità della Camera (Camera Depth)**:
   - Se stai utilizzando più camere, assicurati che la camera che renderizza il Canvas abbia un valore di **Depth** maggiore rispetto alle altre, in modo che il suo contenuto venga renderizzato successivamente.

4. **Layer degli Oggetti**:
   - Controlla i **Layer** assegnati ai tuoi GameObject e al Canvas.
   - Assicurati che il **Culling Mask** della camera includa il layer del Canvas.

5. **Utilizzo del componente Canvas Additional Shader Channels**:
   - Nel componente **Canvas**, assicurati che i **Additional Shader Channels** includano i canali richiesti per il corretto rendering degli elementi UI.

6. **Verifica degli elementi figlio del Canvas**:
   - Assicurati che l'immagine che hai aggiunto sia effettivamente un elemento figlio del Canvas.

7. **Problemi con il Post-processing o effetti speciali**:
   - Alcuni effetti di post-processing possono influenzare l'ordine di rendering. Se stai utilizzando effetti come Bloom, Depth of Field, ecc., prova a disabilitarli temporaneamente per vedere se il problema persiste.

8. **Controlla gli Script che modificano l'ordine di rendering**:
   - Verifica che non ci siano script nella scena che potrebbero modificare dinamicamente l'ordine di rendering degli oggetti.

**Esempio pratico**:

- **Creazione di una nuova Sorting Layer**:
  - Vai su **Edit** > **Project Settings** > **Tags and Layers**.
  - Nella sezione **Sorting Layers**, clicca sul segno **+** per aggiungere una nuova layer, ad esempio "UIFront".
  - Assegna questa Sorting Layer al tuo Canvas.

- **Impostazione dell'Order in Layer**:
  - Nel componente **Canvas**, imposta l'**Order in Layer** a un valore elevato, come 10, per assicurarti che venga renderizzato dopo gli altri oggetti.

Seguendo questi passaggi, il tuo Canvas dovrebbe essere renderizzato sopra gli altri GameObject, garantendo che l'immagine sia visibile correttamente.

Se dopo aver provato tutti questi suggerimenti il problema persiste, potrebbe essere utile:

- Creare una scena di test minimalista per isolare il problema.
- Consultare la documentazione ufficiale di Unity riguardo al rendering dei Canvas.
- Cercare eventuali bug noti o aggiornamenti disponibili per la versione di Unity che stai utilizzando.

Spero che queste indicazioni ti aiutino a risolvere il problema!

turns-00030.parquet:38346

92420772a7af388e9d8868ab
turn 1/1o1-preview-2024-09-12EnglishEstonia804 words
degenerate_repetitionAbsentFinal dense release
USER
write a godot plugin using rust that is can be used to write a game that we can build tiles with resources using https://github.com/godot-rust/gdext
ASSISTANT
Creating a Godot plugin using Rust with **gdext** allows you to leverage Rust's performance and safety in your Godot projects. In this guide, we'll walk through the steps to create a plugin that enables building tiles with resources. We'll cover setting up `gdext`, creating the Rust project, writing the necessary code, and integrating it with Godot.

---

## Prerequisites

- **Godot Engine 4.x** installed.
- **Rust** programming language installed (with `cargo`).
- Basic understanding of Godot and Rust.

---

## Setting Up `gdext`

[`gdext`](https://github.com/godot-rust/gdext) is a Rust library that facilitates creating Godot Engine extensions. It provides the bindings needed to interface Rust code with Godot.

### 1. Install the `gdext` CLI

First, install the `gdext` command-line tool:

```bash
cargo install gdext
```

### 2. Create a New `gdext` Project

Navigate to your desired directory and initialize a new `gdext` project:

```bash
gdext new my_tile_plugin
```

This command creates a new Rust project pre-configured for `gdext`.

---

## Implementing the Tile Plugin

We'll create a plugin that allows placing tiles with associated resources in a grid-based layout.

### 1. Define the Tile Class

In your Rust project (`src/lib.rs`), we'll define a `Tile` class that extends `Node2D`:

```rust
use gdext::prelude::*;

#[derive(NativeClass)]
#[inherit(Node2D)]
#[register_with(Self::register_builder)]
pub struct Tile {
    #[property]
    pub resource_amount: i32,
}

#[methods]
impl Tile {
    fn new(_owner: TRef<Node2D>) -> Self {
        Tile {
            resource_amount: 0,
        }
    }

    fn register_builder(_builder: &ClassBuilder<Self>) {
        // Register signals, properties, etc.
    }

    #[export]
    fn set_resource_amount(&mut self, _owner: TRef<Node2D>, amount: i32) {
        self.resource_amount = amount;
    }

    #[export]
    fn get_resource_amount(&self, _owner: TRef<Node2D>) -> i32 {
        self.resource_amount
    }
}
```

### 2. Add Functionality to Build Tiles

Add methods to handle tile placement and resource assignment:

```rust
#[export]
fn place_tile(&self, owner: TRef<Node2D>, position: Vector2) {
    // Logic to position the tile in the game world.
    owner.set_position(position);
}

#[export]
fn assign_resource(&mut self, _owner: TRef<Node2D>, amount: i32) {
    self.resource_amount = amount;
    // Update the tile's appearance or state based on the resource amount.
}
```

### 3. Register the Class

Ensure the class is registered so Godot can recognize it:

```rust
fn register_builder(builder: &ClassBuilder<Self>) {
    builder.add_signal(Signal {
        name: "resource_changed",
        args: &[SignalArgument {
            name: "amount",
            default: Variant::from_i64(0),
            export_info: ExportInfo::new(VariantType::I64),
            usage: PropertyUsage::DEFAULT,
        }],
    });
}
```

---

## Building the Plugin

### 1. Build the Project

From the project directory, run:

```bash
gdext build
```

This command compiles the Rust code and generates a GDExtension library compatible with Godot.

### 2. Prepare the Godot Project

In your Godot project, create a folder (e.g., `addons/my_tile_plugin`), and place the generated `gdextension` files there.

### 3. Add the Plugin to Godot

In Godot:

- Go to **Project > Project Settings > Plugins**.
- You should see `my_tile_plugin` listed.
- Enable the plugin.

---

## Using the Plugin in Godot

### 1. Create a Tile Scene

- Create a new **Scene** inheriting from **Node2D**.
- Attach a script to it (optional, for additional GDScript logic).
- Instance the Rust `Tile` class:

  ```gdscript
  extends Node2D

  func _ready():
      var tile = Tile.new()
      add_child(tile)
      tile.place_tile(Vector2(100, 100))
      tile.assign_resource(50)
  ```

### 2. Design the Tile Appearance

- Add sprites or visuals to represent the tile.
- Use the `resource_amount` property to change the tile's appearance based on resources.

### 3. Interact with Tiles

- Use signals (e.g., `resource_changed`) to react to changes in resource amounts.
- Implement gameplay logic to allow players to build and manage tiles with resources.

---

## Example: Grid-Based Tile Placement

For a grid-based system, you might implement a `Grid` class in Rust or GDScript that manages multiple `Tile` instances.

### Sample Code Snippet

```rust
#[derive(NativeClass)]
#[inherit(Node2D)]
pub struct Grid {
    tiles: HashMap<(i32, i32), Instance<Tile>>,
}

#[methods]
impl Grid {
    fn new(_owner: TRef<Node2D>) -> Self {
        Grid {
            tiles: HashMap::new(),
        }
    }

    #[export]
    fn add_tile(&mut self, owner: TRef<Node2D>, x: i32, y: i32, resource_amount: i32) {
        let tile_scene = load::<PackedScene>("res://path_to_tile_scene.tscn").unwrap();
        let instance = tile_scene
            .assume_safe()
            .instantiate()
            .unwrap()
            .cast::<Node2D>()
            .unwrap();

        let tile = instance
            .cast_instance::<Tile>()
            .expect("Failed to cast to Tile");

        tile.map_mut(|t, o| {
            t.place_tile(o, Vector2::new((x * TILE_SIZE) as f32, (y * TILE_SIZE) as f32));
            t.assign_resource(o, resource_amount);
        }).unwrap();

        owner.add_child(instance, false);
        self.tiles.insert((x, y), tile);
    }
}
```

---

## Conclusion

By following these steps, you've created a Godot plugin using Rust and `gdext` that allows building tiles with resources. This approach combines the performance of Rust with the flexibility of Godot, enabling the development of complex and efficient game systems.

---

## Additional Tips

- **Error Handling**: Ensure you handle possible `Option` and `Result` types appropriately to prevent runtime errors.
- **Debugging**: Use `godot_log` macros to output debug information.
- **Extending Functionality**: Consider adding more properties and methods to `Tile` to handle different resource types or interactions.

---

## References

- [`gdext` Documentation](https://github.com/godot-rust/gdext)
- [Godot Engine Docs](https://docs.godotengine.org/)
- [godot-rust Guide](https://godot-rust.github.io/book/introduction.html)

*Happy coding!*