Presentation is loading. Please wait.

Presentation is loading. Please wait.

Biosignals and Systems

Similar presentations


Presentation on theme: "Biosignals and Systems"— Presentation transcript:

1 Biosignals and Systems
Prof. Nizamettin AYDIN Copyright 2000 N. AYDIN. All rights reserved.

2 BASIC SIGNALS Signals are the foundation of information processing, transmission, and storage. They also provide the interface with physiological systems and are the basis for communication between biological processes. Understanding the basics of signals is fundamental to understanding, and interacting with biological processes. A few signals are simple and can be defined analytically, that is as mathematical functions.

3 Biosignals Signals continuously pass between various parts of the body. These biosignals are carried either by electrical energy, as in the nervous system, or by molecular signatures, as in the endocrine system and many other biological processes. Measurement of these biosignals is fundamental to diagnostic medicine and to bioengineering research.

4 The Sinusoidal Waveform
A sinusoidal waveform is defined as: where A is the signal amplitude, specifically the peak-to-peak amplitude, p is the frequency in radians per second, fp is the frequency in Hz, T is the period in seconds, and t is time in seconds. The frequency can be expressed in either radians/sec or Hz ( the units formerly known as cycles per second), and are related by 2π:

5 Sinusoids The frequency is also the inverse of the period, T:
A sinusoidal is completely defined by A and fp (or T). Sinewave-like signals can be represented by either sines or cosines, and the two are related.:

6 Sinusoids Because a sinusoidal signal is completely defined by A and fp, (if neither the amplitude nor the frequency changes over time) it is hard to see how this signal could carry much information. However, sine waves (and cosine waves) are at the foundation of many signal analysis techniques. their importance stems from their simplicity and the way they are treated by linear systems.

7 General Sinusoids A general “sinusoid” (as opposed to a pure sinewave or pure cosinewave) will have a general phase term where again the phase, , would be expressed in degrees even though the frequency descriptor is expressed in radians or hertz.

8 General Sinusoids To convert the difference in phase angle to a difference in time, note that the phase angle varies over 360 deg. during one period, T. To determine the time difference or time delay between the two sinusoids, td, given the phase angle:

9 Example Two 2-Hz sinusoids that differ in phase by 60 degrees.
T = 1/f = 0.5 s. Time delay: td = ( /360)T = (60/360)0.5 = s. = 83.3 ms.

10 Example 1… Find the time delay between two sinusoids:
x1(t) = cos(4t + 30), and x2(t) = -2sin(4t)

11 …Example 1 Solution: Convert both to either a sine or cosine (here we convert to cosines): x2(t) = -2sin(4t) = -2cos(4t - 90) So the total angle between the two sinusoids is 30 -(-90) = 120 deg. Since the period is: The time delay is:

12 TIME-SHIFT Whenever a signal can be expressed in the form x1(t)=s(t-t1), we say that x1(t) is time shifted version of s(t) If t1 is a + number, then the shift is to the right, and we say that the signal s(t) has been delayed in time. If t1 is a - number, then the shift is to the left, and we say that the signal s(t) was advanced in time.

13 TIME-SHIFTED SINUSOID

14 Basic properties of the sine and cosine functions

15 Sinusoidal Arithmetic
Sometimes it is mathematically convenient to represent a sinusoid as a combination of a pure sine and a pure cosine. This representation can be achieved using the well-known trigonometric identities for the sum of two arguments of a cosine function:

16 To convert from a sinusoid with phase to a sine plus cosine
For example, to convert from cos(ωt - ) to sin( ωt) + cos(ωt), use the trigonometric identity: cos(x - y) = cos(x) cos(y) + sin(x) sin(y) Based on this identity, the equation for a sinusoid can be written as: Ccos(2πft-) = Ccos(2πft) cos( ) + Csin(2πft) sin( ) Ccos(2πft-) = a cos(2πft) cos( ) + b sin(2πft) sin( ) where a = Ccos( ) , b = Csin( )

17 To convert from a sine and cosine to a single sinusoid
For example, to convert from sin(2πft) + cos(2πft) to sin(2πft + ), use the trigonometric identity: sin(x + y) = cos(x) sin(y) + sin(x) cos(y) Csin(2πft+) = Csin() cos(2πft ) + Ccos() sin(2πft ) Csin(2πft+) = a cos(2πft) + b sin(2πft) The magnitude of the single sinusoid can be determined as: The phase of the single

