How to extract low frequency component from a "Simulink" model signal using Wavelet Transform?

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:
And here is how I want to implement this:
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 Comments

Hello Mathieu, thank you for the reference document. Actually, I had already seen the Dyadic Analysis Filter Bank, but I was confused about the input to this block. It is asking for a vector input, whereas my input is just a signal.
Could you please elaborate on how to format the input to this block? (how to make it a vector)
PS: Kindly excuse my lack of knowledge, I am learning WT recently. Any help would be appreciated.
Hi Gokul,
There are two issues you are dealing with here.
  1. 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.
  2. 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

Sign in to comment.

Answers (0)

Products

Release

R2020a

Asked:

on 10 Dec 2021

Commented:

on 5 Jun 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!