4.0: Prelude
- Page ID
- 137365
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)In Chapter 1, we discussed that the mechatronic system intersects mainly with four engineering disciplines: control systems, computer science and engineering, electrical and electronic engineering, and mechanical engineering. Within a mechatronic system, these signals can be divided into two domains: digital information and physical domains. The digital domain handles digital information by the microprocessor (or microcontroller) whereas the physical domain handles analog information from the physical systems, including the sensors and actuators.(See Figure 1.2 in Chapter 1 for details as well as Figure 4.1).
This chapter addresses analog and digital signals in the physical and digital domains. We discuss how to convert analog signals to digital ones and vice versa, using analog-to-digital (A/D) and digital-to-analog (D/A) converters. We will present and analyze frequency responses of both analog and discrete signals as well as fast-Fourier transform (FFT). Consequently, we will introduce analog and digital filter design techniques. Later in the chapter, we discuss the Nyquist-Shannon sample frequency theorem along with sample aliasing and anti-aliasing filters. Figure 4.2 depicts the contents of Chapter 4, indicating the connection between the information (discrete-time) and physical (continuous-time) domains.
Section 4.1 addresses the analog signal in a continuous-time physical domain and its frequency domain analysis in terms of the signal magnitude and phase. The Bode plot, introduced in Section 3.2, is used to plot the signal frequency responses (magnitude and phase). We will also discuss the concept of angular frequency in radian per second (rad/s) and oscillation frequency in Hertz (oscillation per second, Hz) as well as their relationship. Note that in the Bode plot [1], the horizontal axis is in angular frequency \(\omega\) (rad/s) and, in industry, the oscillation frequency \(f\) in Hertz (Hz) is widely used, where \(\omega =2\pi f\).
As Figure 4.1 indicates, the information of mechatronic systems is often processed in the information domain using a microcontroller (or microprocessor). Therefore, the physical domain analog signals need to be converted into digital ones using analog-to-digital (A/D) converters [2], [3]. Furthermore, the information domain digital signals can be converted back into analog ones using digital-to-analog (D/A) converters [4], [5]. Section 4.2 discusses the sample and hold circuit, along with the relationship between the analog and sampled digital signals. The section also looks at typical analog-to-digital (A/D) and digital-to-analog (D/A) converter electronic circuits.
Section 4.3 focuses on the digital signals inside the information domain of a mechatronic system. They are often obtained by analog-to-digital (A/D) conversion of system sensor signals. Sometimes these signals come through a so-called sample and hold process. Other times, the signals are input directly through microcontroller (microprocessor) digital input channels either by counting the number of pulses or by recording the time duration between two pulses. The microcontroller of a mechatronic system processes these digital signals through filtering, signal conditioning, and generating control signals.
The digital signal can be analyzed in the frequency domain similar to the case of analog signals using the discrete Fourier transform [6], [7], [8], which requires a lot of computational time. In order to make the real-time frequency analysis possible, we often use the fast Fourier transform (FFT) [7]. This requires the signal length \(l\ \)equal to \(l=2^n\), where \(n>0\) is an integer. The FFT can reduce transform calculation throughput by more than 90% when \(n\) is large, compared with the conventional discrete Fourier transform. For the discrete Fourier transform, the highest frequency information is limited by the signal sample frequency, and the lowest frequency information is limited by the signal length \(l\).
Analog and digital signals in physical and information domains, respectively, use analog and digital filters widely to get rid of the undesired information over certain frequency range contained in the signal. For instance, the low-pass filter is often used to get rid of high-frequency noise contained in the sensor signal. Meanwhile, the high-pass filter can be used to eliminate the DC bias in the signal, especially in the case integration of the signal is required. Band-pass and band-kill (notch) filters can also be used to allow the signal with a specific frequency range to pass the filter or to get rid of a specific frequency component.
Note that analog and digital filters [9], [10] have different characteristics. For certain applications (such as eliminating sampling aliasing), only analog filters can be used. Section 4.4 addresses designing both analog and digital filters, along with the realization of analog filter using electronic circuits. Digital filters are implemented in software as computational algorithms with no hardware required. Therefore, it is inexpensive to implement digital filters. For extremely fast application, FPGA (field programmable gate arrays) silicon is often used for implementing digital filters with certain cost [11].
During the conversion process of the analog signal in the physical domain to the digital signal in the information domain through sample and hold in the form of analog-to-digital (A/D) converter, it is both desired and important to retain the information contained in the analog signal once it is in the converted digital signal. Otherwise, the sampled signals are not useful in the information domain because of lost information. In addition, if the sample frequency is too low, the digital signal may contain information in these frequencies (called aliasing frequencies) that are not contained in the original analog signal. This can lead to errors not only in the sampled digital signals, but also, as a result, in the control signals generated by the microcontroller.
In Section 4.5, we introduce the Nyquist-Shannon theorem, which provides a sample frequency condition to avoid sample aliasing [12], [13]. The sample frequency should be at least two times higher than the highest frequency component contained in the analog signal. In order to avoid sample aliasing, after the sample frequency is selected, an analog anti-aliasing filter shall be designed and placed before the A/D converter. Here, the low-pass filter has a corner frequency below at least one half of the sample frequency [14].
Next, we discuss another class of signals in Section 4.6. Although these pulse-width modulated and frequency modulated signals are digital in nature, they represent analog signals in the physical domain. The pulse-width modulated signal is a square pulse train with fixed frequency but varying duty-cycle [15]. The frequency modulated signal [16] is a fixed duty-cycle signal (such as square waive or sinusoid signal) with varying frequency. Note that a frequency modulated sinusoid signal is often used to transmit the radio signal.
For square-wave pulse-width modulated signals, we can convert the signal from physical domain into information domain by first counting the clock pulse activated by the square-wave. We then transfer the signal from the information domain to the physical domain by using a fixed frequency saw-wave and a comparator. Note that the pulse-width modulated signal is often used to control DC motors to reduce the energy consumption of the amplifying circuit.
Many advanced filter design methodologies can be used to improve signal quality; these are discussed in Section 4.7. Note that first and second order filters do not have a clean cutoff around the corner frequency. As a result, a certain amount of the unwanted signal (noise) beyond or below the corner frequency passes through the filter, which is undesirable. To improve filtering quality, high order filters such as Butterworth and Chebyshev filters [17] are often designed and implemented. This section addresses the design of both analog Butterworth and Chebyshev filters, along with its implementation hardware, especially for analog Butterworth and Chebyshev filters. We also discuss digital filter implementation with an example of moving average.
Orienting Questions
- How do we conduct frequency domain analysis for both analog and digital signals?
- What are the processes of analog-to-digital (A/D) and digital-to-analog (D/A) signal conversions?
- How do we design analog low-pass, high-pass, band-pass, and band-kill (notch) filters?
- What is the Nyquist-Shannon sample theory?
- How do we select the sample and anti-aliasing filter frequencies to avoid sampling frequency aliasing?