18 Again, it is common to use degrees for phase angle.
Care must be taken in evaluating  = tan-1(b/a) to ensure that  is determined to be in the correct quadrant on the basis of the signs of a and b. If both a and b are positive,  must be between 0 and 90 degrees; If b is positive and a is negative,  must be between 90 and 180 degrees If both a and b are negative, must be between 180 and 270 degrees If b is negative and a is positive,  must be between 270 and 360 degrees. Again, it is common to use degrees for phase angle.

19 Sinusoidal Arithmetic
To add sine or cosine waves, simply add their amplitudes: assuming that they are all at the same frequency, ω To add two sinusoids i.e., C sin(ωt + θ) or C cos(ωt – θ) convert them to sines and cosines using the equations above, add sines to sines and cosines to cosines, and convert back to a single sinusoid if desired.

20 Example 2… Convert the following sum of a sine and cosine wave,
x(t) = -5 cos(10t) - 3 sin(10t) into a single sinusoid.

21 …Example 2 Solution: Apply previous equations
Therefore, the single sinusoid representation would be:

22 Example 3… Combine x(t) = 4 cos (2t - 30) - 3 sin(2t +60)
into a single sinusoid.

23 …Example 3… Solution: First expand each sinusoid into a sum of cosine and sine, then algebraically add the cosines and sines, then recombine them into a single sinusoid. Be sure to convert the cos into a sin recall: sin(x) = cos(x-90) ) before expanding this term. 4 cos (2t - 30) = a cos(2t) + b sin(2t) a = Ccos( ) = 4cos(30) ≈ 3.5, b = Csin( ) = 4sin(30) = 2 4 cos (2t - 30) = 3.5 cos(2t) + 2 sin(2t)

24 …Example 3 3 sin(2t +60) = 3 cos (2t + 60 - 90) = 3 cos (2t - 30)
a = Ccos( ) = 3cos(30) ≈ 2.6, b = Csin( ) = 3sin(30) = 1.5 3 sin(2t +60) = 2.6 cos(2t) sin(2t) Combining cosine and sine terms algebraically: 4 cos (2t - 30) - 3 sin(2t +60) = 3.5 cos(2t) + 2 sin(2t) cos(2t) sin(2t) = 0.9 cos(2t) sin(2t) C =sqrt( (0.9)2+(0.5)2) ≈ 1,  = tan-1(-0.5/0.9) ≈ -30 So, the combined sinusoid is: x(t) = cos (2t - 30) = cos (2t + 330)

25 Example 3 – alternative solution
x(t) = 4 cos (2t - 30) - 3 sin(2t + 60) sin(2t +60) = cos (2t ) = cos (2t - 30) x(t) = 4 cos (2t - 30) - 3 cos(2t - 30) x(t) = cos (2t - 30)

26 Example 4… Combine x(t) = 4 cos(2t + 30) - 3 sin(2t - 60)
into a single sinusoid.

