Upcoming SlideShare
×

# Chapter7 circuits

527 views
458 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
527
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
21
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Chapter7 circuits

1. 1. Elec3017: Electrical Engineering DesignChapter 7: Circuits and Communication A/Prof D. S. Taubman September 1, 20081 Purpose of this ChapterThis chapter cannot possibly take the place of an electronics course, so it isassumed that you already have the basics under your belt. You may alreadyhave seen a number of the circuit ideas introduced in this chapter, but then youmight not have. Our goal is to be as practical as possible, pointing out someof the conﬁgurations and concepts with which every electrical engineer shouldhave some familiarity. Seeming as all the lecture notes for this course are being created for the ﬁrsttime, it is not possible to provide a comprehensive written coverage here at thepresent time. For this reason, many sections of these notes serve only to indicatethe circuit conﬁgurations which are discussed during lectures and provide youwith some brief pointers. If, for some reason, you are unable to attend lectures(this is generally a mistake), you can use these pointers to conduct your ownresearch. A good general reference is [1]. Many electronics design projects end up involving some form of communica-tion, in the presence of noise and interference. These projects tend to be donebadly, due to a lack of knowledge of the fundamental principles. In Section 5,we attempt to bridge this knowledge gap, by providing a minimal treatmentof the concepts of matched ﬁltering and receiver synchronization, with circuitexamples.2 Voltage SourcesTopics covered are as follows: • Regulated power supplies • Establishing a voltage reference with zener diodes — remember to use a ceramic capacitor to reduce high frequency noise. 1
2. 2. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 2 • Establishing a voltage reference using a forward biased diode — remember temperature sensitivity (Ebers-Moll equation). • A few words about temperature stabilized voltage reference IC’s.3 Driving CircuitsTopics covered are as follows: • Driving solenoids and relays — remember ﬂy-back diodes and snubber cir- cuits. • Driving LED’s and LED displays • Driving digital transmission lines — remember R-C transient suppression circuits.4 Opamp CircuitsTopics covered are as follows: • Inverting, non-inverting, summing and diﬀerential ampliﬁers • Peak detectors and reciﬁer circuits • Digitally controlled integrators — circuits and choosing suitable compo- nents5 CommunicationsSince the material in this section is more diﬃcult than the others, we providesome additional explanation of the theory here. We cannot aﬀord to be con-cerned with general communication theory, so we will focus primarily on theproblem of robustly detecting codes (i.e., signal patterns) and modulated bi-nary data sequences in the presence of noise and interference. The methodsdescribed here can be used with RF, IR or even audio physical communicationsmedia.Sidebar: The word “media” is plural. Its singular form is “medium.” Thus, an IR link forms a single communications medium, whereas IR and RF are two diﬀerent communications media.Totally unrelated sidebar: While we are on singular and plural forms of technical English terms, here is one common error that grates most deeply upon the ear: The word “criterion” is the singular of “criteria.” Please get this around the right way!!!
3. 3. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 35.1 Mathematical Description of the Transmitted SignalAt a fundamental level, we are concerned with transmitted signals of the fol-lowing form: X x (t) = sk · g (t − kT ) (1) kHere, T is the symbol period, sk is the k th symbol value, and g (t) is knownas the shaping pulse. Equation (1) states the transmitted signal is formed byconcatenating scaled copies of the shaping pulse. During the ﬁrst symbol period(ﬁrst T seconds), x (t) is equal to g (t) scaled by s0 . During the second symbolperiod, x (t) is equal to g (t − T ) scaled by s1 — i.e., delay g (t) by T seconds, toshift it into the second symbol period, and then multiply by s1 — and so on. For simplicity, we restrict our attention here to the following scenarios:Repeating code: In this case, sk = 1 for all k so that x (t) is a periodic waveform, with period T , the ﬁrst period of which is given by g (t). We think of g (t) as some kind of code, which is used to indicate the presence of a transmitter. The goal of the receiver, in this case, is to ﬁgure out whether or not the code is being transmitted and hence to deduce whether the transmitter is nearby. A typical application of this is the garage door opener. Each garage door looks for a speciﬁc code g (t), whose presence indicates that the door should be opened (or closed, if it is already open). The code g (t) should have a high degree of uniqueness and other garage door codes, or randomly generated codes, should have an extremely low probability of being detected by the receiver. Other codes may be regarded as sources of interference. The reason for repeating the code g (t) is to give the receiver time to lock onto the pattern. It may require many repetitions before the receiver can correctly detect the code in a robust manner — more on this shortly.On-oﬀ keying: In this case, sk ∈ {0, 1}, so that in each symbol interval, the canonical shaping pulse g (t) is either present or absent. Presence or ab- sence may be interpreted by the receiver as a binary digit, so that each symbol period has the opportunity to signal a single bit.Antipodal signalling: In this case, sk ∈ {−1, 1}, so that in each symbol inter- val, either g (t) or −g (t) is transmitted. Again, this allows for the trans- mission of a single binary digit in each symbol period. One important advantage of antipodal signalling over on-oﬀ keying is that the receiver need only decide whether the received signal looks more like g (t) or its inverse within each symbol period — this decision is essentially indepen- dent of the amount by which the signal may have been attenuated over the transmission medium. For on-oﬀ keying, on the other hand, attenua- tion in the transmission medium biases the detection process toward the detection of a 0 (oﬀ). On the other hand, antipodal signalling presents greater challenges for synchronization — particularly for the recovery of the transmitter’s symbol clock at the receiver.
4. 4. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 45.2 Matched Filters for Optimal ReceptionFor the sake of this simple treatment, we will regard the signal recovered bythe receiver as a scaled copy of the transmitted waveform plus additive whiteGaussian noise. We write this as y (t) = αx (t) + n (t) (2) X = αg (t − kT ) · sk + n (t) kAn important property of truly white noise processes is that they have inﬁnitepower. To see this, let ΓN (f ) be the power spectral density of the noise process,as a function of frequency f . For a truly white noise process, ΓN (f ) = N0 /2is constant1 , for all frequencies. Now the noise power in the time domain isexpressed by the variance of n (t). That is, Z ∞ £ ¤ σ 2 = E n2 (t) = N ΓN (f ) df = ∞!! −∞What this means is that instantaneously sampling a truly white noise waveformn (t) at any given time instant t will produce sample values of inﬁnite magnitudewith probability 1. This might sound ridiculous at ﬁrst. Of course, the noise cannot have inﬁnitepower. However, its power spectrum is often well approximated as ﬂat over allfrequencies of interest, i.e. N0 ΓN (f ) = 2The trick, then, is to ﬁlter the signal before sampling it, in order to avoid theamplitude of the sampled noise process far exceeding that of the signal of inter-est. Filtering the noise process limits the range of frequencies over which ΓN (f )departs signiﬁcantly from 0, which drastically reduces the value of σ 2 produced Nby the above integral. This is a very real phenomenon. For communicationsystems, we don’t just take samples of the received waveform and then process.We should always include some kind of analog ﬁlter. Fortunately, the best kind of analog ﬁlter depends on the shaping pulse g (t)alone, and can often be implemented or approximated quite simply with the aidof a switched opamp integrator. This best ﬁlter is called a matched ﬁlter, butit is most easily understood and implemented if you don’t think of ﬁltering at ˜all. Instead, let h (t) be any scaled version of g (t); that is, ˜ h (t) = βg (t) (3)Suppose that the receiver is perfectly synchronized with the transmitter. Thenthe variable which best indicates what was transmitted in symbol period k — 1 We adopt here the usual convention of writing N /2 for the magnitude of the two-sided 0power spectrum (having values for both positive and negative frequencies). This means thatthe power passed by a band-pass ﬁlter with passband given by B0 ≤ |f | ≤ B1 is equal toN0 · (B1 − B0 ).
5. 5. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 5i.e., between time kT and (k + 1) T — is Z T rk = ˜ y (t + kT ) · h (t) dt (4) 0Putting equation (2) into the above equation, we see that Z T Z T rk = sk · αβ g 2 (t) dt + β g (t) n (t) dt 0 0 = sk · αβEg + n0 kHere, Eg denotes the total energy in the shaping pulse2 Z T Eg = g 2 (t) dt 0. It can be shown that the noise term, n0 is a zero mean Gaussian random kvariable with variance N0 2 σ2 0 = N β Eg 2 pNow, since the the standard deviation of n0 (i.e., σ N 0 ) varies as β Eg and the kmagnitude of the transmitted signal component, sk · αβEg , varies as αβEgpit is ,clear that the key to robust reception is to make αEg much larger than Eg .There are three ways to do this: 1. Make α as large as possible — this corresponds to making the receiver more eﬃcient, or bringing it closer to the transmitter, so that it receives a larger portion of the transmitted signal power. 2. Make the amplitude of g (t) as large as possible — this corresponds to increasing the transmitter power. 3. Make the duration of g (t) as large as possible — this corresponds to slowing down the communication, integrating for a longer period at the receiver before deciding what was transmitted.Given that receiver eﬃciency and transmitter power are likely to be constrainedby technology and/or regulatory standards, the third mechanism is the onlything that a designer has direct control over. In summary, the longer you inte-grate at the receiver, the more robust your detection mechanism will be. The above discussion may still seem rather abstract. To bring things sharplyinto focus, let us consider how to implement the receiver model in equation(4). Suppose, for simplicity, that g (t) is a square wave pattern, consisting ofalternating −1’s and 1’s, as shown in Figure 1. In this case, the matched receiver 2 We think of the energy in a signal as the integral of its squared amplitude. The originof this convention is that we think of the signal as a voltage waveform, applied across a 1Ωresistor. Of course, we can replace the load resistor with R, and then the energy is just scaledby 1/R, but this is of no fundamental importance.
6. 6. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 6 g (t ) +1 t −1 0 T Figure 1: Example shaping pulse. y(t) S2 S1 rk R2 C R1 R1 S3Figure 2: Matched ﬁltering receiver for square wave shaping pulses. The circuitis an integrator, driven either by y (t) or −y (t), depending on the state of theMOSFET switches (e.g. those provided by a CD4066 quad bilateral switch IC)S1 and S2 . Switch S3 is used to dump charge at the start of each symbol period.The output rk holds the correct value at the end of each symbol period.can be implemented using the circuit shown in Figure 2. Here, switch S1 isclosed when g (t − kT ) is +ve, while switch S2 is closed when g (t − kT ) is −ve.The factor β in equation (3) depends on the selection of parameters (resistorsand capacitor) in the opamp integrator. The switch S3 is closed very brieﬂy atthe start of each symbol period. It is important that the on resistance of thisswitch is as small as possible, so that very little of the symbol integration periodneed be wasted in dumping the capacitor’s charge in preparation for the nextperiod. To simplify things, you might design your shaping pulse g (t) to containan initial period in which g (t) = 0, during which capacitor charge dumping canoccur. The longer this initial period is, the easier it will be for a receiver tofully dump the charge on the integrator’s capacitor, but this charge dumpingperiod will also reduce the value of Eg , which determines the communicationrobustness. We can now consider the circuit shown in Figure 2 in light of thethree communication scenarios outlined at the beginning of this section.Repeating code: In this case, our objective is simply to determine whether
7. 7. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 7 or not the transmitter is present. The output rk from the integrator at the end of one symbol period, is given by ½ αβEg + n0 if transmitter present k rk = n0 k if no transmitter Evidently, both the presence and absence of a transmitter may produce non-zero values for rk , so we must determine a threshold κ and check whether or not rk > κ. The threshold should be some multiple of the RMS noise amplitude, e.g., κ = 4σ N 0 or more. In order to make detection more reliable, we should consider integrating for multiple symbol periods. For example, we can always think of x (t) as being generated by symbols with period 2T , each of which is of the form g (t) + g (t − T ) — i.e., two copies of the g (t) shaping pulse. These double length symbols have twice the energy, so the detection process will be more immune to noise; the √ value of σ N 0 (and hence κ) increases by 2, but the signal received when a transmitter is present increases by a factor of 2. By integrating for a large number of symbol periods, we can reliably detect extremely weak transmitted signals in the presence of a large amount of noise. On the other hand, the eﬀect of non-idealities in our integrator will become accentuated as we try to integrate for longer periods of time.On-oﬀ keying: In this case, our objective is to determine whether or not the symbol transmitted in each symbol period is a 0 or a 1. To do this, we again compare the value of rk with a threshold κ at the end of each symbol period. In this case, integrating for multiple symbol periods is not an option for improved reliability at the receiver. Thus, to achieve the desired level of robustness, we must carefully select the symbol period length used by the transmitter.Antipodal signalling: In this case, we again check the value of rk produced by the integrator at the end of each symbol period. The possible values are given by ½ αβEg + n0 k if sk = 1 rk = −αβEg + n0 if sk = −1 k Noting that the noise has zero-valued mean, so that n0 is as likely to k be positive as negative, the optimal detection strategy is to decide that sk = 1 if rk > 0 and sk = −1 if rk < 0. One nice property of antipodal signalling is that we don’t need to select a threshold at all (if you like, the threshold is always 0). All we need is to detect the sign of the integrator output at the end of each symbol period. Again, robustness to noise can be increased by extending the duration (and hence energy) of each symbol period.5.3 Design of Shaping PulsesThe shaping pulse is a kind of code that the receiver is looking for. We have al-ready said that long shaping pulses (i.e., long symbol periods) will give increased
8. 8. c°Taubman, 2006 ELEC3017: Circuits and Communication Page 8robustness to noise and interference. At the end of the previous sub-section, weconsidered shaping pulses which alternate between +1 and −1. Smoother pat-terns (typically windowed sinusoids) can be much more interesting from theperspective of bandwidth preservation, but we will not consider them here dueto limited time, and the increased practical complications of matched ﬁltering.For your ELEC3117 project, strict bandwidth conservation is unlikely to be asigniﬁcant issue. For practical reasons, you might not have the luxury of transmittingboth negative and positive levels. For example, if you are using an IR (in-frared) system, you only have the opportunity to transmit positive levels oflight. As another example, you might well be using pre-existing RF modula-tion/demodulation modules which give you access only to the amplitude of themodulated RF signal. You can readily obtain 433MHz transmit/receive mod-ules of this form from electronics hobby stores. In any event, the best way towork in such an environment is to add a constant to the otherwise signed signalx (t) so as to render it strictly positive. Thus, for example, if g (t) consists ofan alternating sequence of 1’s and −1’s, you have only to add 1 to x (t) to geta signal which alternates between 0 and 2. It turns out that this need not haveany impact upon our optimal matched ﬁltering receiver, so long as the matchedﬁlter is insensitive to the addition of constant signal oﬀsets. To arrange for this,it is suﬃcient to ensure that the shaping pulse has a mean value of 0 (prior toadding oﬀsets), i.e., Z T g (t) dt = 0 0This simply means that g (t) spends as much time in the 1 state as it does in ˜the −1 state. The matched ﬁlter h (t) will then also have have zero mean. Evenif you are not forced to signal only with positive amplitudes, it is always a goodidea to arrange for the shaping pulse to have zero mean, since then the receiverwill be insensitive to constant voltage oﬀsets which might appear in your circuitfor any number of reasons — e.g., opamp input voltage oﬀsets, background lightin an optical signalling scheme, etc. The second consideration we mention here applies when you wish to dis-tinguish between multiple diﬀerent transmitters, as in the garage door openerexample. Suppose each transmitter has a separate shaping pulse (or code), gi (t),where i is the index of the transmitter. It is important that the matched ﬁlterfor transmitter i is insensitive to the shaping pulse used by another transmitterj 6= i. That is, we want Z T gi (t) gj (t) dt ≈ 0, whenever i 6= j. 0 More generally, we need to recognize that the various transmitters are notlikely to be synchronized with each other. This means that interference fromtransmitter j may be any shifted copy of gj (t), as far as the matched ﬁlter fortransmitter i is concerned. Ideally, then, we would like the following property