Microcontroller-Based PID Controller Design and Simulation.

Ing. Cristoforo Baldoni

In this article, we will explore the transition from analog PID controller design for continuous-time systems to digital controllers, including PID controller simulation. This transition involves substituting operational amplifiers, resistors, and capacitors with microcontrollers. Digital controllers offer remarkable compactness, fitting the entire controller onto a single chip, complete with A/D and D/A converters. Furthermore, digital controllers remain immune to component aging and temperature-induced value fluctuations, in contrast to analog components.

We will delve into the application of the Z-transform, which serves as the discrete-time systems counterpart to the Laplace transform. This exploration will encompass the identification of a process’s transfer function. Through a systematic, step-by-step approach, we will demonstrate the practical application of theoretical insights. This will be accomplished by analyzing a Proteus microcontroller-based project, wherein the PWM output is harnessed to regulate the temperature of an oven. The microcontroller boasts a 10-bit A/D converter.

This adaptable procedure can be easily customized with minimal adjustments for controlling various other processes.

Topics Covered:

1. Digital Control-System Block Diagrams.

2. Linear Difference Equations, Z-Transform, Inverse Z-Transform and Discrete Transfer Function.

3. Sampling and A/D Conversion: Analog to Digital Converter.

4. D/A Conversion and ZERO ORDER HOLD  (ZOH) : Relationship between the Continuous Transfer Function and Discrete Transfer Function of a Sampled Process.

5.  Manipulation of Block Diagrams for Sampled Data.

6. Methods for designing Digital Controllers and Ensuring Stability.

7. Microcontroller-Based PID Controller Design.

8. Transfer Function Identification and PID Tuning using the Ziegler–Nichols Method.

9. Practical case of a temperature control system implemented with a microcontroller PIC and simulated with ISIS Proteus: Step by step explanation of how to apply the theoretical knowledge for implementing and simulating a PID controller.

Premium Content

Login to buy access to this content

SPICE-Based Design of PID Controllers.

In this comprehensive article, we delve into the world of industrial control systems through the lens of PID controllers using SPICE simulation. We will embark on a journey to explore the process of designing and simulating various types of PID controllers – including Proportional (P), Proportional-Integral (P.I.), Proportional-Derivative (P.D.), and Proportional-Integral-Derivative (P.I.D.) controllers, leveraging the power of SPICE simulation. The article delves into the theoretical underpinnings and practical methodologies for creating these controllers, emphasizing their importance in optimizing diverse industrial processes. Additionally, we’ll take a closer look at the subsequent implementation of these controllers, achieved using operational amplifiers. Whether you’re an engineer, a researcher, or a technology enthusiast, this article offers valuable insights into the dynamic world of PID control and its application within industrial contexts.

Premium Content

Login to buy access to this content

Find Poles and Zeros of a Circuit by Inspection

 Ing. Cristoforo Baldoni

In this article, focused on ‘Poles and Zeros of a Circuit‘, we will explore the technique of identifying the count of poles and zeros within a transfer function, including those in complex linear networks, solely through visual inspection. This method obviates the need for calculating the analytical expression of the transfer function. By the conclusion of this article, you will have the capability to swiftly determine the number of poles upon initial examination.

Once the output is established, this approach also enables you to ascertain the quantity of zeros through inspection and subsequently compute the precise symbolic form of the transfer function. Additionally, you can calculate the exact values of both zeros and poles employing user-friendly software tools readily accessible for free. We will validate the findings using SPICE analysis.

The primary objective of this article is to delve into the concepts of poles and zeros within a transfer function, elucidating their physical significance. Furthermore, we aim to furnish valuable analytical tools to aid analog circuit designers and control systems engineers in their endeavors.

How many POLES does this circuit have?

polesnetworkBig

And how many does this high-pass filter have?

fiveorderHPfilter

If your response to the initial question is 9 or 8, or if you do not identify a fifth-order filter (with five poles) in the filter’s illustration, then you should proceed to read this article.

Premium Content

Login to buy access to this content

Control Systems using SPICE Simulation.

Ing. Cristoforo Baldoni

Exploring the domain of Control Systems using SPICE Simulation, this article offers essential principles for designing and analyzing Feedback and Control Systems. Control Systems theory, a cornerstone of engineering and automation, involves the study of dynamic systems and their manipulation to achieve desired outcomes. These systems are omnipresent in our modern industrial technological world, seamlessly integrated into everyday devices. They play a vital role in processes as diverse as the precise positioning of a Reader’s laser, the intricate control of a hard disk head’s movement, and even the numerous biological control systems orchestrating our bodily functions.

