Question
Transcribed Text
A FEW IMPORTANT NOTES
The following practical tutorial is designed to give the student a more practical, or handson,
approach to the theoretical engineering course. This method allows the student to explore the
concepts that was given in the reference book as well as to reinforce the techniques that was
taught.
For this practical a personal computer is a necessity, as computer programs will have to be written.
The computer language or simulation tools to use are solely the student's choice.
The following list will give the student an idea of what computer simulation tools are available on
the market. Some of them are free and others are expensive.
Tools Type of
license
Platform
Matlab Commercial PC/Unix/M
ac

Matlab (Student
version)
Commercial PC/Unix/M
ac
Most Universities (±R300) (RAU)
Mathcad Commercial PC/Mac 
SciLab 
matrixbased
scientific software
package
GNU Unix Internet 
Octave  MATLAB
lookalike
GNU Unix Internet 
ftp.che.utexas.edu/pub/octave
RLab  MATLABlike matrixoriented
programming
language
GNU Unix Internet 
evans.ee.adfa.oz.au /pub/RLaB
SciLab, Octave and RLab are available on the internet for the Linux version of Unix.
Normal C, Pascal or Basic could also be used.
PRACTICUM
1 Generate the following signals with a computer program:
1.1 5 Hz sinusoidal
1.2 25 Hz sinusoidal
1.3 5 Hz + 25 Hz sinusoidal
1.4 Random noise in the amplitude interval (0,0 1,0)
1.5 Random noise in 1,4 but with a zero mean
Each signal must contain one thousand (1 000) datapoints per second. Generate the signals
for a timespan of 2 s but only plot the first 0,5second of data.
(Hand in the plots as well as the computer code)
2 Write a computer program to simulate an Analog to Digital converter. The
A/D must have the following specifications:
FullRange input of ± x Volt
y Bit resolution
z Sampling frequency
3 Use a summation of 5 Hz, 10 Hz and 15 Hz sinusoidal signals to represent
an analogue signal. Use 1 000 data points per second. Scale the signal to
an amplitude of ±12. To digitise this signal use the model of the A/D
converter with the following specifications and plot the input and digitised
signal on top of each other for the first 0,2 seconds. (Hand in the plots as
well as the computer code).
±12 Volt fullrange input, 12 Bit resolution, 100 Hz sampling frequency.
±12Volt fullrange input, 2 Bit resolution, 200 Hz sampling frequency.
4 Use a 15 Hz sinusoidal signal to represent an analogue signal. Use 1 000
data points per second. Scale the signal to an amplitude of ±12. To digitise
this signal, use the model of the A/D converter with the following
specifications and plot the input and digitised signal on top of each other
for the first 0,5 seconds:
±12 Volt fullrange input, 12 Bit resolution, 20 Hz sampling frequency. What happened
in this digitisation process?
(Hand in the plots as well as the computer code)
5 Write a computer program to determine the DFT or FFT of a signal
x = {4; 3; 5, 6; 2; 3; 5}.
[Test with the following: DFT({1; 0; 0; 1})={2,1+j; 0,1j}]
(Hand in the computer code as well)
6 Write a computer program to determine the inverse DFT or inverse FFT of a signal
Y1 = {20,0000; 1,1180 + 7,6942j; 1,1180 – 1,8164j; 1,1180 + 1,8164j; 1,1180 –
7,6942j}.
[Test with the following: IDFT({3;j;0;j})={1;0;1;1}]
(Hand in the computer code as well)
Solution Preview
This material may consist of stepbystep explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning  misuse is strictly forbidden.
function [ UD ] = ADConvert( t, UA,range, resolution, sampleRate )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
if (size(t) == size(UA))
OneBitVoltage = 2 * range /(2^resolution  1) % calculate the voltage of one bit
overValue = find(UA < range) % Check if there is a value outside of negative range
if ~isempty(overValue)
UA(overValue) = range
end
clear overValue
overValue = find(UA > range) % Check if there is a value outside of range
if ~isempty(overValue)
UA(overValue) = range
end
samplingTime = 0
k = size(t)
for i = 1:k(2)
if (t(i) >= samplingTime)
UD(i) = round(UA(i) / OneBitVoltage) * OneBitVoltage % Quantizicide digital value
samplingTime = samplingTime + 1 / sampleRate
else
UD(i) = UD(i  1)
end
end
end
end...
This is only a preview of the solution. Please use the purchase button to see the entire solution