当前位置:网站首页>[signal denoising] signal denoising based on Kalman filter with matlab code
[signal denoising] signal denoising based on Kalman filter with matlab code
2022-07-28 02:45:00 【matlab_ dingdang】
1 Content introduction
1.1 Background and significance of Kalman filter theory
Signal is the carrier of information . Generally, it can be divided into two categories , They are deterministic signal and random signal . obey A signal of a fixed function relationship , It's a deterministic signal , Its changes follow certain rules , have Determined spectral characteristics , For example, sine and cosine signals 、 Step signal 、 Rectangular pulse signal with fixed pulse width . if The value of the signal at each time is a random variable , It is called random signal , It cannot be expressed as a definite Time function or space function . This signal even under the same initial and environmental conditions , Every letter The implementation result of No. is also different , For example, waves 、 Gyro drift 、 Navigation error of inertial navigation system 、 The global positioning system (Global Position System, GPS) Choice availability (Selective Availability, SA) error etc. , Although random signals have no definite spectral characteristics , But in practice , You can use its statistical characteristics To calculate , That is, the random signal has a certain power spectrum [1]1-5. In the process of signal acquisition and transmission , It will inevitably be disturbed by the surrounding environment and internal noise , So I We need to process the signal correctly , Eliminate the influence of interference , Try to get the signal you need , This is It is necessary to filter the received signal . wave filtering , It is the process of extracting signals from noisy observation data . according to The characteristics of signals are different , The filtering methods used are also different . For deterministic signals , Because of its special spectrum Sex is certain , According to the different distribution of each signal in the frequency band , Set the... Corresponding to its frequency characteristic filter , Such as high pass filter 、 Bandpass filter 、 Low pass filter and band stop filter , Make what you need useful The signal passes through without attenuation , And suppress interference signals . This kind of filter can be realized by hardware , That is, we Commonly referred to as analog filter , It can also be realized by software , Digital filter . For deterministic signals The filtering we usually call it conventional filtering . Although the spectral characteristics of random signals are uncertain , But its power spectrum characteristics are certain , The design of filter can be based on According to the power spectrum of the required useful signal and interference signal . American scholar Wiener (N.Wiener) And so forth Wiener wave filtering , The filter is designed by decomposing the power spectrum , Similar to conventional filtering, it is necessary to suppress the signal Control and gating [2,3]. The signal is processed in the frequency domain Wiener Filter design , Ask for Wiener - Hope side cheng , It takes a lot of calculation , And it also needs a lot of storage space , To some extent, it hinders Wiener Filtered extensive use . 1960 Kalman (R.E.Kalman) For discrete data, recursive method is used to solve its linear filtering Paper on wave problem [4]. In this article , Kalman filter is proposed (Kalman Filter), A new and gram I'm impressed Wiener Filtering disadvantages of filtering methods . Kalman introduced the concept of state space into random estimation theory , Consider the signal as the output of a linear system excited by white noise , This kind of input - The output relationship passes through the state party In the form of process , The filtering algorithm uses the system state equation in the estimation process 、 The observation equation 、 The statistical characteristics of system noise and observation noise , Because the signal information used is time domain , So not only can Estimate one-dimensional stationary random process , You can also estimate multidimensional 、 Nonstationary stochastic process . This overcomes the problem of In the frequency domain Wiener Various limitations encountered in filter design , The scope of application is relatively wide .Kalman The theoretical basis of filtering is the estimation problem . From the point of view of signal processing , It is estimated that the problem is as follows How to recover the signal or approximate the signal or deduce a set of parameter values from the observation polluted by noise . In Mathematics On , The estimation problem belongs to the category of statistics . In the estimation problem , Observation space is the only source of information , Only Observations can provide the information needed for estimation [5]17-24. The problem is that these observations contain errors . spread error 、 Equipment error 、 Calculation error and human error are the main sources of these errors [6]. Under evaluation In question , Error mainly refers to random error . therefore , The estimation problem can be summarized as : At a given observation z love

