Tag Archives: Signal Processing

Discrete-Time Signals and System Properties

First, a comparison between Discrete-Time and Digital signals:

The independent variable (most commonly time) is represented by a sequence of numbers of a fixed interval. Both the independent variable and dependent variable are represented by a sequence of numbers of a fixed interval. 

Discrete-Time and Digital signal examples are shown below:

Discrete-Time Systems and Digital Systems are defined by their inputs and outputs being both either Discrete-Time Signals or Digital Signals.

Discrete-Time Signals

Discrete-Time Signal x[x] is sequence for all integers n.

  Unit Sample Sequence:
𝜹[n]: 1 at n=0, 0 otherwise.  
   Unit Step:
u[n] = 1 at n>=0, 0 otherwise.


Any sequence: x[n] = a1* 𝜹[n-1] + a2* 𝜹[n-2]+…
where a1, a2 are magnitude at integer n.

Exponential & Sinusoidal Sequences

Exponential sequence: x[n] = A 𝞪n
                                                 where 𝞪 is complex, x[n] = |A|ej𝜙 |𝞪|e0n=|A||𝞪|n ej(ω0n+𝜙)
                                                                                                     = |A||𝞪|n(cos(ω0n+𝜙)+j sin(ω0n+𝜙))
                Complex and sinusoidal: -𝝅< ω0< 𝝅 or 0< ω0< 2𝝅.

                                                Exponential sequences for given 𝞪 (complex 𝞪 left, real 𝞪 right):

Periodicity:        x[n] = x[n+N],  for all n. (definition). Period = N.
                                Sinusoid: x[n] = A cos(ω0n+𝜙) = A cos (ω0n+ ω0N+ 𝜙)
                                                Test: ω0N = 2𝝅k,                            (k is integer)

                                Exponential: x[n] = e0(n+N) = e0n,
                                                Test: ω0N = 2𝝅k,                            (k is integer)

System Properties

                                  System: Applied transformation y[n] = T{x[n]}

Memoryless Systems:

                                Output y[nx] is only dependent on input x[nx] where the same index nx is used for both (no time delay or advance).

Linear Systems:               Adherence to superposition. The additive property and scaling property.

Additive property:         Where y1[n] = T{x1[n]} and y2[n] = T{x2[n]},
y2[n] + y1[n] = T{x1[n]+ x2[n]}.

Scaling property:            T{a.x[n]} = a.y[n]           

Time-Invariant Systems:

                                Time shift of input causes equal time shift of output. T{x[n-M]} = y[n-M]


                                The system is causal if output y[n] is only dependent on x[n+M] where M<=0.


                                Input x[n] and Output y[n] of system reach a maximum of a number less than infinity. Must hold for all values of n.

Linear Time-Invariant Systems

                                Two Properties: Linear & Time-Invariant follows:

                “Response” hk[n] describes how system behaves to impulse 𝜹[n-k] occurring at n = k.

  • Convolution Sum: y[n] = x[n]*h[n].

Performing Discrete-Time convolution sum:

  1. Identify bounds of x[k] (where x[k] is non-zero) asN1 and N2.
  2. Determine expression for x[k]h[n-k].
  3. Solve for

General solution for exponential (else use tables):

Graphical solution: superposition of responses hk[n] for corresponding input x[n].

LTI System Properties

As LTI systems are described by convolution…

LTI is commutative: x[n]*h[n] = h[n]*x[n].

                                … is additive: x[n]*(h1[n]+h2[n]) = x[n]*h1[n] + x[n]*h2[n].

                                … is associative: (x[n]*h1[n])*h2[n] = x[n]*(h1[n]*h2[n])

                LTI is stable if the sum of impulse responses

                                … is causal if h[n] = 0 for n<0                  (causality definition).

Finite-duration Impulse response (FIR) systems:

                Impulse response h[n] has limited non-zero samples. Simple to determine stability (above).

Infinite-duration impulse response (IIR) systems:

                Example: Bh=

If a<1, Bh is stable and (using geom. series) =

Delay on impulse response: h[n] = sequence*delay = (𝜹[n+1]- 𝜹[n])* 𝜹[n-1] = 𝜹[n] – 𝜹[n-1].



Methods of Calculation for Signal Envelope

The envelope of a signal is an important concept. When a signal is modulated, meaning that information is combined with or embedded in a carrier signal, the envelope follows the shape of the signal on it’s upper and lower most edges.

There are a number of methods for calculating an envelope. When given an in-phase and quadrature signal, the envelope is defined as:

E = sqrt(I^2  + Q^2).

