Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

EEE119 Digital Systems Engineering Assignment

Component Tolerance Modelling and Analysis Using

MATLAB

AIMS

1.   To demonstrate principles of systems engineering through modelling and analysis.

2.   To introduce the MATLAB mathematical programming and simulation environment as a rapid prototyping tool for use in the systems engineering process.

3.   To introduce component tolerance analysis.

4.   To further develop self-learning skills.

5.   To further develop your technical report writing capabilities.

ASSESSMENT METHOD

A written report describing each experiment undertaken with a graphical representation of the results to be submitted on Monday 12th  December 2022 by 23.59.

1. Introduction

In this assignment you will be introduced to the concept of component tolerances and examine the effects of component variation on a number of different circuits by using extreme value analysis and by using MATLAB to perform Monte Carlo analysis. All electronic components are subject to variation, and it is essential that the systems engineer accounts for these variations during the design process, so their system  meets the specification  under  normal operating conditions.  By the end of this assignment, you should have learnt the importance of accounting for the effects of component variation during the design process in order to maximise yield.

The  assignment  is  a  self-learning  exercise  and  should  be  attempted  individually.  It  is  the responsibility of the student to allocate sufficient time to complete the required tasks by the deadline.

The student is reminded that this assignment contributes ~ 20% of the final grade for EEE119 Coursework. Assessment of this work will be in the form of an assignment written in the style of a technical report in which you should describe your investigations, simulation experiments and the results, and findings of these experiments. You should also include any recommendations and conclusions that you draw from this work. The deadline for the report is by 23.59 on Monday 12th December 2022 which time an electronic copy must be submitted to Turnitin. Reports submitted to Turnitin after this date will be penalised.

You have been introduced to MATLAB. Appendix A1 contains a list of MATLAB functions which you may  find  useful.  Further  details  regarding  MATLAB/Simulink  can  be  found  on  the  EEE119 Blackboard page. The MATLAB/Simulink software is available through the University's Managed Desktop Service that is available in the Student Computer Rooms (inc. Information Commons and the Diamond). MATLAB is also available as a software download on MUSE should you wish to use your own computer. You may use GNU Octave [1], a free alternative to MATLAB, should you wish.

The remainder of this document is divided into 4 sections:

•    Section 2 introduces the concept of yield and component tolerance

•    Section 3 describes component tolerance analysis techniques

•    Section 4 describes the individual exercises

•    Section 5 describes the report requirements

2. Yield and Component Tolerances

Yield is a performance measure for manufacturing processes and is defined as:

Yield =

No. of products meeting specification

Total no. of products manufactured

(1)

Maximising yield is very important since it minimises wastage and therefore maximises profits. Since yield is linked to design and manufacture there are several ways in which it can be maximised. In this assignment you will examine the effect of component tolerance on yield.

Most electronic components are characterised by a number of parameters which, along with a suitable mathematical model, allow the circuit designer to predict the behaviour of their circuit. Manufacturers specify the component's nominal parameter value and also specify a tolerance or range of values to represent the natural variations that occur from component to component because of differences with raw materials, processing, tooling, etc. Passive components are available in 'preferred values', where the manufacturer attempts to create a component with a specific value ± a given tolerance. Resistors, for example, are available in the E-range of preferred values where the number of values available spans a decade. The E-24 range divides the decade between 1 and 10 into 24 bins (or discrete resistor values) and each bin has a tolerance of 5%. The E-96 range divides the decade into 96 bins and provides a tolerance of 1%. Capacitors and inductors are also available in preferred values; however, they are often subject to greater variation and it is typical to see both capacitors and inductors with a tolerance of ±10%.

3. Component Tolerance Analysis

This  section  introduces  the  principles  of  component  tolerance  analysis  which  will  be  used subsequently to analyse the performance of a number of circuits in section 4.

3.1  Extreme Value Analysis

With Extreme Value Analysis (EVA), one compares the performance of a circuit evaluated with nominal component values with the performance of the circuit when the component values take on their extreme tolerance values.  By way of example, consider a circuit consisting of two series connected  resistors  R1    and  R2   whose  combined  value  is  RT ,  RT  = R1  + R2 .  To  evaluate  the performance of this circuit when subject to component tolerances, consider a perturbation in the value of resistor i such that Ri  → Ri(1 ± ∆Ri) where ∆Ri  represents the resistor's tolerance (i.e. 0.05 or  5%).  Assuming  R1     and  R2     have  similar  component  tolerances  (∆R = ∆R1  = ∆R2)   then, RT(1 ± ∆RT) = R1(1 ± ∆R) + R1(1 ± ∆R). Taking the extreme positive value reveals ∆RT  = ∆R, i.e. the tolerance remains unchanged in this example. Although this technique can be applied to most component  parameters  it quickly  becomes cumbersome for large circuits since the  number of interacting components increase making it difficult to extract useful information. Furthermore, for certain circuits one has to make a judgement on whether to use a positive or negative tolerance value to maximise effects.

