当前位置:网站首页>[signal denoising] signal denoising based on Kalman filter with matlab code
[signal denoising] signal denoising based on Kalman filter with matlab code
2022-07-27 23:27:00 【Matlab scientific research studio】
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 .
边栏推荐
- Introduction to the paper | language model for long text under transformer architecture
- 迪赛智慧数——其他图表(平行坐标图):家庭未来资产配置意愿
- 2022/6/9 exam summary
- 记录一下使用R语言中关于formatC的错误
- 360 was selected into the panorama of China's security industry, and isc2022 talked about the direction of security services in 63 fields
- Pentium fast system call learning
- Interviewer: I can't carry a backpack at all. Are you going by yourself or I'll give you a lift?
- 机器学习项目可视化展示方法
- Three consecutive high-frequency interview questions of redis online celebrity: cache penetration? Cache breakdown? Cache avalanche?
- Lanproxy映射本地开发环境
猜你喜欢

网络开发套接字以及UDP、TCP协议

Microsoft Office 2019 download installation activation tutorial (full process diagram)
![[GNN report] Tang Jian, Montreal, Canada: Geometric deep learning for drug discovery](/img/ef/aa490aeff5a0690257cd6eca7d5e28.png)
[GNN report] Tang Jian, Montreal, Canada: Geometric deep learning for drug discovery

Read an article to understand artificial neural network
![[C language] simulate and implement string functions (Part 1)](/img/13/afb015de3448e20a0b7b09c1aca4ad.png)
[C language] simulate and implement string functions (Part 1)

【GNN报告】加拿大蒙特利尔唐建:Geometric Deep Learning For Drug Discovery

Analysis of cloud native application security organization structure

Harmonyos third operation

Exercise --- BFS

Blender plug-in of 2022
随机推荐
iMeta | 国际标准刊号ISSN印刷版正式确认,双ISSN申请完成
Introduction to the paper | language model for long text under transformer architecture
Px4 module design part 13: workqueue design
360入选中国安全产业全景图63个领域 ISC2022共话安全服务方向
containerd ctr运行ansible容器执行ansible-playbook任务完整命令
寻找和利用 XXE – XML 外部实体注入
20 character short domain name bypass replication
Arm32进行远程调试
2022/6/9 exam summary
Cron expression
Cloud security daily 220714: Cisco identity service engine found an authentication bypass vulnerability and needs to be upgraded as soon as possible
[elm classification] classification of UCI data sets based on nuclear limit learning machine and limit learning machine, with matlab code
How to narrow the gap between project planning and implementation?
Excel only wants to visualize charts and make data move? Yes, come and watch (with a large number of templates to download)
Helm chart explanation and common commands: helm template / package / plugin
Node red series (30): use persistent UI table to refresh the page without emptying the last table data
NDK 系列(6):说一下注册 JNI 函数的方式和时机
Parameter transmission of components
Pro multi store version system, versatile is it!
Introduction to the paper | distributed graph simulation