Unit 9 / 9

Standard Research, Simulation and Accountability with Python

Gains:

  • Ability to scan IEC, TS and related regulations with AI and apply verification discipline from official sources
  • Ability to produce engineering calculations and simulations with Python and check the results in orders of magnitude
  • Understand that AI output is not a substitute for engineer approval in terms of electrical safety, liability and ethics.

In this final unit, we combine the module's three critical strands: accelerating standards and regulation research with AI but verifying from the official source; Producing engineering calculations and simulations with Python and checking them in order of magnitude; and above all, understanding that AI output is not a substitute for electrical safety and engineer approval. Standards in electrical and electronics (IEC, TS, EN series, relevant installation and product regulations) are not just bureaucracy; It is the legal framework for life safety and compliance. AI is powerful at scanning this framework, but it's also where it's most susceptible to hallucination. The correct usage is to take the speed from the AI ​​and the accuracy and responsibility from the engineer.

Standards and Regulation Research: Quick Scan, Official Verify

Standard texts are long, technical and inter-referential. AI gives you a quick road map for questions such as "which standard covers this subject, which article should I look at, what is the basic requirement?" But the item numbers, table values ​​and limits given by AI must be verified exactly from the official and current text.

Attention: Language models are one of the areas where standard item numbers and numerical boundaries are mostly made up (hallucinations). Statements such as "According to IEC 60364 clause 4.3..." sound reliable, but the clause number or value may be incorrect. Use the AI's output as a "compass to show me where to look"; Never base the decision on the number the AI ​​remembers.

A workflow for the verification discipline:

1) Have AI scan the topic: "Which standards family does this topic concern, which headings should I look at?" (road map)2) Request a 'source required' label for each substance/value suggested by the AI.3) Open the official standard text (current edition from the institution/publisher).4) Compare the substance number, scope and value EXACTLY.5) Correct anything that does not match in favor of the official text, not the AI.6) Confirm that the standard is the current/current edition.

Weak Prompt / Strong Prompt

WEAK: "Which standard should this panel comply with, tell me the values." (Result: there is a high risk of made-up article numbers and numbers.) STRONG: "Summarize which standard families related to low voltage panel design I need to look at and what subject each one covers. Give me a CHECKLIST: 'verify this subject against this standard'. DO NOT give the exact article number or numerical limit; I will verify these myself from the official text. Be clear where you are not sure. specify."

This prompt directs the AI ​​to the task at which it is strongest (topic map and checklist) and keeps it away from the task at which it is weakest (exact number recall).

Calculation and Simulation with Python: Generate, Check with Rank

Python makes engineering calculations reproducible and auditable. AI can write code for you; But always test the result with a sanity check. An example: simple loss and efficiency calculation for a transformer.

# Simple transformer load/loss calculation (for verification purposes) loss (W) - load ratio from datasheet = 0.8 On the order of 1360 Wprint(f"Efficiency: %{efficiency:.2f}") # ~ On the order of 98%

Here, range control saves lives: In a 100 kVA transformer, the total loss should be in the order of a few kW and the efficiency should be in the range of 97-99%. If the code gives 500 kW lost or 50% efficiency, there is definitely a unit or formula error (e.g. mixing kW with W). Chase the inputs and the formula until the result is within a reasonable range.

Tip: Before writing each Python result to the report, ask yourself: "Is this number physically possible? Is its size within the range I expect?" The code may run without errors, but with the wrong unit it may produce a completely wrong result. Order checking is the cheapest and most powerful tool for catching silent unit errors.

In simulations (SPICE, control, power flow) the rule is the same: the simulation is as good as your model. Ideal assumptions (loss-free, lag-free, linear) can deviate from reality. Compare the simulation result with a simple analytical calculation and/or actual measurement if possible.

Safety, Responsibility and Ethics: AI Does Not Replace Engineer Certification

This is the most important message of this module: AI output should never replace engineer judgment and signature in electrical and electronics engineering. This has three legs:

  • Security. Electrical work carries the safety of life and property. An incorrect section, protection or safety logic produces real harm. AI gives speed; The engineer assumes the decision and responsibility regarding whether it is safe.
  • Responsibility. The engineer who approves, signs off and commissions a design is legally and professionally responsible. "AI suggested this" is not a defense. Responsibility cannot be delegated.
  • Ethics and transparency. Rather than hiding the use of AI, document how the output is validated. Do not present any unverified values ​​as "exact"; State uncertainty honestly.