3.2  Monte Carlo analysis

In  Monte  Carlo  analysis  many  hundreds  or thousands  of circuit  evaluations  (simulations)  are evaluated to determine the effects of component tolerance on yield. Each simulation uses a randomly chosen set of component values that exist in the range permitted by the tolerance bounds and the components' values are obtained from probability distributions. Thus, many different component value scenarios are evaluated allowing a more in depth understanding of cause and effect.

Returning once again to our resistor example and using x to represent a randomly generated number in the range 0 to 1. If the resistor values obey a uniform distribution (i.e. each resistor value has an equal chance of appearing), the value of the resistor, R , for a single simulation can be determined using R = Rnm[1 + 2(X − 0.5)∆R] where Rnm  is the nominal or mean resistor value and ∆R is the component tolerance. Figure 1 shows a histogram of resistor values for a 1kΩ ±5% tolerance resistor generated using the uniform probability distribution described above. The MATLAB program code used to generate the Figure 1 is given in Appendix A2 where the random number X was generated using the MATLAB rand function.

 

Figure 1: Histogram showing frequency of resistor values for a uniform distribution

Many  components  are  characterised  by  a  Gaussian  (normal)  probability  distribution , which  is governed by (2), where f(X, u, ) is the distribution, X is the distance from the mean, u is the mean and  is the standard deviation. Figure 2 shows a histogram of resistor values for a 1kΩ ±5% tolerance resistor generated using the Gaussian probability distribution. The MATLAB program code used to generate Figure 2 is given in Appendix A3 and uses a MATLAB function called randn to generate Gaussian distributed random numbers with a standard deviation of 1 and mean value of 0. The multiplier factor 1/3 in Appendix A3 ensures that 99.7% of all generated numbers lie within the tolerance bounds.

f(x, u, G) =           exp ( −   [          ] )                         (1)

When performing Monte Carlo analysis, the random numbers associated with each component parameter  should  be  independent.  Thus,  a  circuit  characterised  by  n  parameters  requires  n independent random numbers to be generated per Monte Carlo simulation.

 

Figure 2: Histogram showing frequency of resistor values for a Gaussian distribution

4. Exercises

This section describes Three exercises for you to work through.

4.1 Inverting OpAmp  (30 marks)

The Inverting OpAmp circuit in Figure 3 is used to generate an amplified voltage Vo for a cascaded oscillator system. The Inverting feedback network controls the overall gain of the system and consists of resistors R1 = 5kΩ and R2 = 100kΩ . Resistors R1 and R2 are assumed to have the same tolerance rating, i.e. |∆R| = |∆R1| = |∆R2|. The inverting op-amp system is designed to operate at a voltage

gain, |G| = |VoVin|, and specified to be 20 ±3%.

 

Figure 3: Inverting OpAmp

1.   Derive the voltage gain expression  (G = VoVin),  in terms of R1and R2 , for the inverting feedback network connected across the amplifier.

2.   Using Extreme Value Analysis (EVA), derive an expression for the tolerance in the inverting op-amp voltage gain, ΔG, featuring the resistor component tolerance, ∆R, and the nominal value of the voltage gain, G .

3.   Using your expression from above (Part 2), determine the voltage gain tolerance if the inverting op-amp feedback resistors have a tolerance of i) ∆R = ±1% , ii) ∆R = ±2%, iii) ∆R = ±5% and iv) ∆R = ±10%. Using a table, compare your results from the equation generated in Part2, with exact results obtained from the voltage gain equation and state whether the EVA results meet the specification, discuss your findings.

4.   Assuming the resistor values follow a uniform distribution, perform Monte Carlo analysis to determine the yield (how many meet the specification) for a run of 10,000 circuits for the following component tolerance values: i) ∆R = ±1% , ii) ∆R = ±2%, iii) ∆R = ±5% and iv) ∆R = ±10%. Include a histogram of the inverting op-amp voltage gain for each tolerance value in your report. Provide a plot of yield versus tolerance in your report. How does these results compares with the EVA techniques, discuss your findings?

Hint: MATLAB’s find command may help here.

5.   Using your expression from Part2, determine the largest possible resistor tolerance value (∆R) that would ensure the specification is always achieved.  Show your working out.  Prove your result using a Monte Carlo analysis of 10,000 circuits using a uniform probability distribution and provide evidence of this in your report. How will this impact the design?