Control Systems theory involves understanding how systems respond to various inputs and disturbances, and how to design controllers that shape these responses to achieve desired goals. These goals can include stability, accuracy, speed, and overall performance optimization. Whether it’s managing the temperature of an oven, stabilizing the flight of an aircraft, or controlling the speed of a motor, the principles of Control Systems theory provide the framework to analyze, design, and optimize these dynamic processes.

As we navigate through this article, we’ll begin by introducing the basic concepts that underpin Control Systems theory. From there, we’ll seamlessly transition into exploring how these theories come to life through the application of SPICE simulation. Our journey includes the evaluation of the Open Loop Transfer Function using the versatile tool of PSPice, providing hands-on insights into the practical implementation of control strategies. Whether you’re a novice eager to comprehend the foundations or an enthusiast seeking to refine your expertise, this article offers a holistic perspective on the symbiotic relationship between Control Systems theory and the power of SPICE Simulation.

Topics Covered:

1.  Processes, Open Loop and Closed Loop Control Systems (Feedback Systems).

2. Generic Closed Loop Schematic of Feedback Systems.

3. Physycal Processes Modeling, Differential Equations and Laplace Transform Simplification.

4. Transfer Function: Understanding Poles, Zeros and their Phisical Significance.

5. Natural and Forced Response: Residues Calculation, Simplification of identical Zeros and Poles, Dominant Poles.

6. Process Stability.

7. Steady State Erro and Systems Types.

8. Transfer Function through Bode Diagram Analysis. Examination of the Open Loop Transfer Function using SPICE Simulation.

Premium Content

Login to buy access to this content

Getting Started with PyOPUS

PyOPUS is a Python based platform for very sophisticated circuit optimization and simulation automation. It represents a library designed for optimizing arbitrary systems through simulation. Its primary focus is on refining circuit performance. Serving as the foundation for the PyOPUS GUI, this library facilitates the effortless configuration of design automation tasks. Within the GUI, users are also able to visualize outcomes and graph the waveforms produced by the simulator.

The module labeled “pyopus.simulator” presently offers compatibility with SPICE OPUS, Ngspice, Xyce, HSPICE, and SPECTRE. The use of the Python library with the simulator requires a previous SPICE OPUS (or other SPICE software compatible) installation, then refer to the relative tutorial before proceeding.

Now let’s see how to install PYOPUS on Windows. The download page offers software for Linux and Windows platforms, but discontinues 32-bit Windows support due to the unavailability of the 32-bit Windows SciPy wheel.

Python Programming language
NumPy Package for scientific computing with Python
SciPy Python software for mathematics, science, and engineering
MatPlotLib Python 2D plotting library
wxPython Blending of the wxWidgets C++ class library with Python
PyOPUS installerthe Windows PyOPUS installer

All these softwares can be downloaded here

Let’s start with the Python installation





the default destination directory is C:Python26





the full features installation requires about 50MegaByte





after the installation we have to add an enviroment variable: Start/Control Panel/System and Security/System/Advanced system settings, now click on Enviroment Variables button.





add to “Path” variable the value “C:Python26”



SPICE OPUS Circuit Simulation

SPICE OPUS, an acronym for SPICE engine for OPtimization UtilitieS, represents a powerful circuit simulation tool. This software is a recompilation of the original Berkeley’s source code, designed to work seamlessly on Windows 95/98/NT and Linux operating systems, supplemented by Georgia Tech Research Institute’s XSPICE mixed-mode simulator.

With SPICE OPUS, you have the capability to perform simulations on a wide range of circuit types, including analog, digital, and mixed-signal configurations. This versatile tool is available for both Windows and Linux platforms, although it does not feature an integrated schematic program for component selection and circuit drawing.

Developed by the Faculty of Electrical Engineering at the University of Ljubljana, Slovenia, SPICE OPUS has gained substantial recognition worldwide, amassing a user base of over 10,000 individuals spanning various domains such as research, education, and industry.

Throughout this article, we will guide you through the straightforward process of installing SPICE OPUS on a Windows environment. Additionally, we’ll delve into the procedure for describing a circuit to simulate, achieved by crafting a .cir file using a standard text editor.

You can download the updated software here

After downloading the program run the Setup.exe

Installation on Windows





you can change the installation directory by clicking on Browse button, by default it is installed in C:SpiceOpus





when the setup is complete, open the Start menu and go to Control Panel, choose “System and Security” and again “System”, once open this window,  click on “Advanced system settings”





the “System Properties”  window pops up:





click on “Enviroment Variables…”



Add a new system variable by clicking on the lower “New” button.

Name the variable OPUSHOME. The specified directory must be the Spice Opus installation directory. Click on OK. Confirm your changes by clicking on OK in the Environment variables dialog and once more in the

System Properties dialog.





Installation on Linux

Become root.

su –

Unpack the .tar.gz archive.