Quest

AI does

Engineer makes/approves

Standard scan

Roadmap, checklist

Verifies the item/value from the official source

Calculation/simulation

Code, first result

Verifies by order, unit, measurement

Protection/security

suggestion, scenario

Final selection and signature

commissioning

Checklist draft

Measurement and confirmation on site

Mini Case

A project engineer is preparing a protection coordination report for a facility and requests relevant standards clauses from the AI. AI gives a specific standard clause and numerical coefficient for cutter selection curves. The engineer opens the official text and checks: the item number is correct, but the coefficient given by the AI ​​has been revised to a different value in the current edition of the standard. It remembered an old, obsolete value. The engineer corrects the report using the current value and verifies the rank by reproducing the calculation with Python. The report includes the printing year of the standard used and the verification note. Lesson: AI may return both the item number correctly and the value incorrectly; Only the current official text is binding and the responsibility remains with the signing engineer.

Common Mistakes

  • Not verifying the standard item number and value given by the AI from the official text.
  • Mistaking an outdated (revised) value as current.
  • Writing the Python result to the report without checking the unit/order.
  • Not comparing the simulation result with measurement or analytical calculation.
  • Trying to delegate responsibility by saying "this is what the AI ​​suggested."
  • Presenting unverified values ​​as "exact"; hide uncertainty.

In summary

  • AI is powerful for roadmapping and checklisting in standards research; items and values ​​are verified from the official, current text.
  • The risk of hallucinations is high in standards; Use AI as a compass and official text as a binding resource.
  • Always check Python calculations with units and orders of magnitude.
  • The simulation is only as good as your model; Compare the result with analytical calculation and measurement.
  • Responsibility for security-critical decisions cannot be delegated; Engineer approval is mandatory.
  • Ethical use is to document verification and honestly state uncertainty.

Application task

Choose a topic from your field (such as shielding selection, EMC limit, cable cross-section). Just ask the AI ​​for a “standard screening checklist” (don't ask for an exact number). Then verify at least two items on the list from the official standard text and evaluate whether the AI's topic map is correct. Separately, generate a relevant calculation in Python and check the result for unit and order. Finally, in your own words, summarize in a paragraph why these outputs do not replace engineer approval.

Module Exam

1. When working with an AI tool in electrical and electronics engineering, the final responsibility for which of the following tasks should always remain with the authorized engineer?

  • A) Final approval of the protection and section selection of a panel and commissioning decision ✔
  • B) Creating a first draft of a datasheet summary
  • C) Editing the axis labels of a Python chart
  • D) Preparing a glossary of terms for a report

Description: AI; It can speed up tasks like code drafting, calculation pre-work, and document production. However, the authorized engineer is responsible for the accuracy of protection coordination, section selection and commissioning approval, which directly affects the safety of life and property, and these decisions cannot be implemented without independent verification.

2. You had AI design a voltage divider and suggested 10 kΩ upper resistor and 3.3 kΩ lower resistor. Which verification should be done first?

  • A) Transferring the suggestion to production as it is
  • B) Verifying the output voltage by hand calculation with the divider formula and comparing the values with the standard series ✔
  • C) Randomly doubling the resistors
  • D) Just checking the color codes

Description: AI can make mistakes in arithmetic and topology. The first and mandatory step is to manually calculate the output voltage with the R2/(R1+R2) ratio and check whether the selected values ​​​​belong to the standard series such as E24 and the power loss of the resistors.

3. You want to sample a signal containing frequencies up to 2 kHz with an ADC. AI recommends a sampling frequency of 3 kHz. What is the main problem with this proposal?

  • A) 3 kHz consumes power because it is higher than necessary
  • B) Memory becomes full because the sampling frequency is too high
  • C) violates the Nyquist criterion; At least 4 kHz is required, otherwise aliasing occurs ✔
  • D) It only increases filter delay, has no other effect

Explanation: According to the Nyquist-Shannon theorem, the sampling frequency must be at least twice the highest frequency component in the signal. 2 kHz requires a minimum of 4 kHz; 3 kHz creates aliasing and irreversibly degrades the signal.