4.2 Active Low Pass Filter  (30 marks)

The active Low Pass Filter (LPF), shown in Figure 4, is used to pass frequency signals below 100kHz for a measurement system. An active LPF is constructed by integrating the LPF components within the feedback network of the differential operational amplifier (op-amp). The active low pass filter is specified to have a gain G = 20 and corner frequency fc = 100kHz ± 5%. The component values are specified as Rin = 80Ω, R = 1.6kΩ and C = 1nF ± 5% .

 

Figure 4: Active low pass filter

1.   Derive the overall circuit transfer function characteristics VoVin in terms of Rin, R and C . Then, identify the op-amp gain components, the LPF transfer function, and state the LPF corner frequency fc equation.

2.   If Vin(t) = 4 sin(2几 × 104t), plot Vin(t) and Vo(t) on the same graph.

For the next set of tasks (in Section 4.2: task3till task7), the LPF is treated in isolation.

3.   Using extreme value analysis, derive the expression for the LPF corner frequency tolerance,

∆fc , featuring the resistor component tolerance, ∆R, and the capacitor tolerance, ∆C.

4.   Using your expression from Part3above, determine the tolerance in the LPF corner frequency if the resistor (R) has a tolerance of i) ∆R = ±1% , ii) ∆R = ±2%, iii) ∆R = ±5% and iv) ∆R = ±10%. Do any of these tolerance ratings meet the specification? Using tabular format, compare your results with those obtained using the expression for the corner frequency and discuss.

5.   Assuming the LPF resistor and capacitor values follow a Gaussian distribution, use Monte Carlo analysis to determine the yield for a run of 10,000 circuits for the following resistor component (R) tolerance values: i) ∆R = ±1% , ii) ∆R = ±2%, iii) ∆R = ±5% and iv) ∆R = ±10. Include a histogram of the LPF corner frequency for each tolerance value in your report. Plot the yield v's tolerance in your report. How does Monte Carlo compare with EVA, discuss your results?

6.   Using your expression from Part3, determine the largest possible capacitor tolerance value ∆C that will always ensure the specification is achieved if the resistor  (R) has a tolerance ∆R = ±1%. Show your analysis and prove your result using a Monte Carlo analysis of 10,000 circuit assuming both components obey a uniform probability distribution.

7.   Using the values  determined  in  Part 6,  perform  Monte  Carlo  analysis  of  10,000  circuits assuming both components obey the Gaussian probability distribution. Compare these results with those obtained in Part 6.

4.3 Voltage limiting circuit

In this section you will analyse the performance of a voltage limiting circuit. The circuit in Figure 5 is typically used to protect sensitive circuit components, such as analogue-to-digital converters (ADCs), from receiving excessive input voltage levels. It operates in the following manner: i) the potential divider formed by R1  and R2  sets the limiting level (labelled Vx  in Figure 5) ; ii) when the input voltage Vin  is below this level the output voltage Vout  = Vin; iii) for input voltages above the limit level, diode D conducts and Vout  is clamped to  Vx .

 

Figure 5: Voltage limiting circuit

For the purpose of this assignment the following assumptions are made:

•    The output impedance of Vin  is zero.

•    The input impedance of Vout  is infinite.

•    Diode D is modelled as switch connected in series with a voltage source Vd  and it turns-on when Vak  = Vd  where Vak  is the diode anode-to-cathode voltage and Vd  is the diode forward voltage drop. Once on, the diode turns off when its current falls to zero.

•    Resistors R1, R2 and R3 are assumed to have the same tolerance rating, i.e. |ΔR|=|ΔR1|=|ΔR2| =|ΔR3|

1.   Derive an expression for the input voltage, Vin(lim) , at onset of the limiting action.

2.   Derive an expression for the output voltage, Vout , during limiting.

In order to meet the design specification, the maximum output voltage Vout(max)  < 5V. Assuming Vs  = 5V , Vd  = 0.7V , R1  = 2.2kΩ , R2  = 3.3kΩ & R3  = 10kΩ and the input voltage is a 1kHz sinusoid with an amplitude of 10V:

3.  What is the value of input voltage at the onset of limiting, Vin(lim)?

4.   Plot the output voltage, Vout , as function of time for 4 complete cycles of the input voltage

5.  What is the maximum value of the output voltage, Vout(max)?

6.  What is the instantaneous power dissipation in each component of the circuit at the operating condition corresponding to Vout(max)?

