#sampling and reconstruction using MATLAB
Explore tagged Tumblr posts
electricalstudent · 2 years ago
Text
3. In this question, we use MATLAB to implement a sampling and reconstruction of the signal f(t) = (5 sin(87t) + 6 sin(167t), Osts 0, otherwise a (a) Use MATLAB to plot the signal for
Auto Draft Continue reading Untitled
Tumblr media
View On WordPress
0 notes
prashantgujjar · 4 years ago
Text
FFT/IFFT - time frequency trade off
I am converting an audio signal to freq domain and back to time domain at different fft sizes to see the trade-off between time and freq resolution.
I thought that if I take the FFT of a very large window, I will get good frequency resolution but smear the time resolution. But when I take the FFT of a very long window (say 2^17 samples, which is roughly 3 sec), the following conversion reconstructs the signal nearly perfectly:s = fft(x); % d contains 2^17 samples x2 = ifft(s);I know these are inverse functions, but shouldn't there be some loss incurred? I expected the result to sound like a bank of sinewaves but playing back x2 it sounds like the original. What am I doing wrong? Thanks!
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Total number of samples is time resolution multiplied by the sampling period. The more total samples you have, the more frequency resolution you get. fft() cannot, however, tell the difference between a low time resolution sampled for a long duration, and a high time resolution sampled for a short duration: it will produce the same output as long as the product of the two is constant. Likewise, if you use a lower time resolution but keep the duration the same, the effect will be identical to having kept the same time resolution but reducing the duration by the same ratio.
0 notes
juniperpublishers-etoaj · 6 years ago
Text
Juniper Publishers - Open Access Journal of Engineering Technology
Tumblr media
Removal of the Power Line Interference from ECG Signal Using Different Adaptive Filter Algorithms and Cubic Spline Interpolation for Missing Data Points of ECG in Telecardiology System
Authored by :  Shekh Md Mahmudul Islam
Abstract
Maintaining one's health is a fundamental human right although one billion people do not have access to quality healthcare services. Telemedicine can help medical facilities reach their previously inaccessible target community. The Telecardiology system designed and implemented in this research work is based on the use of local market electronics. In this research work we tested three algorithms named as LMS (Least Mean Square), NLMS (Normalized Mean Square), and RLS (Recursive Least Square). We have used 250 mV amplitude ECG signal from MIT- BIH database, 25mV (10% of original ECG signal) of random noise, white Gaussian noise and 100mV (40% of original ECG signal) of 50 Hz power signal noise is added with ECG signal in different combinations and Adaptive filter with three different algorithms have been used to reduce the noise that is added during transmission through the telemedicine system. Normalized mean square error was calculated and our MATLAB simulation results suggest that RLS performs better than other two algorithms to reduce the noise from ECG. During analog transmission of ECG signal through existing Telecommunication network some data points may be lost and we have theoretically used Cubic Spline interpolation to regain missing data points. We have taken 5000 data points of ECG Signal from MIT -BIH database. The normalized mean square error was calculated for regaining missing data points of the ECG signal and it was very less in all the conditions. Cubic Spline Interpolation function on MATLAB platform could be a good solution for regaining missing data points of original ECG signal sent through our proposed Telecardiology system but practically it may not be efficient one.
Keywords:  Telemedicine; Power line interference (PLI); ECG; Adaptive filter; LMS; NLMS; RLS
Abbreviations: EMG: Electromyography; ECG: Electrocardiogram; EEG: Electroencephalogram; NLMS: Normalized Least Mean Square; RLS: Recursive Least Square; SD: Storage Card
    Introduction
The ECG signal measured with an electrocardiograph, is a biomedical electrical signal occurring on the surface of the body related to the contraction and relaxation of the heart. This signal represents an extremely important measure for doctors as it provides vital information about a patient cardiac condition and general health. Generally the frequency band of the ECG signal is 0.05 to 100 Hz [1]. Inside the heart there is a specialized electrical conduction system that ensures the heart to relax and contracts in a coordinated and effective fashion. ECG recordings may have common artifacts with noise caused by factors such as power line interference, external electromagnetic field, random body movements, other biomedical signals and respiration. Different types of digital filters may be used to remove signal components from unwanted frequency ranges [2].
The Power line interference 50/60 Hz is the source of interference in bio potential measurement and it corrupt the biomedical signal's recordings such as Electrocardiogram (ECG), Electroencephalogram (EEG) and Electromyography (EMG) which are extremely important for the diagnosis of patients. It is hard to find out the problem because the frequency range of ECG signal is nearly same as the frequency of power line interference. The QRS complex is a waveform which is most important in all ECG's waveforms and it comes into view in usual and unusual signals in ECG [3]. As it is difficult to apply filters with fixed coefficients to reduce biomedical signal noises because human behaviour is not exact depending on time, an adaptive filtering technique is required to overcome the problem. Adaptive filer is designed using different algorithms such as least mean square (LMS), Normalized least mean square (NLMS), Recursive least square (RLS) [4]. Least square algorithms aims at minimization of the sum of the squares of the difference between the desired signal and model filter output when new samples of the incoming signals are received at every iteration, the solution for the least square problem can be computed in recursive form resulting in the recursive least square algorithm. The goal for ECG signal enhancement is to separate the valid signal components from the undesired artifacts so as to present an ECG that facilitates an easy and accurate interpretation.
The basic idea for adaptive filter is to predict the amount of noise in the primary signal and then subtract noise from it. In this research work a Telecardiology system has been designed and implemented using instrumentation amplifier, band pass filter and Arduino interfacing between Smartphone and Arduino board. First of all raw ECG signal has been amplified and filtered by Band pass filter. Analog signal has been digitized using Arduino board and then interfacing between Arduino board and smart phone has been implemented and Digitized value of analog signal has been sent from Arduino board to smart phone and digitized value of analog signal has been stored in SD storage card of smart phone. Using Bluetooth or existing Telecommunication Network. As sinusoidal signals are known to be corrupted during transmission it is expected that similarly an ECG signal will be corrupted.
We have therefore designed an adaptive filter with three different algorithms and simulated in MATLAB platform to compare the performance of denoising of ECG signal. During transmission of ECG signals through existing Telecommunication networks some data pints may be lost. In this research work we have used cubic spline interpolation to regain missing data points. If more data points are missing then reconstruction of an ECG signal becomes impossible and doctor can not accurately interpret a patient's ECG in an efficient manner. Cubic spline interpolation has been implemented for various missing data points of original ECG signal taken from MIT-BIH database. The normalized mean square error of cubic spline interpolation was very low. Cubic Spline interpolation in Matlab platform could be a better solution for regaining missing data points of ECG signal theoretically.
    Related Works and Literature Review
The extraction of high-resolution ECG signals from recordings contaminated with system noise is an important issue to investigate in Telecardiology system. The goal for ECG signal enhancement is to separate the valid signal components from the undesired artifacts, so as to present an ECG that facilitates easy and accurate interpretation.
The work of this research paper is the development of our previous research work "Denoising ECG Signal using Different Adaptive Filter Algorithms and Cubic Spline Interpolation for Missing data points of ECG in Telecardiology System” [5]. Many approaches have been reported in the literature to address ECG enhancement using adaptive filters [6-9], which permit to detect time varying potentials and to track the dynamic variations of the signals. In Md. Maniruzzaman et al [7,10,11] proposed wavelet packet transform, Least-Mean-Square (LMS) normalized least-mean-square (NLMS) and recursive-least-square (RLS), and the results are compared with a conventional notch filter both in time and frequency domain. In these papers, power line interference noise is denoised by NLMS or LMS or RLS algorithms and performed by MTLAB or LABVIEW. But in our research work we have developed our previous work. We denoised ECG signal by removing power line interference, Random noise and White Gaussian noise. In our previous research paper [12] we denoised ECG signal from random noise and white Gaussian noise. In our present research work we have added power line interference with Pure ECG signal individually and added in mixed of power line interference, random noise and white Gaussian noise in different combinations. Finally in our research work we have used cubic spline interpolation for regaining missing data points of ECG signal sent through telecommunication network.
There are certain clinical applications of ECG signal processing that require adaptive filters with large number of taps. In such applications the conventional LMS algorithm is computationally expensive to implement The LMS algorithm and NLMS (normalized LMS) algorithm require few computations, and are, therefore, widely applied for acoustic echo cancellers. However, there is a strong need to improve the convergence speed of the LMS and NLMS algorithms. The RLS (recursive least-squares) algorithm, whose convergence does not depend on the input signal, is the fastest of all conventional adaptive algorithms. The major drawback of the RLS algorithm is its large computational cost. However, fast (small computational cost) RLS algorithms have been studied recently In this paper we aim to obtain a comparative study of faster algorithm by incorporating knowledge of the room impulse response into the RLS algorithm. Unlike the NLMS and projection algorithms, the RLS algorithm does not have a scalar step size.
Therefore, the variation characteristics of an ECG signal cannot be reflected directly in the RLS algorithm. Here, we study the RLS algorithm from the viewpoint of the adaptive filter because
a. The RLS algorithm can be regarded as a special version of the adaptive filter and
b. Each parameter of the adaptive filter has physical meaning.
Computer simulations demonstrate that this algorithm converges twice as fast as the conventional algorithm. These characteristics may plays a vital role in biotelemetry, where extraction of noise free ECG signal for efficient diagnosis and fast computations, high data transfer rate are needed to avoid overlapping of pulses and to resolve ambiguities. To the best of our knowledge, transform domain has not been considered previously within the context of filtering artifacts in ECG signals.
In this paper we compare the performances of LMS, NLMS and RLS algorithms to remove the artifacts from ECG. This algorithm enjoys less computational complexity and good filtering capability. To study the performance of the algorithms to effectively remove the noise from the ECG signal, we carried out simulations on MIT-BIH database. During transmission of ECG signal through existing Telecommunication network it may be corrupted or some data points may be lost. Linear Spline interpolation was popular method for regaining missing data points of ECG signal [13]. Cubic Spline interpolation has gained popularity very recently [6]. In our previous research work we used cubic spline interpolation. The development of our previous research work i.e., in the present research work, in this research paper we have also used cubic spline interpolation for regaining missing data points of ECG signal sent through telecommunication network.
    Adaptive Filter Algorithms
In this research work a Telecardiology system has been implemented and proposed for sending ECG signal through smart phone (Figure 1).
The raw ECG signal will be taken from patient electrode and passed through instrumentation amplifier and band pass filter to amplify the signal and to reduce the noise coming from electrodes. Then that amplified and filtered analog ECG signal will be converted into digital signal by using Arduino AVR microcontroller based system. Then that digital value of ECG signal will be sent to smart phone by using Arduino interfacing with smart phone and digitized signal values will be sent to smart phone SD card. After that digital value will be sent to another smart phone by using Bluetooth technology. Digitized ECG value will be received to smart phone via Bluetooth .During transmission of ECG signal through Telecommunication network it may be corrupted by random noise or white Gaussian noise of the network. Adaptive filter using different algorithms have been used to reduce noise of the transmitted ECG signal. A MATLAB coding has been done to reduce the noise of the ECG signal and for reducing noise of digitized ECG signal, transmitted noisy ECG signal needs to be loaded in MATLAB and then it is filtered suing adaptive filter with different algorithms and performances of different algorithms are measured based on their de-noising capabilities. During transmission of ECG signal some data points may be missing and MATLAB spline interpolation algorithm will get them back so that ECG signal can be transmitted reliably (Figure 2).
Least Mean Square (LMS), Normalized Mean Square Algorithm (NLMS) and Recursive Least Square Algorithm (RLS) has been designed and implemented for denoising ECG signal in MATLAB platform [4,12-14]. Cubic Spline Interpolation has been used for regaining missing data points of ECG signal during transmission through existing Telecommunication network. The normalized mean square error was calculated for regaining missing data points of ECG signal and it was very less and so Cubic spline interpolation could be a better solution in MATLAB platform for regaining missing data points of ECG signal.
    Result
In this work we have taken pure ECG signal from MIT-BIH database. The amplitude of our taken ECG signal was 250 mV which is amplified from.5mV (2 % of original ECG signal), 10 mV (4% of original ECG) 15mV (6% of original ECG), 20 mV (8% of original ECG signal) and 25mV (10% of original ECG signal) of random noise and white Gaussian noise is added with ECG signal. Three different algorithms of Adaptive filter were implemented and tested their performances of denosing ECG signal. We have taken ECG signal with 250 mV amplitude and 5000 samples were taken from MIT-BIH database (Figure 3). In our simulation work we have denoised 100mV of 50 Hz power signal noise.
    Recursive Least Square (RLS) Algorithms
We have taken 5000 data points of ECG signal from MIT- BIH database. In our simulation 11data points (from 689 to 699 of original data points of ECG), 201 data points (from 800 to 1000 of original data points of ECG), 300 data points (from 1600 to 1900 of original data points of ECG), 500 data points (from 2000 to 5000) and 6 data points (from 4095 to 5000) are made zero and cubic spline interpolation function was called in MATLAB platform and it could regain the original data points of ECG signal (Figure 15-20). The MATLAB coding result of Spline Interpolation is given below Table 2
The above simulation result suggests that Recursive algorithms. RLS could be the best option for Telemedicine system Least Square algorithm (RLS) performs better than other two to denoise ECG signal during transmission (Table 1).
Normalized mean square error calculation suggests that Cubic Spline performs satisfactorily for regaining missing data points of ECG signal.
    Conclusion
During transmission of ECG signal it may be corrupted due to random noise and Gaussian noise. So we have tested the performances of LMS, NLMS and RLS algorithm of adaptive filter. Our simulation result suggest that RLS could be the best option for recovering ECG signal or denoising EEG signal during transmission through Telemedicine system.
For more articles in Open Access Journal of Engineering Technology please click on: https://juniperpublishers.com/etoaj/index.php
To read more...Fulltext please click on: https://juniperpublishers.com/etoaj/ETOAJ.MS.ID.555555.php
0 notes
matlabhwexperts-blog · 7 years ago
Text
DSP System Assignment Homework Help
https://www.matlabhomeworkexperts.com/DSP-system.php
DSP Systems Matlab Homework experts Help| DSP Systems Matlab Assignment Help| Matlab Homework experts Help
Digital signal processing (DSP)  is the numerical manipulation of signals,  usually with the intention to measure, filter, produce or compress continuous analog signals.  Signal processing is essential for a wide range of applications, from data   science to real-time embedded systems.  
Following is the list of  topics under DSP System which is prepared after detailed analysis of courses  taught in multiple universities across the globe:
Finite impulse response  systemFixed-Point DesignFourier and Z-transformsInput, Output, and  DisplayIntroduction to Digital  SystemsIntroduction to MatLab  and SimuLinkLowpass FIR FiltersMathematics using MatlabMultirate and Multistage  FiltersNew System ObjectsOptimal Equal- Ripple  Design TechniquesSampling/reconstruction  of continuous time signalsThe Discrete Fourier  TransformThe Fast Fourier  Transform
0 notes
answersportals-blog · 7 years ago
Text
MATLAB DSP System Assignment Help
www.answersportals.com is the best online MATLAB DSP System Assignment Help service provider. Students can be rest assured after submitting  their MATLAB  DSP System homework to us. Our expert put their 100 % and our  work has always helped students to score good grades. In case you have any MATLAB DSP System Assignment or  projects feel free to contact us either through email or live chat at www.answersportals.com. Our expert  will do his best and you can receive a highest quality, plagiarism free and  accurately done assignment in your inbox within the mentioned deadline. We  would like to discuss few topics under MATLAB DSP System:
           Analyze the  stability of systems
           Digital  Filter Structures
           Digital  Signal Processing
           Discrete-Time  Fourier analysis
           Discrete-Time  Signals and Systems
           Filter  Design Using MatLab
           Finite  impulse response system
           find the  system transfer function
           finite  impulse response digital filters
           Introduction  to MatLab and SimuLink
           Optimal  Equal- Ripple Design Techniques
           Sampling/reconstruction  of continuous time signals
           The  Z-Transform
           Two-dimensional  signals and introductory image
0 notes
electricalstudent · 2 years ago
Text
CEN464 Labs Lab 1: Sampling in the time domain using MALAB solved
A continuous-time sinusoidal wave is given byx(t) = Acos(2⇡Ft + “). (1)For A = 5, F = 10, ” = 0, and 0 < t < 1,(a) Define and plot x(t) and |X(j!)|. For 0  t < 1, use a step size of 1256 , and for −128  ! < 127 astep size of 1. To approximate |X(j!)|, use abs(fftshift(fft(x))).(b) Determine the maximum frequency of x(t) from the graph of |X(j!)|. Since the plot of x(t) goes from0 to 1, you can…
Tumblr media
View On WordPress
0 notes
electricalstudent · 2 years ago
Text
write a Matlab program to show both sampling and reconstruction using a truncated Gaussian pulse signal
write a Matlab program to show both sampling and reconstruction using a truncated Gaussian pulse signal Continue reading Untitled
View On WordPress
0 notes
prashantgujjar · 4 years ago
Text
Ringing effect in time domain reconstructed signal after filtering
Hi all,
I'm trying to band pass filter (9Hz to 70Hz) an ECG signal
which is sampled at 256 Hz using MATLAB's 'butter' followed by 'filter'. I'm using an order of 10, just being greedy about making the pass band near perfect. Filtering happens alright but the time domain filtered signal has sort of ringing effect.
 I then reduce the order to 2 and perform the filtering and now the ringing is not there. What's this theoretically? Is this a manifestation of Gibb's phenomenon? 
Any help would be greatly appreciated.
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Not sure exactly what you did, but in general, in Linear Systems Theory (Fourier Filtering), multiplication in one domain is equivalent to convolution in the other domain. A band pass filter is a rect function and the Fourier Transform of a rect function is a sinc function. So when you multiply by a rect function in the Fourier domain to do band pass filtering, it's like you convolve with a sinc function in the time domain. Since the sinc function has ripples, so will your output signal. Yes this is the Gibbs phenomenon. And since wider in one domain means narrower in the other domain, a wider rect will give a narrow sinc (faster ripples) while a narrow rect will give a wider sinc and slower ripples.
0 notes
answersportals-blog · 8 years ago
Text
MATLAB DSP System Assignment Help
Our expert  will do his best and you can receive a highest quality, plagiarism free and  accurately done assignment in your inbox within the mentioned deadline. We  would like to discuss few topics under MATLAB DSP System:
           Analyze the  stability of systems
           Digital  Filter Structures
           Digital  Signal Processing
           Discrete-Time  Fourier analysis
           Discrete-Time  Signals and Systems
           Filter  Design Using MatLab
           Finite  impulse response system
           find the  system transfer function
           finite  impulse response digital filters
           Introduction  to MatLab and SimuLink
           Optimal  Equal- Ripple Design Techniques
           Sampling/reconstruction  of continuous time signals
           The  Z-Transform
           Two-dimensional  signals and introductory image
0 notes