Different wavelet decomposition output matlab and simulink
이전 댓글 표시
Hi,
I have built a code that used wavelet decomposition ('wavedec') with 3 levels and sym3 mother wavelet. When I tried to build a model in simulink using the DWT block with symlets, assymetric, and 3 levels selected, the outputs of the transformations are different.
Please help me figure out why this is or how can I make it the same.
Thank you.
댓글 수: 4
Prashant Arora
2017년 10월 18일
Hi Douglas,
Can you describe in more details how the transformations are different? If you can send me some code or data to reproduce, I will be happy to investigate this further.
Prashant
Douglas Pinto
2017년 10월 19일
Prashant Arora
2017년 10월 19일
Hi Douglas,
Thanks for your response. I have not seen such issue in general. One of the things which I have seen happening is Simulink interpolating between time steps because MATLAB defined times are "slightly" different than Simulink ones. For example:
Consider a Simulink model with Fixed-step 0.2 secs and duration 10 secs and a signal is defined in MATLAB with time as follows:
t = (0:0.2:10)'
This is different than Simulink generated time steps in terms of precision. Simulink defines the time steps as following:
tStart = 0;
tFinal = 10;
stepSize = 0.2;
numSamples = (tFinal-tStart)/stepSize;
t = stepSize*[0:numSamples]';
If I plot the difference between these two generated time steps, you will notice some difference.

Due to this, sometimes there are issues because Simulink will interpolate data when it won't hit the time step exactly.
If you can send me some sample data, I will be happy to investigate the reasons you were seeing a difference.
Douglas Pinto
2017년 10월 24일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Wavelet Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!