This envelope, if plotted will contain the exact upper or lower edge of the signal. An exact envelope may be sought, depending on the level of detail required for the application.

Here, this data was collected as a return from a fiber laser source. We seek to identify this section of the data to determine if the return signal fits the description out of a number of choices. The exact envelope using the above formula is less useful for the application.

The MATLAB formula is used to calculate the envelope:

[upI, lowI] = envelope(I,x,’peak’);

And this is plotted below with the I and Q signals:


Here are two envelopes depicted without the signal shown. By selecting the range of interpolation, this envelope can be smoother. Typically it is less desirable for an envelope to contain so many carrier signals, as is the following where x=1000, the range of interpolation.


Further methods involving the use of filters may also be of consideration. Below, the I and Q signals are taken through a bandpass filter (to ensure that the data is from the desired frequency range) and finally a lowpass filter is applied to the envelope to remove higher frequency oscillation.


Sinusoidal and Exponential Sequences, Periodicity of Sequences

Continuing our discussion on discrete-time sequences, we now come to define exponential and sinusoidal sequences. The general formula for a discrete-time exponential sequence is as follows:

x[n] = Aα^n.

This exponential behaves differently according to the value of α. If the sequence starts at n=0, the formula is as follows:

x[n] = Aα^n * u[n].


If α is a complex number, the exponential function exhibits newer characteristics. The envelope of the exponential is |α|. If |α| < 1, the system is decaying. If |α|> 1, the system is growing.


When α is complex, the sequence may be analyzed as follows, using the definition of Euler’s formula to express a complex relationship as a magnitude and phase difference.

Captu56 ma

Where ω0 is the frequency and φ is the phase, for n number of samples, a complex exponential sequence of form Ae^jw0n may be considered as a sinusoidal sequence for a set of frequencies in an interval of 2π.

A sinusoidal sequence is defined as follows:

x[n] = Acos(ω0*n + φ), for all n, and A, φ are real constants.

Periodicity for discrete-time signals means that the sequence will repeat itself for a certain delay, N.

x[n] = x[n+N] : system is periodic.

t = (-5:1:15)’;

impulse = t==0;
unitstep = t>=0;
Alpha1 = -0.5;
Alpha2 = 0.5;
Alpha3 = 2.5;
Alpha4 = -2.5;
cAlpha1 = -0.5 – 0.5i;
cAlpha2 = 0.5 + 0.5i;
cAlpha3 = 2.5 -2.5i;
cAlpha4 = -2.5 + 2.5i;
A = 1;

Exp1 = A.*unitstep.*Alpha1.^t;
Exp2 = A.*unitstep.*Alpha2.^t;
Exp3 = A.*unitstep.*Alpha3.^t;
Exp4 = A.*unitstep.*Alpha4.^t;

cExp1 = A.*unitstep.*cAlpha1.^t;
cExp2 = A.*unitstep.*cAlpha2.^t;
cExp3 = A.*unitstep.*cAlpha3.^t;
cExp4 = A.*unitstep.*cAlpha4.^t;

stem(t, impulse)

stem(t, unitstep)
title(‘Unit Step’)
stem(t, cExp1)
title(‘Exponential: alpha = -0.5 – 0.5i’)

stem(t, cExp2)
title(‘Exponential: alpha = 0.5 + 0.5i’)

stem(t, cExp3)
title(‘Exponential: alpha = 2.5 -2.5i’)

stem(t, cExp4)
title(‘Exponential: alpha = -2.5 + 2.5i’)
stem(t, Exp1)
title(‘Exponential: alpha = -0.5’)

stem(t, Exp2)
title(‘Exponential: alpha = 0.5’)

stem(t, Exp3)
title(‘Exponential: alpha = 2.5’)

stem(t, Exp4)
title(‘Exponential: alpha = -2.5’)



Discrete-Time Impulse and Unit Step Functions

Discrete-Time Signals are understood as a set or sequence of numbers. These sequences possess magnitudes or values at a given index.

One mark of Discrete-Time Signals is that the index value is an integer. Thus, the sequence will have a magnitude or value for a whole number index such as -5, -4, 0, 6, 10000, etc.

A discrete-time signal represented as a sequence of numbers takes the following form:

x[n] = {x[n]},          -∞ < n < ∞,

where n is any real integer (the index).

An analog representation describes values of a signal at time nT, where T is the sampling period. The sampling frequency is the inverse of the sampling period.

x[n] = X_a(nT),      -∞ < n < ∞.


Common Sequences

Both a very simple and important sequence is the unit sample sequence, “discrete time impulse” or simply “impulse,” equal to 1 only at zero and equal to zero otherwise.


