1. Digital Signal Processing FoundationsIntroduction and ContextDigital signal processing (DSP) is the study and application of mathematical, algorithmic, and computational methods for representing, transforming, analysing, transmitting, storing, and interpreting signals in discrete form. A signal is a physical or abstract quantity that conveys information. Speech pressure, biomedical voltage, radar echoes, vibration, temperature, and communication waveforms are examples of signals. In a digital signal-processing system, these quantities are represented by sequences of numbers and processed using algorithms implemented in software, programmable logic, digital signal processors, or general-purpose computers. The distinction between a continuous-time signal and a discrete-time signal is fundamental. A continuous-time signal is defined at every instant of time, whereas a discrete-time signal is defined only at specified time instants. Sampling converts a continuous-time waveform into a sequence, and quantization converts amplitude values into a finite set of numerical levels. Sampling and quantization are related but distinct operations: sampling concerns the time axis, while quantization concerns amplitude. DSP is not merely the replacement of analogue circuits by digital hardware. It provides a framework for precise, repeatable, programmable, and often highly sophisticated signal manipulation. Digital methods can implement filters with characteristics that are difficult to realize in analogue form, support adaptive and data-driven processing, and permit storage and transmission with error detection and correction. At the same time, DSP systems introduce issues such as aliasing, quantization noise, finite precision, computational delay, memory requirements, and real-time constraints. This chapter establishes the language and analytical foundation required for later study of sampling theory, transform methods, digital filter design, spectral analysis, multirate processing, statistical signal processing, and modern applications such as machine learning for signals. Learning ObjectivesAfter studying this chapter, the reader should be able to: 1. Distinguish continuous-time, discrete-time, analog, and digital signals. 2. Classify discrete-time signals according to dimensionality, determinism, periodicity, symmetry, and energy or power content. 3. Perform time shifting, time reversal, amplitude scaling, and other sequence operations accurately. 4. Explain the role of unit impulse, unit step, ramp, and complex exponential sequences. 5. Determine the energy and average power of important discrete-time signals. 6. Classify systems using linearity, time invariance, causality, stability, memory, and invertibility. 7. Describe a typical DSP workflow and identify the function of its major components. 8. Relate DSP concepts to engineering applications and implementation constraints. 9. Recognize common analytical and practical errors in discrete-time signal processing. From Physical Phenomenon to Digital SequenceA useful DSP model begins with a source, a sensing or acquisition stage, a processing stage, and an output or decision stage. For example, in a vibration-monitoring system, an accelerometer produces an electrical signal proportional to mechanical acceleration. An analogue anti-aliasing filter limits the input bandwidth, an analogue-to-digital converter samples and quantizes the signal, and a digital algorithm estimates vibration features or detects a fault. The result may be displayed, stored, transmitted, or used to control machinery. A discrete-time signal is commonly written as x[n], n ∈ ℤ, where n is an integer-valued index. The notation emphasizes that the independent variable is an integer rather than continuous time t. If a sequence is obtained by uniformly sampling x_a(t) at sampling interval T_s, then x[n] = x_a(nT_s), where the sampling frequency is f_s = 1/T_s and the angular sampling frequency is Ω_s = 2π/T_s. The sequence itself does not contain the physical unit of time unless the sampling interval is specified. Thus, the same numerical sequence can represent audio samples, temperature measurements, or radar data depending on T_s and the measurement context. An analogue signal has continuous amplitude, while a digital signal is represented using finite-precision numerical values. In practice, digital processing requires both discrete time and finite numerical representation. Nevertheless, theoretical DSP often distinguishes discrete-time signals, whose amplitudes may be mathematically real-valued, from digital signals, whose amplitudes are quantized and encoded. Why digital processing is valuableDigital implementation offers programmability, reproducibility, high immunity to component ageing, convenient storage, and integration with communication and computing systems. A filter specification can be changed through software rather than by replacing circuit components. Digital systems can also combine signal processing with classification, optimization, networking, and control. These advantages must be balanced against latency, processor workload, power consumption, memory bandwidth, numerical precision, and the need for appropriate analogue interfaces. A poorly designed acquisition stage cannot generally be repaired by later digital processing; information lost through inadequate sampling or clipping is unavailable to the algorithm. Discrete-Time Signal ClassificationOne-dimensional and multidimensional sequencesA sequence such as x[n] is one-dimensional because it has one independent index. An image is usually represented by a two-dimensional array x[m,n], while video may be described by x[m,n,k], with two spatial indices and one time index. The principles introduced here extend to multidimensional signals, although their geometry and transforms require additional treatment. Deterministic and random signalsA deterministic signal is completely specified by a rule or formula. For example, x[n] = (1/2)^n u[n] is deterministic. A random or stochastic signal cannot be predicted exactly at every index and is instead described statistically through quantities such as mean, variance, autocorrelation, and probability distributions. Measured noise is commonly treated as stochastic, although a particular recorded noise sequence is deterministic once it has been stored. Periodic and aperiodic signalsA discrete-time sequence is periodic if there exists a positive integer N such that x[n + N] = x[n] for every n. The smallest such positive integer is the fundamental period N_0. A complex exponential x[n] = e^{jω_0n} is periodic only when ω_0/(2π) is rational. If ω_0 = 2πp/q, where p and q are relatively prime integers, the fundamental period is q. This differs from continuous-time complex exponentials, for which any frequency produces a periodic waveform in the usual sinusoidal sense. A sum of periodic discrete-time signals is periodic only if the ratio of their periods is rational; for integer periods, a common period is generally the least common multiple. If no positive integer satisfies the periodicity condition, the sequence is aperiodic. Even and odd sequencesA sequence is even if x[n] = x[-n], and odd if x[n] = -x[-n]. Every sequence can be decomposed uniquely into even and odd components: x_e[n] = 1/2[x[n] + x[-n]], x_o[n] = 1/2[x[n] - x[-n]], so that x[n] = x_e[n] + x_o[n]. This decomposition is useful in signal analysis, filter design, and symmetry-based computation. For real signals, even symmetry corresponds to mirror symmetry about n = 0, while odd symmetry implies x[0] = 0. Finite-duration and infinite-duration sequencesA finite-duration sequence is nonzero over only a finite set of indices. An infinite-duration sequence extends indefinitely in at least one direction. The sequence u[n], defined below, is infinite in the positive direction. Duration is important in storage, computation, transform analysis, and system response. Standard Sequences and Complex ExponentialsThe unit impulse, or Kronecker delta, is defined by δ[n] = 1, n = 0; δ[n] = 0, n ≠ 0. It has the sifting property x[n]δ[n-k] = x[k]δ[n-k], and any sequence can be represented as x[n] = Σ_k x[k]δ[n-k]. This representation explains why the impulse response is central to linear time-invariant systems: the system response to an arbitrary input can be assembled from shifted and scaled impulse responses. The unit step is u[n] = 1, n ≥ 0; u[n] = 0, n < 0. Depending on convention, the value at n = 0 may be assigned differently in special contexts, but the convention above is standard in elementary DSP. A discrete-time ramp may be defined as r[n] = n u[n]. Relationships among these sequences include u[n] - u[n-1] = δ[n] and, under appropriate definitions, r[n] - r[n-1] = u[n]. The complex exponential sequence e^{jωn} is a fundamental building block. Euler’s identity gives e^{jωn} = cos(ωn) + j sin(ωn). Its magnitude is one, and its phase is ωn. Discrete-time frequency is periodic with period 2π because e^{j(ω+2π)n} = e^{jωn} for integer n. Consequently, frequencies differing by integer multiples of 2π describe the same discrete-time complex exponential. This periodicity is one of the defining differences between continuous-time and discrete-time frequency descriptions. The real and imaginary parts of a complex exponential are cosine and sine sequences. For a real sinusoid, the frequency may be interpreted modulo 2π, and frequencies ω and −ω correspond to conjugate-related components. Complex exponentials are eigenfunctions of linear time-invariant systems: if the input is e^{jωn}, the output is H(e^{jω})e^{jωn}, where H(e^{jω}) is the system frequency response. Operations on SequencesSequence operations are a frequent source of errors because the index, not the graphical position alone, determines the result. For a given x[n], the expression x[n-n_0] shifts the sequence to the right by n_0 when n_0 is positive, while x[n+n_0] shifts it to the left. Time reversal produces x[-n]. Amplitude scaling produces A x[n], and addition is performed pointwise. A reliable procedure is to identify a reference sample, usually x[0], determine its new index after the operation, and then map all other samples. For example, if x[n] has x[0] = 3 and y[n] = x[n-2], the sample of value 3 appears at n = 2. If z[n] = x[2-n], both reversal and shifting are involved; writing m = 2-n shows that x[m] is placed at n = 2-m. The running sum and first difference are important operations: s[n] = Σ_{k=-∞}^{n} x[k], Δx[n] = x[n] - x[n-1]. The running sum acts as a discrete accumulator, while the first difference is a discrete derivative. They are approximately related to integration and differentiation, but their scaling and frequency behaviour must be interpreted in the discrete-time setting. Convolution for two sequences is defined by (x*h)[n] = Σ_{k=-∞}^{∞} x[k]h[n-k]. For a linear time-invariant system with impulse response h[n], the output is y[n] = x[n]*h[n]. Convolution is commutative, associative, and distributive when the relevant sums converge. In practical implementations, finite-length signals and finite impulse responses reduce the computation to a finite sum. Measuring Signal Size: Energy and PowerFor a complex-valued sequence x[n], its total energy is E_x = Σ_{n=-∞}^{∞} |x[n]|². A sequence is an energy signal if 0 < E_x < ∞. Its average power is defined as P_x = lim_{N→∞} 1/(2N+1) Σ_{n=-N}^{N} |x[n]|², provided the limit exists. A power signal has finite, nonzero average power, generally with infinite energy. A nonzero sequence cannot normally be both a finite-energy signal and a finite-power signal under these standard definitions, although the zero signal is a special case. A finite-duration nonzero sequence is always an energy signal. A nonzero periodic sequence with finite average squared magnitude is a power signal because its energy accumulated over infinitely many periods diverges while its average power remains finite. For a periodic sequence of period N_0, P_x = 1/N_0 Σ_{n=0}^{N_0-1}|x[n]|². For x[n] = a^n u[n], the sequence is an energy signal when |a| < 1, because the geometric series converges. If |a| = 1, it is generally a power signal, and if |a| > 1, neither finite energy nor finite average power exists. Energy and power measures are not merely formal classifications; they influence detector design, normalization, communication-system analysis, and numerical scaling. Systems: Properties That Determine BehaviourA discrete-time system maps an input sequence x[n] to an output y[n]. The following properties provide a practical classification framework. A system is linear if it satisfies superposition: T{a x_1[n] + b x_2[n]} = aT{x_1[n]} + bT{x_2[n]}. Both additivity and homogeneity are required. A nonzero constant offset introduced independently of the input generally makes a system non-linear, even if the remaining operation is linear. A system is time invariant if delaying the input delays the output by the same amount. If T{x[n]} = y[n], then time invariance requires T{x[n-n_0]} = y[n-n_0] for every admissible x[n] and n_0. A system may be linear but time varying, or time invariant but nonlinear. A system is causal if y[n_0] depends only on input samples at indices n ≤ n_0. Dependence on future input values makes the system noncausal. In real-time physical implementation, strict causality is usually required, although offline processing can implement noncausal operations by using stored data. A system is BIBO stable if every bounded input produces a bounded output. For an LTI system, a central result is that BIBO stability is equivalent to absolute summability of the impulse response: Σ_{n=-∞}^{∞}|h[n]| < ∞. A memoryless system has an output at n determined only by the input at the same n. A system involving x[n-1], an accumulator, or stored state has memory. An invertible system permits recovery of the input uniquely from the output. These properties must be checked independently; for example, a system may be causal and stable but not invertible. The DSP Workflow and Its Design Trade-offsA practical DSP system typically follows this chain: 1. sensing and analogue conditioning; 2. anti-alias filtering; 3. sampling and quantization through an ADC; 4. digital storage, transport, or buffering; 5. algorithmic processing; 6. output conversion or decision; 7. reconstruction filtering where an analogue waveform is required. The anti-alias filter attenuates frequency components above the usable band before sampling. If those components are sampled without adequate attenuation, they fold into lower frequencies and become indistinguishable from legitimate content. No later digital filter can reliably separate an aliased component from a genuine component at the same discrete frequency. The choice of sampling frequency depends on signal bandwidth, transition-band requirements, hardware cost, latency, and the intended processing. Quantization introduces an error between the analogue sample and its represented level. For sufficiently well-behaved signals, this error may be approximated as noise, but the approximation fails for overload, low-level signals, correlated errors, and some deterministic inputs. Algorithm selection is an engineering decision rather than a purely mathematical one. Important criteria include accuracy, computational complexity, memory use, numerical robustness, latency, throughput, power consumption, and ease of verification. A high-order algorithm with excellent theoretical performance may be unsuitable for an embedded controller if it exceeds the processor’s timing budget. Applications and Professional UseDSP is used in audio equalization, speech enhancement, hearing aids, wireless communication, radar, sonar, medical imaging, electrocardiography, seismic analysis, machine condition monitoring, control instrumentation, and consumer electronics. In communications, DSP supports modulation, synchronization, channel equalization, coding, and detection. In biomedical systems, it can suppress baseline wander and power-line interference while preserving clinically meaningful features. In industrial practice, engineers must connect signal properties with operational decisions. A vibration-processing algorithm should not be judged only by frequency-response plots; it must also be evaluated against sensor placement, mechanical variability, false alarms, maintenance costs, and safety consequences. Similarly, a medical signal algorithm must account for patient variability, sensor artefacts, validation data, explainability, and regulatory requirements. Modern processors increasingly combine DSP cores, GPUs, FPGAs, and machine-learning accelerators. Neural networks may classify spectrograms or learned signal features, but their input quality still depends on sampling, synchronization, scaling, and noise control. Machine learning complements rather than eliminates foundational DSP knowledge. Illustrative Case Study: Digital Vibration MonitoringBackgroundConsider a fictional manufacturing plant seeking early detection of bearing faults in a high-speed motor. An accelerometer is mounted on the motor housing and produces a broadband voltage signal. The monitoring unit must detect changes while the motor operates continuously. Situation and problemInitial trials produced inconsistent alarms. Engineers observed that the data-acquisition unit sampled at a rate only slightly above the nominal frequency range of interest, while significant high-frequency mechanical energy remained in the sensor output. In addition, the algorithm used unscaled integer samples and had no explicit overload monitoring. AnalysisThe unfiltered high-frequency energy could alias into the diagnostic band. Once aliased, it could not be distinguished from genuine bearing-related components through later digital processing. Integer scaling also caused small changes in signal level to be obscured, while occasional large transients caused clipping. The system’s classification accuracy therefore reflected acquisition faults as much as algorithm quality. Approach and solutionThe engineering team first specified the diagnostic band and selected an analogue anti-alias filter with a transition band appropriate to the chosen sampling frequency. The sampling rate was increased to provide practical filter roll-off and timing margin. The ADC range was selected using measured operating data, with overload flags recorded alongside the samples. In the digital stage, the team removed the mean, applied a calibrated band-pass filter, computed windowed energy and spectral features, and evaluated the detector using separate data from normal and faulty operating conditions. The implementation was then tested for latency, processor utilization, finite-word-length effects, and sensor disconnection. Thresholds were selected using the cost of missed faults and false maintenance interventions rather than accuracy alone. OutcomeThe revised system produced more stable features and substantially fewer spurious alarms in the plant trial. The principal improvement came not from a more complex classifier but from correct analogue conditioning, sampling, scaling, and validation. Learning pointsThe case illustrates four general lessons: acquisition is part of signal processing; aliasing is irreversible after sampling; algorithm performance must be evaluated within system constraints; and engineering success requires linking mathematical measures to operational consequences. Challenges, Errors, and Professional ResponsibilitiesCommon mistakes include confusing x[n-n_0] with x[n+n_0], treating discrete-time frequency as nonperiodic, assuming every sinusoid is periodic, neglecting the distinction between energy and power, and testing linearity using only one input. Another error is to apply a digital filter to aliased data while assuming the original spectrum can be recovered. Finite word length creates rounding, truncation, coefficient quantization, overflow, and limit-cycle effects. Fixed-point implementations require explicit range analysis, saturation policy, scaling, and testing under worst-case conditions. Floating-point arithmetic reduces some problems but does not remove numerical instability or implementation errors. Professional DSP work also involves responsible data handling. Biomedical and personal audio signals may contain sensitive information and require appropriate access control, retention policies, consent, and compliance with applicable law. Safety-critical algorithms need traceable requirements, independent verification, representative test data, documented failure modes, and monitoring after deployment. If machine learning is used, engineers should examine dataset bias, distribution shift, uncertainty, and the consequences of false decisions. Emerging Directions and Best PracticesCurrent DSP development increasingly combines classical transforms and filters with adaptive algorithms, embedded intelligence, edge computing, software-defined instrumentation, and learned representations. Real-time systems are moving toward heterogeneous hardware and energy-aware computation. At the same time, explainability, reproducibility, cybersecurity, and lifecycle maintenance are becoming as important as raw processing speed. Sound practice begins with a precise signal model and measurable requirements. Engineers should specify bandwidth, dynamic range, sampling rate, acceptable latency, accuracy, and failure response before selecting an algorithm. They should preserve units and calibration information, test ideal and nonideal cases, compare simulation with implementation, and document assumptions. Independent checks of indexing, frequency conventions, overflow, and boundary conditions are inexpensive and prevent many failures. Chapter SummaryDigital signal processing represents and manipulates signals as numerical sequences. The chapter distinguished continuous-time, discrete-time, analogue, and digital signals and described the acquisition chain from sensing to digital computation. Discrete-time sequences may be classified as deterministic or random, periodic or aperiodic, even or odd, and finite- or infinite-duration. Unit impulse, step, ramp, and complex exponential sequences provide essential analytical building blocks. Sequence operations include shifting, reversal, scaling, summation, differencing, and convolution. Energy is the sum of squared magnitudes, while average power is the long-term mean squared magnitude; these measures classify important signal families. Systems can be analysed through linearity, time invariance, causality, stability, memory, and invertibility. A complete DSP design must address anti-alias filtering, sampling, quantization, computational resources, numerical precision, latency, and application-specific consequences. The vibration-monitoring case demonstrated that reliable processing depends on the entire system rather than on an algorithm in isolation. Key TermsDiscrete-time signal: A signal defined only at discrete index values. Digital signal: A numerically encoded signal with discrete time and finite amplitude representation. Sampling: Measuring a continuous-time signal at selected time instants. Quantization: Mapping amplitudes to a finite set of numerical levels. Sequence: A function defined on integer indices, commonly written x[n]. Unit impulse: The sequence δ[n] that equals one at n = 0 and zero elsewhere. Unit step: The sequence u[n] that equals one for n ≥ 0 and zero otherwise. Complex exponential: The sequence e^{jωn}, a fundamental discrete-time signal. Periodicity: Repetition satisfying x[n+N] = x[n] for a positive integer N. Even sequence: A sequence satisfying x[n] = x[-n]. Odd sequence: A sequence satisfying x[n] = −x[-n]. Energy signal: A signal with finite, nonzero total squared magnitude. Power signal: A signal with finite, nonzero long-term average squared magnitude. Convolution: The summation operation producing the output of an LTI system from input and impulse response. Linearity: The property of satisfying additivity and homogeneity. Time invariance: The property that an input shift produces the same output shift. Causality: Dependence of the output only on present and past inputs. BIBO stability: Bounded-input, bounded-output behaviour. Aliasing: Irreversible spectral overlap caused by inadequate sampling. Finite word length: The limited numerical precision used in digital implementation. Review QuestionsShort Answer Questions1. Distinguish sampling from quantization. 2. State the condition for periodicity of a discrete-time sequence. 3. Define the unit impulse and state its sifting property. 4. What is the difference between an energy signal and a power signal? 5. Define causality for a discrete-time system. Long Answer Questions1. Explain the complete DSP acquisition and processing workflow, including the role of anti-alias filtering. 2. Discuss the classification of discrete-time signals using periodicity, symmetry, duration, and deterministic character. 3. Derive the even and odd components of an arbitrary sequence and explain their significance. 4. Explain linearity, time invariance, causality, stability, memory, and invertibility as system properties. 5. Discuss the advantages and implementation constraints of digital processing compared with analogue processing. Analytical / Application Questions1. Determine whether x[n] = (0.8)^n u[n] is an energy signal, a power signal, or neither, and justify your answer. 2. A sequence has nonzero samples x[0] = 2, x[1] = −1, and x[3] = 4. Describe the locations and values of these samples in y[n] = x[2−n]. 3. Design a high-level DSP plan for detecting an abnormal condition in a rotating machine. Identify the acquisition risks, processing stages, performance criteria, and validation requirements. 22. Multiple Choice Questions with AnswersQuestion 1Which statement correctly distinguishes sampling from quantization? A. Sampling discretizes amplitude, whereas quantization discretizes time. B. Sampling discretizes time, whereas quantization discretizes amplitude. C. Both sampling and quantization discretize only frequency. D. Sampling applies only to digital signals, whereas quantization applies only to analogue filters. Correct Answer: B. Sampling discretizes time, whereas quantization discretizes amplitude. Question 2For x[n] = e^{j(π/3)n}, what is the fundamental period? A. 2 B. 3 C. 6 D. π Correct Answer: C. 6 Question 3If y[n] = x[n−4], where does the sample x[0] appear in y[n]? A. n = −4 B. n = 0 C. n = 4 D. It is eliminated Correct Answer: C. n = 4 Question 4Which sequence is an energy signal under the standard definitions? A. A nonzero periodic sequence with finite amplitude B. x[n] = (0.5)^n u[n] C. A constant nonzero sequence D. x[n] = 2^n u[n] Correct Answer: B. x[n] = (0.5)^n u[n] Question 5For an LTI system, which condition is equivalent to BIBO stability? A. The impulse response is periodic B. The impulse response is absolutely summable C. The input is finite duration D. The system is memoryless Correct Answer: B. The impulse response is absolutely summable Question 6Which operation produces the odd component of x[n]? A. (x[n] + x[−n])/2 B. x[n]x[−n] C. (x[n] − x[−n])/2 D. x[n] + x[n−1] Correct Answer: C. (x[n] − x[−n])/2 Question 7Why can a digital filter generally not remove aliasing after it has occurred? A. Digital filters cannot process complex signals. B. Aliased components become indistinguishable from legitimate components at the same discrete frequency. C. Anti-alias filters operate only after quantization. D. Sampling increases the signal bandwidth permanently. Correct Answer: B. Aliased components become indistinguishable from legitimate components at the same discrete frequency. Question 8A system defined by y[n] = x[n] + x[n−1] is best classified as: A. Memoryless and noncausal B. Causal and having memory C. Noncausal and unstable D. Memoryless and time varying Correct Answer: B. Causal and having memory Question 9Which statement about discrete-time frequency is correct? A. e^{jωn} and e^{j(ω+2π)n} are identical sequences. B. Every discrete-time sinusoid is periodic for every real ω. C. Discrete-time frequency is not periodic. D. The frequency ω must always lie between 0 and 1. Correct Answer: A. e^{jωn} and e^{j(ω+2π)n} are identical sequences. Question 10In the vibration-monitoring case, the most fundamental cause of unreliable alarms was addressed by: A. Replacing all signal processing with manual inspection. B. Ignoring high-frequency sensor content. C. Improving analogue conditioning, sampling, scaling, and validation. D. Using the highest possible classifier complexity without changing acquisition. Correct Answer: C. Improving analogue conditioning, sampling, scaling, and validation.
|