How to extract low frequency component from a "Simulink" model signal using Wavelet Transform?
8 次查看(过去 30 天)
显示 更早的评论
So, I have a signal which is highly transient in nature. It is a Power Reference signal. I want to separate this transient signal into low frequency and high frequency components in a Simulink Model. And I need to do this using Wavelets. Can someone please help me in understanding how to implement this on Simulink? All the resources point towards Matlab functions only.
Here is the Signal which I am working on:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/829515/image.png)
And here is how I want to implement this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/829520/image.png)
PS: I haven't coded anything into this Matlab fcn block. Just putting it here to make sure you understand what I mean.
I am new to Wavelets and any help from you all will be appreciated! I am here to learn. Thanks in advance ^_^
4 个评论
Sharmin Kibria
2022-5-23
Hi Gokul,
There are two issues you are dealing with here.
- Unless specified otherwise, Simulink passes one sample at a time from one block to another. As the function block you are using expects a vector as input but getting one sample, it is erroring out. To ensure that your function block receives a vector, you need to use a buffer block. The buffer will hold multiple samples to form a vector that your can pass to the MATLAB function block.
- You can obtain the low and high frequency parts of a signal using transforms like lwt, modwt, etc in Wavelet toolbox. For instance, you can obtain the low and high frequency components of a signal using the following command in the function block.:
function [hi,Lo] = LWTFeatureGen(x)
[ca4,cd4]= lwt(yf,'Wavelet','db3','Level',1,"LiftingScheme",LS);
hi = lwtcoef(ca4,cd4,"Wavelet",'db3',"OutputType","projection",...
"Type","detail","Level",1);
Lo = lwtcoef(ca4,cd4,"Wavelet",'db3',"OutputType","projection",...
"Type","approximation","Level",1);
end
You can use other wavelet transform instead of lwt in the function block.
I hope this helps.
Thanks
Sharmin
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!