A directory will be created with the name that looks like

spice_opusXXX_linux_DATE_TIME

Enter this directory.

cd spice_opusXXX_linux_DATE_TIME

Start the installation script (spice.install).

./spice_install INSTALL_PREFIX

INSTALL_PREFIX is the tree where Spice Opus will be installed. The recommended location is

/usr/local. The installation script removes any previous Spice Opus installation in that tree and

replaces it with the latest version. The binaries go to INSTALL_PREFIX/bin .

After the installation is finished, you can remove the spice_opusXXX_linux_DATE_TIME

directory that was created by unpacking the .tar.gz archive.

Setting up the environment.

We shall assume that you are using BASH. Add the following two lines to /etc/profile (you

must be root in order to be able to do it).

OPUSHOME=INSTALL_PREFIX

export OPUSHOME

where INSTALL_PREFIX is the tree where you installed Spice Opus.

It is also convenient if you add INSTALL_PREFIX/bin to your path. Add the following two

lines at the end of /etc/profile.

PATH=$PATH:$OPUSHOME/bin

export PATH

Log out and log in again for the changes to take effect.

Video tutorials Altium Designer

Altium Designer Video tutorials

This page serves as a valuable resource, offering a curated collection of YouTube videos that explore what Altium Designer can do. These tutorials have been chosen to facilitate a swift learning curve, catering to both novices and seasoned designers alike under the banner of “Altium Designer Video tutorials.”

The videos featured here span a wide spectrum of topics, encompassing various types of analyses within SPICE simulations. Whether you’re interested in DC, AC, transient, or frequency-domain analysis, these tutorials provide insightful guides on each facet. Furthermore, the page delves into the intricate journey of PCB design, walking you through the different stages from initial schematic layout to the final Gerber files.

From schematic capture to footprint selection, netlist generation to component placement, and routing to design rule checks, these videos intricately navigate through the entire design process, ensuring a comprehensive understanding of Altium Designer’s capabilities. Whether you’re a seasoned professional aiming to augment your skill set or a newcomer navigating the world of PCB design, this collection will undoubtedly prove to be an invaluable asset. Explore the world of “Altium Designer Video tutorials” and unlock the full potential of SPICE simulation and PCB design.

Learn PCB Designing In Altium Designer in Just 3 hrs and Design Arduino Pro Mini!!

TopicVideo
Getting started with Altium Designer
Installing SPICE Simulation Libraries
Find Devices with SPICE Simulation Models
Configuring SPICE Simulation Parameters
SPICE Templates for Devices
Direct SPICE Model Editing
SPICE Netlist from Schematic
Link a SPICE PSPice XSPICE simulation model to a schematic symbol
Waveform Editor
SPICE DC Sweep Analysis
SPICE AC Sweep Analysis
SPICE Operating Point Analysis
SPICE Transient Analysis
SPICE Monte Carlo Analysis
Fourier Analysis
Parameters Sweep in SPICE Analysis
Getting Started with PCB Design
Schematic Design
Schematic Symbols
PCB Footprint and 3D model
Mounting Holes
Importing Librarian Parts
Part Libraries
Variants DNP
Bill Of Material
PCB Layout Setup
Ground Plane
PCB Fanout to Copper Plane
Routing
Silkscreen and PCB Notes
Gerber Files
Documentation
From 0 to Gerber

Learn PCB Design By Designing an Arduino Nano in Altium!!

An interesting and current video is the one that explains how ChatGPT can be helpful in printed circuit board design.

Altium Designer SPICE simulation

Dive straight into the world of Altium Designer’s SPICE simulation with practical ease. In this instance, we will walk through the creation of a dual-supply inverting operational amplifier circuit. Leveraging the robust capabilities of Altium Designer’s SPICE simulation tools, we’ll lead you through each phase of the process, enabling you to efficiently design and simulate the circuit’s performance. This hands-on experience offers valuable insights into the realm of Altium Designer SPICE simulation, enhancing your circuit analysis and design skills.

On this page, you can discover additional resources to delve deeper into the possibilities of SPICE simulation and learn how to create the PCB for a circuit using Altium Designer.

Let’s begin with the creation of a new circuit schematic.





 a new blank sheet pops up



newschopen


 on the top toolbar we find the icon to place part





The place part window appears



8051 Microcontroller Course- Embedded C and Assembly Language

Click on the button “…” to open the Browse Libraries window





moving throughout the first list we can select a library





Once selected the library we can easily choose a library’s component



Ni Multisim Video tutorials

NI Multisim Video tutorials