4. You see a long delay function in a microcontroller interrupt service routine generated by the AI. Which is the most accurate assessment?

  • A) No problem, long delay in ISR is good practice
  • B) Doubling the delay increases stability
  • C) ISR should only be run on a faster core
  • D) The ISR blocker should not contain any delay; It is necessary to set a flag and move the job to the main loop ✔

Comment: Interrupt service routines (ISR) should be as short as possible; Using a blocking delay in it will cause other interrupts to be missed, watchdog resets, and violations of real time constraints. The AI's suggestion should be reviewed and corrected.

5. What is the most critical verification step when calculating the voltage drop of a cable with AI?

  • A) To verify the current, length and cross-section assumptions used and the compliance of the result with the standard voltage drop limit ✔
  • B) Just checking the number of decimal places of the result
  • C) Printing the account in a larger font
  • D) Changing cable color

Explanation: Voltage drop calculation depends on current, cable length, cross-section and conductor resistance. Verifying the input assumptions used by AI (current, length, cross-section, type of conductor) and whether the result falls below the percentage limit allowed by the relevant standard is imperative for a safe and appropriate design.

6. For a PID controller, AI suggested you Kp, Ki and Kd values. What is the most correct approach when applying these values ​​to the real system?

  • A) Applying the values directly at full operating condition
  • B) First test in simulation and low-risk condition and adjust gradually by observing the response ✔
  • C) It is sufficient to reset the Ki value and use only Kp
  • D) Writing the parameters into the document without testing them at all

Description: The PID parameters suggested by the AI ​​are just a starting point. Values ​​should be tested first in simulation and then in the field gradually and within safe limits; overshoot, oscillation and stability should be observed and improved. Applying directly with full authority may damage the equipment.

7. When you asked AI about the trace width for a power supply PCB, he suggested a thin trace of 5 A. How do you validate this suggestion?

  • A) By looking at the color of the scar
  • B) Just looking at the aesthetics of the card
  • C) Calculating independently according to current, copper thickness and temperature rise with IPC-like trace width rules ✔
  • D) By shortening the trace as much as possible

Description: Trace width is determined by rules similar to IPC-2221, according to the current to be carried, copper thickness and allowable temperature rise. Verifying the value given by the AI ​​by independent calculation against these rules and the actual current/temperature requirement is essential to avoid overheating and trace burn.

8. You are reviewing the emergency stop (E-stop) circuit in a PLC ladder logic produced by AI. Which principle must be ensured?

  • A) E-stop must only be set with software flag, normally open contact
  • B) E-stop logic can be fielded without testing
  • C) E-stop should be supported by fail-safe (falling on the safe side in case of failure) and hardware security chain, and should be verified by an engineer ✔
  • D) E-stop can just be a button on the HMI screen

Description: Emergency stop is a safety function and must be designed with normally closed (NC) contacts to fall on the safe side (fail-safe) in case of fault. Software logic alone is not enough; The hardware security chain and compliance with relevant security standards must be verified by the engineer.

9. AI gives a protection value by referring to a specific clause of an IEC standard. What is the correct engineering behavior?

  • A) Verify the substance number and value from the official, current standard text ✔
  • B) Using the value as is because the AI seems very confident
  • C) Raising the value randomly to stay on the safe side
  • D) Adding the item number to the report without checking it at all

Explanation: Language models may misremember or make up (hallucinate) item numbers and values. Each standard-based value must be verified verbatim from the official and current standard text; The AI ​​output is merely a road map of where to look.

10. In a transformer loss calculation you produced with Python, the AI ​​result gives 500 kW, whereas the transformer power is 100 kVA. What should be your first reaction in this situation?

  • A) Writing the result directly to the report
  • B) Seeing that the order of magnitude of the result is physically impossible and looking for unit and formula errors ✔
  • C) Changing the transformer power to match the result
  • D) Ignoring the loss and continuing

Explanation: The loss should be a small percentage of the device power; 500 kW loss in a 100 kVA transformer is physically impossible. A sanity check immediately reveals a unit or formula error. Inputs and formula should be reviewed until the result is within a reasonable range.