01 Basic Signal
01 Basic Signal
Classification of signals
ex00basicplots.m
continuous time and discrete time signal - based on the nature of signal along the time axis . - signal is defined for a range in time or instants of time Eg: telephone signal vs. monthly sales of company
Analog and digital signals - based on the nature of signal along the amplitude - Amplitude is taking infinite possible values or finite possible values Periodic and aperiodic signals Periodicity condition is x(t) = x(t+m) for all t , where m is the the smallest value that satisfies the periodicity condition and it is called the fundamental period. Properties - Periodic signal must start at t = - and continue for ever - Periodic signal x(t) can be generated by periodic extension of any segment x(t) of duration m (the fundamental period) - Area under x(t) [periodic signal] over any interval of duration m is the same. i.e for any real numbers a and b ( ) ( ) = Causal and non causal signals - A signal that does not start before t=0 is a causal signal i.e. x(t) = 0 for t < 0 - A signal that starts before t=0 is a non-causal signal i.e. x(t) 0 for t < 0 - Everlasting signal is always non-causal, but non-causal signal is not necessarily everlasting Energy and Power signals o A signal with finite energy is the energy signal o A signal with finite power is the power signal
Power is the time average of energy A signal cannot be both an energy signal and power signal A ramp signal is neither energy nor power signal
Deterministic and random signals - A physical description is known completely either in mathematical form or a graphical form - A random cannot be predicted precisely but known only in terms of probabilistic description.
o Signal size is the area under square of the signal x(t), i.e. x2(t) o Signal energy should be finite for it to be a meaningful measure of signal size o Necessary condition is that amplitude of signal x(t) ----> 0 as | | --->
Signal power: o If the amplitude of the signal x(t) is not ----> 0 as | | ---> , signal energy is infinite. o A more meaningful measure of signal size in such a case would be Time average of the energy o Px = ( ) OR Px = | ( )|
where T is the period of the periodic signal. o Signal power should be finite for it to be a meaningful measure of signal size. = RMS Value of the signal, generally applicable for periodic signal.
Note: Generally mean of an entity averaged over a large time interval approaching infinity, exists if the entity either is periodic or has a statistical regularity. If such a condition is not satisfied, the average may not exists. Power is the time average of energy A signal cannot be both an energy signal and power signal A ramp signal is neither energy nor power signal Examples Matlabcode : ex01energypower.m
signal operation:
Amplitude operation : 2 x(t) OR 2 + x(t) e.t.c. Time operation o Time shifting : delay -----> right shift Advance ------> left shift
o Time reversal :
What happens to x(t) at some instant t also happens to (t) = x(-t) at the instant t.
Examples
MATLAB code:
ex01operation.m
CONTINUOUS TIME
o If we have any arbitrary everlasting signal to start at t = 0, we need to multiply the signal by u(t). Eg. e-at is an everlasting signal but e-atu(t) is a causal signal. o It is useful in specifying a function with different mathematical description over different intervals. Example :
MATLAB code:
ex01basicplots1.m
In the generalised sense ( considering the unit step function), ( ) = u(t) = (t) OR U(t) is discontinuous and hence sense. does not exist in ordinary
where is complex in general given by = +j = e t ejt = e t (cos t+jsin t ) A constant K = K e0t A monotonic exponential e t is +ve or ve real values A Sinusoid cos t A exponentially varying sinusoid e t (cos t )
o et compasses Large class of functions : viz i.e. 2. = i.e. with = 0 3. = j i.e. with = 0 4. = +j
Matlab :
ex01basicplots2.m
Given any arbitrary signal x(t), odd and even parts can be found as Even part of the signal xe(t) = [x(t)+x(-t)] Odd part of the signal xo(t) = [x(t)-x(-t)]
MATLAB code:
ex01evenodd.m
Systems
Systems are used to process signals They represents the input output (signal) relationship Systems are governed by the laws of interconnection. Classification of systems
Linear and Nonlinear systems o Superposition and Homogeneity property holds good Time invariant and time varying systems o Systems whose parameters do not change with time o i.e physical phenomenon will not change over time. Instantaneous and dynamic systems (memory less/memory) o System output at any instant t depends only on the excitation at that instant, not the past value / future value of excitation o Otherwise dynamic / memory systems o A system whose response at any instant t is completely determined by the input signals over a past T seconds [interval from t-T to t] is finite memory system. Causal and non causal systems o Causal - - -> physical or non anticipative System output at any instant to depends only on the value of the input x(t) for t < to i.e conversely, present system o/p does not depend on future value of input. o Non causal ----> anticipative System output at any instant to depends on the future value of the input x(t) i.e for t > to. i.e conversely, the response starts before the input is applied to the system. o Prophetic system. o Generally non temporal systems. i.e. system does not depends on time. Eg. optics, charge etc. o Noncausal systems are not realisable systems.
Continuous time and discrete time systems Analog and digital systems Invertible and non-invertible systems o A system S performs certain operation(s) on input signal(s). If we can obtain the same input(s) back from the corresponding output, by some operation, the system S is said to be invertible o For an invertible system, it is essential that every input have a unique output.
o System that achieves the inverse operation is the inverse system for S o Eg. Rectifiers Stable and unstable systems -can be internal / external Single input single output system (SISO), MIMO
Differential equation ( ) ( )
( ) ( ) ( )
( )
( ) ( )
( )
( ) ( )
( ) ( )
x State variables
DISCRETE TIME SIGNAL Discrete signals are a set of data represented in the discrete intervals of time generally called sequence of numbers. Signals can be inherently discrete or can be the result of sampling a continuous time signal. Generally represented as x[n], OR x[nT] , here n integer called running variable/ discrete time variable Eg: continuous time exponential x(t) = e-t when sampled for every T = 0.1sec, results x[nT] = e-nT = e0.1n Signal energy: Ex = | |
o Signal size is the summation of square of the signal x(n), o Signal energy should be finite for it to be a meaningful measure of signal size o Necessary condition is that amplitude of signal x[n] ----> 0 as | | ---> o 1/T factor may be multiplied if it is tagged to continuous time Signal power: o If the amplitude of the signal x(n) is not ----> 0 as | | ---> , signal energy is infinite. o A more meaningful measure of signal size in such a case would be Time average of the energy | | o Px = There are N0 = 2N+1 samples between N to N, which is the period of the periodic signal. Time averaging need to be performed over only one period in view of periodic repetition. Signal power should be finite for it to be a meaningful measure
signal operation: discrete case Amplitude operation : 2 x[n] OR 2 + x[n] e.t.c. Time operation o Time shifting : delay -----> right shift Advance ------> left shift
o Time reversal :
What happens to x[n] at some instant t also happens to [n] = x[-n] at the instant -n.
o Time scaling : (sampling rate Alteration) Decimation ---> Compression -----> fast up ,
Compression by a factor M for a signal x[n] [n] = x[Mn] , at n = 0,1,2,3, . i.e [n] = { x[0], x[M], x[2M], x3M],} i.e. x[Mn] selects every Mth sample of x[n] and deletes the sample between ------> called Decimation ( causes loss of data ) AND Interpolation -----> (up sampling) Expansion -----> slow down , It is generated in two steps 1) We expand x[n] by an integer factor L to obtain the expanded [ ] signal xe(n) as { 2) The missing (zero valued) numbered samples can be reconstructed from non-zero valued samples by using some suitable interpolation formula (interpolating filters) Examples
MATLAB code:
ex01doperation.m
DISCRETE TIME
o (e) n actually expressed as n where = e OR = ln o e-0.3 n actually expressed as (0.7408)n ; where e-0.3 = 0.7408 Now n = (e)n ; If = +j ; then n = (e +j)n ; = en ejn = rn ejn = rn [cos n+ jsin n ] o n compasses Large class of functions : viz Here , = +j and = e ;
1. = 0 i.e. = e0 = 1 A constant K = K e0n = K(1)n 2. = i.e. with = 0 ; i.e. = e ; Ex: (0.7408)n ; where e-0.3 = 0.7408 (4)n ; where e1.386 = 4 e.t.c. A monotonic exponential (e )n is +ve or ve real values 3. = j i.e. with = 0 A Sinusoid : cos n , cos 5n, cos2n 4. = +j A exponentially varying sinusoid (e )n [cos n ] Ex: (0.7408)n[cos3n] = e-0.3n[cos3n] Salient Points : 1) If lies in the imaginery axis, the corresponding (= e) lies on a unit circle with centre origin 2) n = (e +j)n ; = en ejn = rn [cos n+ jsin n ] If = 0 ; with different value of , it is in unit circle. If > 0 ; with different value of , it is in exterior of unit circle. If < 0 ; with different value of , it is in interior of unit circle. 3) Disc ete time sinusoid C cos(n+) Where C is the amplitude and is the phase in radians n is angle in radians ; dimension of (radian frequency) -----> radians / sample Let C cos(n+) = C cos(2Fn+) Where, F = /2 is the discrete time frequency i.e ( radians /2 ) per sample OR cycles per sample If No I theperiod (sample / cycle) of the sinusoid, then the frequency of the sinusoid F = 1/No cycles per sample
Eg:
( =
F= cycles per sample OR No = 24 samples per cycle 4) Allowable variation to = (radian frequency) is finite. 5) Discrete time sinusoid may be periodic or non periodic in nature.
Matlab :
ex01dbasicplots.m
Digital integrator
The output y(t) is required to be the integration of the input x(t) Y[n] = Y[n] - y[n-1] = T x[n] -------- 1) ----------2)
In eqn. 1), the output y[n] at any instant n is computed by adding all past values of input till n ----> Non recursive form. In eqn. 2), the computation of y[n] involves addition of only two values, preceding output value and present input value --------> Recursive form
Plotting using inline functions : { >> prompt is used in every following MATLAB Statements} Many simple functions are most conveniently represented by using MATLAB
inline objects.
Ex: Consider a continuous time function: f(t) = e-tcos(2t) can be expressed as,
>>f= inline('exp(-t).*cos(2*pi*t)','t')
Once defined, f(t) can be evaluated simply by passing the input values of interest. Ex: >> t= 0;
>> f(t) ans = 1
1 sec
will create a single function made out of two different functions valid for two different intervals.
signal operation
Amplitude operation Time operation o Time shifting o Time scaling o Time reversal Ex:
>>plot(t,p(-t)) >>plot(t,p(t-5)) >>plot(t,p(2t)
will plot the above defined functions after reversing will plot the above function time shifted right (delay) by 5 sec. will plot the above function compressed in time by a factor 2
Even and Odd parts of the signal: Even part of the signal xe(t) = [x(t)+x(-t)] Odd part of the signal xo(t) = [x(t)-x(-t)]
MATLAB code:
ex01energypower.m