27 …Example 4 x(t) = 4 cos (2t + 30) - 3 sin(2t - 60)
sin(2t - 60) = cos (2t ) = cos (2t - 150) sin(2t - 60) = cos ((2t +30) - 180) sin(2t - 60) = cos (2t +30)cos(180) + sin((2t +30)sin(180) sin(2t - 60) = -cos (2t +30) x(t) = 4 cos (2t + 30) - 3 (-cos(2t + 30)) x(t) = 7cos (2t + 30)

28 Complex Numbers An even more compact representation of a sinusoid can be obtained if one is willing to use complex notation. A “complex number” combines a “real number” and an “imaginary number.” Real numbers are common. Imaginary numbers are the product of square roots and are represented by real numbers multiplied by the √-1. the letter j or i represent the √-1. Complex numbers behave as if the real and imaginary parts are orthogonal. This means that the two components are independent of one another. Complex numbers and complex variables are actually two numbers, or variables, rolled into one.

29 A complex number represented as an orthogonal combination of a real number on the horizontal axis and an imaginary number on the vertical axis. This graphic representation is useful for understanding complex numbers and aids in the interpretation of some arithmetic operations.

30 Complex Representation of a Sinusoid
The feature that a complex number is actually two separate numbers is particularly handy when sinusoids are involved, since a sinusoid at a given frequency can be uniquely defined by two variables: its magnitude and phase angle, or equivalently, its cosine and sine magnitudes (a and b). A sinusoid at a given frequency can be represented by a single complex number. To find the complex representation, we will use the identity developed by the Swiss mathematician, Euler:

31 Euler equation links sinusoids and exponentials,
providing a definition of the sine and cosine in terms of complex exponentials. It also provides a concise representation of a sinusoid since a complex exponential contains both a sine and a cosine This equation will prove very useful in two sinusoidally based analysis techniques: Fourier analysis phasor analysis

32 Signal Properties: Basic Measurements
Biosignals and other information-bearing signals are often quite complicated and defy a straightforward analytical description. An archetype biomedical signal is the electrical activity of the brain as it is detected on the scalp by electrodes, the electroencephalogram (EEG) shown in the following figure. Although a time display of this signal, as in the following figure , constitutes a unique description, the information carried by this signal is not apparent from the time display, at least not to the untrained eye. Nonetheless, physicians and technicians are trained to extract useful diagnostic information by examining the time display of biomedical signals including the EEG.

33 Segment of an electroencephalogram signal

34 Signal Properties: Basic Measurements
The time display of the electrocardiogram (ECG) signal is so medically useful that it is displayed continuously for patients undergoing surgery or those admitted to intensive care units (ICUs). This signal has become an indispensable image in television and movie medical dramas. Medical images, which can be thought of as two-dimensional signals, often need only visual inspection to provide information useful for diagnosis.

35 Signal Properties: Basic Measurements
A time domain representation of a signal offers a complete description of the signal (if properly sampled), but this representation may not be very informative. One basic measurement of a signal is its mean or average value Another useful basic measurement is the rms value:

36 Example 5… Find the RMS value of a sinusoidal signal.

37 …Example 5 Solution Since this signal is periodic, with each period the same as the previous one, it is sufficient to apply the RMS equation over a single period. (Nothing changes in a sinusoid from one period to the next.)

38 Other Basic Measurements
Two other basic measurements that can be applied to signals, particularly those having some random or noise characteristics are the standard deviation, σ, and the variance, σ2. where x with the bar over it is the mean or signal average. If the signal mean is zero, the standard deviation is the same as the RMS value, except that the standard deviation is normalized by N-1 instead of N.

39 A segment of electroencephalogram signal with the positive and negative standard deviation

40 The Influence of Averaging on Noise
When multiple measurements are made, multiple values or signals will be generated. If multiple measurements are added, the means add so that the combined value or signal has a mean that is the average of the individual means. The variances also add and the average variance is the mean of the individual variances: However, the standard deviation is the square root of the variance and the standard deviations add as the √N times the average standard deviation. The mean standard deviation is the average of the individual standard deviations divided by √N :

41 MATLAB implementation
Calculating the average, standard deviation, or variance may be done in MATLAB using the following commands: If these routines are given a matrix variable, then they operate on each column with the result in a row matrix.

42 Decibels ~ Revisited When used to measure power, the decibel is 10 bels, or 10 times the log of the power: When used to in voltage measurements, the decibel is 20 times the log of voltage: Since:

43 Example 6… A sinusoidal signal is fed into an “attenuator” that reduces the intensity of the signal. The input signal has a peak-to-peak amplitude of 2.8 V and the output signal is measured at 2 V peak-to-peak. Find the ratio of output to input voltage in db.

44 …Example 6 The ratio of the amplitude of a signal coming out of a process to that going into the process is known as the gain, and is often given in db.

45 Ensemble Averaging Averaging can be applied not only to a series of numbers, but to a series of waveforms. Ensemble averaging is used when a number of similar time responses can be obtained from a system. As long as some time reference is available, then averages of a number of responses can be taken at each point in time to create an averaged time response. An example of ensemble averaging is given in the following example.

46 Example 7… Find the average response given a number of individual responses from the vergence eye movement system. The vergence eye movement system is responsible for turning the eye inward to view a near target. These responses are stored in MATLAB file verg1.mat.

47 …Example 7 Solution: Use the MATLAB averaging routine ‘mean’. If this routine is given a matrix variable, it averages each column. Hence, if the various signals are arranged as rows in the matrix, the ‘mean’ routine will produce the ensemble average as a row matrix. load verg1; % Get vergence eye movement data; Ts = .005; % Sample interval = 5 msec [nu,N] = size(data_out); % Get data length (N) t = (1:N)*Ts; % Generate time vector (t = N Ts) % plot(t,data_out,'k'); hold on; % Plot ensemble data superimposed % Construct and plot the ensemble average avg = mean(data_out); % Calculate ensemble average and plot(t,avg-3,'k'); % plot, also label axes

48 Ensemble Averaging

49


Download ppt "Biosignals and Systems"

Similar presentations


Ads by Google