Impulse Response of discrete system

Impulse signal can be represented as:d[n] = 1, if n=0d[n] = 0, otherwiseit can also be written like d=[1,0,0,0,…] Impulse Response The impulse response h(n) is the response of filter L() at time n to unit impulse occurring at time 0.h(n)=L(d(n))Let’s see how a discrete system can be described when impulse response is known We know that: In the linear system this can be written as follows: Because h(n-k)=L(d(n-k))Then: What do we get? Its impulse response can describe a linear system. The last expression is called convolution. This is the heart of DSP Filtering.To write this sum in the more convenient matter is assumed that: Matlab example Matlab example: As you can see if the input queue has N samples, impulse response has M after convolution there will be total N+M-1 samples.

Continue reading

What is a linear system?

A discrete system is nothing more than an algorithm, where input is transformed into output. The output is transformed by operator L(), which describes the discrete system.Let’s see the few most common operators of discrete systems. Delay This means that output queue is delayed by on sample. Multiplication This operator takes each sample of input queue and multiplies by constant a. Sum operator Takes two or more sample queues and adds them in the output. Assuming we can say, that the system is linear if input sum reaction is equal to sum of inputs reactions: The system has stable parameters if:y(n-k)=L(x(n-k)), this means that output delay should be the same as the input.It is obvious that delay, multiply, and sum operators are linear and have stable parameters. We will need them for further lessons.

Continue reading

Understanding of discrete signals

Discrete signals can be generated by software or obtained from the real-world through ADC. Discrete signals are sampled from analog signals. So you get samples in fixed time intervals. The discrete signal is a sequence of numbers. The element number n of the sequence is marked as x(n). The most common number rows: Unit sample sequence You can describe it in Matlab like

Continue reading

Physiological system modeling

Most physical and chemical experiments can be described with a finite number of rules. In physiological processes, everything can be tied to the laws of nature. A good model can be a guideline for new experiments. Usually, the model and experiment have an iterative connection. To understand how to investigate any material, there is a model needed (block 1). First, we need an abstract understanding of what we are investigating (block 2). Abstracts are transformed into mathematical models (block 3). There we can use formulas and solve them using the computer. The results you get shows, what experiments have to be done, and what to expect from them. This loop system is resistive to irregularities in the mathematical model. In other words, this is the purifier of experiments and models.

Continue reading

CMOS and TTL compliance

There was a time when all IC’s were only TTL type. They were marked as 74LS or 74ALS. But then there came CMOS types of semiconductors. They are usually marked CDxx. And lately, there appeared combined semiconductors that are compliant with both types. They usually are marked as 74HC or 74HCT.TTL is faster than CMOS, but they sink more power. They are powered from a 5V source. To diminish the power consumption, the CMOS was developed. They can work with supplied voltages in the range of 3 to 15V. The main disadvantage is that they are static sensitive. So you always have to be grounded when working with CMOS.Now both types of semiconductors are widely used. Sometimes there is a dilemma to connect TTL to CMOS. You cannot connect TTL directly to CMOS as there are different supply voltages. So it would help if you had some compliance circuit. The simplest can be bipolar transistor cascade. Just remember that such a cascade inverts the signal, so you might need to put an inverter in front of CMOS. Another reminder – never leave TTL or CMOS free pins hanging. Jus connect them through a resistor to VCC or GND.

Continue reading

Skin lesion boundary tracing algorithm

I found Matlab to be a convenient tool that easily traces the boundaries of objects in a picture. So I adopted it to skin lesions. This can be used to automatically detect skin irregularities and calculate lesion properties like the asymmetry of shape, or border irregularities, which can help detect melanoma. There are numerous investigations done, so I only put a few examples of how it looks. I will give you my source code so that you can try it on your own. Look at my results: 1) And it also finds the center of mass:

Continue reading

Polarizer test

I used a simple lamp directed to the glossy table surface. One polarizer is in front of the lamp, and the other is in front of a digital camera lens. Both polarizes perpendicularly oriented to each other. How does this work? A theory about an angle on which the incident polarized electromagnetic waves turn reflects from the surface with a polarization plane turned in 90 degrees. When light going through the polarizer towards the surface, the light is polarized in one direction, and when it reflects from the surface, it is turned by 90 degrees. Another perpendicular polarizer filters those waves in front of the lens.

Continue reading

Removing 60Hz from ECG using digital band stop filter

Let’s make a filter, which filters off the 60Hz frequency from the ECG signal. As we know, the American power supply is 60Hz. This is a common noise in biomedical signals while the industrial power supply powers them. This type of noise can be defined easily and can be filtered as parameters of noise are known.Here is one example of how to implement an FIR filter using mathematical tools, like Matlab. This can be done using a microcontroller, like ARM or even AVR, because the frequencies are up to 1 kHz.Initial conditions: f0=60Hz – power supply frequency;fs=500Hz – sampling rate;frequencies who define complex zeros: we get w0=0.754;Positions of complex zeros: Zeros and poles in z plane System Function From it we can calculate filter coefficients: And filter coefficients: b3 = 1; b2 = -2cos(w0); b1 = 1 Also we know that: And here we get filter characteristics: We have a band stop filter at 60Hz, and its jam at 60Hz is -300dB. Bellow is a filter structure: Now using this filter we can filter ECG signal: As you can see, this is a simple FIR filter. In other words, there is nothing more than an average function that doesn’t need…

Continue reading