Ikenna S Report Corrected 231117 120554
Ikenna S Report Corrected 231117 120554
UNDERTAKEN AT
PLETHUDEEP HUB
by
SUBMITTED TO
THE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
OBAFEMI AWOLOWO UNIVERSITY
November 2023
CERTIFICATION
This is to certify that this work was carried out by IDOKO, IKENNA DANIEL in partial
fulfilment of the requirements for the award of the degree of Bachelor of Science ([Link].),
in the Department of Computer Science and Engineering, Obafemi Awolowo University,
Ile-Ife, Nigeria.
————————————————
Engr. S.P. Olayiwola
Industry-based Supervisor
i
DEDICATION
-Neil Finn
ii
ACKNOWLEDGEMENTS
I express my deepest gratitude to the Almighty for His unwavering guidance and
Olayiwola, whose words of motivation and encouragement have been a guiding light. His
love for students and dedication to the progress of Nigeria are truly inspiring.
design and engineering has been invaluable. His wisdom and support have shaped my
understanding and passion for the field. I am fortunate to have had such a dedicated
mentor.
To God, Engr. Olayiwola, and Innocent Emmanuel, thank you for being integral parts
iii
Table of contents
List of Figures vi
Abstract ix
Chapter 1: Introduction 1
1.1 Student Industrial Work Experience Scheme (SIWES) . . . . . . . . . . 1
1.2 Objectives of SIWES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 PlethuDeep Hub — Company Profile . . . . . . . . . . . . . . . . . . . . 4
iv
2.3.3 Simulation and results of the OTA . . . . . . . . . . . . . . . . . 36
References 49
v
List of Figures
vi
List of Tables
vii
LIST OF ABBREVIATIONS
viii
ABSTRACT
focusing on Digital Signal Processing (DSP) and Machine Learning utilizing Matlab,
alongside Analog Integrated Circuit (IC) design. The document provides a comprehensive
overview of the projects undertaken during this period, highlighting the integration of
DSP and Machine Learning techniques within the Matlab environment, as well as the
intricacies of Analog IC design. The report details the challenges faced, methodologies
employed, and the valuable insights gained from the intersection of these cutting-edge
ix
CHAPTER ONE
INTRODUCTION
WES)
SIWES stands for the Students Industrial Work Experience Scheme. It is a program
related to their field of study. SIWES is coordinated by the Industrial Training Fund
The history of SIWES in Nigeria dates back to 1971 when the program was established
by the Industrial Training Fund (ITF). The primary objective of SIWES is to bridge the
gap between theoretical knowledge acquired in the classroom and practical application in
the workplace. The program aims to provide students with the opportunity to gain hands-
on experience, develop practical skills, and understand the work environment within their
chosen field.
SIWES was established to address the concerns about the perceived lack of practical
1
The Industrial Training Fund (ITF) was mandated to oversee the implementation
of SIWES. The ITF works in collaboration with tertiary institutions, industries, and
SIWES typically lasts for a period of three to six months, depending on the academic
program. During this time, students are required to undergo practical training in relevant
industries.
SIWES is usually a compulsory part of the curriculum for students in fields such
graduates.
The program offers several benefits, including exposure to real-world work environ-
ments, the opportunity to apply theoretical knowledge in practice, and the chance to
SIWES plays a vital role in preparing students for the workforce and ensuring that
they are equipped with the practical skills required by industries. It also serves as a
platform for industries to identify potential talent and contribute to the development of
2
1.2 Objectives of SIWES
• Integration of Theory and Practice: SIWES aims to bridge the gap between
what they have learned in their academic programs with hands-on experience.
the actual working conditions and practices in industries related to their fields of
study. This exposure helps them gain a better understanding of industry operations,
• Skill Development: The program is designed to enhance the practical skills and
develop technical skills, problem-solving abilities, and other practical skills that are
where academic institutions gain insights into industry trends, and industries
to explore different aspects of their chosen fields. This hands-on experience helps
them identify specific areas of interest within their disciplines, which can guide their
3
• Promotion of Self-Reliance: SIWES encourages self-reliance and independence
professional networks and connections within their industries. This networking can
In summary, SIWES plays a crucial role in preparing students for the workforce
by providing them with practical experience, enhancing their skills, and fostering
projects to becoming viable products and services in the market. It was established 2018
but began operations 2020. Our Vision Statement Our vision is to bridge the gap between
training at school and the digital skills expected in the industrial world in order to provide
at scale future ready to fill job positions and create tech based startups Our Mission
Statement Our mission is as to provide a gamified platform that will drive engagement in
learning skills which re in tandem with the realities of the emerging digital market place
and that seamlessly integrates to their curriculum at school The various aspects of the
hub includes
• Artificial Intelligence
4
• Microelectronics
The organogram of the company being a startup comprises the CEO who has the
Chief Technical Officer (CTO) working alongside with both the ideas incubation team
5
Figure 1.1: The organisation structure of PlethuDeep Hub
6
CHAPTER TWO
SIWES ACTIVITES
2.1 Introduction
The focal point of my engagement at PlethuDeep Hub was the comprehensive exploration
of Digital Signal Processing (DSP), Machine Learning and Analog IC design. This chapter
exclusively delves into the intricacies of the design, simulation, and physical layout of a
However, for the purpose of this chapter, the detailed discussion will revolve around my
involvement in DSP and Analog IC design, showcasing the skills and experiences gained
This programmable gain amplifier project draws inspiration from the During my SIWES
I started by learning the basics of generating and manipulating digital signals. This
included techniques like resampling and modulation. After getting comfortable with
signal generation, I moved on to more advanced topics like spectral estimation and digital
7
filter design. A major part of my work involved processing streaming signals in real-
time. Throughout the internship, I applied DSP concepts to solve problems in condition
I began by learning how to generate and visualize different types of digital signals
like sinusoids, chirps, impulses, and noise. Using MATLAB, I wrote programs to
generate sampled signals with specified sample rates and durations. I also learned basic
operations like shifting signals in time, changing amplitude, merging multiple signals, and
introducing noise. These skills allowed me to synthesize test signals for subsequent DSP
experiments.
8
Table 2.1: A Few Signal Processing basics in MATLAB
9
2.2.2 Generating Signals and Common Signal Operations
I generated sinusoidal, triangular, sawtooth and noise signals using functions like
sine, triange, sawtooth and randn in MATLAB. I specified parameters like amplitude,
frequency, phase, sample rate and duration to control the signal properties. By adding
To change the sample rate of a signal, I used functions like resample in MATLAB. This
allowed me to increase or decrease the sample rate by a factor while avoiding aliasing. For
frequency shifting without distortion, I multiplied the signal with a complex exponential
using the freqshift function. I also got familiar with time shifting and scaling operations
Digital Watermarking
The watermark was a pseudo-random binary sequence generated using a key. I embedded
the watermark into an audio signal by adding the scaled watermark to the signal. To
extract the watermark, I correlated the watermarked signal with the original watermark
Resampling
When altering the sample rate of a signal, I was careful to apply anti-aliasing filters to
avoid artifacts. I wrote functions to upsample and downsample signals using polyphase
implementations. This approach provided an efficient way to change sample rates. There
10
are multiple ways to resample a signal to a higher or lower rate. Upsampling and
11
(a) Single tone watermark
12
Modulation
I explored modulation techniques like AM and FM synthesis. Given a carrier and message
signal, I wrote functions to generate modulated outputs. Adjusting the modulation index
allowed me to vary the strength of the modulation. I also demodulated signals using
like:
I wrote functions to apply each technique and analyzed the results. This gave me an
intuition for how each method improves the power spectral density estimate.
I estimated the frequency content of signals by computing the Discrete Fourier Transform
using the FFT. For real signals, I only looked at the positive frequencies due to symmetry.
The magnitude squared gave an estimate of the power at each frequency bin. The discrete
13
Fourier transform (DFT) is computed for each sample in x.
N
X −1
Xk = x[n].e−[Link]/N . (2.1)
k=0
For a discrete-time, finite-length signal, the discrete Fourier transform (DFT) can be used
to calculate the spectrum at particular frequencies. In MATLAB, you can calculate the
DFT by using the .fft function, which stands for fast Fourier transform.
Periodogram
The periodogram computes the power spectral density by taking the magnitude squared
of the DFT. I averaged multiple periodograms to reduce the variance of the estimate.
Zero Padding
To interpolate additional points, I padded the signal with zeros prior to taking the DFT.
This allowed me to increase the frequency resolution. However, zero-padding alone did
Windowing
I multiplied the signal by window functions like Kasier and Hamming windows prior
to taking the DFT. This attenuated discontinuities and reduced spectral leakage. The
14
(a) Periodogram
15
2.2.4 Improving the Power Spectral Density Estimate
For noisy, non-stationary signals, the standard periodogram was often insufficient. I
Welch’s Method
I split the signal into overlapping segments, computed windowed periodograms of each
segment and averaged the results. This reduced noise by decreasing the variance across
MATLAB
Where,
• f is the Frequencies
• window is the Window vector. If the size is less than sig, there is spectral averaging.
• numoverlap is the Number of samples to overlap. Must be less than the size of
window.
16
Time-Frequency Analysis
For signals whose spectrum varies over time, I used time-frequency distributions.
The short-time Fourier transform (STFT) allowed me to analyze the spectral content
distributions.
Using MATLAB,
[s,f,t,ps] = spectrogram(sig,window,numoverlap,nfft,fs)
Parametric Methods
The experience helped me learn the trade-offs between different spectral estimation
improve resolution, reduce noise and handle non-stationary signals when estimating power
spectral densities.
I wrote programs to visualize filter responses in the time and frequency domains. This
17
In the time domain, I analyzed the filter coefficients and impulse response. The
impulse response showed the output for a delta input and revealed properties like ringing
and delay.
ing the magnitude response showed how the filter alters individual frequency components.
Zeros and poles revealed stability and frequency selective properties. With this
comprehensive analysis, I was able to predict the impact of filters on signal characteristics.
Filter Coefficients
I specified FIR and IIR filters by directly entering the filter coefficients. Analyzing the
Digital filters with finite-duration impulse response are called FIR filters, as opposed
to infinite-duration impulse response, which are called IIR filters. Each filter type has
Filter Responses
I visualized the impulse and step response to analyze time-domain properties. The
impulse response characterized the output for an isolated input spike. Step response
18
Filter Delay
I quantified the delay introduced by a filter using the group delay plot. For linear phase
FIR filters, the delay was constant across frequencies. For IIR and nonlinear filters, the
The position of zeros and poles indicated the stability of IIR filters. Filters with poles
outside the unit circle were unstable. The angle and distance of poles from the origin
intuitive understanding of how filters reshape signals. This helped me predict the impact
19
Table 2.2: FIR versus IIR Filters
20
2.2.6 Designing Digital Filters
FIR Filters
I designed finite impulse response (FIR) filters using the window, frequency sampling and
least squares methods. Windowing offered simplicity while frequency sampling allowed
IIR Filters
For infinite impulse response (IIR) filters, I applied the Butterworth and Chebyshev
approximations. I used higher order designs when sharp transitions were needed. Biquad
Through hands-on design, I learned how parameters affect the frequency response,
design trade-offs.
edge, stopband attenuation and allowed ripples. This automated the design process
21
Arbitrary Filter Response
I designed custom FIR filters by specifying an ideal desired frequency response. MATLAB
functions like firls and firpm allowed me to implement filters with arbitrary, non-
By gaining experience in FIR and IIR filter design, I developed practical skills for
developing filters targeted for different applications. The combination of manual and
22
(a) For example, here’s the magnitude response of
an IIR filter designed with the Butterworth method.
23
Table 2.3: FIR versus IIR Filters
24
Minimizes the absolute difference between
ideal and actual frequency response by using
Chebyshev an equal ripple in the passband. Stopband
Type I filter response is maximally flat. The transition
from passband to stopband is more rapid than
for the Butterworth filter.
Table 2.4: FIR versus IIR Filters
25
advantage.
acquired:
I segmented the continuous input into chunks or frames using fixed length or adaptive
windows.
For each frame, I applied DSP operations like filtering, spectral analysis and feature
extraction.
The output was passed downstream for additional processing or decision making.
applying buffering and parallelization, I optimized the code to sustain real-time rates.
The streaming approach enabled online processing and analysis of live data. Through
systems.
I created DSP system objects like filters, transforms, analyzers using MATLAB classes.
I processed the input frames inside a for/while loop. Each iteration handled the next
frame, applied DSP operations and passed the output. Buffering reduced data copies.
26
By architecting DSP systems in a streaming manner, I learned real-time design
practices crucial for embedded signal processing applications. This experience helped
strengthen my skills.
circuit design, facilitating the conversion of input voltage signals into corresponding
output currents. Among the various OTA architectures, the folded cascode configuration
has garnered significant attention for its robust performance and versatility in meeting
This design explores the intricacies of a folded cascode OTA, a configuration renowned
for its high gain, wide bandwidth, and enhanced linearity. As an essential component
in numerous analog and mixed-signal applications, the folded cascode OTA offers a
tasks.
In this project, the level 1 square-law transistor model was utilized to size the transistors,
This choice was made due to its convenience for manual calculations and its still
methodologies, such as the EKV model, gm/Id-based design approach, and the inversion
27
coefficient, yield results that align well with modern SPICE simulators, they were not
employed in this project. The EKV model and the inversion coefficient method are
impractical for manual calculations, and the gm/Id-based methodology, though suitable
constraints precluded the generation of these charts for the specific transistor technology
To align the design with actual transistor behavior, following the calculations using
the level-1 model, the design underwent simulation and optimization using the SPICE
The behavior of the MOS transistor devices for levels 1, 2, and 3 models is defined by
W
ID = µCox (VGS − VT n )2 (2.2)
2L
p p
VT n = VT o + γ 2ϕf − VSB − 2ϕf (2.3)
Where:
• VT n is the overall threshold voltage of the MOS device with backgate effect
28
• λ is the channel length modulation parameter
• W
L
is the sizing of the transistor device
One of the common design parameters used in the level-1 model is the voltage overdrive
2ID
Vov = (2.4)
gm
Equations 2.5 and 2.6 are specific to NMOS and PMOS devices respectively. In
equation 2.4 gm is the transconductance of the transistor device either NMOS or PMOS.
sizing ( W
L
) of the transistors. In levels 1-3 model design, the sizings of the transistors can
W gm 2
= (2.7)
L 2ID µn Cox
29
W 2ID
= (2.8)
L µn Cox Vov 2
The design process for all circuits and systems initiates with the specification phase.
Therefore, this particular design commenced with the specifications detailed at the
beginning of this chapter. To facilitate reference, the specifications are reiterated below:
• VDD = 3.3V
• P haseM argin ≥ 60
• Close Loop Gain Range = 0.25V/V, 0.5V/V, 1V/V, 2V/V, 4V/V, 8V/V
The CMOS technology employed in this design originates from the open-source
GlobalFoundry process design kit (PDK), specifically the GF180nm variant. While
validate whether the chosen CMOS technology aligns with the intended specifications.
It’s essential to acknowledge that all specifications carry a degree of uncertainty, as certain
30
For instance, the intrinsic gain of a transistor device is not uniform across all potential
output or input ranges. To address this, an initial simulation is often conducted using
the selected transistor technology to verify alignment with the desired output or input
range and gain. However, in the context of this design, an assumption was made that the
specifications are achievable with the chosen transistor technology. This assumption
is justified by the iterative nature of the design process, allowing for adjustments,
The key parameters to be determined in this design include the sizing ratios ( W
L
) of
each transistor, the bias currents for each transistor, the bias voltages, and the output
voltage swing.
In Fig. 2.4(a), the fundamental folded cascode topology is depicted, biased by ideal
current sources I0 and IB . Within this topology, transistors M1 and M2 constitute the
input differential pair stage, while M3 and M4 function as the cascode transistors. The
pairs M1 − M3 and M2 − M4 form the folded cascode amplifier. To match the high output
resistance of the cascode pair, the current source load is implemented with a cascode
configuration, the ideal current sources I0 and IB must also be realized with transistors.
In Fig. 2.4(b), the complete realization of the folded cascode amplifier is presented,
incorporating M0 and M9 to M10 as current sources. Further details regarding the design
of voltage references Vref , VB3 , VB5 , and VB9 will be addressed subsequently. Currently,
the focus will center on the design intricacies of the contributing transistors within the
31
The initial phase of this design involved determining the bias currents to meet the
specified slew rate requirement. The slew rate is defined by the equation:
I0
SR = (2.9)
CL
Where I0 is the bias current through M0 and CL is the load capacitance. From the SR
32
(a) The folded cascode operational transconductance amplifier (OTA)
biased with ideal current sources I0 and IB .
(b) The folded cascode OTA with the ideal current sources replaced wiith
transistors M0 and M9,10 operating in their constant current region.
33
I0 = SR · CL = 20
10−6
× 5 × 10−12 = 100µA
I0 100×10−6
This therefore means that ID1,2 = 2
= 2
= 50µA and the current through M3
I0
to M8 , ID3−8 = ID9,10 − 2
. Generally the design is done such that
ID9,10 ≥ I0 (2.10)
For this design, ID9,10 was chosen to be slightly greater than I0 . This was done to ensure
that M5-M8 are always on. So ID9,10 is assigned ID9,10 = 150µA and ID3−8 = ID9,10 − I20 =
gm1,2
fGBW = (2.11)
2πCL
34
Therefore gm1,2 = 2 × π30 × 106 × 5 × 10−12 = 942.5S Using equation (2.7), the sizing
2 2
W gm1,2 (942.5 × 10−6 )
( )1,2 = = = 49.35
L 2ID1,2 µn Cox 2 × 50 × 10−6 × 180 × 10−6
Now to determine the voltage biases VB3 , VB5 , VB9 , and VB0 .
35
Finally the input common mode range (Vcm ) and the output swing VOS , were
determined using the equations 2.9 and 2.10 respectively. But the overdrive voltage
of M1,2 was first determined. Equation 2.2 came in handy for this case.
2 · ID1,2 2 × 50 × 10−6
Vov1,2 = = = 108mV
gm1,2 924.5 × 10−6
2.55+0.8
This implies the optimum output voltage is 2
= 1.675V .
Following several SPICE simulation iterations, the chosen channel lengths (L) for each
36
- LM 1,2 = 1µm - LM 3,4 = 1µm - LM 5−M 8 = 0.8µm - LM 9,10 = 0.8µm - LM 0 = 2µm
These lengths were selected based on simulation results that closely matched the
desired specifications. Additionally, the lengths were chosen to ensure that the calculated
W
sizing ratios L
of each transistor remained unchanged.
To validate the expected results, three simulations were conducted using Ngspice.
Both Bespice viewer and Ngspice viewer were utilized to visualize the simulation
waveforms. These simulations played a crucial role in verifying the performance and
DC simulation
For the DC analysis, a .op analysis was executed to obtain the DC operating point of each
transistor. In Table 2.5, values of certain large signal variables were calculated manually,
while Table 2.6 presents the values of the same variables generated by the .op analysis.
Upon comparing the corresponding values in both tables, a notable agreement between
hand calculations and SPICE simulation results is observed. It is acknowledged that there
is room for further refinement. Table 2.7 juxtaposes the hand-calculated values with the
SPICE simulation results for the input common mode range and output swing.
and practical simulation outcomes, laying the foundation for a robust validation of the
37
AC simulation
(OTA) is depicted, showcasing both the magnitude and phase plots. Notably, the plot
illustrates that both the gain specification and the phase margin have been successfully
the amplifier’s behavior in the frequency domain, confirming its adherence to the desired
performance characteristics.
38
Table 2.5: Some DC parameter; hand-calculated values
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M0
50µA 50µA 100µA 100µA 100µA 100µA 100µA 100µA 150µA 150µA 100µA
39
ID
VGS 0.9232V 0.9232V 1.0380V 1.0380V 1.111V 1.111V 1.111V 1.111V 1.288V 1.288V 1.211V
VDS,sat 0.106V 0.106V 0.25V 0.25V 0.4V 0.4V 0.4V 0.4V 0.5V 0.5V 0.5V
Gm 0.942mS 0.942mS 0.8mS 0.8mS 0.5mS 0.5mS 0.5mS 0.5mS 0.6mS 0.6mS 0.4mS
Table 2.6: Some DC parameter; .op simulation results
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M0
ID 51.1µA 51.1µA 84.5µA 84.5µA 84.5µA 84.5µA 84.5µA 84.5µA 136µA 136µA 102µA
40
VGS 1.01V 1.01V 1.28V 1.28V 1.35V 1.35V 1.10V 1.10V 1.29V 1.29V 1.26V
VDS 1.68V 1.68V 1.56V 1.56V 0.377V 0.377V 0.727V 0.727V 0.632V 0.632V 0.990V
VDS,sat 0.102V 0.102V 0.255V 0.255V 0.398V 0.398V 0.370V 0.370V 0.489V 0.489V 0.487V
Gm 0.82mS 0.82mS 0.61mS 0.61mS 0.31mS 0.31‘mS 0.36mS 0.36mS 0.41mS 0.41mS 0.32mS
Table 2.7: Hand calculated values vs. simulation values of the input common
mode range and output swing
41
Figure 2.5: Transfer function of the OTA at open loop – Magnitude and phase plot
42
CHAPTER THREE
During my SIWES, while working on both Digital Signal Processing (DSP) and Analog
IC design, I acquired a diverse set of technical and soft skills, contributing significantly
to my professional development.
and analog IC design, I honed critical skills that will serve me well in my career. This
Technical Skills
In DSP, I gained proficiency in generating and analyzing signals using MATLAB and
Python. Implementing techniques like filtering and spectral estimation from scratch gave
strong fundamentals.
Through circuit design using Xschem and ngspice, I developed skills in schematic
capture, simulation, and analog IC analysis. Exposure to the GF180 PDK provided
43
• DSP Expertise: Developed proficiency in DSP techniques, including signal
processing, spectral analysis, and filter design, using tools such as MATLAB.
transconductance amplifier (OTA) with the folded cascode topology using Xschem
and ngspice.
LAB for DSP applications and scripting languages for automation in circuit design.
Soft Skills
The internship enhanced vital soft skills like problem-solving, perseverance, and attention
to detail. For instance, debugging circuit stability issues and device mismatches required
44
• Adaptability: Navigated through various tasks, demonstrating adaptability to
technical stakeholders.
neering)
The DSP projects reinforced concepts from Signals and Systems (EEE 309) and
level implementation.
and gained practical experience in designing circuits, aligning with the course’s
theoretical foundations.
techniques.
in circuit analysis and DSP algorithms, aligning with the course’s emphasis on
numerical methods.
45
• CPE 316 (Introduction to Artificial Intelligence): Explored AI applications
I encountered issues like high offset voltage due to device mismatches. By introducing
The circuit had stability issues and proneness to oscillations. I stabilized the design by
Device parasitics limited the gain bandwidth product. I re-sized transistors and
In DSP projects, issues like noise and non-stationary signals required careful analysis
experience in DSP algorithm implementation and IC design. This will serve me well in
46
CHAPTER FOUR
4.1 Conclusion
The SIWES internship at PlethuDeep Hub provided invaluable hands-on experience and
Through projects in digital signal processing and analog integrated circuit design,
I developed strong technical skills in areas like MATLAB, Python, schematic capture,
through reports and presentations enhanced my technical writing and presentation skills.
Adhering to deadlines and processes instilled professional work ethics like time
lifecycle exposure and key soft skills that will accelerate my career development.
47
4.2 Recommendations
internship:
• Increase focus on practical hands-on learning through lab sessions, live projects and
industry visits. This will enable students to better apply classroom theory.
like power, communications, embedded systems etc. This will give a more holistic
perspective.
• Incorporate more training sessions on professional skills like technical writing, pre-
sentation delivery, project planning etc. These are vital for workplace effectiveness.
• Set up mentoring programs and progress reviews with faculty supervisors. This will
• Encourage students to document their work through project reports, code samples
etc. This will reinforce technical learning while improving documentation abilities.
By incorporating these suggestions, the SIWES program can provide even more
holistic development of technical talent ready for industry needs. I am grateful for the
48
REFERENCES
Geiger, R. L., Allen, P. E., and Strader, N. R. (1985). VLSI design techniques for analog
Gray, P. R., Hurst, P. J., Lewis, S. H., and Meyer, R. G. (2006). Analysis and design of
Smith, S. W. (2010). Practical Signal Processing and its Applications With MATLAB
Programming. Newnes.
49