diff --git a/presentations/AnalogL1/presentation.html b/presentations/AnalogL1/presentation.html index 37b6fa0..2a2982f 100644 --- a/presentations/AnalogL1/presentation.html +++ b/presentations/AnalogL1/presentation.html @@ -287,7 +287,7 @@ - A source that produces a nearly sinusoidal AC voltage is provided to you - The voltage generated by this source can be expressed in time-domain as -\\[ v\_{L(t)} = V\_{L(pk)}sin \left( \omega\_{L} t \right) \quad \text{where} \quad \omega\_{L} = 2 \pi f\_{L} = 1000 \pi \quad \because \ f\_{L} = 500Hz \\] +\\[ v\_{\text{L}}(t) = V\_{\text{L(pk)}}\sin \left( \omega\_{\text{L}} t \right) \quad \text{where} \quad \omega\_{\text{L}} = 2 \pi f\_{\text{L}} = 1000 \pi \quad \because \ f\_{\text{L}} = 500\,\text{Hz} \\] - RMS of this voltage, VL, can be set to between 13.6VRMS and 15.4VRMS via a software application - This AC source needs to be powered by providing 30VDC from a bench-top DC power source - It employs a switched-mode converter to synthesize an AC output voltage from a DC input voltage @@ -301,7 +301,7 @@ - A load that consists of a fixed inductor, LL, in series with a variable resistor, RL, is provided to you - The impedance of this load can be expressed in the phasor-domain as -\\[ Z\_{L} = R\_{L} + j \omega\_{L} L\_{L} \quad \text{where} \quad \omega\_{L} = 2 \pi f\_{L} = 1000 \pi \quad \because \ f\_{L} = 500Hz \\] +\\[ Z\_{\text{L}} = R\_{\text{L}} + j \omega\_{\text{L}} L\_{\text{L}} \quad \text{where} \quad \omega\_{\text{L}} = 2 \pi f\_{\text{L}} = 1000 \pi \quad \because \ f\_{\text{L}} = 500\,\text{Hz} \\] - The inductor has a fixed inductance of 4mH ± 20% - The resistance of the variable resistor can be set between 5Ω and 105Ω using the knob - Helps control complex power of the load to between specified 2.5VA and 7.5VA @@ -431,7 +431,7 @@ - Voltage is a measure of the charge imbalance that provides the force to move the electrons through a circuit branch - Resistance of a circuit branch is a measure of how hard it is for the electrons to flow through that branch - Ohm's law relates voltage, current and resistance of a resistor -\\[ V\_{DC} = I\_{DC}R \quad \text{OR} \quad v\_{(t)} = i\_{(t)}R \\] +\\[ V\_{\text{DC}} = I\_{\text{DC}}R \quad \text{or} \quad v(t) = i(t)R \\] ] .right-column[ @@ -507,27 +507,27 @@
]
+.center[
]
- In this lecture, lets assume a 50Hz Vvf at ADC0 is sampled and converted to an ADC value every 2ms
- Note that project specifications limits maximum sampling rate to 10kHz and therefore if repeatedly a sample of Vvf is taken followed by a sample of Vif then each Vvf sample will be 0.2ms apart
- Alternatively Vvf can be continuously sampled over a few periods to take samples of Vvf every 0.1ms
- Need zero crossing detector to correctly align the Vif samples taken after this with the Vvf samples
- From the ADC data we can estimate the AC source voltage at ith sample point since
-\\[ V\_{AC}[i] = \left( ADC0Value[i] \times 5/1024 - V\_{off} \right) / \left( G\_{vs} G\_{vo} \right) \\]
+\\[ V\_\text{AC}[i] = \tfrac {\mathtt{ADC0Value}[i] \times \frac{5}{1024} - V\_\text{off}} {G\_\text{vs} G\_\text{vo}} \\]
---
@@ -306,14 +306,14 @@
# ADC Data Representing Current
-.center[
]
+.center[
]
- Similar to Vvf lets assume a 50Hz Vif at ADC1 is sampled and converted to an ADC value every 2ms
- Project specifications limits maximum sampling rate to 10kHz and therefore if repeatedly a sample of Vvf is taken followed by a sample of Vif then each Vif sample will be 0.2ms apart
- Alternatively Vif can be continuously sampled over a few periods to take samples of Vif every 0.1ms
- Need zero crossing detector to correctly align the Vif samples with the Vvf samples
- From the ADC data we can estimate the AC load current at ith sample point since
-\\[ I\_{L}[i] = \left( ADC1Value[i] \times 5/1024 - V\_{off} \right) / \left( G\_{is} G\_{io} \right) \\]
+\\[ I\_\text{L}[i] = \tfrac {\mathtt{ADC1Value}[i] \times \frac{5}{1024} - V\_\text{off}} {G\_\text{is} G\_\text{io}} \\]
---
name: S6
@@ -410,13 +410,13 @@
- [Recall](#S7) that we have already learnt how to obtain the peak of a signal
- Assuming this signal is sinusoidal, the peak value is related to the RMS value as given by
-\\[ RMS = \frac {Peak} {\sqrt{2}} \\]
+\\[ \text{RMS} = \frac {\text{Peak}} {\sqrt{2}} \\]
- The assumption of a sinusoidal signal is not always correct, especially in a practical design, as Vac and IL are often distorted sinusoidal signals
- The distortions in the signals lead to significant errors in the RMS estimate when using this method
- We can improve the accuracy by developing software to implement the RMS formula given by
-\\[ V\_{AC\_{rms}} = \sqrt {\frac {1} {T\_p} \int\_{0}^{T\_p} {V\_{AC}^2 dt}} \quad \text{OR} \quad I\_{L\_{rms}} = \sqrt {\frac {1} {T\_p} \int\_{0}^{T\_p} {I\_{L}^2 dt}}\\]
+\\[ V\_\text{AC(RMS)} = \sqrt {\frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {V\_\text{AC}^2 \,dt}} \quad \text{or} \quad I\_\text{L(RMS)} = \sqrt {\frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {I\_\text{L}^2 \,dt}}\\]
---
name: S11
@@ -446,7 +446,7 @@
- If we have taken N ADC samples at regular Δtsample intervals over one time period of the signal, the time period Tp = NΔtsample
- We can square each VAC or IL sample and use Riemann sum to numerically evaluate the RMS as given by
-\\[ V\_{AC\_{rms}}^2 = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} V\_{AC}^2[i] \Delta t\_{sample} \quad \text{OR} \quad I\_{L\_{rms}}^2 = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} I\_L^2[i] \Delta t\_{sample}\\]
+\\[ V\_\text{AC(RMS)}^2 = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} V\_\text{AC}^2[i] \cdot \Delta t\_\text{sample} \quad \text{or} \quad I\_\text{L(RMS)}^2 = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} I\_\text{L}^2[i] \cdot \Delta t\_\text{sample}\\]
---
@@ -505,13 +505,13 @@
- [Recall](#S10) that we have already learnt how to obtain the RMS of VAC and IL
- Assuming VAC and IL are sinusoidal, the power is related to their RMS values and the power factor angle as given by
-\\[ P = V\_{AC\_{rms}} I\_{L\_{rms}} cos(\theta) \\]
+\\[ P = V\_\text{AC(RMS)} I\_\text{L(RMS)} \cos(\theta) \\]
- The assumption of a sinusoidal signal is not always correct, especially in a practical design, as Vac and IL are often distorted sinusoidal signals
- The distortions in the signals lead to significant errors in the power estimate when using RMSs and the power factor angle
- We can improve the accuracy by developing software to implement the power formula given by
-\\[ P = \frac {1} {T\_p} \int\_{0}^{T\_p} {V\_{AC} I\_{L} dt} \\]
+\\[ P = \frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {V\_\text{AC} I\_\text{L} \,dt} \\]
---
name: S15
@@ -523,7 +523,7 @@
- Samples of VAC as well as IL are at regular Δtsample intervals
- We can multiply each VAC sample with corresponding IL sample to numerically evaluate power as given by
-\\[ P = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} V\_{AC}[i] I\_L[i] \Delta t\_{sample} = \frac {1}{N } \sum\_{i=0}^{N-1} V\_{AC}[i] I\_L[i]\\]
+\\[ P = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} \left( V\_\text{AC}[i] \cdot I\_\text{L}[i] \cdot \Delta t\_\text{sample} \right) = \frac {1}{N} \sum\_{i=0}^{N-1} \left( V\_\text{AC}[i]\cdot I\_\text{L}[i] \right)\\]
- Since the two ADC channels are sampled one after the other, there is a time delay between each sample of VAC and its corresponding IL sample
- This can lead to a significant error in power calculation in the form of a phase-shift
@@ -542,13 +542,13 @@
.left-column[
- The missing VAC and IL samples can be approximated using the average of the samples from either side (i.e. linear approximation)
-\\[ \bar{V}\_{AC}[i] = \left( V\_{AC}[i] + V\_{AC}[i+1] \right) / 2 \\]
-\\[ \bar{I}\_{L}[i] = \left( I\_{L}[i-1] + I\_{L}[i] \right) / 2 \\]
+\\[ \bar{V}\_\text{AC}[i] = \frac {V\_\text{AC}[i] + V\_\text{AC}[i+1]} {2} \\]
+\\[ \bar{I}\_\text{L}[i] = \frac {I\_\text{L}[i-1] + I\_\text{L}[i]} {2} \\]
- How can we estimate the 11th sample of VAC and the -1th sample of IL?
- Power can now be evaluated as given by
-\\[ P = \frac {1}{2N} \sum\_{i=0}^{N-1} \left[ V\_{AC}[i] \bar{I}\_L[i] + \bar{V}\_{AC}[i] I\_L[i] \right] \\]
+\\[ P = \frac {1}{2N} \sum\_{i=0}^{N-1} \left[ V\_\text{AC}[i] \cdot \bar{I}\_\text{L}[i] + \bar{V}\_\text{AC}[i] \cdot I\_\text{L}[i] \right] \\]
]
diff --git a/presentations/DigitalL5/presentation.html b/presentations/DigitalL5/presentation.html
index 3c4871f..6e7051c 100644
--- a/presentations/DigitalL5/presentation.html
+++ b/presentations/DigitalL5/presentation.html
@@ -258,8 +258,8 @@
- We also want to monitor activities, and want to determine for how long or how often they occur
- As an example consider having to measure how long a button is pressed for
- All microcontrollers have a notion of time based on its clock, as each clock period is a function of the system clock frequency
-\\[ T\_{system\\\_clk} = \frac{1}{f\_{system\\\_clk}} \\]
-- Timers are peripherals which enable us to convert the `\(T_{system\_clk}\)` either into actions in real time or to measure events in real time
+\\[ T\_\mathtt{system\\\_clk} = \frac{1}{f\_\mathtt{system\\\_clk}} \\]
+- Timers are peripherals which enable us to convert the `\(T_\mathtt{system\_clk}\)` either into actions in real time or to measure events in real time
---
@@ -268,7 +268,7 @@
# Timing Without Timer Peripherals
- The microcontroller processor also has a notion of time from the system clock since the duration of each execution cycle is also
-\\[ T\_{cpu\\\_clk} = \frac{1}{f\_{cpu\\\_clk}} \\]
+\\[ T\_\mathtt{cpu\\\_clk} = \frac{1}{f\_\mathtt{cpu\\\_clk}} \\]
- We could implement timing in software by using for example a 'dummy' block of code that uses up execution cycles
- This is at the expense of taking up the processor time
- We also need to know exactly how many clock cycles it took to execute the block of code used for timing
@@ -388,13 +388,13 @@
- Prescaler
- The clock divider which divides the system clock to create the timer clock
-\\[ f\_{timer\\\_clk} = \frac{f\_{system\\_clk}}{\text{Prescaler}} \\]
+\\[ f\_\mathtt{timer\\\_clk} = \frac{f\_\mathtt{system\\\_clk}}{\text{Prescaler}} \\]
- Bits
- The number of bits allocated to the count register
-\\[ 0 \leqslant \text{count} < 2^{bits} \\]
+\\[ 0 \leqslant \text{count} < 2^\text{bits} \\]
- Resolution
- This is the minimum time interval the timer can measure and is equal to one timer clock period
-\\[ \text{Resolution} = \frac{1}{f\_{timer\\_clk}} \\]
+\\[ \text{Resolution} = \frac{1}{f\_\mathtt{timer\\\_clk}} \\]
---
@@ -404,7 +404,7 @@
- Range
- This is the maximum time interval the timer can measure
-\\[ \text{Range} = \text{Resolution} \times \left( 2^{bits} - 1 \right) \\]
+\\[ \text{Range} = \text{Resolution} \times \left( 2^\text{bits} - 1 \right) \\]
- Top
- The count value at which the count is reset
- Top must be less than or equal to the maximum possible count value which can be stored with the available bits
@@ -720,7 +720,7 @@
- We often want to produce a periodically pulsating signals that has a fixed time period (Tp)
- The pulsating signal is high (logic 1) for a certain portion of Tp and this time is called the on-time (Ton)
- For the remainder of Tp the pulsating signal is low (logic 0) and this time is called the off-time (Toff)
-\\[ T\_{p} = T\_{on} + T\_{off} \\]
+\\[ T\_\text{p} = T\_\text{on} + T\_\text{off} \\]
- In many application we control the duration of Ton to control the “pulse width”
- These signals are known as pulse-width modulated (PWM) signals
@@ -735,7 +735,7 @@
- Vsupply can be any voltage ranging from a few volts to thousands of volts
- Pulsating Vsupply can be turned in to a DC signal by passing it through an analog low-pass filter
- The DC signal can be controlled using Ton/Tp, which is referred to as the duty-cycle (D)
-\\[ V\_{DC} = V\_{supply} \times T\_{on}/T\_{p} = D V\_{supply} \\]
+\\[ V\_\text{DC} = V\_\text{supply} \times \frac{T\_\text{on}}{T\_\text{p}} = D \cdot V\_\text{supply} \\]
---
name: S30
@@ -748,8 +748,8 @@
- We can use this property to set Ton of the PWM, by setting the output state of OCnA/OCnB to low when every time a compare match is achieved
- The output state of OCnA/OCnB can be configured to be set to high when the count value resets
- Since we have to add 1 when calculating periods, this results in a PWM output where
-\\[ T\_{p} = \text{Resolution} \times \left( \text{Top} + 1 \right) = \left( \text{Top} + 1 \right) / f\_{timer\\\_clk}\\]
-\\[ T\_{on} = \text{Resolution} \times \left( \text{Compare} + 1 \right) = \left( \text{Compare} + 1 \right) / f\_{timer\\\_clk}\\]
+\\[ T\_\text{p} = \text{Resolution} \times \left( \text{Top} + 1 \right) = \frac{\text{Top} + 1}{f\_\mathtt{timer\\\_clk}}\\]
+\\[ T\_\text{on} = \text{Resolution} \times \left( \text{Compare} + 1 \right) = \frac{\text{Compare} + 1}{f\_\mathtt{timer\\\_clk}}\\]
- The compare value can be changed between 0 and Top to change the duty-cycle between 0% and 100%
---