The discrete time impulse is used to describe an entire system using a delayed impulse. An entire sequence may also be shifted or delayed using the following relation:

y[n] = x[n – n0],

where n0 is an integer (which is the increment of indices by which the system is delayed. The impulse function delayed to any index and multiplied by the value of the system at that index can describe any discrete-time system. The general formula for this relationship is,


The unit step sequence is related to the unit impulse. The unit step sequence is a set of numbers that is equal to zero for all numbers less than zero and equal to one for numbers equal and greater than zero.


The unit step sequence is therefore equal to a sequence of delta impulses with a zero and greater delay.

u[n] = δ[n] + δ[n-1] + δ[n-2] + . . .


The unit impulse can also be represented by unit step functions:

δ[n] = u[n] – u[n-1].

Below I’ve plotted both the impulse and unit step function in matlab.


t = (-10:1:10)';

impulse = t==0;
unitstep = t>=0;

stem(t, impulse)
stem(t, unitstep)
title('Unit Step')



Monochromaticity, Narrow Spectral Width and High Temporal & Spatial Coherence

A laser is a device that emits light through a process of optical amplification based on stimulated emission of electromagnetic radiation. A laser has high monochromaticity, narrow spectral width and high temporal coherence. These three qualities are interrelated, as will be shown.

Monochromaticity is a term for a system, particularly in relation to light that references a constant frequency and wavelength. With the understanding that color is a result of frequency and wavelength, a monochromatic system also means that a single color is selected. A good laser will have only one output wavelength and frequency, typically referred to in relation to the wavelength (i.e. 1500 nanometer wavelength, 870 nanometer wavelength).

A monochromatic system, made of only one frequency ideally is a single sinusoid function. A constant frequency sinusoid plotted in the frequency domain will have a line width approaching zero.


The time τ that the wave behaves as a perfect sinusoid is related to the spectral line width. If the sinusoid takes an infinite time domain presence, the spectral line width is zero. The frequency domain plot in this scenario is a perfect pulse.

If two frequencies are present in the time domain, the system is not monochromatic, which violates one of the principles of a perfect laser.


Temporal Coherence is essentially a different perspective of the same relation present between monochromaticity and narrow spectral width. Coherence is the ability to predict the value of a system. Temporal coherence means that, given information related to the time of the system, the position or value of the system should be predictable. Given a sinousoid with a long time domain presence, the value of the sinusoid will be predictable given a time value. This is one condition of a proper laser.

Spatial coherence takes a value of distance as a given. If the system is highly spatially coherent, the value of the system at a certain distance should predictable. This point is also a condition of a proper laser. This is also one differentiating point between a laser and an LED, since an LED’s light propagation direction is unpredictable at a certain time and certainly not in a certain distance. Light emitted from the LED may travel at any angle at any time. An LED does not produce coherent light; the Laser does.

de Broglie’s “Matter Waves” and Full Schroedinger’s Equation

Photons were originally assumed to be waves and even after they were found to be particles, photons still exhibited the same qualities that allowed them to be considered as waves before. de Broglie considered that, if a photon could be considered both a particle and a wave, then perhaps other forms of matter could be treated as waves.


de Broglie’s finding later became a pillar of quantum mechanics. The Schroedinger equation becomes an equation for such ‘matter waves’ as proposed by de Broglie. The plane wave as mentioned above later becomes the ‘wavefunction’ ψ(x,t)  as is fundamental to Schroedinger’s equaiton. Is the wavefunction ψ(x,t) measurable? What is the meaning of the wavefunction ψ(x,t)? To come to this understanding, we should unpack some of de Broglie’s matter wave formulas.

Consider that the wavelength is inversely proportional to the momentum in de Broglie’s formula. Further, the momentum is found to be equal to h_bar multiplied by the wavenumber.


de Broglie’s wave formula presented further complications however. It was found that certain aspects of the wave would in fact be correct, but other parts of the wave would not be accurate. For instance, the phase of de Broglie’s matter wave would be accurate. The phase of the wavelength is understood to adhere to Galilean, non-relativistic physics, meaning that the result is not altered according to perspective. An example of a system would be relitivistic is the case for instance where the speed of a vehicle is determined relative to another moving vehicle. The phase of de Broglie’s calculation is therefore is a type of ‘objective’ calculation.


Further calculations below show that the waves proposed by de Broglie are not directly measurable. The wavefunction  ψ(x,t) is also known to be multiplied by an imaginary number and this makes it difficult to measure. Further, the system is not Galilean invariant. This means that matter waves may differ according to reference. Finally it is concluded that the wavefunction ψ is not like sound waves, water waves, mechanical or electromagnetic waves. A difference according to reference however does not mean that all hope is lost in the calculation of the wavefunction, however. By taking account for the difference in reference, two points can be compared to allow for a wavefunction that may vary according to reference.




What does a matter wave look like?

Consider it should look like any other wave. It should have some kind of sinusoidal representation. Considering one aspect of matter, it should be that matter is not allowed to exist in any one place. This is the case for instance, when a particular piece of matter is not present in a location. However, to restrict a matter wave by time could be problematic. This is to say that, at a certain moment, no matter is allowed to exist anywhere or for all positions.

There are four cases listed below that, being sinusoidal, may seen to be possible respresentations for matter waves. In the case however for a sin(kx-wt) or cos(kx-wt), it is implied then that for time wt eual to pi/2, 3*pi/2, etc matter is not allowed to exist anywhere. Therefore these functions are not acceptable representations.

For the case however of e^(ikx-iwt) + e^(-kx-iwt) and it’s counterpart e(-ikx+iwt)+e^(ikx+iwt), this is not the case. Could both be used together in superposition? The answer is that if they were added together, matter would be restricted to one direction, which is undesireable as well. Therefore, either representations would be acceptable, but not both. The boxed answer below is the normative convention taken by physicists for the matter wave wavefunction for a particle. The other representation would work as well.



Principle of Stationary Phase

Consider the case of a narrow peak, modulated by a sinusoidal function centered about zero. If the sinusoid frequency is too high with relation to the narrowness of the peak or if the phase is rapidly changing, the averaging of the system will cause the narrow peak to disappear. If however the frequency is low – or if the phase is stationary at the narrow peak, any averaging that is done will still allow the narrow peak to exist.


As related to quantum mechanics, while determining characteristics of a wave, the principle of stationary phase becomes important. The wave Φ(k) as a function of wavenumber will be detected as a narrow peak. In order to properly detect this narrow peak, the modulating sinusoid must have a phase that varies much less with respect to (in this case, k) the x-axis. Otherwise, the narrow signal will be lost.



Towards developing a generalized Wavefunction

Performing a specific operation to the wavefunction interestingly produces the momentum multiplied by the wavefunction. The operator used is termed the “momentum operator.”


As we know from linear algebra, if a matrix multiplied by a vector is equal to a number multiplied by the vector, then the vector is termed an eigenvector of the matrix.


Given the above momentum operator relationship, it may be concluded that ψ(x,t) is an eignevector, or more specifically an eigenstate of the momentum operator p_hat. p is then also the eigenvalue.


And finally, using the eigenstate condition, Schroedinger’s Equation in general form for a free particle is derived:



Barton Zwiebach. 8.04 Quantum Physics I. Spring 2016. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.

Random Signal Analyzer – MATLAB

ECE457 Senior Design
November 2019
Michael Benker

Random Signal Analyzer

The following MATLAB program is designed to create a random signal and analyze statistical properties. The applications for this are a current senior design project and the code may eventually be implemented in a project that involves a sound level analysis program on a microcontroller.



MATLAB Data Analysis – Senior Design Project Component

ECE457 – Senior Design Project, Professor Dr. Fortier
October 2019
Michael Benker
MATLAB Data Analysis


The following code was one component of my current Senior Design Project assignment, which will involve the creation of a device known as the “Audio Awareness Enabler.” More information relating to this project is sure to follow in the future. For now, let us take a look at the following MATLAB code, which takes excel files of data and calculates the averages and standard deviations and then plots a Gaussian normal plot. Soon, this code will be modified to be able to determine whether a set of data will fall into the “ambient” range or one of the three interrupt levels. It will also eventually seek to create a formula that will determine whether a set of data is in the interrupt zone based on the ambient level.

See the pdf file: ece457p9v002


Data at one location:


Next location:


I-Q Demodulation for Radar Cross Section Measurements

RF/Photonics Lab at UMASS Dartmouth, Advisor: Professor Dr. Yifei Li
October 2019
Michael Benker
RCS/ISAR Data Acquisition


Of critical importance to attaining an RCS measurement is the doppler shift, a change in return frequency that results in the movement of an object. I-Q demodulation is useful for attaining this measurement, producing the difference as an output signal when supplied two signals of different frequencies. The following MATLAB program utilizes a set of data acquired using an oscilloscope to test a demodulator. This is part of a project being undertaken at the UMASS Dartmouth RF/Photonics Lab. To view a published version of the code: rcs20190925.