Welcome to our page dedicated to NI Multisim Video Tutorials. Here, you will find a collection of YouTube videos that offer a comprehensive overview of the capabilities of NI Multisim software for SPICE simulation and PCB design. These videos cover a wide range of topics, from the fundamental aspects of placing components on the layout to conducting time-domain analysis using the virtual oscilloscope. You’ll also learn how to perform AC analysis, utilize tools for phasor analysis, explore the integration of LabVIEW with NI Multisim, create schematics for new programmable logic designs, and harness Ultiboard for your PCB layout needs. Whether you’re a novice seeking an introduction to the software or an experienced user looking to enhance your skills, these tutorials will guide you through the various functionalities and empower you to make the most of NI Multisim’s features.

Alternativa:

Welcome to our page dedicated to NI Multisim Video Tutorials. If you’re eager to delve into the world of circuit design, SPICE simulation, and PCB layout using NI Multisim software, you’re in the right place. We’ve curated a collection of informative YouTube videos that will equip you with the knowledge and skills needed to harness the full potential of NI Multisim.

Exploring NI Multisim’s Capabilities: A Deep Dive

These NI Multisim video tutorials cover a wide spectrum of topics, catering to both beginners and advanced users. If you’re just starting, you’ll find videos that walk you through the basics, such as how to strategically place components on the layout canvas and connect them effectively. But we don’t stop there – we’ll take you on a journey through more complex tasks too.

Mastering Analysis Techniques

In these tutorials, you’ll learn how to perform essential analysis techniques. From time-domain analysis, using the built-in virtual oscilloscope, to AC analysis and phasor analysis tools, we’ll guide you step by step. No matter your level of familiarity with these concepts, our tutorials will ensure you grasp them with ease.

Integration and Innovation

NI Multisim isn’t just a standalone tool; it’s a versatile software that can integrate seamlessly with LabVIEW for enhanced capabilities. Our tutorials will demonstrate how to bridge the gap between these two powerful tools, opening up new possibilities for your projects. Additionally, if you’re interested in programmable logic designs, Videos will show you how to create detailed schematics tailored to your needs.

From Schematic to PCB Layout

Taking your circuit design from a schematic to a physical PCB layout is a crucial step. Our tutorials go beyond theory and guide you through the utilization of Ultiboard – NI Multisim’s companion for designing professional-grade PCB layouts. You’ll gain insights into optimizing component placement, routing traces efficiently, and ensuring your design is production-ready.

For All Skill Levels

Whether you’re a newcomer seeking a friendly introduction or a seasoned user aiming to further refine your skills, these NI Multisim Video tutorials cater to your needs. We ensure that the learning curve is smooth and the content is engaging, making your exploration of NI Multisim not only educational but also enjoyable.

In conclusion, our NI Multisim Video Tutorials are designed to empower you with the expertise needed to leverage the software’s capabilities fully. With step-by-step guidance, insightful demonstrations, and a wealth of practical tips, you’ll be well-equipped to create intricate circuits, simulate their behavior, and design professional-grade PCB layouts. Your journey into the world of circuit design starts here, so dive in and discover the endless possibilities with NI Multisim.

For a step-by-step guide on how to draw and simulate your first circuit using NI Multisim, you can refer to this article.

Learn how to create, design, and analyze circuits using NI Multisim!!

TopicVideo
How to place and wire components with NI Multisim
NI Multisim and Time domain analysis, the oscilloscope
The AC Analysis with NI Multisim
Analog Simulation Feature Enhancements
NI Multisim: the Grapher View
Phasors with NI Multisim
Create a component from a template with NI Multisim
NI Multisim: Using the SPICE Netlist Viewer
How to Import a SPICE list into NI Multisim
How to use LabVIEW Instruments with NI Multisim
New Programmable Logic Design Schematic
NI Multisim: Using global and pages connectors
PCB Design with Multisim: Ultiboard
Rearchitected Forward and Backward Annotation

Master PCB Design using Ultiboard and Multisim!!

NI Multisim SPICE simulation

On this page, we learn to become proficient with NI Multisim software through a step-by-step guide
to creating and subsequently simulating a 20-Watt integrated power audio amplifier circuit. Leveraging
the advanced features of NI Multisim SPICE Simulation, this guide will carefully walk through the process
of designing this circuit using the LM 1875T component. Through this hands-on experience, you will gain
a practical understanding of circuit design, analysis, and simulation, making full use of the powerful
capabilities provided by NI Multisim’s SPICE Simulation tools.

Here, you’ll find supplementary materials to further explore the capabilities of SPICE simulation and gain insights into PCB creation using NI Multisim.

After running the program Multisim opens the default capture and simulation environment:



MultisimIDE


Now let’s select the components for our amplifier





The Component Browser dialog window will appear, with components organized into Groups and Families:







In the same Component Browser window, under the label ‘Components’, we can search for a component by entering its name. In this case, ‘LM1875T