7.   Normalising the resistor values to R1 , investigate the loading effect of R3  on the maximum output voltage, Vout(max) . Show your mathematical analysis and include a plot of Vout(max)  obtained from your analysis. Discuss resistor R3  loading effect on the overall circuit performance.

8.   Using extreme value analysis, derive an expression for the tolerance in the maximum output voltage, Vout(max) , featuring the resistor component tolerance, ΔR.  For this step you may assume that ΔRΔR<<1 and therefore these terms can be neglected.

9.   Using your expression from Part 8, determine the maximum output voltage if the resistors have a tolerance of i) ΔR=±1%, ii) ΔR=±2%, iii) ΔR=±5% and iv) ΔR=±10%. Do anyof these tolerance ratings meet the specification, provide reasoning in your answer?

10. Assuming the resistor values follow a uniform distribution, perform Monte Carlo analysis to determine the yield (how many meet the specification) for a run of 10,000 circuits for the following component tolerance values: i) ΔR=±1%, ii) ΔR=±2%, iii) ΔR=±5% and iv) ΔR=±10%. Include a histogram of the maximum output voltage, Vout(max) , for each tolerance value in your report. Provide a plot of yield v's tolerance in your report. Discuss how Monte Carlo analysis compares to EVA in Part 9.

5. Written Assessment

Write a technical laboratory report describing the investigations undertaken in Part 4 of this document. The report should include details of any mathematical derivation you have made, any the numerical and graphical results produced and analysis of your results. In the conclusion of your report you should discuss the practical issues associated with using MATLAB for component tolerance analysis. As a guide the report should not exceed 5000 words reports significantly longer this or those submitted without a word count displayed on the front cover will be penalised.

The report should include the following:

•    A short introduction that introduces the work being presented and the structure of the report.

•    Three major sections describing the inverting OpAmp, active low pass filter and diode limiting circuit. For each major section you should include:

•    Clear derivations as required.

•    A short description of methods employed.

•    Results section: Used to describe your results - shapes of graphs, trends in data, etc. You should present all your results in a clear and understandable manner. All figures should be fully labelled with units and legends clearly visible and the figure should be numbered and  referenced in the text.   Here you may also decide to interpret the meanings of your results and provide the reader with an insight into why the results are of specific importance and significance. Aim to draw conclusions from your findings.

•    A report conclusion where you summarise and conclude the main work within the report

•    Include relevant appendices and the corresponding MATLAB code.

•    If you use any external sources of information, then you should acknowledge this fact by providing a reference to that information in the main text and then the bibliographical details (i.e. where to find) of the information in a references section.

Technical laboratory reports not only serve as a record of your work but must be detailed enough for a reasonably competent engineer or scientist to replicate your experiments and, hopefully, your results. Therefore, your report should be concise (to the point), easy to read (well structured) and free from grammatical and typographical errors. Everything you include in your report should be free from ambiguity and misinterpretation - this means avoiding contradictions and ensuring that all graphs and figures are clearly labelled and referenced. In keeping with scientific convention, you should avoid writing in the first-person perspective, do not use “I” . If in doubt consult the material presented to you describing technical report writing and use technical papers from the learned societyjournals (i.e. IEEE Transactions on Power Electronics) as a style guide for your report.

6. Marking Scheme

The report will be marked out of 100 and the marks are distributed as follows:

➢ Report structure – 5%

➢ Report introduction and conclusion – 5%

➢ Report codes in an appendix – 5%

➢ Task 4.1 – Inverting Op-amp – 30%

➢ Task 4.2 – Active LPF – 30%

➢ Task 4.3 – Voltage limiting Circuit – 25%

References

[1]        GNU Octave, http://www.gnu.org/software/octave/,Accessed 28/02/12

[2]        Prof M Foster, ‘A brief introduction to Maple for circuit analysis’, EEE119

Appendices

A1 – Useful Matlab commands

help          legend

plot            who

grid            title

hold           save

xlabel          load

ylabel          why

find          

t=0:0.01:10 % generate time vector x=sin(2*pi*50*t) %

generate a 50Hz sine wave

plot(t,x) % plot the sine wave as a function of time

A2 – Uniform component distribution

% define nominal and tolerance parameters

Rnom=1e3

dR=0.05

%loop to generate 20000 resistors

for ind=1:20000

% determine individual component value

R(ind)=Rnom*(1+2*(rand-0.5)*dR)

end

%plot a histogram

hist(R)

A3 – Gaussian (normal) component distribution

% define nominal and tolerance parameters

Rnom=1e3

dR=0.05

%loop to generate 20000 resistors

for ind=1:20000

% determine individual component value

R(ind)=Rnom*(1+dR/3*randn)

end

%plot a histogram with 20 bins

hist(R,20)