hilbert transform

Started by February 13, 2014
I try to get the Hilbert transformed for a chaotic signal in order to have two signals completely orthogonal -> Chotic signal and Hilbert Transform of chaotic signal

in MATLAB all goes well, I have a good hilbert transformed with the proper phase and all, basically it is the signal which I expected .

when I try to do it in simulink , I found on the net two methods to obtain hilbert transorm:
1 . Analytic Signal block and take the imaginary portion of the complex output .
2 . Remez FIR Filter Design block with the Hilbert Transform filter types .

Neither method does not satisfy me , and the signal obtained is wrong and not orthogonal with the original signal .
so I try to remedy this by incorporating a matlab function block to my diagram, I wrote the following code on this block:

function y = fcn (u )
y = zeros ( u);
coder.extrinsic (' hilbert ');
hilbert = y ( u ) ;

then u is of type double timeseries , I treat in this way the elements of a series one by one and I send it to the output witch is y, y is complex type where the imaginary part is the hilbert transform of the signal and the real part is the original signal . I obtain hilbert transform witch is NULL ... WHY does it work in matlab with the almost same code and it does not work when I integrate this code in my block diagram ... I thought it all time , help me if you like me .