Hello! Welcome to the engineering projects. This is the second part of the signal and system series in which we will discuss some essential classifications of simple signals. In the previous session, we discussed the introduction of signals and systems and also ran some simple codes on MATLAB for the implementation of some simple codes.
In this session, we are discussing some essential types of signals, and the best part is that we will implement all the signals in MATLAB for the best understanding. Here is a quick glance at all the topics that we will discuss today:
Continuous-Time Signals
Discrete-Time Signals
Periodic Signals
Aperiodic Signals
Even Signals
Odd Signals
Deterministic Signals
Non-Deterministic Signals
Energy Signals
Power Signals
What are functions?
Some examples of signals
Difference between some signals
It is a signal that does not contain any breaks and is referred to as a continuous-time signal.
Differential equations are used to describe this. This signal is represented by the letter x(t). Because of their historical significance, CT signals are frequently referred to as analog signals.
Controlling the speed of a DC motor by the use of a tacho generator's feedback, sine waveforms, or exponential waveforms. The well-known mathematical concepts of differential equations, continuous convolution operators, Laplace transforms, and Fourier transforms are what differentiate linear CT systems from other types.
A signal is said to have a discrete-time signal if its value can be measured at discrete intervals. There will be time intervals of n during which you do not have a value when you are working with a discrete-time signal. The form x[n] is utilized in the representation of DT signals. Continuous-time (CT) signals are approximated by discrete signals.
Difference equations, discrete convolution operators, Z-transforms, and discrete Fourier transforms are some of the mathematical tools that can be used to represent linear DT systems.
Once you have understood these concepts, you must know there are further types of these signals as well. Keep in mind that every signal is continuous or discrete, and these are further divided into sub-types. These sub-types are given next:
A signal is said to be periodic if it satisfies the following equation:
π₯(π) = π₯(π + π);
where n is a positive number. In other words, a signal is said to be periodic if it repeats the same sequence of values exactly after a predetermined amount of time, which is referred to as the period.
Sine Wave
Here, we are going to present some lines of code that when entered into the MATLAB window, you will observe a sinusoidal wave.
Code |
|
A=7; f=10000; T=1/f; t=0:T/10:5*T; y1=sin(pi*f*t); plot(t,y1) xlabel('Time') ylabel('Amplitude') title('Periodic Signal') grid on |
|
As we know, all waves have an amplitude, frequency, and time period. Simple code is explained in our previous lecture, but in this code, you must notice that the amplitude and the whole wave repeat their pattern after a particular time period that is exactly the same as in the previous section.
As you can guess from the name, an aperiodic signal is one that can be represented as
π₯(π) β π₯(π + π);
Here, n is a positive number.
The signal does not repeat itself after a particular time interval; instead, it has a different pattern at every point.
As you can see in the output, the waveβs pattern is not predictable. You can do the same thing by using a βRandomβ function that you will see in this same article in just a bit. For now, there is no need to understand all this code, you just have to observe the pattern in the output.
The term "even signal" or "even function" refers to a signal that is symmetrical at the time origin or the vertical axis, respectively. The even signals are also referred to as symmetrical signals for this reason.
Mathematically,
x(-n)=x(n)
In other words, the values on the right-hand side are exactly symmetric to the left-hand side of the axis.
Cosine Wave
A signal is referred to as "odd" if it is anti-symmetrical on the vertical axis. An odd function is another name for an unusual signal. As a result, the signals that are odd are sometimes referred to as antisymmetric signals.
Sine Wave
Code |
Output |
n=-2:12 x=sin(4*pi*n/5) subplot(2,2,1) plot(n,x) title('Odd Signal') xlabel('Time/ The Engineering Projects') ylabel('Amplitude') grid on; xo=-sin(4*pi*n/5) subplot(2,2,2) plot(n,xo) title('Odd Signal') xlabel('Time/ The Engineering Projects') ylabel('Amplitude') grid on; |
Here, in the output, you can see two signals. When we replace the equation with the negative sign, we find that it is flipped and is non-identicle to the first picture. Hence, it is an odd signal.
When there is no room for interpretation regarding a signal's value at any given moment in time, we say that the signal is deterministic. Or, signals are referred to as deterministic when they are capable of being characterized in an accurate manner by a mathematical formula.
Letβs say we have a formula that shows an equation or a signal, then we can predict the result or the graphical representation with the help of that formula, and such signals are referred to as deterministic signals.
sine wave, square wave.
Code |
Output |
n=-2:10 x=sin(4*n/5) subplot(2,2,1) plot(n,x) title('Deterministric Signal') xlabel('Time/ The Engineering Projects') ylabel('Amplitude') grid on; |
|
These are contrary to the one that was discussed before. The result of such signals is not predictable, and therefore, a formula can not be set to represent non-deterministic signals. In one case, they are shown with a certain value, and in the next case, the values change abruptly. Because of the nature of providing random values with these signals, they are also called random signals.
Noise in communication is an example of random signals because no one can exactly predict the noise value during communication.
Code |
Output |
x=rand(1,100); plot(x) title('Random Signal') xlabel('Time/ The Engineering Projects') ylabel('Amplitude') grid on; |
|
Here is an interesting example for beginners. Basically, this code comprises two steps that are used in the functionality of the signal. We have used a function called βRandomβ and represented as rand(a,b) where a and b are the peak values in between which, this function displays any number randomly without any pattern. In the next step, we will just plot the signal and got the perfect example for the random function.
Energy signals are the ones that contain a finite amount of energy in them. The energy of such signals can be calculated using different techniques, but the power of such signals is infinite. Mathematically,
0 < πΈ < β
Aperiodic signals
In contrast to energy signals, power signals have a finite power that can be observed and measured, and the energy of these signals is infinite. By using mathematical representation, we can say,
0 < π < β
Periodic signals
Just like any other programming language, MATLAB also has some pre-defined functions and in this course, we will use some of these according to the need of time. You have observed that some functions are also present in the codes that we have discussed today and now, we are going to discuss some explanations about these functions so that you may have an idea about the working and needs of these functions.
We can write a function independently from the main program, without having to consider how it will interact with the rest of the program as we do so. A function can be thought of as a miniature version of the main program. Because of this, we are able to break down a large program into smaller, more manageable portions, which ultimately results in a reduction in the total complexity of our program.
Flip is an interesting function in MATLAB that can be used to flip the whole signal in just one step. There is no need to write the code with different signs and information. Mathematically, the flip function is given as
B = flip( A, dim )
Where
B= Any variable that is used to store the result of the flip function so that you can take further steps.
A= The signal that is to be flipped. You can also give the signal to any name.
Dim= dimensions at which you want to flip your signal.
We have used this function in our code where we had to find that is our signal even or odd. It is just an example. This function is also used in other codes according to the needs of the programmer.
Random Function is used to have a uniformly distributed random number that is set by the programmer according to need. There are different forms of random functions that are used in random functions and some of them are:
Y = rand(n)
Y = rand(m,n)
Y = rand([m n])
Y = rand(m,n,p,...)
Y = rand([m n p...])
Y = rand(size(A))
Out of which we have used the second one, where we have given the two dimensions to the random function. This returned us an m-by-n matrix of random entries, and we used it for our aperiodic signals.
In the case given above, the result of this random function is stored in the Y variable so that it can be used again for more actions.
While using these signals in our codes, one must be clear about the difference between some same kinds of signals and it is a good practice to have to keep them in mind in the form of points so that you may have the idea about the best use of these signals. Here are some important points to keep in mind.
Continuous-Time Signals |
Discrete-Time Signals |
|
|
|
|
|
|
Periodic Signal |
Aperiodic Signal |
|
|
|
|
Even Signal |
Odd Signal |
|
|
|
|
Deterministitric Signals |
Non-Deterministitric Signals |
|
|
|
|
Energy Signal |
Power Signal |
|
|
Signals have a different type but all of these can be represented as discrete or continuous. We use these types many times while we are dealing with the signal and system and it is important to have the idea of pre-defined functions so that we may minimize the code size with fewer errors.