## Digital PLL's -- Part 2

June 15, 2016

In Part 1, we found the time response of a 2nd order PLL with a proportional + integral (lead-lag) loop filter.  Now let’s look at this PLL in the Z-domain [1, 2].  We will find that the response is characterized by a loop natural frequency ωn and damping coefficient ζ.

Having a Z-domain model of the DPLL will allow us to do three things:

Compute the values of loop filter proportional gain KL and integrator gain KI that give the desired loop natural frequency and...

## Digital PLL's -- Part 1

1. Introduction

Figure 1.1 is a block diagram of a digital PLL (DPLL).  The purpose of the DPLL is to lock the phase of a numerically controlled oscillator (NCO) to a reference signal.  The loop includes a phase detector to compute phase error and a loop filter to set loop dynamic performance.  The output of the loop filter controls the frequency and phase of the NCO, driving the phase error to zero.

One application of the DPLL is to recover the timing in a digital...

## Stability or insanity

May 17, 20161 comment

I've just spent over two weeks getting ready to do my next video.  It was a combination of one of those vast underestimations one occasionally makes, combined with falling into a bit of an obsession.

I am, at this point, not only wondering if it was worth it, but questioning my sanity in carrying on even when the going went beyond tough to just plain crazy.

At any rate, a good video needs a visual aid, and I decided that my video needed to demonstrate stability with a pendulum....

## PID Without a PhD

I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.

This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...

## 3 Good News

March 9, 20161 comment
Good News #1

Last week, I announced a new and ambitious reward program that will be funded by the new Vendors Directory.

This week, I am happy to announce that we have our firsts two sponsors!  Quantum Leaps & Abelon Systems have agreed to pay the sponsorship fee to be listed in the new Vendors Directory.  Because of their support, there is now some money in the reward pool ($1,000) and enough to pay for the firsts 500 'beers' awarded. Please... ## Go Big or Go Home - Generating$500,000 for Contributors