2 Simulation code
<span style="color:#333333"><span style="background-color:rgba(0, 0, 0, 0.03)"><code>addpath('./filters');</code><code>addpath('./IP_raytracing');</code><code>%% Simulate a trajectory , Then add Gaussian observation noise , As the track of observation position . Then use Kalman filter to get the filtered result .</code><code>% The speed is the average 0.6m Standard deviation 0.05 Gaussian distribution of </code><code>% The standard deviation of the observed noise is 2</code><code></code><code>%% Draw the actual real path </code><code>roomLength = 1000;</code><code>roomWidth = 1000;</code><code>t = 500;</code><code>trace_real = get_random_trace(roomLength, roomWidth, t);</code><code>figure; </code><code>subplot(1, 3, 1); plot(trace_real(:, 1), trace_real(:, 2), '.');</code><code>title(' The actual real path ');</code><code></code><code>%% Path with observation noise </code><code>noise = 2; %2m Position fluctuation noise </code><code>trace = trace_real + normrnd(0, noise, size(trace_real));</code><code>subplot(1, 3, 2); plot(trace(:, 1), trace(:, 2), '.');</code><code>title(' Path with noise ');</code><code>fprintf(' Positioning accuracy before Kalman filter :%f m\n', accuracy(trace, trace_real));</code><code></code><code>%% Kalman filter the noisy path </code><code>kf_params_record = zeros(size(trace, 1), 4);</code><code>for i = 1 : t</code><code> if i == 1</code><code> kf_params = kf_init(trace(i, 1), trace(i, 2), 0, 0); % initialization </code><code> <span style="color:#ca7d37">else</span></code><code> kf_params.z = trace(i, 1:2)'; % Set the observation position at the current time </code><code> kf_params = kf_update(kf_params); % Kalman filtering </code><code> end</code><code> kf_params_record(i, :) = kf_params.x';</code><code>end</code><code>kf_trace = kf_params_record(:, 1:2);</code><code>subplot(1, 3, 3); plot(kf_trace(:, 1), kf_trace(:, 2), '.');</code><code>title(' The effect of Kalman filter ');</code><code>fprintf(' Positioning accuracy after Kalman filter :%f m\n', accuracy(kf_trace, trace_real));</code><code></code></span></span>3 Running results

4 reference
[1] Hou Yapei . Research on EEG signal denoising method based on Kalman filter [D]. Yanshan University .
About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .
Some theories cite network literature , If there is infringement, contact the blogger to delete .
边栏推荐
猜你喜欢

Center-based 3D Object Detection and Tracking(基于中心的3D目标检测和跟踪 / CenterPoint)论文笔记

Representation of children and brothers of trees
![[software testing] - unittest framework for automated testing](/img/7a/29b222cb0b6a5953b98f8d797cd106.png)
[software testing] - unittest framework for automated testing
![[hcip] routing strategy, strategic routing](/img/3d/9389fb441cdd3591595ed2918d928b.png)
[hcip] routing strategy, strategic routing

【软件测试】—— 自动化测试之unittest框架

Special network technology virtual host PHP version setting
![[understanding of opportunity -53]: Yang Mou stands up and plots to defend himself](/img/93/2f61993770d93d9adc80a9fa89e71c.jpg)
[understanding of opportunity -53]: Yang Mou stands up and plots to defend himself

1313_pyserial的安装以及文档的生成

Deep Residual Learning for Image Recognition浅读与实现

Should programmers choose outsourcing companies
随机推荐
How to simply realize the function of menu dragging and sorting
Share an esp32 relay
In practical work, how do I use postman for interface testing?
First knowledge of C language -- structure, branch and loop statements
【英雄哥七月集训】第 26天:并查集
数字孪生农业丨智慧农业稻米加工厂从“看天吃饭”到“知天而作”
[software testing] - unittest framework for automated testing
MySQL explain (glory Collection Edition)
基于stm32的恒功率无线充电
【自我成长网站收集】
Newline required at end of file but not found.
[brother hero's July training] day 27: picture
mysql 如图所示,现有表a,表b,需求为 通过projectcode关联a、b表,查出address不同的 idcardnum。
1313_ Pyserial installation and document generation
【信号处理】基于高阶统计量特征的通信系统中微弱信号检测附matlab代码
unordered_map的hash function及hash bucket存储方式探索
POC simulation attack weapon - Introduction to nucleus (I)
[TA frost wolf \u may - hundred people plan] Figure 3.7 TP (d) r architecture of mobile terminal
[hcip] BGP Foundation
【HCIP】路由策略、策略路由