当前位置:网站首页>[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 .
边栏推荐
- [software testing] - unittest framework for automated testing
- 0动态规划中等 LeetCode873. 最长的斐波那契子序列的长度
- Maskedauutoencoders visual learner cvpr2022
- Use of Day6 functions and modules
- 2022.7.8 eth price analysis
- What is eplato cast by Plato farm on elephant swap?
- Share an esp32 relay
- One month's experience of joining Huawei OD
- 怎么简单实现菜单拖拽排序的功能
- A 64 bit 8-stage pipelined adder based on FPGA
猜你喜欢

分层图解决的一些最短路问题

retainface使用报错:ModuleNotFoundError: No module named 'rcnn.cython.bbox'

修改MySQL密码的四种方法(适合初学者)

JS event loop synchronous task, asynchronous task (micro task, macro task) problem analysis

Notes for the fourth time of first knowing C language

First knowledge of C language -- structure, branch and loop statements

Sqlserver problem solving: replication components are not installed on this server. Please run SQL Server Setup again and select the option to install replication components

Learn this trick and never be afraid to let the code collapse by mistake

Canvas 从入门到劝朋友放弃(图解版)

基于FPGA的64位8级流水线加法器
随机推荐
[solution] solve the problem of SSH connection being inactive for a long time and being stuck and disconnected
Necessary knowledge points of the original group
Cesium3Dtilesets 使用customShader的解读以及泛光效果示例
【 图像去雾】基于暗通道和非均值滤波实现图像去雾附matlab代码
Chapter 3 business function development (batch export of market activities, Apache POI)
1313_ Pyserial installation and document generation
IO流:节点流和处理流详细归纳。
Lombok prompts variable log error when using JUnit test in idea
TypeScript(零) —— 简介、环境搭建、第一个实例
Sqlserver problem solving: replication components are not installed on this server. Please run SQL Server Setup again and select the option to install replication components
Interpretation of cesium3dtilesets using customshader and examples of Omni effects
In practical work, how do I use postman for interface testing?
[understanding of opportunity -53]: Yang Mou stands up and plots to defend himself
Digital empowerment and innovation in the future: hese eredi appears at the 5th Digital China Construction Summit
Wechat campus bathroom reservation applet graduation design finished product (1) development outline
[leetcode] 13. linked list cycle · circular linked list
Special network technology virtual host PHP version setting
[TA frost wolf \u may hundred people plan] Figure 3.5 early-z and z-prepass
Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B
Sword finger offer special assault edition day 12