In a Nutshell
• A new Vendors Directory has been created
• Vendors will be invited to pay a sponsorship fee to be listed in the directory
• 100% of the basic sponsorship fee will be distributed to the *Related Sites community through a novel reward system
• The goal is for the directory to eventually generate - drum roll please -  $500,000 on a yearly basis for contributing members on the *Related Sites • Members will choose how the reward money gets distributed between... ## The New Forum is LIVE! February 18, 20161 comment After months of hard word, I am very excited to introduce to you the new forum interface. Here are the key features: 1- Easily add images to a post by drag & dropping the images in the editor 2- Easily attach files to a post by drag & dropping the files in the editor 3- Add latex equations to a post and they will be rendered with Mathjax (tutorial) 4- Add a code snippet and surround the code with ## Ancient History January 18, 201612 comments The other day I was downloading an IDE for a new (to me) OS. When I went to compile some sample code, it failed. I went onto a forum, where I was told "if you read the release notes you'd know that the peripheral libraries are in a legacy download". Well damn! Looking back at my previous versions I realized I must have done that and forgotten about it. Everything changes, and keeping up with it takes time and effort. When I first started with microprocessors we... ## What IS an electron? December 21, 20155 comments When I was a student I got kicked out of a professor's office for having the gall to say that an electron was nothing more than a theory. I still believe that. It is an amazing and awesome theory, and the more we learn the more wonderous the theory becomes. The word electron first appeard in 1891 long after electricity had been in use. In 1897 the electron was discovered by J.J. Thompson who proved it was a sub atomic particle. By this time we already had electric lights. In fact... ## The Art of Debugging December 11, 20151 comment Debugging electronics is similar to any technological process. In theory we know how things are supposed to work, in reality they don't behave as expected. The challenge of engineering boils down to making things work, and debugging is the fundamental task we use to go from lumps of sand to picosecond accurate switching networks. Debugging is an art that requires a lot of time to learn. Like any skill, the more we work at it, the better we become. The first... ## First-Order Systems: The Happy Family May 3, 20141 comment Все счастли́вые се́мьи похо́жи друг на дру́га, ка́ждая несчастли́вая семья́ несчастли́ва по-сво́ему. — Лев Николаевич Толстой, Анна Каренина Happy families are all alike; every unhappy family is unhappy in its own way. — Lev Nicholaevich Tolstoy, Anna Karenina I was going to write an article about second-order systems, but then realized that it would be... ## Have You Ever Seen an Ideal Op-Amp? April 30, 2012 Somewhere, along with unicorns and the Loch Ness Monster, lies a small colony of ideal op-amps. Op-amp is short for operational amplifier, and we start our education on them by learning about these mythical beasts, which have the following properties: • Infinite gain • Infinite input impedance • Zero output impedance And on top of it all, they will do whatever it takes to change their output in order to make their two inputs equal. But they don't exist. Real op-amps have... ## Real-time clocks: Does anybody really know what time it is? May 30, 20118 comments We recently started writing software to make use of a real-time clock IC, and found to our chagrin that the chip was missing a rather useful function, namely elapsed time in seconds since the standard epoch (January 1, 1970, midnight UTC).Let me back up a second.A real-time clock/calendar (RTC) is a micropower chip that has an oscillator on it that keeps counting time, independent of main system power. Usually this is done with a lithium battery that can power the RTC for years, so that even... ## Oscilloscope review: Hameg HMO2024 March 28, 20133 comments Last year I wrote about some of the key characteristics of oscilloscopes that are important to me for working with embedded microcontrollers. In that blog entry I rated the Agilent MSOX3024A 4-channel 16-digital-input oscilloscope highly. Since then I have moved to a different career, and I am again on the lookout for an oscilloscope. I still consider the Agilent MSOX3024A the best choice for a... ## Stairway to Thévenin December 31, 2011 This article was inspired by a recent post on reddit asking for help on Thévenin and Norton equivalent circuits. (With apologies to Mr. Thévenin, the rest of the e's that follow will remain unaccented.) I still remember my introductory circuits class on the subject, roughly as follows: (NOTE: Do not get scared of what you see in the rest of this section. We're going to point out the traditional approach for teaching linear equivalent circuits first. If you have... ## Digital PLL's -- Part 1 June 7, 20167 comments 1. Introduction Figure 1.1 is a block diagram of a digital PLL (DPLL). The purpose of the DPLL is to lock the phase of a numerically controlled oscillator (NCO) to a reference signal. The loop includes a phase detector to compute phase error and a loop filter to set loop dynamic performance. The output of the loop filter controls the frequency and phase of the NCO, driving the phase error to zero. One application of the DPLL is to recover the timing in a digital... ## Two jobs December 5, 201223 comments For those of you following closely embeddedrelated and the other related sites, you might have noticed that I have been less active for the last couple of months, and I will use this blog post to explain why. The main reason is that I got myself involved into a project that ended up using a better part of my cpu than I originally thought it would. I currently have two jobs: one as an electrical/dsp engineer recycled as a web publisher and the other as a parent of three kids. My job... ## March is Oscilloscope Month — and at Tim Scale! March 6, 2014 I got my oscilloscope today. Maybe that was a bit of an understatement; I'll have to resort to gratuitous typography: I GOT MY OSCILLOSCOPE TODAY!!!! Those of you who are reading this blog may remember I made a post about two years ago about searching for the right oscilloscope for me. Since then, I changed jobs and have been getting situated in the world of applications engineering, working on motor control projects. I've been gradually working to fill in gaps in the infrastructure... ## Go Big or Go Home - Generating$500,000 for Contributors

In a Nutshell
• A new Vendors Directory has been created
• Vendors will be invited to pay a sponsorship fee to be listed in the directory
• 100% of the basic sponsorship fee will be distributed to the *Related Sites community through a novel reward system
• The goal is for the directory to eventually generate - drum roll please -  \$500,000 on a yearly basis for contributing members on the *Related Sites
• Members will choose how the reward money gets distributed between...